From nobody Thu Apr 18 20:23:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1527518436631287.58608702476363; Mon, 28 May 2018 07:40:36 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 17D25203B9933; Mon, 28 May 2018 07:40:35 -0700 (PDT) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6010020977877 for ; Mon, 28 May 2018 07:40:33 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id m129-v6so32613772wmb.3 for ; Mon, 28 May 2018 07:40:33 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id y18-v6sm4177938wrl.53.2018.05.28.07.40.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 07:40:30 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::236; helo=mail-wm0-x236.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=p7ups/9ZdYsiMQSjbYeXAzS9Lyu9fSQlANLgL0VADt8=; b=VGD3LGnS291x6TPafxiBk5JgiYblTP6I6sg/tjSBm/i7fcNlPmpcANrGhdGnVMVARp xzwuy2/LzaViALSeD2SOM+3sL9ttuA23MyO8k+5c/CYZU3EWHYh9Df2ZKMHgqHSEyfvr S3tFvmZytvcRYry8h/nhcFgxrFB3Y6FWzdyi0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=p7ups/9ZdYsiMQSjbYeXAzS9Lyu9fSQlANLgL0VADt8=; b=tCmlRBqoIfaaFQ03BgoLurUqFy8E8ydF2H4BDwuIiQ4GhJrK1nwF9tVDsq84EBxIJo IIM8KgQ24sSuYvojOJ1L3uxNGo0GSF7pfRVY2XWwVIJqO3kuaDV5OWgpocryF9PJPd98 GRuUPGIstrzeJ1wqz31rx64nI/tDiOQbCy+u8mf0NPGQcISAwR1gJs2P4XJJgVCu7a5a sATe3D5PBMSN6TwS+cdHRjcyjwepLymXHMpBIKHUI7abNqxL3nzucl65j7sBnb15sNvF xTiyygcPdNRt7LhD7QU7Ow094M6LpB3biCSy6dNeykR/it1PpazQbl7zOPqaoloilady jBsw== X-Gm-Message-State: ALKqPwcUUqa9QfxtTbSlbdIesnoENjQ0ITgnyS2O0+k5wCsNU7nSsMlj hUqA7Kf2kHtakU0HPBYInvg/AffZqy0= X-Google-Smtp-Source: AB8JxZpHnoZIJJXFGgADni9YoR0Pk1dblFYjdWTRY4qRdyuT4aXArCz/XMRi1cqV4xihloloO1/YYQ== X-Received: by 2002:a1c:ca:: with SMTP id 193-v6mr7909058wma.99.1527518431344; Mon, 28 May 2018 07:40:31 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 28 May 2018 16:40:20 +0200 Message-Id: <20180528144024.10809-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528144024.10809-1-ard.biesheuvel@linaro.org> References: <20180528144024.10809-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 1/5] OvmfPkg/PlatformBootManagerLib: add missing report status code call X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Consumers of status code reports may rely on a status code to be reported when the ReadyToBoot event is signalled. For instance, FirmwarePerformanceDxe will fail to install the FPDT ACPI table in this case. So add the missing call. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 + OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.= inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 4b72c44bcf0a..d355d0440efd 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -56,6 +56,7 @@ [LibraryClasses] QemuFwCfgS3Lib LoadLinuxLib QemuBootOrderLib + ReportStatusCodeLib UefiLib Tcg2PhysicalPresenceLib =20 diff --git a/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c b/OvmfPkg/= Library/PlatformBootManagerLib/QemuKernel.c index ef728dfdeb60..f20df9533fda 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include =20 @@ -149,6 +150,9 @@ TryRunningQemuKernel ( // EfiSignalEventReadyToBoot(); =20 + REPORT_STATUS_CODE (EFI_PROGRESS_CODE, + (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT)); + Status =3D LoadLinux (KernelBuf, SetupBuf); =20 FreeAndReturn: --=20 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Thu Apr 18 20:23:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1527518439431723.30483777972; Mon, 28 May 2018 07:40:39 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 479D1203B9918; Mon, 28 May 2018 07:40:36 -0700 (PDT) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 92D322083797D for ; Mon, 28 May 2018 07:40:34 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id l1-v6so32744590wmb.2 for ; Mon, 28 May 2018 07:40:34 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id y18-v6sm4177938wrl.53.2018.05.28.07.40.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 07:40:32 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::22c; helo=mail-wm0-x22c.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LtaOyF5EP/jWZpzn3YTKYoEiPlyVmdLg+3R5UYQFlvY=; b=aBmRk6n56g80dHgb+gYy5c+VUSzfAZwOjLdC2mXsCZZJbXjJbvfQQ6vbBcMTO9rTLw nVBIdrZWuMc9mBCOi5iuF8wdQM8OBxNZ5udf/CiPBB5xHJKNSbnIQQFft7mYcGnbkDSB iS+aUDvVOVG93gYV1N24LkIdspKKoWax5Jgi0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LtaOyF5EP/jWZpzn3YTKYoEiPlyVmdLg+3R5UYQFlvY=; b=ukezqfoQNgk9hiQMkPmxfS44+ej2DetmW2cMOZ4Kp09Eirf/wgOvTixb14JgwUSw0g U5HnPOeadE0rwr44mtNiCfOF3HfVhSNmkO6CC0qt0uAYypo66jmLoOSQXwz1GCEnQ0h7 7nO6clcMaGz3dqNhBHokc6VmpzGTWVP8+BFlAXt1cZUbBg4QSJgbvzcBigt+k2cFDc/+ Fg+rRWFWkBHSl1p4MpMiMJceBttloE6VVMBL/jmK++yInJmBL5nKb61wCBE2+EmIqK6e 5O5OJj/fyRV36CG+2GCxSLrSWjyiGUcOGc42CukMNWCKKQfIzRw5bJMV/AdBVwb6gEtd TGGw== X-Gm-Message-State: ALKqPwdWKgybyanDx8XDWZOQd2yeNsGzpZJR3AikMDIeb25QhBYqBvsl +njDgoYEQUI5ezrcRflfChJFCkD4NNM= X-Google-Smtp-Source: ADUXVKIqggoU0J+J29RGKB8Bkz/iRupE1deB14ehq9yQEUGfv4NRN2VKEhd/ENbx69SXe1P8nqsTkQ== X-Received: by 2002:a1c:d106:: with SMTP id i6-v6mr3999036wmg.1.1527518432902; Mon, 28 May 2018 07:40:32 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 28 May 2018 16:40:21 +0200 Message-Id: <20180528144024.10809-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528144024.10809-1-ard.biesheuvel@linaro.org> References: <20180528144024.10809-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 2/5] ArmVirtPkg/PlatformBootManagerLib: add missing report status code call X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Consumers of status code reports may rely on a status code to be reported when the ReadyToBoot event is signalled. For instance, FirmwarePerformanceDxe will fail to install the FPDT ACPI table in this case. So add the missing call. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 + ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c | 4 += +++ 2 files changed, 5 insertions(+) diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerL= ib.inf b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.i= nf index d6c1ef95dc44..0cbc82f5d27d 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -53,6 +53,7 @@ [LibraryClasses] PrintLib QemuBootOrderLib QemuFwCfgLib + ReportStatusCodeLib UefiBootManagerLib UefiBootServicesTableLib UefiLib diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c b/ArmVi= rtPkg/Library/PlatformBootManagerLib/QemuKernel.c index ac47d21e71c8..7b59f57eb19f 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1072,6 +1073,9 @@ TryRunningQemuKernel ( // EfiSignalEventReadyToBoot(); =20 + REPORT_STATUS_CODE (EFI_PROGRESS_CODE, + (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT)); + // // Start the image. // --=20 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Thu Apr 18 20:23:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1527518442308968.4737496058013; Mon, 28 May 2018 07:40:42 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 776342096DCEE; Mon, 28 May 2018 07:40:38 -0700 (PDT) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0FE8720348603 for ; Mon, 28 May 2018 07:40:36 -0700 (PDT) Received: by mail-wm0-x229.google.com with SMTP id 18-v6so27177241wml.2 for ; Mon, 28 May 2018 07:40:35 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id y18-v6sm4177938wrl.53.2018.05.28.07.40.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 07:40:33 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::229; helo=mail-wm0-x229.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=u6zCqFp2IaaQxo92GOnrrGKK5FBwiSrmNNmvxZqOObs=; b=AhUs3h4+pKPZqzwXhEgwPjrExAsJoqdTvyowA2u7EwtNMA0tDkSYmWJ/mHd3IkFoS/ YGoXESOx+zT9OKK3+zYj6utSuRB011IJTvfqBJwpwMc0mD8QGKTtYZoaV8SqnihXXdgW u2bl7Evi6A5FJ/WZ+PV403eEPUuGfgSN1n1L0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=u6zCqFp2IaaQxo92GOnrrGKK5FBwiSrmNNmvxZqOObs=; b=BNtfH13hVNs1BdrPguBiWf1b0W/kbqrsYRR8krL87M9w/esjT9Vgnsw3wtbRcNKQG0 pdJm9rctA02by2JGe0qjoMbb4BSqAEsJoUKk8UbT7C7CypDSQ6aigLYaOHd7muM2niIw zOcg+FhZddjdnnzVYzGtHGgQE1wGNSctV2ZbwS5CWJ3Mt09ngDgux+M9gRHPOXWTuoGh xR1zzA154y9+cyzVUGRKyNr6q1xxM/xkq/ZKcWdafaxtWQp9e9KHHVVPalN8D++RVKan oEuTeTKoFapSxnw+IMzG1ESFo/Cr0svwWmC0Jqy/AdC7yvh7dygotFqHVhRKdSkVgRMB NNJg== X-Gm-Message-State: ALKqPwe0ZtvE/xBN+Hsoj5aMJ65KsqvMgvAWuwnVHFA/Wouj7k4QgqOF QlWiEyLeYyv4ap0pPQeUJ8+5CC3B/lY= X-Google-Smtp-Source: ADUXVKKW6Ij0p3dfwOkhmcd2lY+O6IhRFKMEEt667vZ+ERYWqM6Zv53k2TFkHKRbo1j2bsUnlBy2hg== X-Received: by 2002:a1c:6dd3:: with SMTP id b80-v6mr7968979wmi.32.1527518434317; Mon, 28 May 2018 07:40:34 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 28 May 2018 16:40:22 +0200 Message-Id: <20180528144024.10809-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528144024.10809-1-ard.biesheuvel@linaro.org> References: <20180528144024.10809-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 3/5] MdePkg/DxeServicesLib: introduce AllocatePeiAccessiblePages routine X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a routine to DxeServicesLib that abstracts the allocation of memory that should be accessible by PEI after a warm reboot. We will use it to replace open coded implementations that limit the address to < 4 GB, which may not be possible on non-Intel systems that have no 32-bit addressable memory at all. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek Reviewed-by: Liming Gao --- MdePkg/Include/Library/DxeServicesLib.h | 23 ++++++- MdePkg/Library/DxeServicesLib/Allocate.c | 54 +++++++++++++++ MdePkg/Library/DxeServicesLib/DxeServicesLib.inf | 11 +++- MdePkg/Library/DxeServicesLib/X64/Allocate.c | 69 ++++++++++++++++++++ 4 files changed, 155 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Library/DxeServicesLib.h b/MdePkg/Include/Libra= ry/DxeServicesLib.h index 7c1c62236d96..20aee68af558 100644 --- a/MdePkg/Include/Library/DxeServicesLib.h +++ b/MdePkg/Include/Library/DxeServicesLib.h @@ -305,5 +305,26 @@ GetFileDevicePathFromAnyFv ( OUT EFI_DEVICE_PATH_PROTOCOL **FvFileDevicePath ); =20 -#endif +/** + Allocates one or more 4KB pages of a given type from a memory region tha= t is + accessible to PEI. + + Allocates the number of 4KB pages of type 'MemoryType' and returns a + pointer to the allocated buffer. The buffer returned is aligned on a 4KB + boundary. If Pages is 0, then NULL is returned. If there is not enough + memory remaining to satisfy the request, then NULL is returned. =20 + @param[in] MemoryType The memory type to allocate + @param[in] Pages The number of 4 KB pages to allocate. + + @return A pointer to the allocated buffer or NULL if allocation fails. + +**/ +VOID * +EFIAPI +AllocatePeiAccessiblePages ( + IN EFI_MEMORY_TYPE MemoryType, + IN UINTN Pages + ); + +#endif diff --git a/MdePkg/Library/DxeServicesLib/Allocate.c b/MdePkg/Library/DxeS= ervicesLib/Allocate.c new file mode 100644 index 000000000000..4d118f766d49 --- /dev/null +++ b/MdePkg/Library/DxeServicesLib/Allocate.c @@ -0,0 +1,54 @@ +/** @file + DxeServicesLib memory allocation routines + + Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+ + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include +#include +#include + +/** + Allocates one or more 4KB pages of a given type from a memory region tha= t is + accessible to PEI. + + Allocates the number of 4KB pages of type 'MemoryType' and returns a + pointer to the allocated buffer. The buffer returned is aligned on a 4KB + boundary. If Pages is 0, then NULL is returned. If there is not enough + memory remaining to satisfy the request, then NULL is returned. + + @param[in] MemoryType The memory type to allocate + @param[in] Pages The number of 4 KB pages to allocate. + + @return A pointer to the allocated buffer or NULL if allocation fails. + +**/ +VOID * +EFIAPI +AllocatePeiAccessiblePages ( + IN EFI_MEMORY_TYPE MemoryType, + IN UINTN Pages + ) +{ + EFI_STATUS Status; + EFI_PHYSICAL_ADDRESS Memory; + + if (Pages =3D=3D 0) { + return NULL; + } + + Status =3D gBS->AllocatePages (AllocateAnyPages, MemoryType, Pages, &Mem= ory); + if (EFI_ERROR (Status)) { + return NULL; + } + return (VOID *)(UINTN)Memory; +} diff --git a/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf b/MdePkg/Libr= ary/DxeServicesLib/DxeServicesLib.inf index bd2faf2f6f2d..50ae24f8ee22 100644 --- a/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf +++ b/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf @@ -27,12 +27,18 @@ [Defines] LIBRARY_CLASS =3D DxeServicesLib|DXE_CORE DXE_DRIVER DX= E_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UE= FI_DRIVER =20 # -# VALID_ARCHITECTURES =3D IA32 X64 IPF EBC +# VALID_ARCHITECTURES =3D IA32 X64 IPF EBC ARM AARCH64 # =20 [Sources] DxeServicesLib.c =20 +[Sources.IA32, Sources.IPF, Sources.EBC, Sources.ARM, Sources.AARCH64] + Allocate.c + +[Sources.X64] + X64/Allocate.c + [Packages] MdePkg/MdePkg.dec =20 @@ -44,6 +50,9 @@ [LibraryClasses] UefiLib UefiBootServicesTableLib =20 +[LibraryClasses.X64] + HobLib + [Guids] gEfiFileInfoGuid ## SOMETIMES_CONSUMES ## U= NDEFINED =20 diff --git a/MdePkg/Library/DxeServicesLib/X64/Allocate.c b/MdePkg/Library/= DxeServicesLib/X64/Allocate.c new file mode 100644 index 000000000000..b6d34ba20881 --- /dev/null +++ b/MdePkg/Library/DxeServicesLib/X64/Allocate.c @@ -0,0 +1,69 @@ +/** @file + DxeServicesLib memory allocation routines + + Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+ + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include +#include +#include +#include + +/** + Allocates one or more 4KB pages of a given type from a memory region tha= t is + accessible to PEI. + + Allocates the number of 4KB pages of type 'MemoryType' and returns a + pointer to the allocated buffer. The buffer returned is aligned on a 4KB + boundary. If Pages is 0, then NULL is returned. If there is not enough + memory remaining to satisfy the request, then NULL is returned. + + @param[in] MemoryType The memory type to allocate + @param[in] Pages The number of 4 KB pages to allocate. + + @return A pointer to the allocated buffer or NULL if allocation fails. + +**/ +VOID * +EFIAPI +AllocatePeiAccessiblePages ( + IN EFI_MEMORY_TYPE MemoryType, + IN UINTN Pages + ) +{ + EFI_STATUS Status; + EFI_ALLOCATE_TYPE AllocType; + EFI_PHYSICAL_ADDRESS Memory; + EFI_HOB_HANDOFF_INFO_TABLE *PhitHob; + + if (Pages =3D=3D 0) { + return NULL; + } + + AllocType =3D AllocateAnyPages; + // + // A X64 build of DXE may be combined with a 32-bit build of PEI, and so= we + // need to check the memory limit set by PEI, and allocate below 4 GB if= the + // limit is set to 4 GB or lower. + // + PhitHob =3D (EFI_HOB_HANDOFF_INFO_TABLE *)GetHobList (); + if (PhitHob->EfiFreeMemoryTop <=3D MAX_UINT32) { + AllocType =3D AllocateMaxAddress; + Memory =3D MAX_UINT32; + } + + Status =3D gBS->AllocatePages (AllocType, MemoryType, Pages, &Memory); + if (EFI_ERROR (Status)) { + return NULL; + } + return (VOID *)(UINTN)Memory; +} --=20 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Thu Apr 18 20:23:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1527518445704656.3692230678655; Mon, 28 May 2018 07:40:45 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A83E020971743; Mon, 28 May 2018 07:40:38 -0700 (PDT) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 730592007E7EA for ; Mon, 28 May 2018 07:40:37 -0700 (PDT) Received: by mail-wm0-x243.google.com with SMTP id f6-v6so32744573wmc.4 for ; Mon, 28 May 2018 07:40:37 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id y18-v6sm4177938wrl.53.2018.05.28.07.40.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 07:40:35 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/JEKeo7S/737rZrZeZuXQkl9OAczJ86VGCjE1eeWUIA=; b=Up/RJK47oDFE/H6Qqai9BP4SuOp/6kurwIAnZDXVyApboCmn5MgHcXvTulqf/8p+Rh D2u5/QjWUVsYIcasVn9Lqfn0gF8pSfNgNwRUmKdZl14eSJDtjdBL/LWEJKWnV3PBGWAn ryUrzOioIL2NPUD5o0w6cyJt1fDiZzrIJapOM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/JEKeo7S/737rZrZeZuXQkl9OAczJ86VGCjE1eeWUIA=; b=SXYcvtPunWGVau4xrBBWwol/C92m6a9S0D2GnKcV6y2NwSZROBaow4tspCt7vj2dor UOE+h2Ws1ueGrGXwE29lKuj0hpkUcSG57C2X7W7JCgK1cNEyA39IUevtioIKpMkIjeYV ldWtaVgoU4Zt7RXRhU1jLHWIxmM11rujQFK3ed6MJ3dRj0BA6Biv8PcTezVGFkXQjBm2 qUfGgrGRNR9IiOMqmISVHy2WeNugHOw2XO3a6VQUT9Oc1X5a/gG4g5IB/5FW/uWBphpC ucPoade8JSZe/9MlqtYK3KV0+qtJNeYlWZaOjHVHJL1YwCrTQfzHpYQizpK8wpGNUOX8 bv9g== X-Gm-Message-State: ALKqPwfwBTxhVuQZZHtoVkoE1j0Etooz/BDll9r7NP5K0oi9ElaYssux LRm2JhTMfJeYLFe9Nea+qAANhVCYlnE= X-Google-Smtp-Source: ADUXVKJoCrvWYNcjGsMDOuO4lmTFp6ni2V1pNqbuWVcwC0W3d34f5EFTHocy8kxCcpXkK+LDC5rDrg== X-Received: by 2002:a1c:9c2:: with SMTP id 185-v6mr9033332wmj.53.1527518435737; Mon, 28 May 2018 07:40:35 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 28 May 2018 16:40:23 +0200 Message-Id: <20180528144024.10809-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528144024.10809-1-ard.biesheuvel@linaro.org> References: <20180528144024.10809-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 4/5] MdeModulePkg/DxeCorePerformanceLib: use AllocatePeiAccessiblePages X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Replace the call to and implementation of the function FpdtAllocateReservedMemoryBelow4G() with a call to AllocatePeiAccessiblePages, which boils down to the same on X64, but does not crash non-X64 systems that lack memory below 4 GB. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek Reviewed-by: Star Zeng --- MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c | 48 ++= +----------------- 1 file changed, 7 insertions(+), 41 deletions(-) diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceL= ib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c index 71d624fc9ce9..68b29ac5a9e2 100644 --- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c +++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c @@ -165,46 +165,6 @@ IsKnownID ( } } =20 -/** - Allocate EfiReservedMemoryType below 4G memory address. - - This function allocates EfiReservedMemoryType below 4G memory address. - - @param[in] Size Size of memory to allocate. - - @return Allocated address for output. - -**/ -VOID * -FpdtAllocateReservedMemoryBelow4G ( - IN UINTN Size - ) -{ - UINTN Pages; - EFI_PHYSICAL_ADDRESS Address; - EFI_STATUS Status; - VOID *Buffer; - - Buffer =3D NULL; - Pages =3D EFI_SIZE_TO_PAGES (Size); - Address =3D 0xffffffff; - - Status =3D gBS->AllocatePages ( - AllocateMaxAddress, - EfiReservedMemoryType, - Pages, - &Address - ); - ASSERT_EFI_ERROR (Status); - - if (!EFI_ERROR (Status)) { - Buffer =3D (VOID *) (UINTN) Address; - ZeroMem (Buffer, Size); - } - - return Buffer; -} - /** Allocate buffer for Boot Performance table. =20 @@ -348,7 +308,13 @@ AllocateBootPerformanceTable ( // // Fail to allocate at specified address, continue to allocate at any = address. // - mAcpiBootPerformanceTable =3D (BOOT_PERFORMANCE_TABLE *) FpdtAllocateR= eservedMemoryBelow4G (BootPerformanceDataSize); + mAcpiBootPerformanceTable =3D (BOOT_PERFORMANCE_TABLE *) AllocatePeiAc= cessiblePages ( + EfiReservedMe= moryType, + EFI_SIZE_TO_P= AGES (BootPerformanceDataSize) + ); + if (mAcpiBootPerformanceTable !=3D NULL) { + ZeroMem (mAcpiBootPerformanceTable, BootPerformanceDataSize); + } } DEBUG ((DEBUG_INFO, "DxeCorePerformanceLib: ACPI Boot Performance Table = address =3D 0x%x\n", mAcpiBootPerformanceTable)); =20 --=20 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Thu Apr 18 20:23:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1527518451270339.1282377259771; Mon, 28 May 2018 07:40:51 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EB26820348603; Mon, 28 May 2018 07:40:41 -0700 (PDT) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C285020977877 for ; Mon, 28 May 2018 07:40:38 -0700 (PDT) Received: by mail-wm0-x243.google.com with SMTP id f8-v6so32749703wmc.4 for ; Mon, 28 May 2018 07:40:38 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id y18-v6sm4177938wrl.53.2018.05.28.07.40.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 07:40:36 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2mfqJqNMucuBxDg42ENRB7P/wgjoANgMFzPCFg5NVWA=; b=UWNNWgtqHDt7SC7mjPnlsiVlbPw3qXBtCxG3eGcUncwjZUloUpK/J2JLMbcI4ba7FU oKwrBUCKwNhtU0H4hauSmB6P20vfa+z/BPlh5tOsIoArmSD79eMKRHbadbhMkBNDoQfe FxxltARrK3xjxb87dvUtumwHRhAsDLoQv53Jk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2mfqJqNMucuBxDg42ENRB7P/wgjoANgMFzPCFg5NVWA=; b=oqPcLZzhtcecwBtG5drzU166hcsT45tycLWz2GaMtvIqGgc2FVFRPBAsW/11c6LeMc 9tIaLMF/a+49Qelt4IH3Rz/IrL3cV+o95eYjQZenDcfqTc+P3GZCldaJTFOIz4PlV5y4 w7hs9k+Wn9lfDTTRKbjldIKA1Dt7z6l/rOSXIQzDyiC7E3BHT5ye5s01DH4JWKJnvJn5 w2TEyZhQlX0VCAMSo48G35FNa4dxxWvhG/3DKET/Roqo0InVWuz3T5Eg5gCU54ZvEAeN 1FqYfrY57XLIHSLWhfZwPrbxv19i88cAZH3wM2UVXDaYB4zwSjCDBd67t/ZTBTPWjM06 reXQ== X-Gm-Message-State: ALKqPwez8Q5npDYWPU1tT7SevpkJ8CDQVYTZ0InL8zv0Jkp0pZAzwxvq doCJtaaERn4ZpRoAIk1achdUVCNmzfw= X-Google-Smtp-Source: ADUXVKKtvH9Ch652GBgu962Tv7jsnCSYnYyn68JQe9HvPeC6Y0zDeFxYIq5E9NfMLPjiyyk8rIE1Zg== X-Received: by 2002:a1c:e906:: with SMTP id q6-v6mr8708808wmc.23.1527518437126; Mon, 28 May 2018 07:40:37 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 28 May 2018 16:40:24 +0200 Message-Id: <20180528144024.10809-6-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528144024.10809-1-ard.biesheuvel@linaro.org> References: <20180528144024.10809-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 5/5] MdeModulePkg/FirmwarePerformanceDataTableDxe: use AllocatePeiAccessiblePages X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Replace the call to and implementation of the function FpdtAllocateReservedMemoryBelow4G() with a call to AllocatePeiAccessiblePages, which boils down to the same on X64, but does not crash non-X64 systems that lack memory below 4 GB. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek Reviewed-by: Star Zeng --- MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerfor= manceDxe.c | 51 ++++---------------- MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerfor= manceDxe.inf | 1 + 2 files changed, 10 insertions(+), 42 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Fi= rmwarePerformanceDxe.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDat= aTableDxe/FirmwarePerformanceDxe.c index e719e9e482cb..ded817f37301 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwareP= erformanceDxe.c +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwareP= erformanceDxe.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -179,46 +180,6 @@ FpdtAcpiTableChecksum ( Buffer[ChecksumOffset] =3D CalculateCheckSum8 (Buffer, Size); } =20 -/** - Allocate EfiReservedMemoryType below 4G memory address. - - This function allocates EfiReservedMemoryType below 4G memory address. - - @param[in] Size Size of memory to allocate. - - @return Allocated address for output. - -**/ -VOID * -FpdtAllocateReservedMemoryBelow4G ( - IN UINTN Size - ) -{ - UINTN Pages; - EFI_PHYSICAL_ADDRESS Address; - EFI_STATUS Status; - VOID *Buffer; - - Buffer =3D NULL; - Pages =3D EFI_SIZE_TO_PAGES (Size); - Address =3D 0xffffffff; - - Status =3D gBS->AllocatePages ( - AllocateMaxAddress, - EfiReservedMemoryType, - Pages, - &Address - ); - ASSERT_EFI_ERROR (Status); - - if (!EFI_ERROR (Status)) { - Buffer =3D (VOID *) (UINTN) Address; - ZeroMem (Buffer, Size); - } - - return Buffer; -} - /** Callback function upon VariableArchProtocol and LockBoxProtocol to allocate S3 performance table memory and save the pointer to LockBox. @@ -287,7 +248,10 @@ FpdtAllocateS3PerformanceTableMemory ( // // Fail to allocate at specified address, continue to allocate at = any address. // - mAcpiS3PerformanceTable =3D (S3_PERFORMANCE_TABLE *) FpdtAllocateR= eservedMemoryBelow4G (sizeof (S3_PERFORMANCE_TABLE)); + mAcpiS3PerformanceTable =3D (S3_PERFORMANCE_TABLE *) AllocatePeiAc= cessiblePages ( + EfiReservedMe= moryType, + EFI_SIZE_TO_P= AGES (sizeof (S3_PERFORMANCE_TABLE)) + ); } DEBUG ((EFI_D_INFO, "FPDT: ACPI S3 Performance Table address =3D 0x%= x\n", mAcpiS3PerformanceTable)); if (mAcpiS3PerformanceTable !=3D NULL) { @@ -368,7 +332,10 @@ InstallFirmwarePerformanceDataTable ( // // Fail to allocate at specified address, continue to allocate at an= y address. // - mAcpiBootPerformanceTable =3D (BOOT_PERFORMANCE_TABLE *) FpdtAllocat= eReservedMemoryBelow4G (BootPerformanceDataSize); + mAcpiBootPerformanceTable =3D (BOOT_PERFORMANCE_TABLE *) AllocatePei= AccessiblePages ( + EfiReserved= MemoryType, + EFI_SIZE_TO= _PAGES (BootPerformanceDataSize) + ); } DEBUG ((DEBUG_INFO, "FPDT: ACPI Boot Performance Table address =3D 0x%= x\n", mAcpiBootPerformanceTable)); if (mAcpiBootPerformanceTable =3D=3D NULL) { diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Fi= rmwarePerformanceDxe.inf b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceD= ataTableDxe/FirmwarePerformanceDxe.inf index 8757bbd0aaa9..3d2dd6eb732f 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwareP= erformanceDxe.inf +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwareP= erformanceDxe.inf @@ -44,6 +44,7 @@ [LibraryClasses] UefiRuntimeServicesTableLib BaseLib DebugLib + DxeServicesLib TimerLib BaseMemoryLib MemoryAllocationLib --=20 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel