Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5584127img; Wed, 27 Mar 2019 11:09:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwR9pttHkL05Hzq0pExrWyz+bzX+bTU7oKRp2X8kHYLEhhH2iVGidz2MyzC+uIuSfZuJB4b X-Received: by 2002:a17:902:b210:: with SMTP id t16mr15015970plr.84.1553710143345; Wed, 27 Mar 2019 11:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553710143; cv=none; d=google.com; s=arc-20160816; b=eppSg3XX61wNhfiNjkxeSqg+SGis+Mr2qu6cPd4neMzoBx0hGnRY9UfB2loqrzxrde fVqYJsYD5xQfWs3vpiQlP4gAgGlcMFDapwPvO0tKTP9CVr4gBdEkh0GpaAR41He+BjFo TfuwEgmRabxuT10ibXzI6ns4J6/MwvnT6rkaaUUZhNMuS3MnaVleiaIcplthdCNvI2WL VcXoqDvZaK7tPJiOjW85Hit1AqEFRp3RXUpLkIiNwdkGgAlJD9GcGFOB1q68IKKJYew2 sDvAfHkPrC3Pj7AZyYExqTSy/EMDiPjx7niOVQG369a9BiK+qkDDESPJPVh8GiNGvjyI e9rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xsfMMXcbBEs80RY2KyxiCJrxkT/hlJhrzfnByfGq6go=; b=ZP367Vo/cWdcKJALBPZupTlWXnj+3OKPuaRgeQPg7BuLe+V61XShb5k0r96FVwBO49 rp8kQtcV8FXaLisyPWCkN40aQBfFyAKg8DYrX6wABfJGYNDiyxdHVZQ9Upi8nWfU6KKI CmdS46S3NimuJB7f9JLLnaPmgmF9FBY8Cd/nyRUuf6Fbqr1/EXmyXg15YJUt/twbRfhX eJIV52f69LyAmhCrDgT+Vil4PH+wD/LzvI+wGoGUY5Hi23C/LDgmEgGxAvvcJCKXHthN sfXCUI5QqyWL0IiDnP+EVt48pXBr97pjeMFN0k626GgEHq1zW79//tfFxsL32XJilRI7 Z9Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ELCdGPD9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32si19687111plb.278.2019.03.27.11.08.47; Wed, 27 Mar 2019 11:09:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ELCdGPD9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387718AbfC0SHe (ORCPT + 99 others); Wed, 27 Mar 2019 14:07:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:49332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388195AbfC0SHa (ORCPT ); Wed, 27 Mar 2019 14:07:30 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EB09B2063F; Wed, 27 Mar 2019 18:07:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710048; bh=5AyJgHfpn1Z9lzjKd638j5q9HxUdRuqTInU71GTx38o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ELCdGPD9JyhtDVUlE8BwBOEUHxT16b2XgrD9kANl6aI9EsR7OG+L+2eg7eE8oadvl BIgjKtB/UP35V0igH71KWSDdRalkQ/EZF0juhdbn3ETrDOwuKoiYwlvbc/bFdsFq/p KprmJZm2e+dpkkEc0cysjvQRwBhTAFNWZlrZZe4A= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kairui Song , Borislav Petkov , AKASHI Takahiro , Andrew Morton , Baoquan He , Chao Fan , Dave Young , David Howells , "H. Peter Anvin" , Ingo Molnar , kexec@lists.infradead.org, Philipp Rudo , Thomas Gleixner , x86-ml , Yannik Sembritzki , Sasha Levin Subject: [PATCH AUTOSEL 5.0 173/262] x86/kexec: Fill in acpi_rsdp_addr from the first kernel Date: Wed, 27 Mar 2019 14:00:28 -0400 Message-Id: <20190327180158.10245-173-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kairui Song [ Upstream commit ccec81e4251f5a5421e02874e394338a897056ca ] When efi=noruntime or efi=oldmap is used on the kernel command line, EFI services won't be available in the second kernel, therefore the second kernel will not be able to get the ACPI RSDP address from firmware by calling EFI services and so it won't boot. Commit e6e094e053af ("x86/acpi, x86/boot: Take RSDP address from boot params if available") added an acpi_rsdp_addr field to boot_params which stores the RSDP address for other kernel users. Recently, after 3a63f70bf4c3 ("x86/boot: Early parse RSDP and save it in boot_params") the acpi_rsdp_addr will always be filled with a valid RSDP address. So fill in that value into the second kernel's boot_params thus ensuring that the second kernel receives the RSDP value from the first kernel. [ bp: massage commit message. ] Signed-off-by: Kairui Song Signed-off-by: Borislav Petkov Cc: AKASHI Takahiro Cc: Andrew Morton Cc: Baoquan He Cc: Chao Fan Cc: Dave Young Cc: David Howells Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: kexec@lists.infradead.org Cc: Philipp Rudo Cc: Thomas Gleixner Cc: x86-ml Cc: Yannik Sembritzki Link: https://lkml.kernel.org/r/20190204173852.4863-1-kasong@redhat.com Signed-off-by: Sasha Levin --- arch/x86/kernel/kexec-bzimage64.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c index 53917a3ebf94..1f3b77367948 100644 --- a/arch/x86/kernel/kexec-bzimage64.c +++ b/arch/x86/kernel/kexec-bzimage64.c @@ -218,6 +218,9 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params, params->screen_info.ext_mem_k = 0; params->alt_mem_k = 0; + /* Always fill in RSDP: it is either 0 or a valid value */ + params->acpi_rsdp_addr = boot_params.acpi_rsdp_addr; + /* Default APM info */ memset(¶ms->apm_bios_info, 0, sizeof(params->apm_bios_info)); @@ -256,7 +259,6 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params, setup_efi_state(params, params_load_addr, efi_map_offset, efi_map_sz, efi_setup_data_offset); #endif - /* Setup EDD info */ memcpy(params->eddbuf, boot_params.eddbuf, EDDMAXNR * sizeof(struct edd_info)); -- 2.19.1