From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web11.17981.1583169687001253406 for ; Mon, 02 Mar 2020 09:21:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=XMmmt9q4; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.66, mailfrom: pete@akeo.ie) Received: by mail-wr1-f66.google.com with SMTP id y17so733681wrn.6 for ; Mon, 02 Mar 2020 09:21:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lHiO6jWxV3uPvEgRRZc6YUdAqgiHElyCuUTjKzS131Y=; b=XMmmt9q4DL9ijaEQWvBrjS+0nCPZZAgqHbi5IKCGug8q5GkoafYJcPdEvsQ4lTGShI MjPNLsZpdi84jM3wI6gZbvHqlqzPYSk94VcICQoWCziMVEdz3dbPjAIZyDKiWeBCO2Qf e6apNlXwgAbrdZRoRQ0DCipPfCc2NmLa+aZcVohZg5S+YyiFGcY3EkHAFjYnxdKAuZqA D0qquwnDK45y1/RGVY5r7FJEVjaX+xz+YHNt9YGOMPFbxR6XY4tZIFAq5Z/VOZTKzmBr zZL5kfW9zKO32GnX7bgqVtlTY5QAjN6KuzzK7UZxDDhNbMCxjDfrsB3fIOfiIeA2CIcp AMcg== 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:mime-version :content-transfer-encoding; bh=lHiO6jWxV3uPvEgRRZc6YUdAqgiHElyCuUTjKzS131Y=; b=XWV2jWwqtglmGUYzpxUtP9RaYJki+1Ih4WJJC2dMug4fXRlyYAArY41KkiUms6XRjt dLDmKzmRUogdIlzYDBEZXV3D594fAgSlD1w25aDxKcgL6Tr7QiDKVEsCeULhhcBl9yt5 OuGfYH9RIRvUHIPC6FG2MrUy/UsN8n+9V9Il2gnfz5XsrZ5YPam7SkOa85mXwFpSayzJ Ss19Nh0KX/0wTv3Iko14CSXzfwsLGwYrtiUW5nYVd2kuXrCvuPHAxPqWbEP3FUvJi51m exKtuxFuAJpUpLrZP+ldmD2Tbc6UJUYh+AfXI5Oq94iTqLnV+1gFS/CklzWhaNw6EPx6 q2yw== X-Gm-Message-State: ANhLgQ1+aKAEmg0XJhCpCzZPs2pg6OIxWfpqVkkDECsvGRDt0ssWo3zF F5fWxkkp28P4BJrJYRXNgSJ/d0CbIkw= X-Google-Smtp-Source: ADFU+vsKueNKN8OFPYbjIf7uW0WX30bnJiRuvQOyD9YrUdBPmoMlhnaPn59T8+l21VzA3i65ocdshg== X-Received: by 2002:a5d:56c4:: with SMTP id m4mr632029wrw.6.1583169685143; Mon, 02 Mar 2020 09:21:25 -0800 (PST) Return-Path: Received: from localhost.localdomain ([84.203.56.244]) by smtp.gmail.com with ESMTPSA id v131sm93001wme.23.2020.03.02.09.21.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Mar 2020 09:21:24 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com, awarkentin@vmware.com Subject: [edk2-devel][PATCH 1/1] Platform/RPi: Move away from AcpiPlatformDxe for loading ACPI tables Date: Mon, 2 Mar 2020 17:21:13 +0000 Message-Id: <20200302172113.6260-1-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Andrei Warkentin Instead use ConfigDxe. This will allow selective loading/patching to enable different SBBR/EBBR profiles. Signed-off-by: Pete Batard --- Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 10 ++++++++++ Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf | 2 ++ Platform/RaspberryPi/RPi3/RPi3.dsc | 2 +- Platform/RaspberryPi/RPi3/RPi3.fdf | 1 - Platform/RaspberryPi/RPi4/RPi4.dsc | 2 +- Platform/RaspberryPi/RPi4/RPi4.fdf | 1 - 6 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c index f92ac709a3d8..5c86b6dd12b1 100644 --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -26,6 +27,12 @@ extern UINT8 ConfigDxeStrings[]; STATIC RASPBERRY_PI_FIRMWARE_PROTOCOL *mFwProtocol; +/* + * The GUID inside Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.inf and + * Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.inf _must_ match below. + */ +STATIC CONST EFI_GUID mAcpiTableFile = { 0x7E374E25, 0x8E01, 0x4FEE, { 0x87, 0xf2, 0x39, 0x0C, 0x23, 0xC6, 0x06, 0xCD } }; + typedef struct { VENDOR_DEVICE_PATH VendorDevicePath; EFI_DEVICE_PATH_PROTOCOL End; @@ -408,5 +415,8 @@ ConfigInitialize ( DEBUG ((DEBUG_ERROR, "Couldn't install ConfigDxe configuration pages: %r\n", Status)); } + Status = LocateAndInstallAcpiFromFv (&mAcpiTableFile); + ASSERT_EFI_ERROR (Status); + return EFI_SUCCESS; } diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf index 817cb98c1933..dc726cc6d934 100644 --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf @@ -35,6 +35,7 @@ [Packages] MdeModulePkg/MdeModulePkg.dec Silicon/Broadcom/Bcm283x/Bcm283x.dec Platform/RaspberryPi/RaspberryPi.dec + EmbeddedPkg/EmbeddedPkg.dec [LibraryClasses] BaseLib @@ -46,6 +47,7 @@ [LibraryClasses] UefiDriverEntryPoint HiiLib GpioLib + AcpiLib [Guids] gConfigDxeFormSetGuid diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3/RPi3.dsc index 304bc3dfeadf..df5b246af1f8 100644 --- a/Platform/RaspberryPi/RPi3/RPi3.dsc +++ b/Platform/RaspberryPi/RPi3/RPi3.dsc @@ -346,6 +346,7 @@ [LibraryClasses.common] PlatformBootManagerLib|Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf + AcpiLib|EmbeddedPkg/Library/AcpiLib/AcpiLib.inf [LibraryClasses.common.UEFI_DRIVER] UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf @@ -548,7 +549,6 @@ [Components.common] # ACPI Support # MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf - MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf Platform/RaspberryPi/AcpiTables/AcpiTables.inf diff --git a/Platform/RaspberryPi/RPi3/RPi3.fdf b/Platform/RaspberryPi/RPi3/RPi3.fdf index ec3742c83729..66c2cbada59b 100644 --- a/Platform/RaspberryPi/RPi3/RPi3.fdf +++ b/Platform/RaspberryPi/RPi3/RPi3.fdf @@ -240,7 +240,6 @@ [FV.FvMain] # ACPI Support # INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf - INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf INF RuleOverride = ACPITABLE Platform/RaspberryPi/AcpiTables/AcpiTables.inf diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4/RPi4.dsc index c039f6df2eb4..94e0d91ede2f 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.dsc +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc @@ -355,6 +355,7 @@ [LibraryClasses.common] PlatformBootManagerLib|Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf + AcpiLib|EmbeddedPkg/Library/AcpiLib/AcpiLib.inf [LibraryClasses.common.UEFI_DRIVER] UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf @@ -574,7 +575,6 @@ [Components.common] # ACPI Support # MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf - MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf Platform/RaspberryPi/AcpiTables/AcpiTables.inf diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4/RPi4.fdf index b2a6ac9e6c66..ee57cc0dac89 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.fdf +++ b/Platform/RaspberryPi/RPi4/RPi4.fdf @@ -236,7 +236,6 @@ [FV.FvMain] # ACPI Support # INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf - INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf INF RuleOverride = ACPITABLE Platform/RaspberryPi/AcpiTables/AcpiTables.inf -- 2.21.0.windows.1