diff mbox

[Linaro-uefi,v4,12/56] Platforms/Hisilicon: Add definition of NUMA related structures

Message ID 1479544691-59575-13-git-send-email-heyi.guo@linaro.org
State Accepted
Commit 85069eb277629a9aebca70c761d08b22d4bcac83
Headers show

Commit Message

gary guo Nov. 19, 2016, 8:37 a.m. UTC
Update gicc and memory affinity structure version to ACPI 6.0 and
add NUMA related structure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>
---
 Chips/Hisilicon/Include/Library/AcpiNextLib.h | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

Comments

Leif Lindholm Nov. 29, 2016, 2:31 p.m. UTC | #1
On Sat, Nov 19, 2016 at 04:37:27PM +0800, Heyi Guo wrote:
> Update gicc and memory affinity structure version to ACPI 6.0 and
> add NUMA related structure.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
> Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>

Pushed as 85069eb277629a9aebca70c761d08b22d4bcac83.

> ---
>  Chips/Hisilicon/Include/Library/AcpiNextLib.h | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/Chips/Hisilicon/Include/Library/AcpiNextLib.h b/Chips/Hisilicon/Include/Library/AcpiNextLib.h
> index 639b702..5a810ec 100644
> --- a/Chips/Hisilicon/Include/Library/AcpiNextLib.h
> +++ b/Chips/Hisilicon/Include/Library/AcpiNextLib.h
> @@ -32,14 +32,14 @@
>       GicRBase, GicRlength \
>    }
>  
> -#define EFI_ACPI_5_1_GICC_AFFINITY_STRUCTURE_INIT(                                              \
> +#define EFI_ACPI_6_0_GICC_AFFINITY_STRUCTURE_INIT(                                              \
>      ProximityDomain, ACPIProcessorUID, Flags, ClockDomain)                                      \
>    {                                                                                             \
>      3, sizeof (EFI_ACPI_5_1_GICC_AFFINITY_STRUCTURE),ProximityDomain ,                          \
>       ACPIProcessorUID,  Flags,  ClockDomain                                                     \
>    }
>  
> -#define EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE_INIT(                                              \
> +#define EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE_INIT(                                              \
>      ProximityDomain, AddressBaseLow, AddressBaseHigh, LengthLow, LengthHigh, Flags)               \
>    {                                                                                               \
>      1, sizeof (EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE),ProximityDomain , EFI_ACPI_RESERVED_WORD,  \
> @@ -47,6 +47,21 @@
>      EFI_ACPI_RESERVED_QWORD                                                                       \
>    }
>  
> +#pragma pack(1)
> +//
> +// Define the number of each table type.
> +// This is where the table layout is modified.
> +//
> +#define EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT  64
> +#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT                10
>  
> +
> +typedef struct {
> +  EFI_ACPI_6_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER          Header;
> +  EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE                      Memory[EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT];
> +  EFI_ACPI_6_0_GICC_AFFINITY_STRUCTURE                        Gicc[EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT];
> +} EFI_ACPI_STATIC_RESOURCE_AFFINITY_TABLE;
> +
> +#pragma pack()
>  #endif
>  
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/Chips/Hisilicon/Include/Library/AcpiNextLib.h b/Chips/Hisilicon/Include/Library/AcpiNextLib.h
index 639b702..5a810ec 100644
--- a/Chips/Hisilicon/Include/Library/AcpiNextLib.h
+++ b/Chips/Hisilicon/Include/Library/AcpiNextLib.h
@@ -32,14 +32,14 @@ 
      GicRBase, GicRlength \
   }
 
-#define EFI_ACPI_5_1_GICC_AFFINITY_STRUCTURE_INIT(                                              \
+#define EFI_ACPI_6_0_GICC_AFFINITY_STRUCTURE_INIT(                                              \
     ProximityDomain, ACPIProcessorUID, Flags, ClockDomain)                                      \
   {                                                                                             \
     3, sizeof (EFI_ACPI_5_1_GICC_AFFINITY_STRUCTURE),ProximityDomain ,                          \
      ACPIProcessorUID,  Flags,  ClockDomain                                                     \
   }
 
-#define EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE_INIT(                                              \
+#define EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE_INIT(                                              \
     ProximityDomain, AddressBaseLow, AddressBaseHigh, LengthLow, LengthHigh, Flags)               \
   {                                                                                               \
     1, sizeof (EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE),ProximityDomain , EFI_ACPI_RESERVED_WORD,  \
@@ -47,6 +47,21 @@ 
     EFI_ACPI_RESERVED_QWORD                                                                       \
   }
 
+#pragma pack(1)
+//
+// Define the number of each table type.
+// This is where the table layout is modified.
+//
+#define EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT  64
+#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT                10
 
+
+typedef struct {
+  EFI_ACPI_6_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER          Header;
+  EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE                      Memory[EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT];
+  EFI_ACPI_6_0_GICC_AFFINITY_STRUCTURE                        Gicc[EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT];
+} EFI_ACPI_STATIC_RESOURCE_AFFINITY_TABLE;
+
+#pragma pack()
 #endif