From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: zailiang.sun@intel.com) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Sun, 30 Jun 2019 21:08:42 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 21:08:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="157168909" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga008.jf.intel.com with ESMTP; 30 Jun 2019 21:08:42 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 30 Jun 2019 21:08:41 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.240]) with mapi id 14.03.0439.000; Mon, 1 Jul 2019 12:08:39 +0800 From: "Sun, Zailiang" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Qian, Yi" Subject: Re: [edk2-platforms Patch 13/14] Vlv2TbltDevicePkg: Change to PI Spec ACPI Table Protocol Thread-Topic: [edk2-platforms Patch 13/14] Vlv2TbltDevicePkg: Change to PI Spec ACPI Table Protocol Thread-Index: AQHVL7ifTUyLYRNspU+g8n8JMAZqT6a1Jd5w Date: Mon, 1 Jul 2019 04:08:38 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C905BB@SHSMSX104.ccr.corp.intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> <20190701025553.18596-14-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-14-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-By: Zailiang Sun -----Original Message----- From: Kinney, Michael D=20 Sent: Monday, July 01, 2019 10:56 AM To: devel@edk2.groups.io Cc: Sun, Zailiang ; Qian, Yi Subject: [edk2-platforms Patch 13/14] Vlv2TbltDevicePkg: Change to PI Spec = ACPI Table Protocol 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 =3D ((EFI_FIRMWARE_VOLUME_PROTOCOL *) (*Instance))->ReadFile ( - *Instance, - &gEfiAcpiTab= leStorageGuid, - NULL, - &Size, - &FileType, - &Attributes, - &FvStatus - ); + Status =3D ((EFI_FIRMWARE_VOLUME2_PROTOCOL *) (*Instance))->ReadFile ( + *Instance, + &gEfiAcpiT= ableStorageGuid, + NULL, + &Size, + &FileType, + &Attribute= s, + &FvStatus + ); =20 // // 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 =3D NULL; EFI_PLATFORM_CPU_INFO PlatformCpuInfo; - EFI_PEI_HOB_POINTERS GuidHob; + EFI_PEI_HOB_POINTERS GuidHob; =20 if (mFirstNotify) { return; @@ -701,23 +698,6 @@ OnReadyToBoot ( ); ASSERT_EFI_ERROR (Status); } - - // - // Find the AcpiSupport protocol. - // - Status =3D LocateSupportProtocol (&gEfiAcpiSupportProtocolGuid, (VOID **= ) &AcpiSupport, 0); - ASSERT_EFI_ERROR (Status); - - TableVersion =3D EFI_ACPI_TABLE_VERSION_2_0; - - // - // Publish ACPI 1.0 or 2.0 Tables. - // - Status =3D AcpiSupport->PublishTables ( - AcpiSupport, - TableVersion - ); - ASSERT_EFI_ERROR (Status); } =20 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 ( } =20 // - // Find the AcpiSupport protocol. + // Find the AcpiTable protocol. // - Status =3D LocateSupportProtocol (&gEfiAcpiSupportProtocolGuid, (VOID **= ) &AcpiSupport, 0); + Status =3D LocateSupportProtocol (&gEfiAcpiTableProtocolGuid, (VOID **)= =20 + &AcpiTable, 0); ASSERT_EFI_ERROR (Status); =20 // @@ -1171,11 +1151,10 @@ AcpiPlatformEntryPoint ( // Add the table. // TableHandle =3D 0; - AcpiStatus =3D AcpiSupport->SetAcpiTable ( - AcpiSupport, + AcpiStatus =3D AcpiTable->InstallAcpiTable ( + AcpiTable, CurrentTable, - TRUE, - TableVersion, + Size, &TableHandle ); ASSERT_EFI_ERROR (AcpiStatus); @@ -1189,21 +1168,6 @@ AcpiPlatfo= rmEntryPoint ( } } =20 - // - // Publish ACPI 1.0 or 2.0 Tables. - // -// Status =3D AcpiSupport->PublishTables ( -// AcpiSupport, -// TableVersion -// ); -// ASSERT_EFI_ERROR (Status); - -// Status =3D EfiCreateEventReadyToBootEx ( -// TPL_NOTIFY, -// OnReadyToBoot, -// NULL, -// &Event -// ); Event =3D NULL; OnReadyToBoot (Event, NULL); =20 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/In= tel/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 =3D { 0xec87d643, 0xeba4, 0x4bb5= , { 0xa1, 0xe5, 0x3f, 0x3e, 0x36, 0xb2, 0x0d, 0xa9 } } gEfiPlatformInfoGuid =3D { 0x1e2acc41, 0xe26a, 0x483d= , { 0xaf, 0xc7, 0xa0, 0x56, 0xc3, 0x4e, 0x08, 0x7b } } gMfgModeVariableGuid =3D { 0xEF14FD78, 0x0793, 0x4e2b= , { 0xAC, 0x6D, 0x06, 0x28, 0x47, 0xE0, 0x17, 0x91 } } - gEfiAcpiTableStorageGuid =3D { 0x7e374e25, 0x8e01, 0x4fee= , { 0x87, 0xf2, 0x39, 0x0c, 0x23, 0xc6, 0x06, 0xcd } } gACPIOSFRMfgStringVariableGuid =3D { 0x72234213, 0x0fd7, 0x48a1= , { 0xa5, 0x9f, 0xb4, 0x1b, 0xc1, 0x07, 0xfb, 0xcd } } gACPIOSFRRefDataBlockVariableGuid =3D { 0x72234213, 0x0fd7, 0x48a1= , { 0xa5, 0x9f, 0xb4, 0x1b, 0xc1, 0x07, 0xfb, 0xcd } } gACPIOSFRModelStringVariableGuid =3D { 0xca1bcad9, 0xe021, 0x4547= , { 0xa1, 0xb0, 0x5b, 0x22, 0xc7, 0xf6, 0x87, 0xf4 } } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Platform/In= tel/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/BootScriptExecutorDx= e.inf INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf -INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.i= nf +INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf INF RuleOverride =3D ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/Po= werManagement/AcpiTables/PowerManagementAcpiTables.inf =20 INF RuleOverride =3D ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTab= les.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/BootScriptExecutorDx= e.inf INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf -INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.i= nf +INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf INF RuleOverride =3D ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/Po= werManagement/AcpiTables/PowerManagementAcpiTables.inf =20 INF RuleOverride =3D ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTab= les.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platf= orm/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 =20 - IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/Power= ManagementAcpiTables.inf =20 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platfor= m/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 =20 - IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/Power= ManagementAcpiTables.inf =20 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 =20 - IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/Power= ManagementAcpiTables.inf =20 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf -- 2.21.0.windows.1