From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: michael.d.kinney@intel.com) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Sun, 30 Jun 2019 19:56:09 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:56:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480253" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:56:08 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-platforms Patch 13/14] Vlv2TbltDevicePkg: Change to PI Spec ACPI Table Protocol Date: Sun, 30 Jun 2019 19:55:52 -0700 Message-Id: <20190701025553.18596-14-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Remove use of ACPI Support Protocol from IntelFrameworkPkg and use the ACPI Table Protocol and ACPI SDT Protocol from the MdePkg. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../AcpiPlatform/AcpiPlatform.c | 72 +++++-------------- .../AcpiPlatform/AcpiPlatform.h | 2 +- .../AcpiPlatform/AcpiPlatform.inf | 5 +- .../Intel/Vlv2TbltDevicePkg/PlatformPkg.dec | 1 - .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 2 +- .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 2 +- 9 files changed, 26 insertions(+), 64 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c index 13d904b834..962baf561d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c @@ -35,8 +35,7 @@ Abstract: #include #include #include -#include -#include +#include #include #include #include @@ -142,15 +141,15 @@ LocateSupportProtocol ( // // See if it has the ACPI storage file. // - Status = ((EFI_FIRMWARE_VOLUME_PROTOCOL *) (*Instance))->ReadFile ( - *Instance, - &gEfiAcpiTableStorageGuid, - NULL, - &Size, - &FileType, - &Attributes, - &FvStatus - ); + Status = ((EFI_FIRMWARE_VOLUME2_PROTOCOL *) (*Instance))->ReadFile ( + *Instance, + &gEfiAcpiTableStorageGuid, + NULL, + &Size, + &FileType, + &Attributes, + &FvStatus + ); // // If we found it, then we are done. @@ -633,13 +632,11 @@ OnReadyToBoot ( ) { EFI_STATUS Status; - EFI_ACPI_TABLE_VERSION TableVersion; - EFI_ACPI_SUPPORT_PROTOCOL *AcpiSupport; SYSTEM_CONFIGURATION SetupVarBuffer; UINTN VariableSize; EFI_PLATFORM_CPU_INFO *PlatformCpuInfoPtr = NULL; EFI_PLATFORM_CPU_INFO PlatformCpuInfo; - EFI_PEI_HOB_POINTERS GuidHob; + EFI_PEI_HOB_POINTERS GuidHob; if (mFirstNotify) { return; @@ -701,23 +698,6 @@ OnReadyToBoot ( ); ASSERT_EFI_ERROR (Status); } - - // - // Find the AcpiSupport protocol. - // - Status = LocateSupportProtocol (&gEfiAcpiSupportProtocolGuid, (VOID **) &AcpiSupport, 0); - ASSERT_EFI_ERROR (Status); - - TableVersion = EFI_ACPI_TABLE_VERSION_2_0; - - // - // Publish ACPI 1.0 or 2.0 Tables. - // - Status = AcpiSupport->PublishTables ( - AcpiSupport, - TableVersion - ); - ASSERT_EFI_ERROR (Status); } VOID @@ -759,8 +739,8 @@ AcpiPlatformEntryPoint ( { EFI_STATUS Status; EFI_STATUS AcpiStatus; - EFI_ACPI_SUPPORT_PROTOCOL *AcpiSupport; - EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol; + EFI_ACPI_TABLE_PROTOCOL *AcpiTable; + EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol; INTN Instance; EFI_ACPI_COMMON_HEADER *CurrentTable; UINTN TableHandle; @@ -821,9 +801,9 @@ AcpiPlatformEntryPoint ( } // - // Find the AcpiSupport protocol. + // Find the AcpiTable protocol. // - Status = LocateSupportProtocol (&gEfiAcpiSupportProtocolGuid, (VOID **) &AcpiSupport, 0); + Status = LocateSupportProtocol (&gEfiAcpiTableProtocolGuid, (VOID **) &AcpiTable, 0); ASSERT_EFI_ERROR (Status); // @@ -1171,11 +1151,10 @@ AcpiPlatformEntryPoint ( // Add the table. // TableHandle = 0; - AcpiStatus = AcpiSupport->SetAcpiTable ( - AcpiSupport, + AcpiStatus = AcpiTable->InstallAcpiTable ( + AcpiTable, CurrentTable, - TRUE, - TableVersion, + Size, &TableHandle ); ASSERT_EFI_ERROR (AcpiStatus); @@ -1189,21 +1168,6 @@ AcpiPlatformEntryPoint ( } } - // - // Publish ACPI 1.0 or 2.0 Tables. - // -// Status = AcpiSupport->PublishTables ( -// AcpiSupport, -// TableVersion -// ); -// ASSERT_EFI_ERROR (Status); - -// Status = EfiCreateEventReadyToBootEx ( -// TPL_NOTIFY, -// OnReadyToBoot, -// NULL, -// &Event -// ); Event = NULL; OnReadyToBoot (Event, NULL); diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h index b27ca661ff..8289eecc6d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h @@ -30,7 +30,7 @@ Abstract: #include #include #include -#include +#include #include #include #include diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf index ce4db9fa85..6f843d6d2e 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf @@ -34,7 +34,6 @@ [sources.common] [Packages] Vlv2TbltDevicePkg/PlatformPkg.dec MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec MdeModulePkg/MdeModulePkg.dec Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec Vlv2TbltDevicePkg/PlatformPkg.dec @@ -64,7 +63,7 @@ [Guids] [Protocols] gEnhancedSpeedstepProtocolGuid gEfiPlatformCpuProtocolGuid - gEfiAcpiSupportProtocolGuid + gEfiAcpiTableProtocolGuid gEfiFirmwareVolume2ProtocolGuid gEfiMpServiceProtocolGuid gEfiGlobalNvsAreaProtocolGuid @@ -78,5 +77,5 @@ [Pcd] [Depex] gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid AND - gEfiAcpiSupportProtocolGuid AND + gEfiAcpiTableProtocolGuid AND gEfiMpServiceProtocolGuid diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec index a5c7062cbb..abe9d7e3a0 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec @@ -44,7 +44,6 @@ [Guids] gEfiSetupVariableGuid = { 0xec87d643, 0xeba4, 0x4bb5, { 0xa1, 0xe5, 0x3f, 0x3e, 0x36, 0xb2, 0x0d, 0xa9 } } gEfiPlatformInfoGuid = { 0x1e2acc41, 0xe26a, 0x483d, { 0xaf, 0xc7, 0xa0, 0x56, 0xc3, 0x4e, 0x08, 0x7b } } gMfgModeVariableGuid = { 0xEF14FD78, 0x0793, 0x4e2b, { 0xAC, 0x6D, 0x06, 0x28, 0x47, 0xE0, 0x17, 0x91 } } - gEfiAcpiTableStorageGuid = { 0x7e374e25, 0x8e01, 0x4fee, { 0x87, 0xf2, 0x39, 0x0c, 0x23, 0xc6, 0x06, 0xcd } } gACPIOSFRMfgStringVariableGuid = { 0x72234213, 0x0fd7, 0x48a1, { 0xa5, 0x9f, 0xb4, 0x1b, 0xc1, 0x07, 0xfb, 0xcd } } gACPIOSFRRefDataBlockVariableGuid = { 0x72234213, 0x0fd7, 0x48a1, { 0xa5, 0x9f, 0xb4, 0x1b, 0xc1, 0x07, 0xfb, 0xcd } } gACPIOSFRModelStringVariableGuid = { 0xca1bcad9, 0xe021, 0x4547, { 0xa1, 0xb0, 0x5b, 0x22, 0xc7, 0xf6, 0x87, 0xf4 } } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf index b0fbbdb9cb..0661c778c1 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf @@ -504,7 +504,7 @@ [FV.FVMAIN] # INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf -INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf +INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf INF RuleOverride = ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf INF RuleOverride = ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf index 107c160b76..06bdebb10b 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf @@ -453,7 +453,7 @@ [FV.FVMAIN] # INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf -INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf +INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf INF RuleOverride = ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf INF RuleOverride = ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc index 2123745ccd..b558caa61f 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc @@ -1108,7 +1108,7 @@ [Components.X64] } MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf - IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index 086668d570..99ada0ef0a 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -1092,7 +1092,7 @@ [Components.IA32] } MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf - IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index 5f2dd65ec8..87404d2d82 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -1107,7 +1107,7 @@ [Components.X64] } MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf - IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf -- 2.21.0.windows.1