[edk2-devel] [edk2-platforms][PATCH V2 1/6] MinPlatformPkg: Clean up duplicated SmramMemoryReserve.h files
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2108 SmramMemoryReserve.h has been added into Edk2\MdePkg\Include\Guid\SmramMemoryReserve.h. The duplicated header file can be clean up. Edk2Platforms\Platform\Intel\MinPlatformPkg\Include\Guid\SmramMemoryReserve.h Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Co-authored-by: Nate DeSimone Signed-off-by: Marc W Chen Signed-off-by: Nate DeSimone --- .../Include/Guid/SmramMemoryReserve.h | 54 --- .../Intel/MinPlatformPkg/MinPlatformPkg.dec | 5 -- .../PlatformInitPei/PlatformInitPostMem.c | 4 +- .../PlatformInitPei/PlatformInitPostMem.inf | 4 +- .../TestPointCheckLib/PeiCheckSmmInfo.c | 6 +-- 5 files changed, 7 insertions(+), 66 deletions(-) delete mode 100644 Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h diff --git a/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h b/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h deleted file mode 100644 index 9918c768ba..00 --- a/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h @@ -1,54 +0,0 @@ -/** @file - Definition of GUIDed HOB for reserving SMRAM regions. - - This file defines: - * the GUID used to identify the GUID HOB for reserving SMRAM regions. - * the data structure of SMRAM descriptor to describe SMRAM candidate regions - * values of state of SMRAM candidate regions - * the GUID specific data structure of HOB for reserving SMRAM regions. - This GUIDed HOB can be used to convey the existence of the T-SEG reservation and H-SEG usage - -Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved. -SPDX-License-Identifier: BSD-2-Clause-Patent - - @par Revision Reference: - GUIDs defined in SmmCis spec version 0.9. - -**/ - -#ifndef _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_ -#define _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_ - -#define EFI_SMM_PEI_SMRAM_MEMORY_RESERVE \ - { \ -0x6dadf1d1, 0xd4cc, 0x4910, {0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d } \ - } - -/** -* GUID specific data structure of HOB for reserving SMRAM regions. -* -* Inconsistent with specification here: -* EFI_HOB_SMRAM_DESCRIPTOR_BLOCK has been changed to EFI_SMRAM_HOB_DESCRIPTOR_BLOCK. -* This inconsistency is kept in code in order for backward compatibility. -**/ -typedef struct { - /// - /// Designates the number of possible regions in the system - /// that can be usable for SMRAM. - /// - /// Inconsistent with specification here: - /// In Framework SMM CIS 0.91 specification, it defines the field type as UINTN. - /// However, HOBs are supposed to be CPU neutral, so UINT32 should be used instead. - /// - UINT32NumberOfSmmReservedRegions; - /// - /// Used throughout this protocol to describe the candidate - /// regions for SMRAM that are supported by this platform. - /// - EFI_SMRAM_DESCRIPTOR Descriptor[1]; -} EFI_SMRAM_HOB_DESCRIPTOR_BLOCK; - -extern EFI_GUID gEfiSmmPeiSmramMemoryReserveGuid; - -#endif - diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec index a642f9f3a3..d79f5ec1bd 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec @@ -42,11 +42,6 @@ gBoardNotificationInitGuid = {0x78dbcabf, 0xc544, 0x4e6f, {0xaf, 0x3a, 0x71, 0x1 gBoardAcpiTableGuid= {0xd70e9f57, 0x69f, 0x4bef, {0x96, 0xc0, 0x84, 0x74, 0xf4, 0xa2, 0x5f, 0x3a}} gBoardAcpiEnableGuid = {0x9727b610, 0xf645, 0x4429, {0x89, 0x21, 0x2c, 0x2b, 0x58, 0xdc, 0xbb, 0xa}} -## -## IntelFrameworkPkg -## -gEfiSmmPeiSmramMemoryReserveGuid = {0x6dadf1d1, 0xd4cc, 0x4910, {0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d}} - gDefaultDataFileGuid= { 0x1ae42876, 0x008f, 0x4161, { 0xb2, 0xb7, 0x1c, 0x0d, 0x15, 0xc5, 0xef, 0x43 }} gDefaultDataOptSizeFileGuid = { 0x003e7b41, 0x98a2, 0x4be2, { 0xb2, 0x7a, 0x6c, 0x30, 0xc7, 0x65, 0x52, 0x25 }} diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPostMem.c b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPostMem.c index 00877593bc..70e6b9a495 100644 --- a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPostMem.c +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPostMem.c @@ -1,7 +1,7 @@ /** @file Source code file for Platform Init PEI module -Copyright (c) 2017, Intel Corporation. All rights reserved. +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -113,7 +113,7 @@ SetCacheMtrrAfterEndOfPei ( Status = PeiServicesGetHobList ((VOID **) &Hob.Raw); while (!END_OF_HOB_LIST (Hob)) { if (Hob.Header->HobType == EFI_HOB_TYPE_GUID_EXTENSION) { - if (CompareGuid (&Hob.Guid->Name, &gEfiSmmPeiSmramMemoryReserveGuid)) { + if (CompareGuid (&Hob.Guid->Name,
Re: [edk2-devel] [edk2-platforms][PATCH V2 1/6] MinPlatformPkg: Clean up duplicated SmramMemoryReserve.h files
Reviewed-by: Chasel Chiu > -Original Message- > From: Chen, Marc W > Sent: Monday, September 2, 2019 11:36 PM > To: devel@edk2.groups.io > Cc: Kubacki, Michael A ; Chiu, Chasel > ; Desimone, Nathaniel L > ; Gao, Liming > Subject: [edk2-platforms][PATCH V2 1/6] MinPlatformPkg: Clean up > duplicated SmramMemoryReserve.h files > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2108 > > SmramMemoryReserve.h has been added into > Edk2\MdePkg\Include\Guid\SmramMemoryReserve.h. > > The duplicated header file can be clean up. > Edk2Platforms\Platform\Intel\MinPlatformPkg\Include\Guid\SmramMemory > Reserve.h > > Cc: Michael Kubacki > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Liming Gao > > Co-authored-by: Nate DeSimone > Signed-off-by: Marc W Chen > Signed-off-by: Nate DeSimone > --- > .../Include/Guid/SmramMemoryReserve.h | 54 --- > .../Intel/MinPlatformPkg/MinPlatformPkg.dec | 5 -- > .../PlatformInitPei/PlatformInitPostMem.c | 4 +- > .../PlatformInitPei/PlatformInitPostMem.inf | 4 +- > .../TestPointCheckLib/PeiCheckSmmInfo.c | 6 +-- > 5 files changed, 7 insertions(+), 66 deletions(-) delete mode 100644 > Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h > > diff --git > a/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h > b/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h > deleted file mode 100644 > index 9918c768ba..00 > --- a/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h > @@ -1,54 +0,0 @@ > -/** @file > - Definition of GUIDed HOB for reserving SMRAM regions. > - > - This file defines: > - * the GUID used to identify the GUID HOB for reserving SMRAM regions. > - * the data structure of SMRAM descriptor to describe SMRAM candidate > regions > - * values of state of SMRAM candidate regions > - * the GUID specific data structure of HOB for reserving SMRAM regions. > - This GUIDed HOB can be used to convey the existence of the T-SEG > reservation and H-SEG usage > - > -Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved. > -SPDX-License-Identifier: BSD-2-Clause-Patent > - > - @par Revision Reference: > - GUIDs defined in SmmCis spec version 0.9. > - > -**/ > - > -#ifndef _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_ > -#define _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_ > - > -#define EFI_SMM_PEI_SMRAM_MEMORY_RESERVE \ > - { \ > -0x6dadf1d1, 0xd4cc, 0x4910, {0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, > 0x3d } \ > - } > - > -/** > -* GUID specific data structure of HOB for reserving SMRAM regions. > -* > -* Inconsistent with specification here: > -* EFI_HOB_SMRAM_DESCRIPTOR_BLOCK has been changed to > EFI_SMRAM_HOB_DESCRIPTOR_BLOCK. > -* This inconsistency is kept in code in order for backward compatibility. > -**/ > -typedef struct { > - /// > - /// Designates the number of possible regions in the system > - /// that can be usable for SMRAM. > - /// > - /// Inconsistent with specification here: > - /// In Framework SMM CIS 0.91 specification, it defines the field type as > UINTN. > - /// However, HOBs are supposed to be CPU neutral, so UINT32 should be > used instead. > - /// > - UINT32NumberOfSmmReservedRegions; > - /// > - /// Used throughout this protocol to describe the candidate > - /// regions for SMRAM that are supported by this platform. > - /// > - EFI_SMRAM_DESCRIPTOR Descriptor[1]; > -} EFI_SMRAM_HOB_DESCRIPTOR_BLOCK; > - > -extern EFI_GUID gEfiSmmPeiSmramMemoryReserveGuid; > - > -#endif > - > diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec > b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec > index a642f9f3a3..d79f5ec1bd 100644 > --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec > +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec > @@ -42,11 +42,6 @@ gBoardNotificationInitGuid = {0x78dbcabf, 0xc544, > 0x4e6f, {0xaf, 0x3a, 0x71, 0x1 > gBoardAcpiTableGuid= {0xd70e9f57, 0x69f, 0x4bef, {0x96, 0xc0, > 0x84, 0x74, 0xf4, 0xa2, 0x5f, 0x3a}} > gBoardAcpiEnableGuid = {0x9727b610, 0xf645, 0x4429, {0x89, 0x21, > 0x2c, 0x2b, 0x58, 0xdc, 0xbb, 0xa}} > > -## > -## IntelFrameworkPkg > -## > -gEfiSmmPeiSmramMemoryReserveGuid = {0x6dadf1d1, 0xd4cc, 0x4910, > {0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d}} > - > gDefaultDataFileGuid= { 0x1ae42876, 0x008f, > 0x4161, { 0xb2, 0xb7, 0x1c, 0x0d, 0x15, 0xc5, 0xef, 0x43 }} > gDefaultDataOptSizeFileGuid = { 0x003e7b41, 0x98a2, > 0x4be2, { 0xb2, 0x7a, 0x6c, 0x30, 0xc7, 0x65, 0x52, 0x25 }} > > diff --git > a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPo > stMem.c > b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitP > ostMem.c > index 00877593bc..70e6b9a495 100644 > --- > a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPo > stMem.c > +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/Platfor > +++ mInitPostMem.c > @@
Re: [edk2-devel] [edk2-platforms][PATCH V2 1/6] MinPlatformPkg: Clean up duplicated SmramMemoryReserve.h files
Reviewed-by: Michael Kubacki > -Original Message- > From: devel@edk2.groups.io On Behalf Of Chiu, Chasel > Sent: Tuesday, September 3, 2019 2:12 AM > To: Chen, Marc W ; devel@edk2.groups.io > Cc: Kubacki, Michael A ; Desimone, Nathaniel L > ; Gao, Liming > Subject: Re: [edk2-devel] [edk2-platforms][PATCH V2 1/6] MinPlatformPkg: > Clean up duplicated SmramMemoryReserve.h files > > > Reviewed-by: Chasel Chiu > > > -Original Message- > > From: Chen, Marc W > > Sent: Monday, September 2, 2019 11:36 PM > > To: devel@edk2.groups.io > > Cc: Kubacki, Michael A ; Chiu, Chasel > > ; Desimone, Nathaniel L > > ; Gao, Liming > > Subject: [edk2-platforms][PATCH V2 1/6] MinPlatformPkg: Clean up > > duplicated SmramMemoryReserve.h files > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2108 > > > > SmramMemoryReserve.h has been added into > > Edk2\MdePkg\Include\Guid\SmramMemoryReserve.h. > > > > The duplicated header file can be clean up. > > Edk2Platforms\Platform\Intel\MinPlatformPkg\Include\Guid\SmramMemory > > Reserve.h > > > > Cc: Michael Kubacki > > Cc: Chasel Chiu > > Cc: Nate DeSimone > > Cc: Liming Gao > > > > Co-authored-by: Nate DeSimone > > Signed-off-by: Marc W Chen > > Signed-off-by: Nate DeSimone > > --- > > .../Include/Guid/SmramMemoryReserve.h | 54 --- > > .../Intel/MinPlatformPkg/MinPlatformPkg.dec | 5 -- > > .../PlatformInitPei/PlatformInitPostMem.c | 4 +- > > .../PlatformInitPei/PlatformInitPostMem.inf | 4 +- > > .../TestPointCheckLib/PeiCheckSmmInfo.c | 6 +-- > > 5 files changed, 7 insertions(+), 66 deletions(-) delete mode 100644 > > Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h > > > > diff --git > > a/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h > > b/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h > > deleted file mode 100644 > > index 9918c768ba..00 > > --- a/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h > > @@ -1,54 +0,0 @@ > > -/** @file > > - Definition of GUIDed HOB for reserving SMRAM regions. > > - > > - This file defines: > > - * the GUID used to identify the GUID HOB for reserving SMRAM regions. > > - * the data structure of SMRAM descriptor to describe SMRAM > > candidate regions > > - * values of state of SMRAM candidate regions > > - * the GUID specific data structure of HOB for reserving SMRAM regions. > > - This GUIDed HOB can be used to convey the existence of the T-SEG > > reservation and H-SEG usage > > - > > -Copyright (c) 2007 - 2010, Intel Corporation. All rights > > reserved. > > -SPDX-License-Identifier: BSD-2-Clause-Patent > > - > > - @par Revision Reference: > > - GUIDs defined in SmmCis spec version 0.9. > > - > > -**/ > > - > > -#ifndef _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_ > > -#define _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_ > > - > > -#define EFI_SMM_PEI_SMRAM_MEMORY_RESERVE \ > > - { \ > > -0x6dadf1d1, 0xd4cc, 0x4910, {0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, > > 0x3d } \ > > - } > > - > > -/** > > -* GUID specific data structure of HOB for reserving SMRAM regions. > > -* > > -* Inconsistent with specification here: > > -* EFI_HOB_SMRAM_DESCRIPTOR_BLOCK has been changed to > > EFI_SMRAM_HOB_DESCRIPTOR_BLOCK. > > -* This inconsistency is kept in code in order for backward compatibility. > > -**/ > > -typedef struct { > > - /// > > - /// Designates the number of possible regions in the system > > - /// that can be usable for SMRAM. > > - /// > > - /// Inconsistent with specification here: > > - /// In Framework SMM CIS 0.91 specification, it defines the field > > type as UINTN. > > - /// However, HOBs are supposed to be CPU neutral, so UINT32 should > > be used instead. > > - /// > > - UINT32NumberOfSmmReservedRegions; > > - /// > > - /// Used throughout this protocol to describe the candidate > > - /// regions for SMRAM that are supported by this platform. > > - /// > > - EFI_SMRAM_DESCRIPTOR Descriptor[1]; -} > > EFI_SMRAM_HOB_DESCRIPTOR_BLOCK; > > - > > -extern EFI_GUID gEfiSmmPeiSmramMemoryReserveGuid; > > - > > -#endif > > - > > diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec > > b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec > > index a642f9f3a3..