Re: [edk2-devel] [edk2-platforms][PATCH V2 3/6] CoffeelakeSiliconPkg: Clean up duplicated SmramMemoryReserve.h files

2019-09-04 Thread Kubacki, Michael A
Reviewed-by: Michael Kubacki 

> -Original Message-
> From: Chen, Marc W
> Sent: Monday, September 2, 2019 8:36 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Kubacki, Michael A
> ; Chaganty, Rangasai V
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][PATCH V2 3/6] CoffeelakeSiliconPkg: 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 cleaned up.
> Edk2Platforms\Silicon\Intel\CoffeelakeSiliconPkg\SampleCode\IntelFramework
> Pkg\Include\Guid\SmramMemoryReserve.h
> 
> Cc: Chasel Chiu 
> Cc: Michael Kubacki 
> Cc: Sai Chaganty 
> 
> Co-authored-by: Nate DeSimone 
> Signed-off-by: Marc W Chen 
> Signed-off-by: Nate DeSimone 
> ---
>  .../Include/Guid/SmramMemoryReserve.h | 51 ---
>  Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec  |  5 --
>  .../SystemAgent/SmmAccess/Dxe/SmmAccess.inf   |  2 +-
>  .../SmmAccess/Dxe/SmmAccessDriver.c   |  2 +-
>  4 files changed, 2 insertions(+), 58 deletions(-)  delete mode 100644
> Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include/Gui
> d/SmramMemoryReserve.h
> 
> diff --git
> a/Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include/G
> uid/SmramMemoryReserve.h
> b/Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include/G
> uid/SmramMemoryReserve.h
> deleted file mode 100644
> index 862a7c8aea..00
> ---
> a/Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include/G
> uid/SmramMemoryReserve.h
> @@ -1,51 +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) 2019 Intel Corporation. All rights reserved. 
> -
> -  SPDX-License-Identifier: BSD-2-Clause-Patent -**/
> -
> -#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/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
> b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
> index fa8c11e93d..6cf894498d 100644
> --- a/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
> +++ b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
> @@ -54,11 +54,6 @@ gEfiMemoryTypeInformationGuid  =  {0x4c19049f,
> 0x4137, 0x4dd3, {0x9c, 0x10, 0x8b  gEfiCapsuleVendorGuid  =  {0x711c703f,
> 0xc285, 0x4b10, {0xa3, 0xb0, 0x36, 0xec, 0xbd, 0x3c, 0x8b, 0xe2}}
> gEfiConsoleOutDeviceGuid = { 0xd3b36f2c, 0xd551, 0x11d4, { 0x9a, 0x46, 0x0,
> 0x90, 0x27, 0x3f, 0xc1, 0x4d}}
> 
> -##
> -## IntelFrameworkPkg
> -##
> -gEfiSmmPeiSmramMemoryReserveGuid =  {0x6dadf1d1, 0xd4cc, 0x4910, {0xbb,
> 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d}}
> -
>  ##
>  ## Common
>  ##
> diff --git
> a/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccess
> .inf
> b/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccess
> .inf
> index 9356781c9e..bb1944c9ec 100644
> ---
> a/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccess
> .inf
> +++ b/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAc
> +++ cess.inf
> @@ -41,7 +41,7 @@ gEfiSmmAccess2ProtocolGuid   ## PRODUCES
> 
> 
>  [Guids]
> -gEfiSmmPeiSmramMemoryReserveGuid
> +gEfiSmmSmramMemoryGuid
> 
> 
>  [Depex]
> diff --git
> a/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccess

Re: [edk2-devel] [edk2-platforms][PATCH V2 3/6] CoffeelakeSiliconPkg: Clean up duplicated SmramMemoryReserve.h files

2019-09-03 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Chen, Marc W
> Sent: Monday, September 2, 2019 11:36 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Kubacki, Michael A
> ; Chaganty, Rangasai V
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][PATCH V2 3/6] CoffeelakeSiliconPkg: 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 cleaned up.
> Edk2Platforms\Silicon\Intel\CoffeelakeSiliconPkg\SampleCode\IntelFramewor
> kPkg\Include\Guid\SmramMemoryReserve.h
> 
> Cc: Chasel Chiu 
> Cc: Michael Kubacki 
> Cc: Sai Chaganty 
> 
> Co-authored-by: Nate DeSimone 
> Signed-off-by: Marc W Chen 
> Signed-off-by: Nate DeSimone 
> ---
>  .../Include/Guid/SmramMemoryReserve.h | 51 ---
>  Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec  |  5 --
>  .../SystemAgent/SmmAccess/Dxe/SmmAccess.inf   |  2 +-
>  .../SmmAccess/Dxe/SmmAccessDriver.c   |  2 +-
>  4 files changed, 2 insertions(+), 58 deletions(-)  delete mode 100644
> Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include/
> Guid/SmramMemoryReserve.h
> 
> diff --git
> a/Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include
> /Guid/SmramMemoryReserve.h
> b/Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Includ
> e/Guid/SmramMemoryReserve.h
> deleted file mode 100644
> index 862a7c8aea..00
> ---
> a/Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include
> /Guid/SmramMemoryReserve.h
> @@ -1,51 +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) 2019 Intel Corporation. All rights reserved. 
> -
> -  SPDX-License-Identifier: BSD-2-Clause-Patent -**/
> -
> -#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/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
> b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
> index fa8c11e93d..6cf894498d 100644
> --- a/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
> +++ b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
> @@ -54,11 +54,6 @@ gEfiMemoryTypeInformationGuid  =  {0x4c19049f,
> 0x4137, 0x4dd3, {0x9c, 0x10, 0x8b  gEfiCapsuleVendorGuid  =
> {0x711c703f, 0xc285, 0x4b10, {0xa3, 0xb0, 0x36, 0xec, 0xbd, 0x3c, 0x8b, 0xe2}}
> gEfiConsoleOutDeviceGuid = { 0xd3b36f2c, 0xd551, 0x11d4, { 0x9a, 0x46, 0x0,
> 0x90, 0x27, 0x3f, 0xc1, 0x4d}}
> 
> -##
> -## IntelFrameworkPkg
> -##
> -gEfiSmmPeiSmramMemoryReserveGuid =  {0x6dadf1d1, 0xd4cc, 0x4910,
> {0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d}}
> -
>  ##
>  ## Common
>  ##
> diff --git
> a/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAcce
> ss.inf
> b/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAcce
> ss.inf
> index 9356781c9e..bb1944c9ec 100644
> ---
> a/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAcce
> ss.inf
> +++
> b/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAc
> +++ cess.inf
> @@ -41,7 +41,7 @@ gEfiSmmAccess2ProtocolGuid   ## PRODUCES
> 
> 
>  [Guids]
> -gEfiSmmPeiSmramMemoryReserveGuid
> +gEfiSmmSmramMemoryGuid
> 
> 
>  [Depex]
> diff --git
> a/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAcce
> 

[edk2-devel] [edk2-platforms][PATCH V2 3/6] CoffeelakeSiliconPkg: Clean up duplicated SmramMemoryReserve.h files

2019-09-02 Thread Marc W Chen
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 cleaned up.
Edk2Platforms\Silicon\Intel\CoffeelakeSiliconPkg\SampleCode\IntelFrameworkPkg\Include\Guid\SmramMemoryReserve.h

Cc: Chasel Chiu 
Cc: Michael Kubacki 
Cc: Sai Chaganty 

Co-authored-by: Nate DeSimone 
Signed-off-by: Marc W Chen 
Signed-off-by: Nate DeSimone 
---
 .../Include/Guid/SmramMemoryReserve.h | 51 ---
 Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec  |  5 --
 .../SystemAgent/SmmAccess/Dxe/SmmAccess.inf   |  2 +-
 .../SmmAccess/Dxe/SmmAccessDriver.c   |  2 +-
 4 files changed, 2 insertions(+), 58 deletions(-)
 delete mode 100644 
Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include/Guid/SmramMemoryReserve.h

diff --git 
a/Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include/Guid/SmramMemoryReserve.h
 
b/Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include/Guid/SmramMemoryReserve.h
deleted file mode 100644
index 862a7c8aea..00
--- 
a/Silicon/Intel/CoffeelakeSiliconPkg/SampleCode/IntelFrameworkPkg/Include/Guid/SmramMemoryReserve.h
@@ -1,51 +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) 2019 Intel Corporation. All rights reserved. 
-
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-
-#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/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec 
b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
index fa8c11e93d..6cf894498d 100644
--- a/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
+++ b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec
@@ -54,11 +54,6 @@ gEfiMemoryTypeInformationGuid  =  {0x4c19049f, 0x4137, 
0x4dd3, {0x9c, 0x10, 0x8b
 gEfiCapsuleVendorGuid  =  {0x711c703f, 0xc285, 0x4b10, {0xa3, 0xb0, 0x36, 
0xec, 0xbd, 0x3c, 0x8b, 0xe2}}
 gEfiConsoleOutDeviceGuid = { 0xd3b36f2c, 0xd551, 0x11d4, { 0x9a, 0x46, 0x0, 
0x90, 0x27, 0x3f, 0xc1, 0x4d}}
 
-##
-## IntelFrameworkPkg
-##
-gEfiSmmPeiSmramMemoryReserveGuid =  {0x6dadf1d1, 0xd4cc, 0x4910, {0xbb, 0x6e, 
0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d}}
-
 ##
 ## Common
 ##
diff --git 
a/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccess.inf 
b/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccess.inf
index 9356781c9e..bb1944c9ec 100644
--- a/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccess.inf
+++ b/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccess.inf
@@ -41,7 +41,7 @@ gEfiSmmAccess2ProtocolGuid   ## PRODUCES
 
 
 [Guids]
-gEfiSmmPeiSmramMemoryReserveGuid
+gEfiSmmSmramMemoryGuid
 
 
 [Depex]
diff --git 
a/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccessDriver.c
 
b/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccessDriver.c
index 08fd9266c6..17855d3942 100644
--- 
a/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccessDriver.c
+++ 
b/Silicon/Intel/CoffeelakeSiliconPkg/SystemAgent/SmmAccess/Dxe/SmmAccessDriver.c
@@ -49,7 +49,7 @@ SmmAccessDriverEntryPoint (
   ///
   /// Get Hob list
   ///
-  Hob = GetFirstGuidHob ();
+  Hob = GetFirstGuidHob ();
   if (Hob == NULL) {
 DEBUG ((DEBUG_WARN, "SmramMemoryReserve HOB not found\n"));
 return EFI_NOT_FOUND;
-- 
2.17.1.windows.2


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You