Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp719608ima; Wed, 6 Feb 2019 07:17:59 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibwt87l/c07He8T1S2oTrUS8eOTIZmhvqCbZaYIjKPxuCA+o9rQkTp+VdxXxV0N+lUs/oE2 X-Received: by 2002:a65:4c0f:: with SMTP id u15mr9628528pgq.225.1549466279202; Wed, 06 Feb 2019 07:17:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549466279; cv=none; d=google.com; s=arc-20160816; b=SW/HkoRAk0zFQKfDI0wxhCZtAMlABnDRSRT13o1kwF+A7Wu8RRrvn3kmFxTyJ6sq3S tnPU+PRKcEI8mYFKfsPPr17Tg0B4zXIQC5ra4DjZo4F4U1+oJM5n9uy2ykZ1nYur/Eso Zoaa52Mrg7UohNGvvaB5R1c5aQizK/OTPljMGIrSubmDg/wWM5USnEUrrThXRFoC4QvH 9DlGJEdhmsslGlGz1KKQ2oJxFwAhMKR5GynNo4d7QgOLenWzm8rn7LczEIipdWBCmIho eHU+U/LZM3LmE30ht43QhPQJxpIFLeKWjHRSJO/zxhc1mnviZ8Uc/YJct9qvbRJFtwph MlSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=JrzxXV/zkubB5rId5ZdUhLi2qdRQm/VZ7jsqqs1G7uI=; b=xMhjTIbyM/hHZujiPpeM1rwS6BUE27fKK/Cu1iMbETyc8Meyq7i7f84ms+BwdQCAdh t68DPLqow4ZCkzFBn4a0qBkeNqNJW+XJUcBD+A5I4Oo871KOSQm74wR+bhUJ7uUzbIOS PzE72T+75ZNdH58ZUhTyLdoXcAPt/vj5M+YG3L73ELpJwUVewWy1JEW3Ez+VuNASDXsw ux4Q0jR5KpMwLpj9NumfYrxDTLzKeP3ALkDYguDfztOmFzqpokHczxLQilDh8OlaDr/x ze62wATUimc8TsoqfwZDzILSsLspqAKMTIDHX1DfUCyyhT2pqqyYv8A/QUVkxTuOP1mi /fiw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si6195078pgd.567.2019.02.06.07.17.42; Wed, 06 Feb 2019 07:17:59 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730006AbfBFOhy (ORCPT + 99 others); Wed, 6 Feb 2019 09:37:54 -0500 Received: from terminus.zytor.com ([198.137.202.136]:39451 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726914AbfBFOhy (ORCPT ); Wed, 6 Feb 2019 09:37:54 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x16EbJgK1325273 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 6 Feb 2019 06:37:19 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x16EbGVH1325270; Wed, 6 Feb 2019 06:37:16 -0800 Date: Wed, 6 Feb 2019 06:37:16 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Kairui Song Message-ID: Cc: yannik@sembritzki.me, tglx@linutronix.de, dyoung@redhat.com, x86@kernel.org, bp@suse.de, prudo@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, takahiro.akashi@linaro.org, dhowells@redhat.com, fanc.fnst@cn.fujitsu.com, bhe@redhat.com, akpm@linux-foundation.org, mingo@kernel.org, hpa@zytor.com, mingo@redhat.com, kasong@redhat.com Reply-To: takahiro.akashi@linaro.org, dhowells@redhat.com, linux-kernel@vger.kernel.org, fanc.fnst@cn.fujitsu.com, hpa@zytor.com, mingo@kernel.org, kasong@redhat.com, mingo@redhat.com, bhe@redhat.com, akpm@linux-foundation.org, tglx@linutronix.de, yannik@sembritzki.me, bp@suse.de, prudo@linux.vnet.ibm.com, x86@kernel.org, dyoung@redhat.com In-Reply-To: <20190204173852.4863-1-kasong@redhat.com> References: <20190204173852.4863-1-kasong@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/boot] x86/kexec: Fill in acpi_rsdp_addr from the first kernel Git-Commit-ID: ccec81e4251f5a5421e02874e394338a897056ca X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ccec81e4251f5a5421e02874e394338a897056ca Gitweb: https://git.kernel.org/tip/ccec81e4251f5a5421e02874e394338a897056ca Author: Kairui Song AuthorDate: Tue, 5 Feb 2019 01:38:52 +0800 Committer: Borislav Petkov CommitDate: Wed, 6 Feb 2019 15:29:03 +0100 x86/kexec: Fill in acpi_rsdp_addr from the first kernel 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 --- 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 0d5efa34f359..2a0ff871025a 100644 --- a/arch/x86/kernel/kexec-bzimage64.c +++ b/arch/x86/kernel/kexec-bzimage64.c @@ -215,6 +215,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)); @@ -253,7 +256,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));