Re: [edk2-platforms PATCH 4/6] Marvell/Cn913xDbA: AcpiTables: Use unique UID's
Samer El-Haj-Mahmoud
Reviewed-By: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...>
toggle quoted message
Show quoted text
-----Original Message-----IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. |
|
Re: [edk2-platforms PATCH 2/6] Marvell: Armada7k8k/OcteonTx: Fix RT debug prints
Samer El-Haj-Mahmoud
Reviewed-By: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...>
toggle quoted message
Show quoted text
-----Original Message-----IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. |
|
Re: [PATCH 1/1] MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2
Samer El-Haj-Mahmoud
Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...>
toggle quoted message
Show quoted text
-----Original Message-----IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. |
|
Re: [PATCH 1/1] MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2
Samer El-Haj-Mahmoud
Sunny,
toggle quoted message
Show quoted text
I think the issue is outlook removing the extra line breaks. To disable this do the following (per https://docs.microsoft.com/en-us/outlook/troubleshoot/message-body/line-breaks-are-removed-in-posts-made-in-plain-text) Open Outlook. On the File tab, select Options. In the Options dialog, select Mail. In the Message format section, clear the Remove extra line breaks in plain text messages check box. Select OK. -----Original Message-----IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. |
|
Re: [PATCH v3] MinPlatformPkg/Fsp: Rebase fail when python tools path exist whitespace REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3412
Chiu, Chasel
With subject format correction, Reviewed-by: Chasel Chiu <chasel.chiu@...>
toggle quoted message
Show quoted text
-----Original Message----- |
|
[PATCH v3] MinPlatformPkg/Fsp: Rebase fail when python tools path exist whitespace REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3412
From: IanX Kuo <ianx.kuo@...>
(a) C:\Users\<UserName>\AppData\Local\Program\Python\Python38 (b) C:\Python38 (c) C:\Program Files\Python38 Issue only happens on (a) and (c). (a) happen on <UserName> have whitespace. Ex: Tony Chen (c) happen on "Program Files" have whitespace. Cc: Chasel Chiu <chasel.chiu@...> Cc: Nate DeSimone <nathaniel.l.desimone@...> Signed-off-by: IanX Kuo <ianx.kuo@...> --- .../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py | 6 +++--- .../MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBa= seAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBin= BaseAddress.py index 406e5ec130..f3cba2651a 100644 --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre= ss.py +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre= ss.py @@ -1,6 +1,6 @@ ## @ RebaseAndPatchFspBinBaseAddress.py=0D #=0D -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>=0D +# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D =0D @@ -93,13 +93,13 @@ fspTBaseAddress =3D flashBase + fspTBaseOffset # Re-base FSP bin file to new address and save it as fspBinFileRebased usi= ng SplitFspBin.py=0D #=0D rebaseArguments =3D fspBinFilePath + " -c s m t -b " + str(hex(fspSBaseAdd= ress).rstrip("L")) + " " + str(hex(fspMBaseAddress).rstrip("L")) + " " + st= r(hex(fspTBaseAddress).rstrip("L")) + " -o" + fspBinPath + " -n " + fspBinF= ileRebased=0D -os.system(pythontool + " " + splitFspBinPath + " rebase -f" + rebaseArgume= nts)=0D +os.system('"' + pythontool + '"' + " " + splitFspBinPath + " rebase -f" + = rebaseArguments)=0D =0D #=0D # Split FSP bin to FSP-S/M/T segments=0D #=0D splitArguments =3D fspBinPath + os.sep + fspBinFileRebased + " -o " + fspB= inPath + " -n Fsp_Rebased.fd"=0D -os.system(pythontool + " " + splitFspBinPath + " split -f" + splitArgument= s)=0D +os.system('"' + pythontool + '"' + " " + splitFspBinPath + " split -f" + s= plitArguments)=0D =0D #=0D # Patch dsc file with the re-based FSP-S/M/T address, so internally build = will use the same.=0D diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddres= s.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py index fb4cf4f9b7..b7e4bcf5f9 100644 --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py @@ -1,6 +1,6 @@ ## @ RebaseFspBinBaseAddress.py=0D #=0D -# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>=0D +# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D =0D @@ -87,12 +87,12 @@ fspTBaseAddress =3D flashBase + fspTBaseOffset # Re-base FSP bin file to new address and save it as fspBinFileRebased usi= ng SplitFspBin.py=0D #=0D rebaseArguments =3D fspBinFilePath + " -c s m t -b " + str(hex(fspSBaseAdd= ress).rstrip("L")) + " " + str(hex(fspMBaseAddress).rstrip("L")) + " " + st= r(hex(fspTBaseAddress).rstrip("L")) + " -o" + fspBinPath + " -n " + fspBinF= ileRebased=0D -os.system(pythontool + " " + splitFspBinPath + " rebase -f" + rebaseArgume= nts)=0D +os.system('"' + pythontool + '"' + " " + splitFspBinPath + " rebase -f" + = rebaseArguments)=0D =0D #=0D # Split FSP bin to FSP-S/M/T segments=0D #=0D splitArguments =3D fspBinPath + os.sep + fspBinFileRebased + " -o " + fspB= inPath + " -n Fsp_Rebased.fd"=0D -os.system(pythontool + " " + splitFspBinPath + " split -f" + splitArgument= s)=0D +os.system('"' + pythontool + '"' + " " + splitFspBinPath + " split -f" + s= plitArguments)=0D =0D exit(0)=0D --=20 2.27.0.windows.1 |
|
[PATCH 2/2] UefiPayloadPkg: Use standalone PCD driver
Zhiguang Liu
Using standalone PCD driver need to change PcdLib and also set a feature PC=
D. Cc: Maurice Ma <maurice.ma@...> Cc: Guo Dong <guo.dong@...> Cc: Benjamin You <benjamin.you@...> Signed-off-by: Zhiguang Liu <zhiguang.liu@...> --- UefiPayloadPkg/UefiPayloadPkg.dsc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index 37ad5a0ae7..425447a58f 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -237,7 +237,7 @@ VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf=0D =0D [LibraryClasses.common.DXE_DRIVER]=0D - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + PcdLib|MdePkg/Library/DxePcdLib/PayloadPcdLib.inf=0D HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExt= ractGuidedSectionLib.inf=0D @@ -250,14 +250,14 @@ VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf=0D =0D [LibraryClasses.common.DXE_RUNTIME_DRIVER]=0D - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + PcdLib|MdePkg/Library/DxePcdLib/PayloadPcdLib.inf=0D HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/R= untimeDxeReportStatusCodeLib.inf=0D VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL= ibRuntimeDxe.inf=0D =0D [LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]= =0D - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + PcdLib|MdePkg/Library/DxePcdLib/PayloadPcdLib.inf=0D MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf=0D HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D @@ -271,6 +271,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE=0D + gEfiMdePkgTokenSpaceGuid.PcdStandalonePcdDatabaseEnable|TRUE=0D =0D [PcdsFixedAtBuild]=0D gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x10000=0D @@ -562,7 +563,7 @@ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf= =0D HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandlePar= singLib.inf=0D OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTre= eLib/BaseOrderedCollectionRedBlackTreeLib.inf=0D - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + PcdLib|MdePkg/Library/DxePcdLib/PayloadPcdLib.inf=0D ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLi= b.inf=0D ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellComman= dLib.inf=0D SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf=0D --=20 2.30.0.windows.2 |
|
[PATCH 1/2] MdePkg: Standalone PCD driver
Zhiguang Liu
Add a feature PCD to control if the PCD driver is build as standalone mode.
This way, two mode PCD driver won't share the data base. Cc: Michael D Kinney <michael.d.kinney@...> Cc: Liming Gao <gaoliming@...> Signed-off-by: Zhiguang Liu <zhiguang.liu@...> --- MdeModulePkg/Universal/PCD/Dxe/Pcd.c | 75 ++++++++++++++++++++++++++= +++++++++++++++++++++++++------------------------ MdeModulePkg/Universal/PCD/Dxe/Pcd.inf | 16 ++++++++++++---- MdeModulePkg/Universal/PCD/Dxe/Service.c | 7 ++++++- MdePkg/Include/Protocol/Pcd.h | 5 ----- MdePkg/Include/Protocol/PcdInfo.h | 5 ----- MdePkg/Library/DxePcdLib/DxePcdLib.c | 24 ++++++++++++++++++++---- MdePkg/Library/DxePcdLib/DxePcdLib.inf | 16 ++++++++++++---- MdePkg/Library/DxePcdLib/PayloadPcdLib.inf | 71 ++++++++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++ MdePkg/MdePkg.dec | 12 ++++++++++++ 9 files changed, 184 insertions(+), 47 deletions(-) diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c b/MdeModulePkg/Universal/= PCD/Dxe/Pcd.c index cdb9b4fac1..dc9c4be022 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c @@ -129,34 +129,61 @@ PcdDxeInit ( //=0D // Make sure the Pcd Protocol is not already installed in the system=0D //=0D + if (FeaturePcdGet (PcdStandalonePcdDatabaseEnable)) {=0D + ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEdkiiPayloadStandalonePcdPr= otocolGuid);=0D + BuildPcdDxeDataBase ();=0D =0D - ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gPcdProtocolGuid);=0D + //=0D + // Install PCD_PROTOCOL to handle dynamic type PCD=0D + // Install EFI_PCD_PROTOCOL to handle dynamicEx type PCD=0D + //=0D + Status =3D gBS->InstallMultipleProtocolInterfaces (=0D + &mPcdHandle,=0D + &gEdkiiPayloadStandalonePcdProtocolGuid, &mPcdInst= ance,=0D + &gEdkiiEfiPayloadStandalonePcdProtocolGuid, &mEfiPcdI= nstance,=0D + NULL=0D + );=0D + ASSERT_EFI_ERROR (Status);=0D =0D - BuildPcdDxeDataBase ();=0D + //=0D + // Install GET_PCD_INFO_PROTOCOL to handle dynamic type PCD=0D + // Install EFI_GET_PCD_INFO_PROTOCOL to handle dynamicEx type PCD=0D + //=0D + Status =3D gBS->InstallMultipleProtocolInterfaces (=0D + &mPcdHandle,=0D + &gEdkiiPayloadGetStandalonePcdInfoProtocolGuid, &m= GetPcdInfoInstance,=0D + &gEdkiiEfiPayloadGetStandalonePcdInfoProtocolGuid, &m= EfiGetPcdInfoInstance,=0D + NULL=0D + );=0D + ASSERT_EFI_ERROR (Status);=0D + } else {=0D + ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gPcdProtocolGuid);=0D + BuildPcdDxeDataBase ();=0D =0D - //=0D - // Install PCD_PROTOCOL to handle dynamic type PCD=0D - // Install EFI_PCD_PROTOCOL to handle dynamicEx type PCD=0D - //=0D - Status =3D gBS->InstallMultipleProtocolInterfaces (=0D - &mPcdHandle,=0D - &gPcdProtocolGuid, &mPcdInstance,=0D - &gEfiPcdProtocolGuid, &mEfiPcdInstance,=0D - NULL=0D - );=0D - ASSERT_EFI_ERROR (Status);=0D + //=0D + // Install PCD_PROTOCOL to handle dynamic type PCD=0D + // Install EFI_PCD_PROTOCOL to handle dynamicEx type PCD=0D + //=0D + Status =3D gBS->InstallMultipleProtocolInterfaces (=0D + &mPcdHandle,=0D + &gPcdProtocolGuid, &mPcdInstance,=0D + &gEfiPcdProtocolGuid, &mEfiPcdInstance,=0D + NULL=0D + );=0D + ASSERT_EFI_ERROR (Status);=0D =0D - //=0D - // Install GET_PCD_INFO_PROTOCOL to handle dynamic type PCD=0D - // Install EFI_GET_PCD_INFO_PROTOCOL to handle dynamicEx type PCD=0D - //=0D - Status =3D gBS->InstallMultipleProtocolInterfaces (=0D - &mPcdHandle,=0D - &gGetPcdInfoProtocolGuid, &mGetPcdInfoInstance,=0D - &gEfiGetPcdInfoProtocolGuid, &mEfiGetPcdInfoInstance,=0D - NULL=0D - );=0D - ASSERT_EFI_ERROR (Status);=0D + //=0D + // Install GET_PCD_INFO_PROTOCOL to handle dynamic type PCD=0D + // Install EFI_GET_PCD_INFO_PROTOCOL to handle dynamicEx type PCD=0D + //=0D + Status =3D gBS->InstallMultipleProtocolInterfaces (=0D + &mPcdHandle,=0D + &gGetPcdInfoProtocolGuid, &mGetPcdInfoInstance,=0D + &gEfiGetPcdInfoProtocolGuid, &mEfiGetPcdInfoInstance,= =0D + NULL=0D + );=0D + ASSERT_EFI_ERROR (Status);=0D + }=0D =0D //=0D // Register callback function upon VariableLockProtocol=0D diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf b/MdeModulePkg/Universa= l/PCD/Dxe/Pcd.inf index eb9f757f14..f3e704f083 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf +++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf @@ -329,10 +329,15 @@ gEfiMdeModulePkgTokenSpaceGuid ## SOMETIMES_CONSUMES ## = GUID=0D =0D [Protocols]=0D - gPcdProtocolGuid ## PRODUCES=0D - gEfiPcdProtocolGuid ## PRODUCES=0D - gGetPcdInfoProtocolGuid ## SOMETIMES_PRODUCES=0D - gEfiGetPcdInfoProtocolGuid ## SOMETIMES_PRODUCES=0D + gPcdProtocolGuid ## PRODUCES=0D + gEfiPcdProtocolGuid ## PRODUCES=0D + gGetPcdInfoProtocolGuid ## SOMETIMES_PRODUCES=0D + gEfiGetPcdInfoProtocolGuid ## SOMETIMES_PRODUCES=0D +=0D + gEdkiiPayloadStandalonePcdProtocolGuid ## PRODUCES=0D + gEdkiiEfiPayloadStandalonePcdProtocolGuid ## PRODUCES=0D + gEdkiiPayloadGetStandalonePcdInfoProtocolGuid ## SOMETIMES_PRODUCES=0D + gEdkiiEfiPayloadGetStandalonePcdInfoProtocolGuid ## SOMETIMES_PRODUCES=0D ## NOTIFY=0D ## SOMETIMES_CONSUMES=0D gEdkiiVariableLockProtocolGuid=0D @@ -342,6 +347,9 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress64 ## SOMETIMES_CONSU= MES=0D gEfiMdeModulePkgTokenSpaceGuid.PcdSetNvStoreDefaultId ## SOMETIMES_CONSU= MES=0D =0D +[FeaturePcd]=0D + gEfiMdePkgTokenSpaceGuid.PcdStandalonePcdDatabaseEnable ## CONSUMES=0D +=0D [Depex]=0D TRUE=0D =0D diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Univer= sal/PCD/Dxe/Service.c index ea7edc3cbb..fe16ba713b 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -861,7 +861,12 @@ BuildPcdDxeDataBase ( CopyMem (PcdDxeDb, mPcdDatabase.DxeDb, mPcdDatabase.DxeDb->Length);=0D mPcdDatabase.DxeDb =3D PcdDxeDb;=0D =0D - GuidHob =3D GetFirstGuidHob (&gPcdDataBaseHobGuid);=0D + if (FeaturePcdGet (PcdStandalonePcdDatabaseEnable)) {=0D + GuidHob =3D NULL;=0D + } else {=0D + GuidHob =3D GetFirstGuidHob (&gPcdDataBaseHobGuid);=0D + }=0D +=0D if (GuidHob !=3D NULL) {=0D =0D //=0D diff --git a/MdePkg/Include/Protocol/Pcd.h b/MdePkg/Include/Protocol/Pcd.h index 9cd1a998f8..cfa6ac2360 100644 --- a/MdePkg/Include/Protocol/Pcd.h +++ b/MdePkg/Include/Protocol/Pcd.h @@ -17,11 +17,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef __PCD_H__=0D #define __PCD_H__=0D =0D -extern EFI_GUID gPcdProtocolGuid;=0D -=0D -#define PCD_PROTOCOL_GUID \=0D - { 0x11b34006, 0xd85b, 0x4d0a, { 0xa2, 0x90, 0xd5, 0xa5, 0x71, 0x31, 0xe,= 0xf7 } }=0D -=0D #define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0)=0D =0D =0D diff --git a/MdePkg/Include/Protocol/PcdInfo.h b/MdePkg/Include/Protocol/Pc= dInfo.h index b0ec7f6770..5691215c42 100644 --- a/MdePkg/Include/Protocol/PcdInfo.h +++ b/MdePkg/Include/Protocol/PcdInfo.h @@ -19,11 +19,6 @@ #ifndef __PCD_INFO_H__=0D #define __PCD_INFO_H__=0D =0D -extern EFI_GUID gGetPcdInfoProtocolGuid;=0D -=0D -#define GET_PCD_INFO_PROTOCOL_GUID \=0D - { 0x5be40f57, 0xfa68, 0x4610, { 0xbb, 0xbf, 0xe9, 0xc5, 0xfc, 0xda, 0xd3= , 0x65 } }=0D -=0D ///=0D /// The forward declaration for GET_PCD_INFO_PROTOCOL.=0D ///=0D diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcdLi= b/DxePcdLib.c index 2accaeda2c..8a61486832 100644 --- a/MdePkg/Library/DxePcdLib/DxePcdLib.c +++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c @@ -43,7 +43,11 @@ GetPiPcdProtocol ( // PI Pcd protocol defined in PI 1.2 vol3 should be installed before t= he module=0D // access DynamicEx type PCD.=0D //=0D - Status =3D gBS->LocateProtocol (&gEfiPcdProtocolGuid, NULL, (VOID **) = &mPiPcd);=0D + if (FeaturePcdGet (PcdStandalonePcdDatabaseEnable)) {=0D + Status =3D gBS->LocateProtocol (&gEdkiiEfiPayloadStandalonePcdProtoc= olGuid, NULL, (VOID **) &mPiPcd);=0D + } else {=0D + Status =3D gBS->LocateProtocol (&gEfiPcdProtocolGuid, NULL, (VOID **= ) &mPiPcd);=0D + }=0D ASSERT_EFI_ERROR (Status);=0D ASSERT (mPiPcd !=3D NULL);=0D }=0D @@ -68,7 +72,11 @@ GetPcdProtocol ( // PCD protocol need to be installed before the module access Dynamic = type PCD.=0D // But dynamic type PCD is not required in PI 1.2 specification.=0D //=0D - Status =3D gBS->LocateProtocol (&gPcdProtocolGuid, NULL, (VOID **)&mPc= d);=0D + if (FeaturePcdGet (PcdStandalonePcdDatabaseEnable)) {=0D + Status =3D gBS->LocateProtocol (&gEdkiiPayloadStandalonePcdProtocolG= uid, NULL, (VOID **)&mPcd);=0D + } else {=0D + Status =3D gBS->LocateProtocol (&gPcdProtocolGuid, NULL, (VOID **)&m= Pcd);=0D + }=0D ASSERT_EFI_ERROR (Status);=0D ASSERT (mPcd !=3D NULL);=0D }=0D @@ -88,7 +96,11 @@ GetPiPcdInfoProtocolPointer ( EFI_STATUS Status;=0D =0D if (mPiPcdInfo =3D=3D NULL) {=0D - Status =3D gBS->LocateProtocol (&gEfiGetPcdInfoProtocolGuid, NULL, (VO= ID **)&mPiPcdInfo);=0D + if (FeaturePcdGet (PcdStandalonePcdDatabaseEnable)) {=0D + Status =3D gBS->LocateProtocol (&gEdkiiEfiPayloadGetStandalonePcdInf= oProtocolGuid, NULL, (VOID **)&mPiPcdInfo);=0D + } else{=0D + Status =3D gBS->LocateProtocol (&gEfiGetPcdInfoProtocolGuid, NULL, (= VOID **)&mPiPcdInfo);=0D + }=0D ASSERT_EFI_ERROR (Status);=0D ASSERT (mPiPcdInfo !=3D NULL);=0D }=0D @@ -108,7 +120,11 @@ GetPcdInfoProtocolPointer ( EFI_STATUS Status;=0D =0D if (mPcdInfo =3D=3D NULL) {=0D - Status =3D gBS->LocateProtocol (&gGetPcdInfoProtocolGuid, NULL, (VOID = **)&mPcdInfo);=0D + if (FeaturePcdGet (PcdStandalonePcdDatabaseEnable)) {=0D + Status =3D gBS->LocateProtocol (&gEdkiiPayloadGetStandalonePcdInfoPr= otocolGuid, NULL, (VOID **)&mPcdInfo);=0D + } else {=0D + Status =3D gBS->LocateProtocol (&gGetPcdInfoProtocolGuid, NULL, (VOI= D **)&mPcdInfo);=0D + }=0D ASSERT_EFI_ERROR (Status);=0D ASSERT (mPcdInfo !=3D NULL);=0D }=0D diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.inf b/MdePkg/Library/DxePcd= Lib/DxePcdLib.inf index 3d4d21b442..59d9fe4f11 100644 --- a/MdePkg/Library/DxePcdLib/DxePcdLib.inf +++ b/MdePkg/Library/DxePcdLib/DxePcdLib.inf @@ -53,10 +53,18 @@ =0D =0D [Protocols]=0D - gPcdProtocolGuid ## SOMETIMES_CONSUMES=0D - gEfiPcdProtocolGuid ## CONSUMES=0D - gGetPcdInfoProtocolGuid ## SOMETIMES_CONSUMES=0D - gEfiGetPcdInfoProtocolGuid ## SOMETIMES_CONSUMES=0D + gPcdProtocolGuid ## SOMETIMES_CONSUMES=0D + gEfiPcdProtocolGuid ## SOMETIMES_CONSUMES=0D + gGetPcdInfoProtocolGuid ## SOMETIMES_CONSUMES=0D + gEfiGetPcdInfoProtocolGuid ## SOMETIMES_CONSUMES=0D +=0D + gEdkiiPayloadStandalonePcdProtocolGuid ## SOMETIMES_CONSUMES=0D + gEdkiiEfiPayloadStandalonePcdProtocolGuid ## SOMETIMES_CONSUMES=0D + gEdkiiPayloadGetStandalonePcdInfoProtocolGuid ## SOMETIMES_CONSUMES=0D + gEdkiiEfiPayloadGetStandalonePcdInfoProtocolGuid ## SOMETIMES_CONSUMES=0D +=0D +[FeaturePcd]=0D + gEfiMdePkgTokenSpaceGuid.PcdStandalonePcdDatabaseEnable ## CONSUMES=0D =0D [Depex.common.DXE_DRIVER, Depex.common.DXE_RUNTIME_DRIVER, Depex.common.DX= E_SAL_DRIVER, Depex.common.DXE_SMM_DRIVER]=0D gEfiPcdProtocolGuid=0D diff --git a/MdePkg/Library/DxePcdLib/PayloadPcdLib.inf b/MdePkg/Library/Dx= ePcdLib/PayloadPcdLib.inf new file mode 100644 index 0000000000..e61296e11a --- /dev/null +++ b/MdePkg/Library/DxePcdLib/PayloadPcdLib.inf @@ -0,0 +1,71 @@ +## @file=0D +# Instance of PCD Library using PCD Protocol.=0D +#=0D +# There are two PCD protocols as follows:=0D +# 1) PCD_PROTOCOL=0D +# It is EDKII implementation which support Dynamic/DynamicEx Pcds.=0D +# 2) EFI_PCD_PROTOCOL=0D +# It is defined by PI specification 1.2, Vol 3 which only support dyn= amicEx=0D +# type Pcd.=0D +#=0D +# For dynamicEx type PCD, it is compatible between PCD_PROTOCOL and EFI_PC= D_PROTOCOL.=0D +#=0D +# This library instance uses the PCD_PROTOCOL to handle dynamic PCD reques= t and use=0D +# EFI_PCD_PROTOCOL to handle dynamicEx type PCD.=0D +#=0D +# Note: A driver of type DXE_RUNTIME_DRIVER and DXE_SMM_DRIVER can only us= e this DxePcdLib=0D +# in their initialization without any issues to access Dynamic and Dynami= cEx PCD. They can't=0D +# access Dynamic and DynamicEx PCD in the implementation of runtime servi= ces and SMI handlers.=0D +# Because EFI_PCD_PROTOCOL is DXE protocol that is not available in OS ru= ntime phase.=0D +#=0D +# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +#=0D +##=0D +=0D +[Defines]=0D + INF_VERSION =3D 0x00010005=0D + BASE_NAME =3D DxePcdLib=0D + MODULE_UNI_FILE =3D DxePcdLib.uni=0D + FILE_GUID =3D f9af2f38-09e2-4ff1-b661-5d1c19d9f75c= =0D + MODULE_TYPE =3D DXE_DRIVER=0D + VERSION_STRING =3D 1.0=0D + LIBRARY_CLASS =3D PcdLib|DXE_CORE DXE_DRIVER DXE_RUNTIM= E_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER=0D +=0D +#=0D +# VALID_ARCHITECTURES =3D IA32 X64 EBC=0D +#=0D +=0D +[Sources]=0D + DxePcdLib.c=0D +=0D +=0D +[Packages]=0D + MdePkg/MdePkg.dec=0D +=0D +=0D +[LibraryClasses]=0D + BaseMemoryLib=0D + UefiBootServicesTableLib=0D + DebugLib=0D +=0D +=0D +[Protocols]=0D + gPcdProtocolGuid ## SOMETIMES_CONSUMES=0D + gEfiPcdProtocolGuid ## SOMETIMES_CONSUMES=0D + gGetPcdInfoProtocolGuid ## SOMETIMES_CONSUMES=0D + gEfiGetPcdInfoProtocolGuid ## SOMETIMES_CONSUMES=0D +=0D + gEdkiiPayloadStandalonePcdProtocolGuid ## SOMETIMES_CONSUMES=0D + gEdkiiEfiPayloadStandalonePcdProtocolGuid ## SOMETIMES_CONSUMES=0D + gEdkiiPayloadGetStandalonePcdInfoProtocolGuid ## SOMETIMES_CONSUMES=0D + gEdkiiEfiPayloadGetStandalonePcdInfoProtocolGuid ## SOMETIMES_CONSUMES=0D +=0D +[FeaturePcd]=0D + gEfiMdePkgTokenSpaceGuid.PcdStandalonePcdDatabaseEnable ## CONSUMES=0D +=0D +[Depex.common.DXE_DRIVER, Depex.common.DXE_RUNTIME_DRIVER, Depex.common.DX= E_SAL_DRIVER, Depex.common.DXE_SMM_DRIVER]=0D + gEdkiiEfiPayloadStandalonePcdProtocolGuid=0D +=0D diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index b49f88d8e1..44f60e2086 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1000,6 +1000,12 @@ ## Include/Protocol/PcdInfo.h=0D gGetPcdInfoProtocolGuid =3D { 0x5be40f57, 0xfa68, 0x4610, { 0xbb,= 0xbf, 0xe9, 0xc5, 0xfc, 0xda, 0xd3, 0x65 } }=0D =0D + ## Payload Standalone Pcd Protocol=0D + gEdkiiPayloadStandalonePcdProtocolGuid =3D {0x8ef6ff48, 0x226= 0, 0x5407, {0x0d, 0x18, 0x2e, 0x2c, 0xaa, 0x7d, 0xc9, 0x1f}}=0D + gEdkiiEfiPayloadStandalonePcdProtocolGuid =3D {0x7e50c422, 0xae7= 6, 0xbdc9, {0x16, 0x66, 0xca, 0x67, 0x95, 0x04, 0x4d, 0xea}}=0D + gEdkiiPayloadGetStandalonePcdInfoProtocolGuid =3D {0xd7214c03, 0x27e= 0, 0x5b35, {0xd5, 0xb1, 0xeb, 0x1a, 0x50, 0x14, 0x5e, 0x15}}=0D + gEdkiiEfiPayloadGetStandalonePcdInfoProtocolGuid =3D {0x1039ecdf, 0x590= 8, 0xf76c, {0x51, 0xf9, 0xae, 0x09, 0xc5, 0xa9, 0x68, 0x9e}}=0D +=0D #=0D # Protocols defined in PI1.0.=0D #=0D @@ -1945,6 +1951,12 @@ # @Prompt Validate ORDERED_COLLECTION structure=0D gEfiMdePkgTokenSpaceGuid.PcdValidateOrderedCollection|FALSE|BOOLEAN|0x00= 00002a=0D =0D + ## Indicates if the standalone PCD database is enabled for Payload.<BR><= BR>=0D + # TRUE - Enable tandalone PCD database is enabled for Payload.<BR>=0D + # FALSE - Disable tandalone PCD database is enabled for Payload.<BR>=0D + # @Prompt Enable tandalone PCD database is enabled for Payload.=0D + gEfiMdePkgTokenSpaceGuid.PcdStandalonePcdDatabaseEnable|FALSE|BOOLEAN|0x= 0000002e=0D +=0D [PcdsFixedAtBuild]=0D ## Status code value for indicating a watchdog timer has expired.=0D # EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED=0D --=20 2.30.0.windows.2 |
|
[PATCH 0/2] New feature to enable standalone PCD driver
Zhiguang Liu
There are cases that different binary is build differently, and both want to use PCD feature.
If these two different don't want to use PCD to communicate, they should have a standalone PCD data base, For example, bootloader and payload want to have seperately PCD data base. Zhiguang Liu (2): MdePkg: Standalone PCD driver UefiPayloadPkg: Use standalone PCD driver MdeModulePkg/Universal/PCD/Dxe/Pcd.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++------------------------ MdeModulePkg/Universal/PCD/Dxe/Pcd.inf | 16 ++++++++++++---- MdeModulePkg/Universal/PCD/Dxe/Service.c | 7 ++++++- MdePkg/Include/Protocol/Pcd.h | 5 ----- MdePkg/Include/Protocol/PcdInfo.h | 5 ----- MdePkg/Library/DxePcdLib/DxePcdLib.c | 24 ++++++++++++++++++++---- MdePkg/Library/DxePcdLib/DxePcdLib.inf | 16 ++++++++++++---- MdePkg/Library/DxePcdLib/PayloadPcdLib.inf | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MdePkg/MdePkg.dec | 12 ++++++++++++ UefiPayloadPkg/UefiPayloadPkg.dsc | 9 +++++---- 10 files changed, 189 insertions(+), 51 deletions(-) create mode 100644 MdePkg/Library/DxePcdLib/PayloadPcdLib.inf -- 2.30.0.windows.2 |
|
Re: deprecation notice: *dynamic* multi-VMM (QEMU vs. Xen) support in OvmfPkg
Ard Biesheuvel
On Mon, 24 May 2021 at 10:42, Laszlo Ersek <lersek@...> wrote:
I have no stake in this, but I do strongly support this change. As Laszlo points out, the maintenance burden is substantial, with very little benefit. |
|
Re: [PATCH 1/1] MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2
Marcin Wojtas
Hi Liming,
pon., 24 maj 2021 o 10:42 gaoliming <gaoliming@...> napisał(a): Sure, I ran it prior to submission. Best regards, Marcin Thanks |
|
deprecation notice: *dynamic* multi-VMM (QEMU vs. Xen) support in OvmfPkg
Laszlo Ersek
Hi,
the "OvmfXen.dsc" platform supports not only HVM guests, but also PVH guests. This platform does not run on QEMU. The historical "OvmfPkgIa32.dsc", "OvmfPkgIa32X64.dsc", "OvmfPkgX64.dsc" platforms support Xen guests, HVM only. They dynamically adapt to QEMU vs. Xen HVM. This dynamism has been a *huge* development and maintenance complication over the years. Another issue (which has been becoming ever more acute) is the NOOPT binary size, which certainly matters for debugging. With the introduction of OvmfXen in August 2019 <https://bugzilla.tianocore.org/show_bug.cgi?id=1689>, we formed a plan to remove the dynamism. Xen guests would only be targeted with the OvmfXen platform, while the "historical three" would only target QEMU. See <https://bugzilla.tianocore.org/show_bug.cgi?id=2122>. The incompatibility is that an existing Xen guest that uses one of the "OvmfPkgIa32.dsc", "OvmfPkgIa32X64.dsc", "OvmfPkgX64.dsc" firmware binaries will have to be reconfigured on the host to switch to the "OvmfXen.dsc" binary, after an edk2 package upgrade brings the above change to the host. Anthony originally proposed a 1 year grace period; we're now at 23 months. I've got 20 patches thus far, and those only take us about one third, or maybe one half, of the way. It's a very intrusive patch series, not one to revert after it's applied. My intent / hope is to get this merged into the (presumed) edk2-stable202108 tag. If you find that too early, please speak up. If you have another distro with LTS in mind whose package maintainer I should have put on the address list, please don't hesitate to add them. Please note that my question is not *if* we should do this, the question is *when* you can tolerate it, in your respective distros. Thanks, Laszlo |
|
回复: [edk2-devel] [PATCH 1/1] MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2
gaoliming
You can run BaseTools\Scripts\PatchCheck.py -1 to check the patch format.
toggle quoted message
Show quoted text
Thanks Liming -----邮件原件----- |
|
Hard Feature Freeze starts now for edk2-stable202105
gaoliming
Hi, all Today, we enter into Hard Feature Freeze phase until edk2-stable202105 tag is created at 2021-05-28. In this phase, there is no feature to be pushed. The critical bug fix is still allowed.
If the patch is sent after Hard Feature Freeze, and plans to catch this stable tag, please add edk2-stable202105 key words in the patch title and BZ, and also cc to Tianocore Stewards, then Stewards can give the comments.
Below is edk2-stable202105 tag planning in https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Release-Planning Date (00:00:00 UTC-8) Description 2021-03-05 Beginning of development 2021-05-10 Feature Planning Freeze 2021-05-17 Soft Feature Freeze 2021-05-24 Hard Feature Freeze 2021-05-28 Release
Thanks Liming |
|
Re: [PATCH] Silicon/StMMRpmb: Consume MdeLibs.dsc.inc for RegisterFilterLib
Ilias Apalodimas
Hi Sami,
toggle quoted message
Show quoted text
Indeed I forgot about that patchset! Since Etienne's patches are reviewed already, feel free to ignore this so he won't need to rebase his code. Thanks /Ilias On Mon, 24 May 2021 at 11:12, Sami Mujawar <Sami.Mujawar@...> wrote:
|
|
Re: [PATCH] Silicon/StMMRpmb: Consume MdeLibs.dsc.inc for RegisterFilterLib
Sami Mujawar
Hi Ilias,
Thank you for this patch.
I think this change may have been covered in https://edk2.groups.io/g/devel/topic/82880299#75180. However, this is an independent fix that is needed to the current code (before the 32-bit support is merged).
Reviewed-by: Sami Mujawar <sami.mujawar@...>
Regards,
Sami Mujawar
From:
Ilias Apalodimas <ilias.apalodimas@...> REF:
https://bugzilla.tianocore.org/show_bug.cgi?id=3246 |
|
[PATCH 9/9] UefiPayloadPkg: Creat gPldAcpiTableGuid Hob
Zhiguang Liu
From SysTableInfo Hob, get ACPI table address, and creat gPldAcpiTableGuid =
Hob to store it. Remove diretly adding ACPI table to ConfigurationTable. Dxe ACPI driver will parse it and install ACPI table from Guid Hob. Cc: Maurice Ma <maurice.ma@...> Cc: Guo Dong <guo.dong@...> Cc: Benjamin You <benjamin.you@...> Cc: Ray Ni <ray.ni@...> Signed-off-by: Zhiguang Liu <zhiguang.liu@...> --- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 17 ----------------- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h | 5 +---- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf | 1 - UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 11 +++++++++++ UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 2 +- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 1 + 6 files changed, 14 insertions(+), 23 deletions(-) diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c b/UefiPayloadPkg/Bl= SupportDxe/BlSupportDxe.c index 56b85b8e6d..ffd3427fb3 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c @@ -99,7 +99,6 @@ BlDxeEntryPoint ( {=0D EFI_STATUS Status;=0D EFI_HOB_GUID_TYPE *GuidHob;=0D - SYSTEM_TABLE_INFO *SystemTableInfo;=0D EFI_PEI_GRAPHICS_INFO_HOB *GfxInfo;=0D ACPI_BOARD_INFO *AcpiBoardInfo;=0D =0D @@ -113,22 +112,6 @@ BlDxeEntryPoint ( Status =3D ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0= xFED00000, SIZE_1KB, 0, ImageHandle); // HPET=0D ASSERT_EFI_ERROR (Status);=0D =0D - //=0D - // Find the system table information guid hob=0D - //=0D - GuidHob =3D GetFirstGuidHob (&gUefiSystemTableInfoGuid);=0D - ASSERT (GuidHob !=3D NULL);=0D - SystemTableInfo =3D (SYSTEM_TABLE_INFO *)GET_GUID_HOB_DATA (GuidHob);=0D -=0D - //=0D - // Install Acpi Table=0D - //=0D - if (SystemTableInfo->AcpiTableBase !=3D 0 && SystemTableInfo->AcpiTableS= ize !=3D 0) {=0D - DEBUG ((DEBUG_ERROR, "Install Acpi Table at 0x%lx, length 0x%x\n", Sys= temTableInfo->AcpiTableBase, SystemTableInfo->AcpiTableSize));=0D - Status =3D gBS->InstallConfigurationTable (&gEfiAcpiTableGuid, (VOID *= )(UINTN)SystemTableInfo->AcpiTableBase);=0D - ASSERT_EFI_ERROR (Status);=0D - }=0D -=0D //=0D // Find the frame buffer information and update PCDs=0D //=0D diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h b/UefiPayloadPkg/Bl= SupportDxe/BlSupportDxe.h index 512105fafd..3332a30eae 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h @@ -1,7 +1,7 @@ /** @file=0D The header file of bootloader support DXE.=0D =0D -Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>=0D +Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -19,12 +19,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include <Library/IoLib.h>=0D #include <Library/HobLib.h>=0D =0D -#include <Guid/Acpi.h>=0D #include <Guid/SmBios.h>=0D #include <Guid/SystemTableInfoGuid.h>=0D #include <Guid/AcpiBoardInfoGuid.h>=0D #include <Guid/GraphicsInfoHob.h>=0D =0D -#include <IndustryStandard/Acpi.h>=0D -=0D #endif=0D diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf b/UefiPayloadPkg/= BlSupportDxe/BlSupportDxe.inf index 30f41f8c39..1ccb250991 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf @@ -42,7 +42,6 @@ HobLib=0D =0D [Guids]=0D - gEfiAcpiTableGuid=0D gUefiSystemTableInfoGuid=0D gUefiAcpiBoardInfoGuid=0D gEfiGraphicsInfoHobGuid=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.c index 7b71d37f94..14b7a732da 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c @@ -235,6 +235,7 @@ BuildHobFromBl ( EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;=0D EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;=0D PLD_SMBIOS_TABLE *SmBiosTableHob;=0D + PLD_ACPI_TABLE *AcpiTableHob;=0D =0D //=0D // Parse memory info and build memory HOBs=0D @@ -287,6 +288,16 @@ BuildHobFromBl ( SmBiosTableHob->SmBiosEntryPoint =3D SysTableInfo.SmbiosTableBase;=0D DEBUG ((DEBUG_INFO, "Create smbios table gPldSmbiosTableGuid guid hob\n"= ));=0D =0D + // =0D + // Creat ACPI table Hob=0D + //=0D + AcpiTableHob =3D BuildGuidHob (&gPldAcpiTableGuid, sizeof (PLD_ACPI_TABL= E));=0D + ASSERT (AcpiTableHob !=3D NULL);=0D + AcpiTableHob->PldHeader.Revision =3D PLD_ACPI_TABLE_REVISION;=0D + AcpiTableHob->PldHeader.Length =3D sizeof (PLD_ACPI_TABLE);=0D + AcpiTableHob->Rsdp =3D SysTableInfo.AcpiTableBase;=0D + DEBUG ((DEBUG_INFO, "Create smbios table gPldAcpiTableGuid guid hob\n"))= ;=0D +=0D //=0D // Create guid hob for acpi board information=0D //=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.h index e7d0d15118..a4c9da128e 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h @@ -32,7 +32,7 @@ #include <Guid/AcpiBoardInfoGuid.h>=0D #include <Guid/GraphicsInfoHob.h>=0D #include <UniversalPayload/SmbiosTable.h>=0D -=0D +#include <UniversalPayload/AcpiTable.h>=0D =0D #define LEGACY_8259_MASK_REGISTER_MASTER 0x21=0D #define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf b/UefiPay= loadPkg/UefiPayloadEntry/UefiPayloadEntry.inf index 444f39acf3..01388b8831 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf @@ -65,6 +65,7 @@ gEfiGraphicsDeviceInfoHobGuid=0D gUefiAcpiBoardInfoGuid=0D gPldSmbiosTableGuid=0D + gPldAcpiTableGuid=0D =0D [FeaturePcd.IA32]=0D gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUME= S=0D --=20 2.30.0.windows.2 |
|
[PATCH 8/9] MdeModulePkg/ACPI: Install ACPI table from HOB.
Zhiguang Liu
If HOB contains APCI table information, entry point of AcpiTableDxe.inf
should parse the APCI table from HOB, and install these tables. We assume the whole ACPI table (starting with EFI_ACPI_2_0_ROOT_SYSTEM_DESC= RIPTION_POINTER) is contained by a single gEfiAcpiTableGuid HOB. Cc: Jian J Wang <jian.j.wang@...> Cc: Hao A Wu <hao.a.wu@...> Cc: Dandan Bi <dandan.bi@...> Cc: Liming Gao <gaoliming@...> Cc: Ray Ni <ray.ni@...> Signed-off-by: Zhiguang Liu <zhiguang.liu@...> --- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h | 4 +++- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf | 4 +++- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 144 +++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 142 insertions(+), 10 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h b/MdeModu= lePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h index 9d7cf7ccfc..7fd393aab3 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h @@ -1,7 +1,7 @@ /** @file=0D ACPI Table Protocol Driver=0D =0D - Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>=0D + Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -24,6 +24,8 @@ #include <Library/MemoryAllocationLib.h>=0D #include <Library/UefiBootServicesTableLib.h>=0D #include <Library/PcdLib.h>=0D +#include <Library/HobLib.h>=0D +#include <UniversalPayload/AcpiTable.h>=0D =0D //=0D // Statements that include other files=0D diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf b/Md= eModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf index d341df439e..df80c4db35 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf @@ -4,7 +4,7 @@ # This driver initializes ACPI tables (Rsdp, Rsdt and Xsdt) and produces = UEFI/PI=0D # services to install/uninstall/manage ACPI tables.=0D #=0D -# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>= =0D +# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>= =0D # Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -51,10 +51,12 @@ DebugLib=0D BaseLib=0D PcdLib=0D + HobLib=0D =0D [Guids]=0D gEfiAcpi10TableGuid ## PRODUCES ## SystemTable= =0D gEfiAcpiTableGuid ## PRODUCES ## SystemTable= =0D + gPldAcpiTableGuid=0D =0D [FeaturePcd]=0D gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol ## CONSUMES=0D diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b= /MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c index 5a2afdff27..24962843a1 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c @@ -1,7 +1,7 @@ /** @file=0D ACPI Table Protocol Implementation=0D =0D - Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>=0D + Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>=0D Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D @@ -30,6 +30,7 @@ STATIC EFI_ALLOCATE_TYPE mAcpiTableAllocType; @param Table Table to add.=0D @param Checksum Does the table require checksumming.=0D @param Version The version of the list to add the tab= le to.=0D + @param IsFromHob True, if add Apci Table from Hob List.= =0D @param Handle Pointer for returning the handle.=0D =0D @return EFI_SUCCESS The function completed successfully.=0D @@ -44,6 +45,7 @@ AddTableToList ( IN VOID *Table,=0D IN BOOLEAN Checksum,=0D IN EFI_ACPI_TABLE_VERSION Version,=0D + IN BOOLEAN IsFromHob,=0D OUT UINTN *Handle=0D );=0D =0D @@ -238,6 +240,7 @@ InstallAcpiTable ( AcpiTableBufferConst,=0D TRUE,=0D Version,=0D + FALSE,=0D TableKey=0D );=0D if (!EFI_ERROR (Status)) {=0D @@ -472,6 +475,7 @@ FreeTableMemory ( @param Table Table to add.=0D @param Checksum Does the table require checksumming.=0D @param Version The version of the list to add the tab= le to.=0D + @param IsFromHob True, if add Apci Table from Hob List.= =0D @param Handle Pointer for returning the handle.=0D =0D @return EFI_SUCCESS The function completed successfully.=0D @@ -487,6 +491,7 @@ AddTableToList ( IN VOID *Table,=0D IN BOOLEAN Checksum,=0D IN EFI_ACPI_TABLE_VERSION Version,=0D + IN BOOLEAN IsFromHob,=0D OUT UINTN *Handle=0D )=0D {=0D @@ -552,13 +557,16 @@ AddTableToList ( // could be updated by OS present agent. For example, BufferPtrAddress= in=0D // SMM communication ACPI table.=0D //=0D - ASSERT ((EFI_PAGE_SIZE % 64) =3D=3D 0);=0D - Status =3D gBS->AllocatePages (=0D - AllocateMaxAddress,=0D - EfiACPIMemoryNVS,=0D - EFI_SIZE_TO_PAGES (CurrentTableList->TableSize),=0D - &AllocPhysAddress=0D - );=0D + if (IsFromHob){=0D + AllocPhysAddress =3D (UINTN)Table;=0D + } else {=0D + Status =3D gBS->AllocatePages (=0D + AllocateMaxAddress,=0D + EfiACPIMemoryNVS,=0D + EFI_SIZE_TO_PAGES (CurrentTableList->TableSize),=0D + &AllocPhysAddress=0D + );=0D + }=0D } else if (mAcpiTableAllocType =3D=3D AllocateAnyPages) {=0D //=0D // If there is no allocation limit, there is also no need to use page= =0D @@ -1689,6 +1697,124 @@ ChecksumCommonTables ( return EFI_SUCCESS;=0D }=0D =0D +/**=0D + This function will find gPldAcpiTableGuid Guid Hob, and install Acpi tab= le from it.=0D +=0D + @param AcpiTableInstance Protocol instance private data.=0D +=0D + @return EFI_SUCCESS The function completed successfully.=0D + @return EFI_NOT_FOUND The function doesn't find the gEfiAcpiTableGu= id Guid Hob.=0D + @return EFI_ABORTED The function could not complete successfully.= =0D +=0D +**/=0D +EFI_STATUS=0D +InstallAcpiTableFromHob (=0D + EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance=0D + )=0D +{=0D + EFI_HOB_GUID_TYPE *GuidHob;=0D + EFI_ACPI_TABLE_VERSION Version;=0D + EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER *Rsdp;=0D + EFI_ACPI_DESCRIPTION_HEADER *Rsdt;=0D + EFI_ACPI_DESCRIPTION_HEADER *ChildTable;=0D + UINT64 ChildTableAddress;=0D + UINTN Count;=0D + UINTN Index;=0D + UINTN TableKey;=0D + EFI_STATUS Status;=0D + UINTN EntrySize;=0D + PLD_ACPI_TABLE *AcpiTableAdress;=0D + VOID *TableToInstall;=0D + PLD_GENERIC_HEADER *GenericHeader;=0D +=0D + TableKey =3D 0;=0D + Version =3D PcdGet32 (PcdAcpiExposedTableVersions);=0D +=0D + //=0D + // HOB only contains the ACPI table in 2.0+ format.=0D + //=0D + GuidHob =3D GetFirstGuidHob (&gPldAcpiTableGuid);=0D + if (GuidHob =3D=3D NULL) {=0D + return EFI_NOT_FOUND;=0D + }=0D +=0D + GenericHeader =3D (PLD_GENERIC_HEADER *) GET_GUID_HOB_DATA (GuidHob);=0D + if ((sizeof (PLD_GENERIC_HEADER) > GET_GUID_HOB_DATA_SIZE (GuidHob)) || = (GenericHeader->Length > GET_GUID_HOB_DATA_SIZE (GuidHob))) {=0D + return EFI_NOT_FOUND;=0D + }=0D + if (GenericHeader->Revision =3D=3D PLD_ACPI_TABLE_REVISION) {=0D + //=0D + // PLD_ACPI_TABLE structure is used when Revision equals to PLD_ACPI_T= ABLE_REVISION=0D + //=0D + AcpiTableAdress =3D (PLD_ACPI_TABLE *) GET_GUID_HOB_DATA (GuidHob);=0D + if (GenericHeader->Length < PLD_SIZEOF_THROUGH_FIELD (PLD_ACPI_TABLE, = Rsdp)) {=0D + //=0D + // Retrun if can't find the ACPI Info Hob with enough length=0D + //=0D + return EFI_NOT_FOUND;=0D + }=0D + Rsdp =3D (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER *) (UINTN) (Acp= iTableAdress->Rsdp);=0D +=0D + //=0D + // An ACPI-compatible OS must use the XSDT if present.=0D + // It shouldn't happen that XsdtAddress points beyond 4G range in 32-b= it environment.=0D + //=0D + ASSERT ((UINTN) Rsdp->XsdtAddress =3D=3D Rsdp->XsdtAddress);=0D +=0D + EntrySize =3D sizeof (UINT64);=0D + Rsdt =3D (EFI_ACPI_DESCRIPTION_HEADER *) (UINTN) Rsdp->XsdtAddress;=0D + if (Rsdt =3D=3D NULL) {=0D + //=0D + // XsdtAddress is zero, then we use Rsdt which has 32 bit entry=0D + //=0D + Rsdt =3D (EFI_ACPI_DESCRIPTION_HEADER *) (UINTN) Rsdp->RsdtAddress;= =0D + EntrySize =3D sizeof (UINT32);=0D + }=0D + Count =3D (Rsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / Entr= ySize;=0D +=0D + for (Index =3D 0; Index < Count; Index++){=0D + ChildTableAddress =3D 0;=0D + CopyMem (&ChildTableAddress, (UINT8 *) (Rsdt + 1) + EntrySize * Inde= x, EntrySize);=0D + //=0D + // If the address is of UINT64 while this module runs at 32 bits,=0D + // make sure the upper bits are all-zeros.=0D + //=0D + ASSERT (ChildTableAddress =3D=3D (UINTN) ChildTableAddress);=0D +=0D + ChildTable =3D (EFI_ACPI_DESCRIPTION_HEADER *) (UINTN) ChildTableAdd= ress;=0D + Status =3D AddTableToList (AcpiTableInstance, ChildTable, TRUE, Vers= ion, TRUE, &TableKey);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI ta= ble at 0x%p\n", ChildTable));=0D + ASSERT_EFI_ERROR (Status);=0D + }=0D + if (ChildTable->Signature =3D=3D EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION= _TABLE_SIGNATURE){=0D + //=0D + // Add the FACS and DSDT tables if it is not NULL.=0D + //=0D + if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *) ChildTable)->Fi= rmwareCtrl !=3D 0) {=0D + TableToInstall =3D (VOID *) (UINTN) ((EFI_ACPI_3_0_FIXED_ACPI_DE= SCRIPTION_TABLE *) ChildTable)->FirmwareCtrl;=0D + Status =3D AddTableToList (AcpiTableInstance, TableToInstall, TR= UE, Version, TRUE, &TableKey);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACP= I table FACS\n"));=0D + ASSERT_EFI_ERROR (Status);=0D + }=0D + }=0D +=0D + if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *) ChildTable)->Ds= dt !=3D 0) {=0D + TableToInstall =3D (VOID *) (UINTN) ((EFI_ACPI_3_0_FIXED_ACPI_DE= SCRIPTION_TABLE *) ChildTable)->Dsdt;=0D + Status =3D AddTableToList (AcpiTableInstance, TableToInstall, TR= UE, Version, TRUE, &TableKey);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACP= I table DSDT\n"));=0D + ASSERT_EFI_ERROR (Status);=0D + }=0D + }=0D + }=0D + }=0D + }=0D + Status =3D PublishTables (AcpiTableInstance, Version);=0D + ASSERT_EFI_ERROR (Status);=0D + return Status;=0D +}=0D =0D /**=0D Constructor for the ACPI table protocol. Initializes instance=0D @@ -1918,6 +2044,8 @@ AcpiTableAcpiTableConstructor ( =0D ChecksumCommonTables (AcpiTableInstance);=0D =0D + InstallAcpiTableFromHob (AcpiTableInstance);=0D +=0D //=0D // Completed successfully=0D //=0D --=20 2.30.0.windows.2 |
|
[PATCH 7/9] MdePkg: Add new structure for the Universal Payload ACPI Table Info Hob
Zhiguang Liu
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...> Signed-off-by: Zhiguang Liu <zhiguang.liu@...> --- MdePkg/Include/UniversalPayload/AcpiTable.h | 28 +++++++++++++++++++++++++= +++ MdePkg/MdePkg.dec | 3 +++ 2 files changed, 31 insertions(+) diff --git a/MdePkg/Include/UniversalPayload/AcpiTable.h b/MdePkg/Include/U= niversalPayload/AcpiTable.h new file mode 100644 index 0000000000..a85c555d9c --- /dev/null +++ b/MdePkg/Include/UniversalPayload/AcpiTable.h @@ -0,0 +1,28 @@ +/** @file=0D + Define the structure for the Payload APCI table.=0D +=0D +Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>=0D +SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#ifndef _PLD_ACPI_TABLE_H_=0D +#define _PLD_ACPI_TABLE_H_=0D +=0D +#include <Uefi.h>=0D +#include <UniversalPayload/UniversalPayload.h>=0D +=0D +#pragma pack(1)=0D +=0D +typedef struct {=0D + PLD_GENERIC_HEADER PldHeader;=0D + EFI_PHYSICAL_ADDRESS Rsdp;=0D +} PLD_ACPI_TABLE;=0D +=0D +#pragma pack()=0D +=0D +#define PLD_ACPI_TABLE_REVISION 1=0D +=0D +extern GUID gPldAcpiTableGuid;=0D +=0D +#endif //_PLD_ACPI_TABLE_H_=0D diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 7a62829059..42a7fa2155 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -830,6 +830,9 @@ ## Include/UniversalPayload/SmbiosTable.h=0D gPldSmbiosTableGuid =3D { 0x590a0d26, 0x06e5, 0x4d20, { 0x8a, 0x82, 0x59= , 0xea, 0x1b, 0x34, 0x98, 0x2d } }=0D =0D + ## Include/UniversalPayload/AcpiTable.h=0D + gPldAcpiTableGuid =3D { 0x9f9a9506, 0x5597, 0x4515, { 0xba, 0xb6, 0x8b, = 0xcd, 0xe7, 0x84, 0xba, 0x87 } }=0D +=0D [Guids.IA32, Guids.X64]=0D ## Include/Guid/Cper.h=0D gEfiIa32X64ErrorTypeCacheCheckGuid =3D { 0xA55701F5, 0xE3EF, 0x43de, { 0= xAC, 0x72, 0x24, 0x9B, 0x57, 0x3F, 0xAD, 0x2C }}=0D --=20 2.30.0.windows.2 |
|
[PATCH 6/9] UefiPayloadPkg: Creat gPldSmbiosTableGuid Hob
Zhiguang Liu
From SysTableInfo Hob, get Smbios table address, and creat gPldSmbiosTableG=
uid Hob to store it. Remove diretly adding smbios table to ConfigurationTable. Dxe module SmbiosDxe will parse it and install smbios table from it. Cc: Maurice Ma <maurice.ma@...> Cc: Guo Dong <guo.dong@...> Cc: Benjamin You <benjamin.you@...> Signed-off-by: Zhiguang Liu <zhiguang.liu@...> --- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 11 +---------- UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf | 3 +-- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 12 +++++++++++- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 3 ++- UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 3 ++- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c b/UefiPayloadPkg/Bl= SupportDxe/BlSupportDxe.c index a746d0581e..56b85b8e6d 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c @@ -2,7 +2,7 @@ This driver will report some MMIO/IO resources to dxe core, extract smbi= os and acpi=0D tables from bootloader.=0D =0D - Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>=0D + Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -129,15 +129,6 @@ BlDxeEntryPoint ( ASSERT_EFI_ERROR (Status);=0D }=0D =0D - //=0D - // Install Smbios Table=0D - //=0D - if (SystemTableInfo->SmbiosTableBase !=3D 0 && SystemTableInfo->SmbiosTa= bleSize !=3D 0) {=0D - DEBUG ((DEBUG_ERROR, "Install Smbios Table at 0x%lx, length 0x%x\n", S= ystemTableInfo->SmbiosTableBase, SystemTableInfo->SmbiosTableSize));=0D - Status =3D gBS->InstallConfigurationTable (&gEfiSmbiosTableGuid, (VOID= *)(UINTN)SystemTableInfo->SmbiosTableBase);=0D - ASSERT_EFI_ERROR (Status);=0D - }=0D -=0D //=0D // Find the frame buffer information and update PCDs=0D //=0D diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf b/UefiPayloadPkg/= BlSupportDxe/BlSupportDxe.inf index cebc811355..30f41f8c39 100644 --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf @@ -3,7 +3,7 @@ #=0D # Report some MMIO/IO resources to dxe core, extract smbios and acpi table= s=0D #=0D -# Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>= =0D +# Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>= =0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -43,7 +43,6 @@ =0D [Guids]=0D gEfiAcpiTableGuid=0D - gEfiSmbiosTableGuid=0D gUefiSystemTableInfoGuid=0D gUefiAcpiBoardInfoGuid=0D gEfiGraphicsInfoHobGuid=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.c index 805f5448d9..7b71d37f94 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c @@ -1,6 +1,6 @@ /** @file=0D =0D - Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>=0D + Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -234,6 +234,7 @@ BuildHobFromBl ( EFI_PEI_GRAPHICS_INFO_HOB *NewGfxInfo;=0D EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;=0D EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;=0D + PLD_SMBIOS_TABLE *SmBiosTableHob;=0D =0D //=0D // Parse memory info and build memory HOBs=0D @@ -276,6 +277,15 @@ BuildHobFromBl ( DEBUG ((DEBUG_INFO, "Detected Acpi Table at 0x%lx, length 0x%x\n", Sys= TableInfo.AcpiTableBase, SysTableInfo.AcpiTableSize));=0D DEBUG ((DEBUG_INFO, "Detected Smbios Table at 0x%lx, length 0x%x\n", S= ysTableInfo.SmbiosTableBase, SysTableInfo.SmbiosTableSize));=0D }=0D + //=0D + // Creat SmBios table Hob=0D + //=0D + SmBiosTableHob =3D BuildGuidHob (&gPldSmbiosTableGuid, sizeof (PLD_SMBIO= S_TABLE));=0D + ASSERT (SmBiosTableHob !=3D NULL);=0D + SmBiosTableHob->PldHeader.Revision =3D PLD_SMBIOS_TABLE_REVISION;=0D + SmBiosTableHob->PldHeader.Length =3D sizeof (PLD_SMBIOS_TABLE);=0D + SmBiosTableHob->SmBiosEntryPoint =3D SysTableInfo.SmbiosTableBase;=0D + DEBUG ((DEBUG_INFO, "Create smbios table gPldSmbiosTableGuid guid hob\n"= ));=0D =0D //=0D // Create guid hob for acpi board information=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h b/UefiPaylo= adPkg/UefiPayloadEntry/UefiPayloadEntry.h index 2c84d6ed53..e7d0d15118 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h @@ -1,6 +1,6 @@ /** @file=0D *=0D -* Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>=0D +* Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>=0D *=0D * SPDX-License-Identifier: BSD-2-Clause-Patent=0D *=0D @@ -31,6 +31,7 @@ #include <Guid/MemoryMapInfoGuid.h>=0D #include <Guid/AcpiBoardInfoGuid.h>=0D #include <Guid/GraphicsInfoHob.h>=0D +#include <UniversalPayload/SmbiosTable.h>=0D =0D =0D #define LEGACY_8259_MASK_REGISTER_MASTER 0x21=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf b/UefiPay= loadPkg/UefiPayloadEntry/UefiPayloadEntry.inf index cc59f1903b..444f39acf3 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf @@ -1,7 +1,7 @@ ## @file=0D # This is the first module for UEFI payload.=0D #=0D -# Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>= =0D +# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>= =0D # Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D @@ -64,6 +64,7 @@ gEfiGraphicsInfoHobGuid=0D gEfiGraphicsDeviceInfoHobGuid=0D gUefiAcpiBoardInfoGuid=0D + gPldSmbiosTableGuid=0D =0D [FeaturePcd.IA32]=0D gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUME= S=0D --=20 2.30.0.windows.2 |
|