Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5863123rwr; Mon, 24 Apr 2023 10:00:25 -0700 (PDT) X-Google-Smtp-Source: AKy350a6vPPCaNKnC3VhUFzyesidSp1Nla3NWMb54MarHmL3q65kORQ3WGFt73DgAUUubKZcJlcm X-Received: by 2002:a17:90b:1957:b0:23f:b609:e707 with SMTP id nk23-20020a17090b195700b0023fb609e707mr13483181pjb.2.1682355624913; Mon, 24 Apr 2023 10:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682355624; cv=none; d=google.com; s=arc-20160816; b=vPQBSc4fySxNUnvDBt1xJRrmo9L7DlOfZV9eMG8+9b3+x/IBrkg0xQpwX238iLSisz qUaDp7eRDYVQCTQ3imr6dBms1aGzYMGGefGMEnflj1XUDyV3MDhNl96lrQY+w9/AKDt1 H/smyhvsx15GONNR7wiYuVxptSQJs36Qmvja8OTt7GbtKsxChxoKpUk+JXCX/4LAP0b2 7LJU2k046r0QPKYYwoD4SQBkZ0jAlnjT3PMAQZjjxaCOeqyoVxrKXUt9eY3TVYbyVSAP joq4WYBNH8AdioQvsy6q9TWJSpTNmguYSONKRLKBV6jeCAlWNM/on/2N/D0RKYcw6ta9 Tl3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=60A6TA5OT12AUEsOQ94ShpB6fxuv1uLpPZrwijcq6PE=; b=CHeiF/5N6HaFMccT7OA8yfdOusR8qFVTGIUDyO3xHV6u3oHCy/GtGmcq58/e8uL8Xk tcqxbDwWJDGznaUrOkMoVbORwuSIhuQZYwQpkAfwzG1lnwOVlZl4AAhjq/il/pOl69/9 PCT8/JTCFf27IxE4+tnPNWZoLfkqQT/9h2sEtVbdtR+Rz3JL3kpds14Ime6xwuRKCE1N a8uwcl20vPDiypvok3/4a8rcCfT0qFuFjvzt4VXLsNOQdanuFK/+o2TUbjJXm5Y7hXKH LNk3oW1cgjd2M843P3C7NprPFwwAdBJaUEU7jPU6mDnN9jrkigg8h2+N7+9YOt8GyArt GthQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=my7xhwSk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot5-20020a17090b3b4500b0022387a1f9a5si12666408pjb.134.2023.04.24.10.00.10; Mon, 24 Apr 2023 10:00:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=my7xhwSk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232278AbjDXQ6F (ORCPT + 99 others); Mon, 24 Apr 2023 12:58:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232245AbjDXQ57 (ORCPT ); Mon, 24 Apr 2023 12:57:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A741AA26B; Mon, 24 Apr 2023 09:57:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6FF876272F; Mon, 24 Apr 2023 16:57:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BD3AC4339C; Mon, 24 Apr 2023 16:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682355468; bh=r/rF9eDTXhHmlrkb2lsJlgyLhYQxh0Hseo352Wqu2+Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=my7xhwSkW6ZiIiIYMlrS49valDwR9XPU+7UEgHKhK/8yi+F/VZFrxbvy0m21Rc7sm UzcBnn2OUdXmfJ4H99y3qn4ZID7nbaIaGnjKLJ9PYECIMhsY2BSs9KbddcvGh5JxMC GHAyrpXVnRYUoSY0seRh/wCOra6PWFocfbMPEAw/SnQUWgCCWnUJRwyiZ5AinvrnIG xmzxf2LP13OI8ygnrZxWcnlnVz+dM9tzTPtHU7GnLy9+mDa5T4LYlOeFTG6Dh/Q+tZ 4Xq00RobvlP/RvKmVbo0rzqajnwNDc8cZxE4VUrVylliUVqdlxfrlroT37OZ2BRHuz Gp6YqaR2V4y6w== From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel , Evgeniy Baskov , Borislav Petkov , Andy Lutomirski , Dave Hansen , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Alexey Khoroshilov , Peter Jones , Gerd Hoffmann , Dave Young , Mario Limonciello , Kees Cook , Tom Lendacky , "Kirill A . Shutemov" , Linus Torvalds Subject: [PATCH 3/6] x86: efistub: Obtain ACPI RSDP address while running in the stub Date: Mon, 24 Apr 2023 18:57:23 +0200 Message-Id: <20230424165726.2245548-4-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424165726.2245548-1-ardb@kernel.org> References: <20230424165726.2245548-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1119; i=ardb@kernel.org; h=from:subject; bh=r/rF9eDTXhHmlrkb2lsJlgyLhYQxh0Hseo352Wqu2+Y=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JIcVty8dvM+dItfbu4b80N7Sy/OvTQLfZIn/5XKZK+fhsE I4Pj4/pKGVhEONgkBVTZBGY/ffdztMTpWqdZ8nCzGFlAhnCwMUpABOZ3sfwv0DDddqvaRv+T7Rn XfjU2OCBZjDH2ZjnU9k+VFuctRSPVGP4p2tvZvfwamN53fRvFcl9th9lt1meX1z6okS+zzSTn/k LEwA= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org One of the actions performed by the decompressor is populating the RSDP address field in the boot_params struct, and when doing EFI boot, EFI configuration tables are the preferred source for this information. In preparation for removing the decompressor code from the EFI stub boot path, set this field from the EFI stub code. Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/x86-stub.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c index a0bfd31358ba97b1..e136c94037dda8d3 100644 --- a/drivers/firmware/efi/libstub/x86-stub.c +++ b/drivers/firmware/efi/libstub/x86-stub.c @@ -787,6 +787,11 @@ asmlinkage unsigned long efi_main(efi_handle_t handle, efi_dxe_table = NULL; } + if (!boot_params->acpi_rsdp_addr) + boot_params->acpi_rsdp_addr = (unsigned long) + (get_efi_config_table(ACPI_20_TABLE_GUID) ?: + get_efi_config_table(ACPI_TABLE_GUID)); + /* * If the kernel isn't already loaded at a suitable address, * relocate it. -- 2.39.2