public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve
@ 2018-11-20  9:01 Ming Huang
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe Ming Huang
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Ming Huang @ 2018-11-20  9:01 UTC (permalink / raw)
  To: leif.lindholm, linaro-uefi, edk2-devel, graeme.gregory
  Cc: ard.biesheuvel, michael.d.kinney, lersek, wanghuiqiang,
	huangming23, zhangjinsong2, huangdaode, john.garry, xinliang.liu,
	zhangfeng56, Ming Huang

Main Change since v2:
1. Use new way to fix secure boot bug in FlashFvbDxe;
2. Spilit patch from "Modify Gic base";
3. Modify some commit messages;

Code can also be found in github:
https://github.com/hisilicon/OpenPlatformPkg.git
branch: d06-acs-platforms-v3


Ming Huang (5):
  Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  Hisilicon/D06: Modify Gic base
  Hisilicon/D06: Correct PcdGicInterruptInterfaceBase
  Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot
  Hisilicon/D06: Move some functions to OemMiscLib

 Platform/Hisilicon/D06/D06.dsc                                              |   2 +-
 Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf                       |   1 +
 Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf |   2 -
 Silicon/Hisilicon/Include/Library/OemMiscLib.h                              |   9 +
 Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h      |   4 -
 Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c                |  82 +++++++++
 Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c                         |   5 +-
 Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c   |  90 +--------
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl                |  28 +--
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl                    |  18 +-
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc                   | 194 ++++++++++----------
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/MadtHi1620.aslc                   |   2 +-
 12 files changed, 224 insertions(+), 213 deletions(-)

-- 
2.9.5



^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20  9:01 [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve Ming Huang
@ 2018-11-20  9:01 ` Ming Huang
  2018-11-20 12:13   ` Leif Lindholm
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 2/5] Hisilicon/D06: Modify Gic base Ming Huang
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Ming Huang @ 2018-11-20  9:01 UTC (permalink / raw)
  To: leif.lindholm, linaro-uefi, edk2-devel, graeme.gregory
  Cc: ard.biesheuvel, michael.d.kinney, lersek, wanghuiqiang,
	huangming23, zhangjinsong2, huangdaode, john.garry, xinliang.liu,
	zhangfeng56, Ming Huang

Now that the generic Variable Runtime DXE code no longer
distinguishes between gEfiVariableGuid and
gEfiAuthenticatedVariableGuid in the varstore FV header.
We can relax the check in the flashFvb driver to accept
either GUID regardless of whether we are running a secure
boot capable build or not.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>
---
 Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf | 1 +
 Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c   | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
index f8be4741ef7c..a0226e0d87c0 100644
--- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
+++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
@@ -44,6 +44,7 @@ [LibraryClasses]
   UefiRuntimeLib
 
 [Guids]
+  gEfiAuthenticatedVariableGuid
   gEfiSystemNvDataFvGuid
   gEfiVariableGuid
 
diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
index e18cc9e06ec2..12baed41cd4e 100644
--- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
+++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
@@ -189,7 +189,7 @@ InitializeFvAndVariableStoreHeaders (
     // VARIABLE_STORE_HEADER
     //
     VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)Headers + (UINTN)FirmwareVolumeHeader->HeaderLength);
-    CopyGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid);
+    CopyGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid);
     VariableStoreHeader->Size = PcdGet32(PcdFlashNvStorageVariableSize) - FirmwareVolumeHeader->HeaderLength;
     VariableStoreHeader->Format            = VARIABLE_STORE_FORMATTED;
     VariableStoreHeader->State             = VARIABLE_STORE_HEALTHY;
@@ -258,7 +258,8 @@ ValidateFvHeader (
     VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)FwVolHeader + (UINTN)FwVolHeader->HeaderLength);
 
     // Check the Variable Store Guid
-    if ( CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) == FALSE )
+    if (!CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) &&
+        !CompareGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid))
     {
         DEBUG ((EFI_D_ERROR, "ValidateFvHeader: Variable Store Guid non-compatible\n"));
         return EFI_NOT_FOUND;
-- 
2.9.5



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH edk2-platforms v3 2/5] Hisilicon/D06: Modify Gic base
  2018-11-20  9:01 [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve Ming Huang
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe Ming Huang
@ 2018-11-20  9:01 ` Ming Huang
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 3/5] Hisilicon/D06: Correct PcdGicInterruptInterfaceBase Ming Huang
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Ming Huang @ 2018-11-20  9:01 UTC (permalink / raw)
  To: leif.lindholm, linaro-uefi, edk2-devel, graeme.gregory
  Cc: ard.biesheuvel, michael.d.kinney, lersek, wanghuiqiang,
	huangming23, zhangjinsong2, huangdaode, john.garry, xinliang.liu,
	zhangfeng56, Ming Huang

The values of GICD are wrong, so modify it.
Fix SBSA test case 21:
21 : Check GIC version
     GIC version is   0
     Failed on PE -    0 for Level=  3 : Result:  --FAIL-- 2

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>
---
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/MadtHi1620.aslc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/MadtHi1620.aslc b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/MadtHi1620.aslc
index 43b43142aff4..d3de69a3ef6c 100644
--- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/MadtHi1620.aslc
+++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/MadtHi1620.aslc
@@ -361,7 +361,7 @@ EFI_ACPI_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
         0x0, 0x0, 25, 0x4000AA000000 + 0x6C0000 /* GicRBase */, 0),
   },
 
-  EFI_ACPI_6_1_GIC_DISTRIBUTOR_INIT(0, 0xAA000000, 0, 0x4),
+  EFI_ACPI_6_1_GIC_DISTRIBUTOR_INIT(0, 0xAE000000, 0, 0x4),
   {
     EFI_ACPI_6_1_GIC_ITS_INIT(0,0x202100000), //peri a
 //    EFI_ACPI_6_1_GIC_ITS_INIT(1,0x400202100000), //peri a
-- 
2.9.5



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH edk2-platforms v3 3/5] Hisilicon/D06: Correct PcdGicInterruptInterfaceBase
  2018-11-20  9:01 [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve Ming Huang
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe Ming Huang
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 2/5] Hisilicon/D06: Modify Gic base Ming Huang
@ 2018-11-20  9:01 ` Ming Huang
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 4/5] Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot Ming Huang
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Ming Huang @ 2018-11-20  9:01 UTC (permalink / raw)
  To: leif.lindholm, linaro-uefi, edk2-devel, graeme.gregory
  Cc: ard.biesheuvel, michael.d.kinney, lersek, wanghuiqiang,
	huangming23, zhangjinsong2, huangdaode, john.garry, xinliang.liu,
	zhangfeng56, Ming Huang

The PcdGicInterruptInterfaceBase(0xFE000000) is wrong,
it just copy from D05/D03. Maybe somewhere will need
the right value of Pcd.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>
---
 Platform/Hisilicon/D06/D06.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc
index e8bf5582572a..742fe30b62c3 100644
--- a/Platform/Hisilicon/D06/D06.dsc
+++ b/Platform/Hisilicon/D06/D06.dsc
@@ -181,7 +181,7 @@ [PcdsFixedAtBuild.common]
   gHisiTokenSpaceGuid.PcdArmPrimaryCoreTemp|0x80010000
   gArmTokenSpaceGuid.PcdGicDistributorBase|0xAE000000
   gArmTokenSpaceGuid.PcdGicRedistributorsBase|0xAE100000
-  gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0xFE000000
+  gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x9B000000
 
 
 
-- 
2.9.5



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH edk2-platforms v3 4/5] Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot
  2018-11-20  9:01 [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve Ming Huang
                   ` (2 preceding siblings ...)
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 3/5] Hisilicon/D06: Correct PcdGicInterruptInterfaceBase Ming Huang
@ 2018-11-20  9:01 ` Ming Huang
  2019-02-11 14:45   ` Leif Lindholm
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 5/5] Hisilicon/D06: Move some functions to OemMiscLib Ming Huang
  2018-11-20 13:02 ` [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve Leif Lindholm
  5 siblings, 1 reply; 19+ messages in thread
From: Ming Huang @ 2018-11-20  9:01 UTC (permalink / raw)
  To: leif.lindholm, linaro-uefi, edk2-devel, graeme.gregory
  Cc: ard.biesheuvel, michael.d.kinney, lersek, wanghuiqiang,
	huangming23, zhangjinsong2, huangdaode, john.garry, xinliang.liu,
	zhangfeng56, Ming Huang

Linux kernel will recognize NUMA node by processor order,
and the Node and proximity domain (PXM) will be not identical
between BIOS and OS kernel after changing to TA(Totem A) boot,
so adjust the NUMA node number and proximity domain (PXM) to
match.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>
---
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl |  28 +--
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl     |  18 +-
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc    | 194 ++++++++++----------
 3 files changed, 120 insertions(+), 120 deletions(-)

diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl
index 87a2da8843e4..27fde2e09bfe 100644
--- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl
+++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl
@@ -212,7 +212,7 @@ Scope(_SB)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x01)
+    Return(0x00)
   }
 } // Device(PCI0)
 
@@ -262,7 +262,7 @@ Device (PCI1)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x01)
+    Return(0x00)
   }
 } // Device(PCI1)
 
@@ -325,7 +325,7 @@ Device (PCI2)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x01)
+    Return(0x00)
   }
 }
 
@@ -374,7 +374,7 @@ Device (PCI3)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x01)
+    Return(0x00)
   }
 }
 
@@ -423,7 +423,7 @@ Device (PCI4)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x01)
+    Return(0x00)
   }
 }
 
@@ -733,7 +733,7 @@ Device (PCI5)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x01)
+    Return(0x00)
   }
 }
 
@@ -866,11 +866,11 @@ Device (PCI6)
     // Never allow SHPC (no SHPC controller in this system)
     And(CTRL,0x1D,CTRL)
 
-    If(LNotEqual(Arg1,One)) {  // Unknown revision
+    If(LNotEqual(Arg1,One)) { // Unknown revision
       Or(CDW1,0x08,CDW1)
     }
 
-    If(LNotEqual(CDW3,CTRL)) {  // Capabilities bits were masked
+    If(LNotEqual(CDW3,CTRL)) { // Capabilities bits were masked
       Or(CDW1,0x10,CDW1)
     }
 
@@ -924,7 +924,7 @@ Device (PCI6)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x03)
+    Return(0x02)
   }
 } // Device(PCI6)
 
@@ -974,7 +974,7 @@ Device (PCI7)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x03)
+    Return(0x02)
   }
 } // Device(PCI7)
 
@@ -1038,7 +1038,7 @@ Device (PCI8)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x03)
+    Return(0x02)
   }
 }// Device(PCI8)
 
@@ -1087,7 +1087,7 @@ Device (PCI9)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x03)
+    Return(0x02)
   }
 }// Device(PCI9)
 
@@ -1136,7 +1136,7 @@ Device (PCIA)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x03)
+    Return(0x02)
   }
 }// Device(PCIA)
 
@@ -1210,7 +1210,7 @@ Device (PCIB)
 
   Method (_PXM, 0, NotSerialized)
   {
-    Return(0x03)
+    Return(0x02)
   }
 }
 
diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl
index 08e15c17bf40..994018db96b5 100644
--- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl
+++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl
@@ -53,7 +53,7 @@
 [0004]                      PRI Interrupt : 00000000
 [0004]                     GERR Interrupt : 00000000
 [0004]                     Sync Interrupt : 00000000
-[0004]                   Proximity Domain : 00000001
+[0004]                   Proximity Domain : 00000000
 [0004]             DeviceID mapping index : 00000002
 
 [0004]                         Input base : 00000000
@@ -97,7 +97,7 @@
 [0004]                      PRI Interrupt : 00000000
 [0004]                     GERR Interrupt : 00000000
 [0004]                     Sync Interrupt : 00000000
-[0004]                   Proximity Domain : 00000001
+[0004]                   Proximity Domain : 00000000
 [0004]             DeviceID mapping index : 0001
 
 [0004]                         Input base : 00007c00
@@ -135,7 +135,7 @@
 [0004]                      PRI Interrupt : 00000000
 [0004]                     GERR Interrupt : 00000000
 [0004]                     Sync Interrupt : 00000000
-[0004]                   Proximity Domain : 00000001
+[0004]                   Proximity Domain : 00000000
 [0004]             DeviceID mapping index : 00000001
 
 [0004]                         Input base : 00007400
@@ -173,7 +173,7 @@
 [0004]                      PRI Interrupt : 00000000
 [0004]                     GERR Interrupt : 00000000
 [0004]                     Sync Interrupt : 00000000
-[0004]                   Proximity Domain : 00000003
+[0004]                   Proximity Domain : 00000002
 [0004]             DeviceID mapping index : 00000002
 
 [0004]                         Input base : 00008000
@@ -217,7 +217,7 @@
 [0004]                      PRI Interrupt : 00000000
 [0004]                     GERR Interrupt : 00000000
 [0004]                     Sync Interrupt : 00000000
-[0004]                   Proximity Domain : 00000003
+[0004]                   Proximity Domain : 00000002
 [0004]             DeviceID mapping index : 0001
 
 [0004]                         Input base : 0000BC00
@@ -255,7 +255,7 @@
 [0004]                      PRI Interrupt : 00000000
 [0004]                     GERR Interrupt : 00000000
 [0004]                     Sync Interrupt : 00000000
-[0004]                   Proximity Domain : 00000003
+[0004]                   Proximity Domain : 00000002
 [0004]             DeviceID mapping index : 00000001
 
 [0004]                         Input base : 0000B400
@@ -288,8 +288,8 @@
                             Read Allocate : 0
                                  Override : 0
 [0002]                           Reserved : 0000
-[0001]       Memory Flags (decoded below) : 00
-                                Coherency : 0
+[0001]       Memory Flags (decoded below) : 01
+                                Coherency : 1
                          Device Attribute : 0
 [0004]                      ATS Attribute : 00000000
 [0004]                 PCI Segment Number : 00000000           // should match with above MCFG
@@ -1911,7 +1911,7 @@
 [34Ch 0844   4]                   Input base : 00000000
 [350h 0848   4]                     ID Count : 00000001
 [354h 0852   4]                  Output Base : 00000100
-[358h 0856   4]             Output Reference : 00000100
+[358h 0856   4]             Output Reference : 00000138
 [35Ch 0860   4]        Flags (decoded below) : 00000001
                               Single Mapping : 1
 /* RDE device report++.*/
diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc
index aea4c2185878..d77bddefc874 100644
--- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc
+++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc
@@ -55,106 +55,106 @@ EFI_ACPI_STATIC_RESOURCE_AFFINITY_TABLE Srat = {
   },
 
   {
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000000,0x00000001,0x00000000),   //GICC Affinity Processor 0
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000001,0x00000001,0x00000000),   //GICC Affinity Processor 1
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000002,0x00000001,0x00000000),   //GICC Affinity Processor 2
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000003,0x00000001,0x00000000),   //GICC Affinity Processor 3
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000004,0x00000001,0x00000000),   //GICC Affinity Processor 4
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000005,0x00000001,0x00000000),   //GICC Affinity Processor 5
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000006,0x00000001,0x00000000),   //GICC Affinity Processor 6
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000007,0x00000001,0x00000000),   //GICC Affinity Processor 7
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000008,0x00000001,0x00000000),   //GICC Affinity Processor 8
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000009,0x00000001,0x00000000),   //GICC Affinity Processor 9
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000A,0x00000001,0x00000000),   //GICC Affinity Processor 10
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000B,0x00000001,0x00000000),   //GICC Affinity Processor 11
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000C,0x00000001,0x00000000),   //GICC Affinity Processor 12
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000D,0x00000001,0x00000000),   //GICC Affinity Processor 13
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000E,0x00000001,0x00000000),   //GICC Affinity Processor 14
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000F,0x00000001,0x00000000),   //GICC Affinity Processor 15
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000010,0x00000001,0x00000000),   //GICC Affinity Processor 16
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000011,0x00000001,0x00000000),   //GICC Affinity Processor 17
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000012,0x00000001,0x00000000),   //GICC Affinity Processor 18
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000013,0x00000001,0x00000000),   //GICC Affinity Processor 19
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000014,0x00000001,0x00000000),   //GICC Affinity Processor 20
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000015,0x00000001,0x00000000),   //GICC Affinity Processor 21
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000016,0x00000001,0x00000000),   //GICC Affinity Processor 22
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000017,0x00000001,0x00000000),   //GICC Affinity Processor 23
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000018,0x00000001,0x00000000),   //GICC Affinity Processor 24
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000019,0x00000001,0x00000000),   //GICC Affinity Processor 25
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001A,0x00000001,0x00000000),   //GICC Affinity Processor 26
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001B,0x00000001,0x00000000),   //GICC Affinity Processor 27
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001C,0x00000001,0x00000000),   //GICC Affinity Processor 28
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001D,0x00000001,0x00000000),   //GICC Affinity Processor 29
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001E,0x00000001,0x00000000),   //GICC Affinity Processor 30
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001F,0x00000001,0x00000000),   //GICC Affinity Processor 31
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000020,0x00000001,0x00000000),   //GICC Affinity Processor 32
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000021,0x00000001,0x00000000),   //GICC Affinity Processor 33
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000022,0x00000001,0x00000000),   //GICC Affinity Processor 34
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000023,0x00000001,0x00000000),   //GICC Affinity Processor 35
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000024,0x00000001,0x00000000),   //GICC Affinity Processor 36
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000025,0x00000001,0x00000000),   //GICC Affinity Processor 37
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000026,0x00000001,0x00000000),   //GICC Affinity Processor 38
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000027,0x00000001,0x00000000),   //GICC Affinity Processor 39
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000028,0x00000001,0x00000000),   //GICC Affinity Processor 40
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000029,0x00000001,0x00000000),   //GICC Affinity Processor 41
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002A,0x00000001,0x00000000),   //GICC Affinity Processor 42
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002B,0x00000001,0x00000000),   //GICC Affinity Processor 43
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002C,0x00000001,0x00000000),   //GICC Affinity Processor 44
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002D,0x00000001,0x00000000),   //GICC Affinity Processor 45
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002E,0x00000001,0x00000000),   //GICC Affinity Processor 46
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002F,0x00000001,0x00000000),   //GICC Affinity Processor 47
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000000,0x00000001,0x00000000),   //GICC Affinity Processor 0
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000001,0x00000001,0x00000000),   //GICC Affinity Processor 1
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000002,0x00000001,0x00000000),   //GICC Affinity Processor 2
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000003,0x00000001,0x00000000),   //GICC Affinity Processor 3
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000004,0x00000001,0x00000000),   //GICC Affinity Processor 4
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000005,0x00000001,0x00000000),   //GICC Affinity Processor 5
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000006,0x00000001,0x00000000),   //GICC Affinity Processor 6
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000007,0x00000001,0x00000000),   //GICC Affinity Processor 7
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000008,0x00000001,0x00000000),   //GICC Affinity Processor 8
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000009,0x00000001,0x00000000),   //GICC Affinity Processor 9
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000A,0x00000001,0x00000000),   //GICC Affinity Processor 10
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000B,0x00000001,0x00000000),   //GICC Affinity Processor 11
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000C,0x00000001,0x00000000),   //GICC Affinity Processor 12
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000D,0x00000001,0x00000000),   //GICC Affinity Processor 13
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000E,0x00000001,0x00000000),   //GICC Affinity Processor 14
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000F,0x00000001,0x00000000),   //GICC Affinity Processor 15
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000010,0x00000001,0x00000000),   //GICC Affinity Processor 16
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000011,0x00000001,0x00000000),   //GICC Affinity Processor 17
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000012,0x00000001,0x00000000),   //GICC Affinity Processor 18
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000013,0x00000001,0x00000000),   //GICC Affinity Processor 19
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000014,0x00000001,0x00000000),   //GICC Affinity Processor 20
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000015,0x00000001,0x00000000),   //GICC Affinity Processor 21
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000016,0x00000001,0x00000000),   //GICC Affinity Processor 22
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000017,0x00000001,0x00000000),   //GICC Affinity Processor 23
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000018,0x00000001,0x00000000),   //GICC Affinity Processor 24
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000019,0x00000001,0x00000000),   //GICC Affinity Processor 25
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001A,0x00000001,0x00000000),   //GICC Affinity Processor 26
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001B,0x00000001,0x00000000),   //GICC Affinity Processor 27
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001C,0x00000001,0x00000000),   //GICC Affinity Processor 28
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001D,0x00000001,0x00000000),   //GICC Affinity Processor 29
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001E,0x00000001,0x00000000),   //GICC Affinity Processor 30
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001F,0x00000001,0x00000000),   //GICC Affinity Processor 31
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000020,0x00000001,0x00000000),   //GICC Affinity Processor 32
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000021,0x00000001,0x00000000),   //GICC Affinity Processor 33
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000022,0x00000001,0x00000000),   //GICC Affinity Processor 34
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000023,0x00000001,0x00000000),   //GICC Affinity Processor 35
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000024,0x00000001,0x00000000),   //GICC Affinity Processor 36
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000025,0x00000001,0x00000000),   //GICC Affinity Processor 37
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000026,0x00000001,0x00000000),   //GICC Affinity Processor 38
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000027,0x00000001,0x00000000),   //GICC Affinity Processor 39
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000028,0x00000001,0x00000000),   //GICC Affinity Processor 40
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000029,0x00000001,0x00000000),   //GICC Affinity Processor 41
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002A,0x00000001,0x00000000),   //GICC Affinity Processor 42
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002B,0x00000001,0x00000000),   //GICC Affinity Processor 43
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002C,0x00000001,0x00000000),   //GICC Affinity Processor 44
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002D,0x00000001,0x00000000),   //GICC Affinity Processor 45
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002E,0x00000001,0x00000000),   //GICC Affinity Processor 46
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002F,0x00000001,0x00000000),   //GICC Affinity Processor 47
 
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000030,0x00000001,0x00000000),   //GICC Affinity Processor 48
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000031,0x00000001,0x00000000),   //GICC Affinity Processor 49
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000032,0x00000001,0x00000000),   //GICC Affinity Processor 50
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000033,0x00000001,0x00000000),   //GICC Affinity Processor 51
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000034,0x00000001,0x00000000),   //GICC Affinity Processor 52
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000035,0x00000001,0x00000000),   //GICC Affinity Processor 53
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000036,0x00000001,0x00000000),   //GICC Affinity Processor 54
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000037,0x00000001,0x00000000),   //GICC Affinity Processor 55
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000038,0x00000001,0x00000000),   //GICC Affinity Processor 56
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000039,0x00000001,0x00000000),   //GICC Affinity Processor 57
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003A,0x00000001,0x00000000),   //GICC Affinity Processor 58
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003B,0x00000001,0x00000000),   //GICC Affinity Processor 59
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003C,0x00000001,0x00000000),   //GICC Affinity Processor 60
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003D,0x00000001,0x00000000),   //GICC Affinity Processor 61
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003E,0x00000001,0x00000000),   //GICC Affinity Processor 62
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003F,0x00000001,0x00000000),   //GICC Affinity Processor 63
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000040,0x00000001,0x00000000),   //GICC Affinity Processor 64
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000041,0x00000001,0x00000000),   //GICC Affinity Processor 65
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000042,0x00000001,0x00000000),   //GICC Affinity Processor 66
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000043,0x00000001,0x00000000),   //GICC Affinity Processor 67
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000044,0x00000001,0x00000000),   //GICC Affinity Processor 68
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000045,0x00000001,0x00000000),   //GICC Affinity Processor 69
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000046,0x00000001,0x00000000),   //GICC Affinity Processor 70
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000047,0x00000001,0x00000000),   //GICC Affinity Processor 71
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000048,0x00000001,0x00000000),   //GICC Affinity Processor 72
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000049,0x00000001,0x00000000),   //GICC Affinity Processor 73
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004A,0x00000001,0x00000000),   //GICC Affinity Processor 74
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004B,0x00000001,0x00000000),   //GICC Affinity Processor 75
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004C,0x00000001,0x00000000),   //GICC Affinity Processor 76
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004D,0x00000001,0x00000000),   //GICC Affinity Processor 77
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004E,0x00000001,0x00000000),   //GICC Affinity Processor 78
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004F,0x00000001,0x00000000),   //GICC Affinity Processor 79
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000050,0x00000001,0x00000000),   //GICC Affinity Processor 80
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000051,0x00000001,0x00000000),   //GICC Affinity Processor 81
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000052,0x00000001,0x00000000),   //GICC Affinity Processor 82
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000053,0x00000001,0x00000000),   //GICC Affinity Processor 83
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000054,0x00000001,0x00000000),   //GICC Affinity Processor 84
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000055,0x00000001,0x00000000),   //GICC Affinity Processor 85
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000056,0x00000001,0x00000000),   //GICC Affinity Processor 86
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000057,0x00000001,0x00000000),   //GICC Affinity Processor 87
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000058,0x00000001,0x00000000),   //GICC Affinity Processor 88
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000059,0x00000001,0x00000000),   //GICC Affinity Processor 89
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005A,0x00000001,0x00000000),   //GICC Affinity Processor 90
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005B,0x00000001,0x00000000),   //GICC Affinity Processor 91
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005C,0x00000001,0x00000000),   //GICC Affinity Processor 92
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005D,0x00000001,0x00000000),   //GICC Affinity Processor 93
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005E,0x00000001,0x00000000),   //GICC Affinity Processor 94
-    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005F,0x00000001,0x00000000),   //GICC Affinity Processor 95
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000030,0x00000001,0x00000000),   //GICC Affinity Processor 48
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000031,0x00000001,0x00000000),   //GICC Affinity Processor 49
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000032,0x00000001,0x00000000),   //GICC Affinity Processor 50
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000033,0x00000001,0x00000000),   //GICC Affinity Processor 51
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000034,0x00000001,0x00000000),   //GICC Affinity Processor 52
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000035,0x00000001,0x00000000),   //GICC Affinity Processor 53
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000036,0x00000001,0x00000000),   //GICC Affinity Processor 54
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000037,0x00000001,0x00000000),   //GICC Affinity Processor 55
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000038,0x00000001,0x00000000),   //GICC Affinity Processor 56
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000039,0x00000001,0x00000000),   //GICC Affinity Processor 57
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003A,0x00000001,0x00000000),   //GICC Affinity Processor 58
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003B,0x00000001,0x00000000),   //GICC Affinity Processor 59
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003C,0x00000001,0x00000000),   //GICC Affinity Processor 60
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003D,0x00000001,0x00000000),   //GICC Affinity Processor 61
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003E,0x00000001,0x00000000),   //GICC Affinity Processor 62
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003F,0x00000001,0x00000000),   //GICC Affinity Processor 63
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000040,0x00000001,0x00000000),   //GICC Affinity Processor 64
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000041,0x00000001,0x00000000),   //GICC Affinity Processor 65
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000042,0x00000001,0x00000000),   //GICC Affinity Processor 66
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000043,0x00000001,0x00000000),   //GICC Affinity Processor 67
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000044,0x00000001,0x00000000),   //GICC Affinity Processor 68
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000045,0x00000001,0x00000000),   //GICC Affinity Processor 69
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000046,0x00000001,0x00000000),   //GICC Affinity Processor 70
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000047,0x00000001,0x00000000),   //GICC Affinity Processor 71
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000048,0x00000001,0x00000000),   //GICC Affinity Processor 72
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000049,0x00000001,0x00000000),   //GICC Affinity Processor 73
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004A,0x00000001,0x00000000),   //GICC Affinity Processor 74
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004B,0x00000001,0x00000000),   //GICC Affinity Processor 75
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004C,0x00000001,0x00000000),   //GICC Affinity Processor 76
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004D,0x00000001,0x00000000),   //GICC Affinity Processor 77
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004E,0x00000001,0x00000000),   //GICC Affinity Processor 78
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004F,0x00000001,0x00000000),   //GICC Affinity Processor 79
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000050,0x00000001,0x00000000),   //GICC Affinity Processor 80
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000051,0x00000001,0x00000000),   //GICC Affinity Processor 81
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000052,0x00000001,0x00000000),   //GICC Affinity Processor 82
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000053,0x00000001,0x00000000),   //GICC Affinity Processor 83
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000054,0x00000001,0x00000000),   //GICC Affinity Processor 84
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000055,0x00000001,0x00000000),   //GICC Affinity Processor 85
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000056,0x00000001,0x00000000),   //GICC Affinity Processor 86
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000057,0x00000001,0x00000000),   //GICC Affinity Processor 87
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000058,0x00000001,0x00000000),   //GICC Affinity Processor 88
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000059,0x00000001,0x00000000),   //GICC Affinity Processor 89
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005A,0x00000001,0x00000000),   //GICC Affinity Processor 90
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005B,0x00000001,0x00000000),   //GICC Affinity Processor 91
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005C,0x00000001,0x00000000),   //GICC Affinity Processor 92
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005D,0x00000001,0x00000000),   //GICC Affinity Processor 93
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005E,0x00000001,0x00000000),   //GICC Affinity Processor 94
+    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005F,0x00000001,0x00000000),   //GICC Affinity Processor 95
   },
   {
-    EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_INIT(0x00000001, 0x00000000),
+    EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_INIT(0x00000000, 0x00000000),
    // EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_INIT(0x00000003, 0x00000001),
   },
 };
-- 
2.9.5



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH edk2-platforms v3 5/5] Hisilicon/D06: Move some functions to OemMiscLib
  2018-11-20  9:01 [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve Ming Huang
                   ` (3 preceding siblings ...)
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 4/5] Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot Ming Huang
@ 2018-11-20  9:01 ` Ming Huang
  2018-11-20 13:02 ` [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve Leif Lindholm
  5 siblings, 0 replies; 19+ messages in thread
From: Ming Huang @ 2018-11-20  9:01 UTC (permalink / raw)
  To: leif.lindholm, linaro-uefi, edk2-devel, graeme.gregory
  Cc: ard.biesheuvel, michael.d.kinney, lersek, wanghuiqiang,
	huangming23, zhangjinsong2, huangdaode, john.garry, xinliang.liu,
	zhangfeng56, Ming Huang

As M41T83RealTimeClockLib is common library, so move two platform
specific functions to OemMiscLib and rename this two functions.
Main gist of this patch is making this library as a common module
in Hisilicon.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>
---
 Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf |  2 -
 Silicon/Hisilicon/Include/Library/OemMiscLib.h                              |  9 ++
 Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h      |  4 -
 Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c                | 82 ++++++++++++++++++
 Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c   | 90 ++------------------
 5 files changed, 98 insertions(+), 89 deletions(-)

diff --git a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf
index e0bf6b3f24db..7bbba5389737 100644
--- a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf
+++ b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf
@@ -27,12 +27,10 @@ [Sources.common]
 [Packages]
   EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
-  Platform/Hisilicon/D06/D06.dec
   Silicon/Hisilicon/HisiPkg.dec
 
 [LibraryClasses]
   BaseMemoryLib
-  CpldIoLib
   DebugLib
   I2CLib
   IoLib
diff --git a/Silicon/Hisilicon/Include/Library/OemMiscLib.h b/Silicon/Hisilicon/Include/Library/OemMiscLib.h
index 86ea6a1b3deb..0d7bf71b17d2 100644
--- a/Silicon/Hisilicon/Include/Library/OemMiscLib.h
+++ b/Silicon/Hisilicon/Include/Library/OemMiscLib.h
@@ -53,4 +53,13 @@ BOOLEAN OemIsNeedDisableExpanderBuffer(VOID);
 
 extern EFI_STRING_ID gDimmToDevLocator[MAX_SOCKET][MAX_CHANNEL][MAX_DIMM];
 EFI_HII_HANDLE EFIAPI OemGetPackages ();
+
+VOID
+OemReleaseOwnershipOfRtc (
+  VOID
+  );
+EFI_STATUS
+OemSwitchRtcI2cChannelAndLock (
+  VOID
+  );
 #endif
diff --git a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h
index d985055d9bb6..f32910885856 100644
--- a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h
+++ b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h
@@ -17,11 +17,7 @@
 #define __M41T83_REAL_TIME_CLOCK_H__
 
 // The delay is need for cpld and I2C. This is a empirical value. MemoryFence is no need.
-#define RTC_DELAY_30_MS            30000
-// The delay is need for cpld and I2C. This is a empirical value. MemoryFence is no need.
 #define RTC_DELAY_1000_MACROSECOND 1000
-// The delay is need for cpld and I2C. This is a empirical value. MemoryFence is no need.
-#define RTC_DELAY_2_MACROSECOND    2
 
 #define M41T83_REGADDR_DOTSECONDS       0x00
 #define M41T83_REGADDR_SECONDS          0x01
diff --git a/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c b/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c
index 2a9db46d1ff9..64d167d18ae6 100644
--- a/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c
+++ b/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c
@@ -17,6 +17,7 @@
 #include <PlatformArch.h>
 #include <Library/BaseMemoryLib.h>
 #include <Library/CpldD06.h>
+#include <Library/CpldIoLib.h>
 #include <Library/DebugLib.h>
 #include <Library/IoLib.h>
 #include <Library/LpcLib.h>
@@ -27,6 +28,12 @@
 #include <Library/SerdesLib.h>
 #include <Library/SerialPortLib.h>
 #include <Library/TimerLib.h>
+#include <Library/UefiRuntimeLib.h>
+
+// The delay is need for cpld and I2C. This is a empirical value. MemoryFence is no need.
+#define RTC_DELAY_30_MS            30000
+// The delay is need for cpld and I2C. This is a empirical value. MemoryFence is no need.
+#define RTC_DELAY_2_MACROSECOND    2
 
 REPORT_PCIEDIDVID2BMC PcieDeviceToReport[PCIEDEVICE_REPORT_MAX] = {
   {67,0,0,0},
@@ -207,3 +214,78 @@ OemIsNeedDisableExpanderBuffer (
 {
   return TRUE;
 }
+
+EFI_STATUS
+OemSwitchRtcI2cChannelAndLock (
+  VOID
+  )
+{
+  UINT8   Temp;
+  UINT8   Count;
+
+  for (Count = 0; Count < 100; Count++) {
+    // To get the other side's state is idle first
+    Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
+    if ((Temp & BIT3) != 0) {
+      (VOID) MicroSecondDelay (RTC_DELAY_30_MS);
+      // Try 100 times, if BMC has not released the bus, return preemption failed
+      if (Count == 99) {
+        if (!EfiAtRuntime ()) {
+          DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Clear cpu_i2c_rtc_state 100 times fail!\n",
+            __FUNCTION__, __LINE__));
+        }
+        return EFI_DEVICE_ERROR;
+      }
+      continue;
+    }
+
+    // if BMC free the bus, can be set 1 preemption
+    Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
+    Temp = Temp | CPU_GET_I2C_CONTROL;
+    // CPU occupied RTC I2C State
+    WriteCpldReg (CPLD_I2C_SWITCH_FLAG, Temp);
+    (VOID) MicroSecondDelay (RTC_DELAY_2_MACROSECOND);
+    Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
+    // Is preempt success
+    if(CPU_GET_I2C_CONTROL == (Temp & CPU_GET_I2C_CONTROL)) {
+      break;
+    }
+    if (Count == 99) {
+      if (!EfiAtRuntime ()) {
+        DEBUG((DEBUG_ERROR, "[%a]:[%dL]  Clear cpu_i2c_rtc_state fail !!! \n",
+          __FUNCTION__, __LINE__));
+      }
+      return EFI_DEVICE_ERROR;
+    }
+    (VOID) MicroSecondDelay (RTC_DELAY_30_MS);
+  }
+
+  //Polling BMC RTC I2C status
+  for (Count = 0; Count < 100; Count++) {
+    Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
+    if ((Temp & BIT3) == 0) {
+      return EFI_SUCCESS;
+    }
+    (VOID) MicroSecondDelay (RTC_DELAY_30_MS);
+  }
+
+  //If the BMC occupies the RTC I2C Channel, write back the CPU side is idle
+  // or the subsequent BMC will not preempt
+  Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
+  Temp = Temp & (~CPU_GET_I2C_CONTROL);
+  WriteCpldReg (CPLD_I2C_SWITCH_FLAG, Temp);
+
+  return EFI_NOT_READY;
+}
+
+VOID
+OemReleaseOwnershipOfRtc (
+  VOID
+  )
+{
+  UINT8   Temp;
+
+  Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
+  Temp = Temp & ~CPU_GET_I2C_CONTROL;
+  WriteCpldReg (CPLD_I2C_SWITCH_FLAG, Temp);
+}
diff --git a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c
index 0670f9c5f47c..1f50ad4b64c4 100644
--- a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c
+++ b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c
@@ -17,10 +17,10 @@
 #include <PiDxe.h>
 #include <Library/BaseLib.h>
 #include <Library/BaseMemoryLib.h>
-#include <Library/CpldD06.h>
 #include <Library/CpldIoLib.h>
 #include <Library/DebugLib.h>
 #include <Library/I2CLib.h>
+#include <Library/OemMiscLib.h>
 #include <Library/TimeBaseLib.h>
 #include <Library/TimerLib.h>
 #include <Library/UefiLib.h>
@@ -32,70 +32,6 @@ extern I2C_DEVICE gRtcDevice;
 
 STATIC EFI_LOCK  mRtcLock;
 
-EFI_STATUS
-SwitchRtcI2cChannelAndLock (
-  VOID
-  )
-{
-  UINT8   Temp;
-  UINT8   Count;
-
-  for (Count = 0; Count < 100; Count++) {
-    // To get the other side's state is idle first
-    Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
-    if ((Temp & BIT3) != 0) {
-      (VOID) MicroSecondDelay (RTC_DELAY_30_MS);
-      // Try 100 times, if BMC has not released the bus, return preemption failed
-      if (Count == 99) {
-        if (!EfiAtRuntime ()) {
-          DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Clear cpu_i2c_rtc_state 100 times fail!\n",
-            __FUNCTION__, __LINE__));
-        }
-        return EFI_DEVICE_ERROR;
-      }
-      continue;
-    }
-
-    // if BMC free the bus, can be set 1 preemption
-    Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
-    Temp = Temp | CPU_GET_I2C_CONTROL;
-    // CPU occupied RTC I2C State
-    WriteCpldReg (CPLD_I2C_SWITCH_FLAG, Temp);
-    (VOID) MicroSecondDelay (RTC_DELAY_2_MACROSECOND);
-    Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
-    // Is preempt success
-    if(CPU_GET_I2C_CONTROL == (Temp & CPU_GET_I2C_CONTROL)) {
-      break;
-    }
-    if (Count == 99) {
-      if (!EfiAtRuntime ()) {
-        DEBUG((DEBUG_ERROR, "[%a]:[%dL]  Clear cpu_i2c_rtc_state fail !!! \n",
-          __FUNCTION__, __LINE__));
-      }
-      return EFI_DEVICE_ERROR;
-    }
-    (VOID) MicroSecondDelay (RTC_DELAY_30_MS);
-  }
-
-  //Polling BMC RTC I2C status
-  for (Count = 0; Count < 100; Count++) {
-    Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
-    if ((Temp & BIT3) == 0) {
-      return EFI_SUCCESS;
-    }
-    (VOID) MicroSecondDelay (RTC_DELAY_30_MS);
-  }
-
-  //If the BMC occupies the RTC I2C Channel, write back the CPU side is idle
-  // or the subsequent BMC will not preempt
-  Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
-  Temp = Temp & (~CPU_GET_I2C_CONTROL);
-  WriteCpldReg (CPLD_I2C_SWITCH_FLAG, Temp);
-
-  return EFI_NOT_READY;
-}
-
-
 /**
   Read RTC content through its registers.
 
@@ -142,18 +78,6 @@ RtcWrite (
   return Status;
 }
 
-VOID
-ReleaseOwnershipOfRtc (
-  VOID
-  )
-{
-  UINT8   Temp;
-
-  Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG);
-  Temp = Temp & ~CPU_GET_I2C_CONTROL;
-  WriteCpldReg (CPLD_I2C_SWITCH_FLAG, Temp);
-}
-
 
 EFI_STATUS
 InitializeM41T83 (
@@ -178,7 +102,7 @@ InitializeM41T83 (
     return Status;
   }
 
-  Status = SwitchRtcI2cChannelAndLock ();
+  Status = OemSwitchRtcI2cChannelAndLock ();
   if (EFI_ERROR (Status)) {
     DEBUG ((DEBUG_ERROR, "Get i2c preemption failed: %r\n", Status));
     if (!EfiAtRuntime ()) {
@@ -231,7 +155,7 @@ InitializeM41T83 (
 
 Exit:
   // Release RTC Lock.
-  ReleaseOwnershipOfRtc ();
+  OemReleaseOwnershipOfRtc ();
   if (!EfiAtRuntime ()) {
     EfiReleaseLock (&mRtcLock);
   }
@@ -274,7 +198,7 @@ LibSetTime (
     return EFI_INVALID_PARAMETER;
   }
 
-  Status = SwitchRtcI2cChannelAndLock ();
+  Status = OemSwitchRtcI2cChannelAndLock ();
   if (EFI_ERROR (Status)) {
     return Status;
   }
@@ -332,7 +256,7 @@ LibSetTime (
   }
 
 Exit:
-  ReleaseOwnershipOfRtc ();
+  OemReleaseOwnershipOfRtc ();
   // Release RTC Lock.
   if (!EfiAtRuntime ()) {
     if (EFI_ERROR (Status)) {
@@ -377,7 +301,7 @@ LibGetTime (
     return EFI_INVALID_PARAMETER;
   }
 
-  Status = SwitchRtcI2cChannelAndLock ();
+  Status = OemSwitchRtcI2cChannelAndLock ();
   if (EFI_ERROR (Status)) {
     return Status;
   }
@@ -422,7 +346,7 @@ LibGetTime (
   }
 
 Exit:
-  ReleaseOwnershipOfRtc ();
+  OemReleaseOwnershipOfRtc ();
   // Release RTC Lock.
   if (!EfiAtRuntime ()) {
     if (EFI_ERROR (Status)) {
-- 
2.9.5



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe Ming Huang
@ 2018-11-20 12:13   ` Leif Lindholm
  2018-11-20 12:40     ` Ming Huang
  0 siblings, 1 reply; 19+ messages in thread
From: Leif Lindholm @ 2018-11-20 12:13 UTC (permalink / raw)
  To: Ming Huang
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, lersek, wanghuiqiang, huangming23,
	zhangjinsong2, huangdaode, john.garry, xinliang.liu, zhangfeng56

On Tue, Nov 20, 2018 at 05:01:46PM +0800, Ming Huang wrote:
> Now that the generic Variable Runtime DXE code no longer
> distinguishes between gEfiVariableGuid and
> gEfiAuthenticatedVariableGuid in the varstore FV header.
> We can relax the check in the flashFvb driver to accept
> either GUID regardless of whether we are running a secure
> boot capable build or not.

We are still in a situation where D06 is not buildable with Secure
Boot enabled though.

If you build with -D SECURE_BOOT_ENABLE=TRUE, you still end up with
/work/git/edk2-platforms/Platform/Hisilicon/D06/D06.dsc(...): error
4000: Instance of library class [PlatformSecureLib] is not found
      in [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf] [AARCH64]
      consumed by module [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf]

And all Hisilicon platforms still use
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
regardless of Secure Boot setting.

So what problem does this patch solve? A runtime one?

/
    Leif

> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang <ming.huang@linaro.org>
> ---
>  Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf | 1 +
>  Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c   | 5 +++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
> index f8be4741ef7c..a0226e0d87c0 100644
> --- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
> +++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
> @@ -44,6 +44,7 @@ [LibraryClasses]
>    UefiRuntimeLib
>  
>  [Guids]
> +  gEfiAuthenticatedVariableGuid
>    gEfiSystemNvDataFvGuid
>    gEfiVariableGuid
>  
> diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
> index e18cc9e06ec2..12baed41cd4e 100644
> --- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
> +++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
> @@ -189,7 +189,7 @@ InitializeFvAndVariableStoreHeaders (
>      // VARIABLE_STORE_HEADER
>      //
>      VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)Headers + (UINTN)FirmwareVolumeHeader->HeaderLength);
> -    CopyGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid);
> +    CopyGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid);
>      VariableStoreHeader->Size = PcdGet32(PcdFlashNvStorageVariableSize) - FirmwareVolumeHeader->HeaderLength;
>      VariableStoreHeader->Format            = VARIABLE_STORE_FORMATTED;
>      VariableStoreHeader->State             = VARIABLE_STORE_HEALTHY;
> @@ -258,7 +258,8 @@ ValidateFvHeader (
>      VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)FwVolHeader + (UINTN)FwVolHeader->HeaderLength);
>  
>      // Check the Variable Store Guid
> -    if ( CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) == FALSE )
> +    if (!CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) &&
> +        !CompareGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid))
>      {
>          DEBUG ((EFI_D_ERROR, "ValidateFvHeader: Variable Store Guid non-compatible\n"));
>          return EFI_NOT_FOUND;
> -- 
> 2.9.5
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20 12:13   ` Leif Lindholm
@ 2018-11-20 12:40     ` Ming Huang
  2018-11-20 12:58       ` Leif Lindholm
  0 siblings, 1 reply; 19+ messages in thread
From: Ming Huang @ 2018-11-20 12:40 UTC (permalink / raw)
  To: Leif Lindholm
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, lersek, wanghuiqiang, huangming23,
	zhangjinsong2, huangdaode, john.garry, xinliang.liu, zhangfeng56



On 11/20/2018 8:13 PM, Leif Lindholm wrote:
> On Tue, Nov 20, 2018 at 05:01:46PM +0800, Ming Huang wrote:
>> Now that the generic Variable Runtime DXE code no longer
>> distinguishes between gEfiVariableGuid and
>> gEfiAuthenticatedVariableGuid in the varstore FV header.
>> We can relax the check in the flashFvb driver to accept
>> either GUID regardless of whether we are running a secure
>> boot capable build or not.
> 
> We are still in a situation where D06 is not buildable with Secure
> Boot enabled though.
> 
> If you build with -D SECURE_BOOT_ENABLE=TRUE, you still end up with
> /work/git/edk2-platforms/Platform/Hisilicon/D06/D06.dsc(...): error
> 4000: Instance of library class [PlatformSecureLib] is not found
>       in [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf] [AARCH64]
>       consumed by module [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf]
> 
> And all Hisilicon platforms still use
> AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
> regardless of Secure Boot setting.
> 
> So what problem does this patch solve? A runtime one?

This patch solve bug in FlashFvbDxe. Should I add a patch before this patch
to solve build error with -D SECURE_BOOT_ENABLE=TRUE in v4?

Thanks.

> 
> /
>     Leif
> 
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ming Huang <ming.huang@linaro.org>
>> ---
>>  Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf | 1 +
>>  Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c   | 5 +++--
>>  2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
>> index f8be4741ef7c..a0226e0d87c0 100644
>> --- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
>> +++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
>> @@ -44,6 +44,7 @@ [LibraryClasses]
>>    UefiRuntimeLib
>>  
>>  [Guids]
>> +  gEfiAuthenticatedVariableGuid
>>    gEfiSystemNvDataFvGuid
>>    gEfiVariableGuid
>>  
>> diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
>> index e18cc9e06ec2..12baed41cd4e 100644
>> --- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
>> +++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
>> @@ -189,7 +189,7 @@ InitializeFvAndVariableStoreHeaders (
>>      // VARIABLE_STORE_HEADER
>>      //
>>      VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)Headers + (UINTN)FirmwareVolumeHeader->HeaderLength);
>> -    CopyGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid);
>> +    CopyGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid);
>>      VariableStoreHeader->Size = PcdGet32(PcdFlashNvStorageVariableSize) - FirmwareVolumeHeader->HeaderLength;
>>      VariableStoreHeader->Format            = VARIABLE_STORE_FORMATTED;
>>      VariableStoreHeader->State             = VARIABLE_STORE_HEALTHY;
>> @@ -258,7 +258,8 @@ ValidateFvHeader (
>>      VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)FwVolHeader + (UINTN)FwVolHeader->HeaderLength);
>>  
>>      // Check the Variable Store Guid
>> -    if ( CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) == FALSE )
>> +    if (!CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) &&
>> +        !CompareGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid))
>>      {
>>          DEBUG ((EFI_D_ERROR, "ValidateFvHeader: Variable Store Guid non-compatible\n"));
>>          return EFI_NOT_FOUND;
>> -- 
>> 2.9.5
>>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20 12:40     ` Ming Huang
@ 2018-11-20 12:58       ` Leif Lindholm
  2018-11-20 14:29         ` Ming Huang
  0 siblings, 1 reply; 19+ messages in thread
From: Leif Lindholm @ 2018-11-20 12:58 UTC (permalink / raw)
  To: Ming Huang
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, lersek, wanghuiqiang, huangming23,
	zhangjinsong2, huangdaode, john.garry, xinliang.liu, zhangfeng56

On Tue, Nov 20, 2018 at 08:40:28PM +0800, Ming Huang wrote:
> 
> 
> On 11/20/2018 8:13 PM, Leif Lindholm wrote:
> > On Tue, Nov 20, 2018 at 05:01:46PM +0800, Ming Huang wrote:
> >> Now that the generic Variable Runtime DXE code no longer
> >> distinguishes between gEfiVariableGuid and
> >> gEfiAuthenticatedVariableGuid in the varstore FV header.
> >> We can relax the check in the flashFvb driver to accept
> >> either GUID regardless of whether we are running a secure
> >> boot capable build or not.
> > 
> > We are still in a situation where D06 is not buildable with Secure
> > Boot enabled though.
> > 
> > If you build with -D SECURE_BOOT_ENABLE=TRUE, you still end up with
> > /work/git/edk2-platforms/Platform/Hisilicon/D06/D06.dsc(...): error
> > 4000: Instance of library class [PlatformSecureLib] is not found
> >       in [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf] [AARCH64]
> >       consumed by module [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf]
> > 
> > And all Hisilicon platforms still use
> > AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
> > regardless of Secure Boot setting.
> > 
> > So what problem does this patch solve? A runtime one?
> 
> This patch solve bug in FlashFvbDxe.

Yes, but what bug? What is the symptom? What _specific_ problem goes
away by adding this patch? That information should have been in the
original commit message. I have no information available to me as I
now build -rc1 to suggest that this patch should be included.

> Should I add a patch before this patch
> to solve build error with -D SECURE_BOOT_ENABLE=TRUE in v4?

That would require a sane implementation of PlatformSecureLib,
implementing a real UserPhysicalPresent().
Can you turn that around within the next few hours?

Regards,

Leif

> Thanks.
> 
> > 
> > /
> >     Leif
> > 
> >> Contributed-under: TianoCore Contribution Agreement 1.1
> >> Signed-off-by: Ming Huang <ming.huang@linaro.org>
> >> ---
> >>  Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf | 1 +
> >>  Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c   | 5 +++--
> >>  2 files changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
> >> index f8be4741ef7c..a0226e0d87c0 100644
> >> --- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
> >> +++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
> >> @@ -44,6 +44,7 @@ [LibraryClasses]
> >>    UefiRuntimeLib
> >>  
> >>  [Guids]
> >> +  gEfiAuthenticatedVariableGuid
> >>    gEfiSystemNvDataFvGuid
> >>    gEfiVariableGuid
> >>  
> >> diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
> >> index e18cc9e06ec2..12baed41cd4e 100644
> >> --- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
> >> +++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
> >> @@ -189,7 +189,7 @@ InitializeFvAndVariableStoreHeaders (
> >>      // VARIABLE_STORE_HEADER
> >>      //
> >>      VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)Headers + (UINTN)FirmwareVolumeHeader->HeaderLength);
> >> -    CopyGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid);
> >> +    CopyGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid);
> >>      VariableStoreHeader->Size = PcdGet32(PcdFlashNvStorageVariableSize) - FirmwareVolumeHeader->HeaderLength;
> >>      VariableStoreHeader->Format            = VARIABLE_STORE_FORMATTED;
> >>      VariableStoreHeader->State             = VARIABLE_STORE_HEALTHY;
> >> @@ -258,7 +258,8 @@ ValidateFvHeader (
> >>      VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)FwVolHeader + (UINTN)FwVolHeader->HeaderLength);
> >>  
> >>      // Check the Variable Store Guid
> >> -    if ( CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) == FALSE )
> >> +    if (!CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) &&
> >> +        !CompareGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid))
> >>      {
> >>          DEBUG ((EFI_D_ERROR, "ValidateFvHeader: Variable Store Guid non-compatible\n"));
> >>          return EFI_NOT_FOUND;
> >> -- 
> >> 2.9.5
> >>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve
  2018-11-20  9:01 [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve Ming Huang
                   ` (4 preceding siblings ...)
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 5/5] Hisilicon/D06: Move some functions to OemMiscLib Ming Huang
@ 2018-11-20 13:02 ` Leif Lindholm
  5 siblings, 0 replies; 19+ messages in thread
From: Leif Lindholm @ 2018-11-20 13:02 UTC (permalink / raw)
  To: Ming Huang
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, lersek, wanghuiqiang, huangming23,
	zhangjinsong2, huangdaode, john.garry, xinliang.liu, zhangfeng56

On Tue, Nov 20, 2018 at 05:01:45PM +0800, Ming Huang wrote:
> Main Change since v2:
> 1. Use new way to fix secure boot bug in FlashFvbDxe;
> 2. Spilit patch from "Modify Gic base";
> 3. Modify some commit messages;
> 
> Code can also be found in github:
> https://github.com/hisilicon/OpenPlatformPkg.git
> branch: d06-acs-platforms-v3

The below three patches:
   Hisilicon/D06: Correct PcdGicInterruptInterfaceBase
   Hisilicon/D06: Modify Gic base
   was folded into
   Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Pushed as 1360ddbc30..cc2b26de91..

The two patches:
   Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
   and
   Hisilicon/D06: Move some functions to OemMiscLib
require further revisions, and may miss the release.

/
    Leif

> Ming Huang (5):
>   Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
>   Hisilicon/D06: Modify Gic base
>   Hisilicon/D06: Correct PcdGicInterruptInterfaceBase
>   Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot
>   Hisilicon/D06: Move some functions to OemMiscLib
> 
>  Platform/Hisilicon/D06/D06.dsc                                              |   2 +-
>  Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf                       |   1 +
>  Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf |   2 -
>  Silicon/Hisilicon/Include/Library/OemMiscLib.h                              |   9 +
>  Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h      |   4 -
>  Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c                |  82 +++++++++
>  Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c                         |   5 +-
>  Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c   |  90 +--------
>  Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl                |  28 +--
>  Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl                    |  18 +-
>  Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc                   | 194 ++++++++++----------
>  Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/MadtHi1620.aslc                   |   2 +-
>  12 files changed, 224 insertions(+), 213 deletions(-)
> 
> -- 
> 2.9.5
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20 12:58       ` Leif Lindholm
@ 2018-11-20 14:29         ` Ming Huang
  2018-11-20 14:39           ` Leif Lindholm
  2018-11-20 14:40           ` Ard Biesheuvel
  0 siblings, 2 replies; 19+ messages in thread
From: Ming Huang @ 2018-11-20 14:29 UTC (permalink / raw)
  To: Leif Lindholm
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, lersek, wanghuiqiang, huangming23,
	zhangjinsong2, huangdaode, john.garry, xinliang.liu, zhangfeng56



On 11/20/2018 8:58 PM, Leif Lindholm wrote:
> On Tue, Nov 20, 2018 at 08:40:28PM +0800, Ming Huang wrote:
>>
>>
>> On 11/20/2018 8:13 PM, Leif Lindholm wrote:
>>> On Tue, Nov 20, 2018 at 05:01:46PM +0800, Ming Huang wrote:
>>>> Now that the generic Variable Runtime DXE code no longer
>>>> distinguishes between gEfiVariableGuid and
>>>> gEfiAuthenticatedVariableGuid in the varstore FV header.
>>>> We can relax the check in the flashFvb driver to accept
>>>> either GUID regardless of whether we are running a secure
>>>> boot capable build or not.
>>>
>>> We are still in a situation where D06 is not buildable with Secure
>>> Boot enabled though.
>>>
>>> If you build with -D SECURE_BOOT_ENABLE=TRUE, you still end up with
>>> /work/git/edk2-platforms/Platform/Hisilicon/D06/D06.dsc(...): error
>>> 4000: Instance of library class [PlatformSecureLib] is not found
>>>       in [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf] [AARCH64]
>>>       consumed by module [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf]
>>>
>>> And all Hisilicon platforms still use
>>> AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
>>> regardless of Secure Boot setting.
>>>
>>> So what problem does this patch solve? A runtime one?
>>
>> This patch solve bug in FlashFvbDxe.
> 
> Yes, but what bug? What is the symptom? What _specific_ problem goes
> away by adding this patch? That information should have been in the
> original commit message. I have no information available to me as I
> now build -rc1 to suggest that this patch should be included.

The bug is that gEfiAuthenticatedVariableGuid should be used in FlashFvbDxe,
not gEfiVariableGuid when enable secure boot.

> 
>> Should I add a patch before this patch
>> to solve build error with -D SECURE_BOOT_ENABLE=TRUE in v4?
> 
> That would require a sane implementation of PlatformSecureLib,
> implementing a real UserPhysicalPresent().
> Can you turn that around within the next few hours?

My original idea is using OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.
There is not enough time to implement a real UserPhysicalPresent.
This patch will add when we implement real secure boot in future.

Thanks.

> 
> Regards,
> 
> Leif
> 
>> Thanks.
>>
>>>
>>> /
>>>     Leif
>>>
>>>> Contributed-under: TianoCore Contribution Agreement 1.1
>>>> Signed-off-by: Ming Huang <ming.huang@linaro.org>
>>>> ---
>>>>  Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf | 1 +
>>>>  Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c   | 5 +++--
>>>>  2 files changed, 4 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
>>>> index f8be4741ef7c..a0226e0d87c0 100644
>>>> --- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
>>>> +++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
>>>> @@ -44,6 +44,7 @@ [LibraryClasses]
>>>>    UefiRuntimeLib
>>>>  
>>>>  [Guids]
>>>> +  gEfiAuthenticatedVariableGuid
>>>>    gEfiSystemNvDataFvGuid
>>>>    gEfiVariableGuid
>>>>  
>>>> diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
>>>> index e18cc9e06ec2..12baed41cd4e 100644
>>>> --- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
>>>> +++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
>>>> @@ -189,7 +189,7 @@ InitializeFvAndVariableStoreHeaders (
>>>>      // VARIABLE_STORE_HEADER
>>>>      //
>>>>      VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)Headers + (UINTN)FirmwareVolumeHeader->HeaderLength);
>>>> -    CopyGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid);
>>>> +    CopyGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid);
>>>>      VariableStoreHeader->Size = PcdGet32(PcdFlashNvStorageVariableSize) - FirmwareVolumeHeader->HeaderLength;
>>>>      VariableStoreHeader->Format            = VARIABLE_STORE_FORMATTED;
>>>>      VariableStoreHeader->State             = VARIABLE_STORE_HEALTHY;
>>>> @@ -258,7 +258,8 @@ ValidateFvHeader (
>>>>      VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)FwVolHeader + (UINTN)FwVolHeader->HeaderLength);
>>>>  
>>>>      // Check the Variable Store Guid
>>>> -    if ( CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) == FALSE )
>>>> +    if (!CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) &&
>>>> +        !CompareGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid))
>>>>      {
>>>>          DEBUG ((EFI_D_ERROR, "ValidateFvHeader: Variable Store Guid non-compatible\n"));
>>>>          return EFI_NOT_FOUND;
>>>> -- 
>>>> 2.9.5
>>>>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20 14:29         ` Ming Huang
@ 2018-11-20 14:39           ` Leif Lindholm
  2018-11-20 15:00             ` Ming Huang
  2018-11-21  7:42             ` Ming Huang
  2018-11-20 14:40           ` Ard Biesheuvel
  1 sibling, 2 replies; 19+ messages in thread
From: Leif Lindholm @ 2018-11-20 14:39 UTC (permalink / raw)
  To: Ming Huang
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, lersek, wanghuiqiang, huangming23,
	zhangjinsong2, huangdaode, john.garry, xinliang.liu, zhangfeng56

On Tue, Nov 20, 2018 at 10:29:57PM +0800, Ming Huang wrote:
> >>> And all Hisilicon platforms still use
> >>> AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
> >>> regardless of Secure Boot setting.
> >>>
> >>> So what problem does this patch solve? A runtime one?
> >>
> >> This patch solve bug in FlashFvbDxe.
> > 
> > Yes, but what bug? What is the symptom? What _specific_ problem goes
> > away by adding this patch? That information should have been in the
> > original commit message. I have no information available to me as I
> > now build -rc1 to suggest that this patch should be included.
> 
> The bug is that gEfiAuthenticatedVariableGuid should be used in FlashFvbDxe,
> not gEfiVariableGuid when enable secure boot.

OK, I will ask a third time: what _problem_ does this solve?
What is the symptom?
When someone uses the buggy firmware, what does not work for them?
This information _always_ needs to be in the commit message.

> >> Should I add a patch before this patch
> >> to solve build error with -D SECURE_BOOT_ENABLE=TRUE in v4?
> > 
> > That would require a sane implementation of PlatformSecureLib,
> > implementing a real UserPhysicalPresent().
> > Can you turn that around within the next few hours?
> 
> My original idea is using OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.
> There is not enough time to implement a real UserPhysicalPresent.

If there is not enough time to implement a real PlatformSecureLib,
there is no need to have Secure Boot at all. Same thing goes for
secure variable store (to hardware devices that are not accessible
from Non-secure world).

> This patch will add when we implement real secure boot in future.

That sounds like the best thing to do.

Meanwhile, could you create a patch to get rid of the SECURE_BOOT
options completely from the .dsc/.fdf please? I don't like having it
in there when we know it doesn't build.

/
    Leif


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20 14:29         ` Ming Huang
  2018-11-20 14:39           ` Leif Lindholm
@ 2018-11-20 14:40           ` Ard Biesheuvel
  2018-11-20 15:14             ` Laszlo Ersek
  1 sibling, 1 reply; 19+ messages in thread
From: Ard Biesheuvel @ 2018-11-20 14:40 UTC (permalink / raw)
  To: Ming Huang
  Cc: Leif Lindholm, linaro-uefi, edk2-devel@lists.01.org,
	Graeme Gregory, Kinney, Michael D, Laszlo Ersek, wanghuiqiang,
	huangming, Jason Zhang, huangdaode, John Garry, Xinliang Liu,
	zhangfeng56

On Tue, 20 Nov 2018 at 15:30, Ming Huang <ming.huang@linaro.org> wrote:
>
>
>
> On 11/20/2018 8:58 PM, Leif Lindholm wrote:
> > On Tue, Nov 20, 2018 at 08:40:28PM +0800, Ming Huang wrote:
> >>
> >>
> >> On 11/20/2018 8:13 PM, Leif Lindholm wrote:
> >>> On Tue, Nov 20, 2018 at 05:01:46PM +0800, Ming Huang wrote:
> >>>> Now that the generic Variable Runtime DXE code no longer
> >>>> distinguishes between gEfiVariableGuid and
> >>>> gEfiAuthenticatedVariableGuid in the varstore FV header.
> >>>> We can relax the check in the flashFvb driver to accept
> >>>> either GUID regardless of whether we are running a secure
> >>>> boot capable build or not.
> >>>
> >>> We are still in a situation where D06 is not buildable with Secure
> >>> Boot enabled though.
> >>>
> >>> If you build with -D SECURE_BOOT_ENABLE=TRUE, you still end up with
> >>> /work/git/edk2-platforms/Platform/Hisilicon/D06/D06.dsc(...): error
> >>> 4000: Instance of library class [PlatformSecureLib] is not found
> >>>       in [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf] [AARCH64]
> >>>       consumed by module [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf]
> >>>
> >>> And all Hisilicon platforms still use
> >>> AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
> >>> regardless of Secure Boot setting.
> >>>
> >>> So what problem does this patch solve? A runtime one?
> >>
> >> This patch solve bug in FlashFvbDxe.
> >
> > Yes, but what bug? What is the symptom? What _specific_ problem goes
> > away by adding this patch? That information should have been in the
> > original commit message. I have no information available to me as I
> > now build -rc1 to suggest that this patch should be included.
>
> The bug is that gEfiAuthenticatedVariableGuid should be used in FlashFvbDxe,
> not gEfiVariableGuid when enable secure boot.
>
> >
> >> Should I add a patch before this patch
> >> to solve build error with -D SECURE_BOOT_ENABLE=TRUE in v4?
> >
> > That would require a sane implementation of PlatformSecureLib,
> > implementing a real UserPhysicalPresent().
> > Can you turn that around within the next few hours?
>
> My original idea is using OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.
> There is not enough time to implement a real UserPhysicalPresent.
> This patch will add when we implement real secure boot in future.
>

I think it is a terrible idea to enable secure boot now in an insecure
manner, and enable 'real' secure boot later.

Note that it is impossible to implement secure boot in a secure manner
using the generic VariableRuntimeDxe. The crypto routines that perform
the authentication are located in EfiRuntimeServicesCode memory
regions, which are writable by the OS, and so any exploit on the OS
side can modify that code to defeat the checks. Also, the SPI flash
that backs the variable store is accessible by the OS directly.

That means a proper secure boot implementation will not be based on
any of the components in use currently, and so enabling it does
nothing except confuse people or give them a false sense of security.
If this is based on OS or firmware test results, please disregard
those - this is a tick the box mentality that is wholly incompatible
with building secure systems.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20 14:39           ` Leif Lindholm
@ 2018-11-20 15:00             ` Ming Huang
  2018-11-20 15:20               ` Laszlo Ersek
  2018-11-20 16:23               ` Leif Lindholm
  2018-11-21  7:42             ` Ming Huang
  1 sibling, 2 replies; 19+ messages in thread
From: Ming Huang @ 2018-11-20 15:00 UTC (permalink / raw)
  To: Leif Lindholm
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, lersek, wanghuiqiang, huangming23,
	zhangjinsong2, huangdaode, john.garry, xinliang.liu, zhangfeng56



On 11/20/2018 10:39 PM, Leif Lindholm wrote:
> On Tue, Nov 20, 2018 at 10:29:57PM +0800, Ming Huang wrote:
>>>>> And all Hisilicon platforms still use
>>>>> AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
>>>>> regardless of Secure Boot setting.
>>>>>
>>>>> So what problem does this patch solve? A runtime one?
>>>>
>>>> This patch solve bug in FlashFvbDxe.
>>>
>>> Yes, but what bug? What is the symptom? What _specific_ problem goes
>>> away by adding this patch? That information should have been in the
>>> original commit message. I have no information available to me as I
>>> now build -rc1 to suggest that this patch should be included.
>>
>> The bug is that gEfiAuthenticatedVariableGuid should be used in FlashFvbDxe,
>> not gEfiVariableGuid when enable secure boot.
> 
> OK, I will ask a third time: what _problem_ does this solve?
> What is the symptom?
> When someone uses the buggy firmware, what does not work for them?
> This information _always_ needs to be in the commit message.

This patch is using with series v1 patch 'Hisilicon/D06: Fix SBBR-SCT AuthVar issue'
to fix the SCT issue:
RT.SetVariable - Set Invalid Time Base Auth Variable – FAILURE;
RT.SetVariable - Create one Time Base Auth Variable, the expect return
status should be EFI_SUCCESS – FAILURE.

> 
>>>> Should I add a patch before this patch
>>>> to solve build error with -D SECURE_BOOT_ENABLE=TRUE in v4?
>>>
>>> That would require a sane implementation of PlatformSecureLib,
>>> implementing a real UserPhysicalPresent().
>>> Can you turn that around within the next few hours?
>>
>> My original idea is using OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.
>> There is not enough time to implement a real UserPhysicalPresent.
> 
> If there is not enough time to implement a real PlatformSecureLib,
> there is no need to have Secure Boot at all. Same thing goes for
> secure variable store (to hardware devices that are not accessible
> from Non-secure world).
> 
>> This patch will add when we implement real secure boot in future.
> 
> That sounds like the best thing to do.
> 
> Meanwhile, could you create a patch to get rid of the SECURE_BOOT
> options completely from the .dsc/.fdf please? I don't like having it
> in there when we know it doesn't build.
> 
> /
>     Leif
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20 14:40           ` Ard Biesheuvel
@ 2018-11-20 15:14             ` Laszlo Ersek
  0 siblings, 0 replies; 19+ messages in thread
From: Laszlo Ersek @ 2018-11-20 15:14 UTC (permalink / raw)
  To: Ard Biesheuvel, Ming Huang
  Cc: Leif Lindholm, linaro-uefi, edk2-devel@lists.01.org,
	Graeme Gregory, Kinney, Michael D, wanghuiqiang, huangming,
	Jason Zhang, huangdaode, John Garry, Xinliang Liu, zhangfeng56

On 11/20/18 15:40, Ard Biesheuvel wrote:
> On Tue, 20 Nov 2018 at 15:30, Ming Huang <ming.huang@linaro.org> wrote:
>>
>>
>>
>> On 11/20/2018 8:58 PM, Leif Lindholm wrote:
>>> On Tue, Nov 20, 2018 at 08:40:28PM +0800, Ming Huang wrote:
>>>>
>>>>
>>>> On 11/20/2018 8:13 PM, Leif Lindholm wrote:
>>>>> On Tue, Nov 20, 2018 at 05:01:46PM +0800, Ming Huang wrote:
>>>>>> Now that the generic Variable Runtime DXE code no longer
>>>>>> distinguishes between gEfiVariableGuid and
>>>>>> gEfiAuthenticatedVariableGuid in the varstore FV header.
>>>>>> We can relax the check in the flashFvb driver to accept
>>>>>> either GUID regardless of whether we are running a secure
>>>>>> boot capable build or not.
>>>>>
>>>>> We are still in a situation where D06 is not buildable with Secure
>>>>> Boot enabled though.
>>>>>
>>>>> If you build with -D SECURE_BOOT_ENABLE=TRUE, you still end up with
>>>>> /work/git/edk2-platforms/Platform/Hisilicon/D06/D06.dsc(...): error
>>>>> 4000: Instance of library class [PlatformSecureLib] is not found
>>>>>       in [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf] [AARCH64]
>>>>>       consumed by module [/work/git/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf]
>>>>>
>>>>> And all Hisilicon platforms still use
>>>>> AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
>>>>> regardless of Secure Boot setting.
>>>>>
>>>>> So what problem does this patch solve? A runtime one?
>>>>
>>>> This patch solve bug in FlashFvbDxe.
>>>
>>> Yes, but what bug? What is the symptom? What _specific_ problem goes
>>> away by adding this patch? That information should have been in the
>>> original commit message. I have no information available to me as I
>>> now build -rc1 to suggest that this patch should be included.
>>
>> The bug is that gEfiAuthenticatedVariableGuid should be used in FlashFvbDxe,
>> not gEfiVariableGuid when enable secure boot.
>>
>>>
>>>> Should I add a patch before this patch
>>>> to solve build error with -D SECURE_BOOT_ENABLE=TRUE in v4?
>>>
>>> That would require a sane implementation of PlatformSecureLib,
>>> implementing a real UserPhysicalPresent().
>>> Can you turn that around within the next few hours?
>>
>> My original idea is using OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.
>> There is not enough time to implement a real UserPhysicalPresent.
>> This patch will add when we implement real secure boot in future.
>>
> 
> I think it is a terrible idea to enable secure boot now in an insecure
> manner, and enable 'real' secure boot later.
> 
> Note that it is impossible to implement secure boot in a secure manner
> using the generic VariableRuntimeDxe. The crypto routines that perform
> the authentication are located in EfiRuntimeServicesCode memory
> regions, which are writable by the OS, and so any exploit on the OS
> side can modify that code to defeat the checks. Also, the SPI flash
> that backs the variable store is accessible by the OS directly.
> 
> That means a proper secure boot implementation will not be based on
> any of the components in use currently, and so enabling it does
> nothing except confuse people or give them a false sense of security.
> If this is based on OS or firmware test results, please disregard
> those - this is a tick the box mentality that is wholly incompatible
> with building secure systems.
> 

Yup.

Thanks,
Laszlo


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20 15:00             ` Ming Huang
@ 2018-11-20 15:20               ` Laszlo Ersek
  2018-11-20 16:23               ` Leif Lindholm
  1 sibling, 0 replies; 19+ messages in thread
From: Laszlo Ersek @ 2018-11-20 15:20 UTC (permalink / raw)
  To: Ming Huang, Leif Lindholm
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, wanghuiqiang, huangming23, zhangjinsong2,
	huangdaode, john.garry, xinliang.liu, zhangfeng56

On 11/20/18 16:00, Ming Huang wrote:
> 
> 
> On 11/20/2018 10:39 PM, Leif Lindholm wrote:
>> On Tue, Nov 20, 2018 at 10:29:57PM +0800, Ming Huang wrote:
>>>>>> And all Hisilicon platforms still use
>>>>>> AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
>>>>>> regardless of Secure Boot setting.
>>>>>>
>>>>>> So what problem does this patch solve? A runtime one?
>>>>>
>>>>> This patch solve bug in FlashFvbDxe.
>>>>
>>>> Yes, but what bug? What is the symptom? What _specific_ problem goes
>>>> away by adding this patch? That information should have been in the
>>>> original commit message. I have no information available to me as I
>>>> now build -rc1 to suggest that this patch should be included.
>>>
>>> The bug is that gEfiAuthenticatedVariableGuid should be used in FlashFvbDxe,
>>> not gEfiVariableGuid when enable secure boot.
>>
>> OK, I will ask a third time: what _problem_ does this solve?
>> What is the symptom?
>> When someone uses the buggy firmware, what does not work for them?
>> This information _always_ needs to be in the commit message.
> 
> This patch is using with series v1 patch 'Hisilicon/D06: Fix SBBR-SCT AuthVar issue'
> to fix the SCT issue:
> RT.SetVariable - Set Invalid Time Base Auth Variable – FAILURE;
> RT.SetVariable - Create one Time Base Auth Variable, the expect return
> status should be EFI_SUCCESS – FAILURE.

Side comment (because the main comment is Ard's): regarding the
Signature GUID in VARIABLE_STORE_HEADER, commit d92eaabefbe0 ("OvmfPkg:
simplify VARIABLE_STORE_HEADER generation", 2016-02-15) might provide
some background.

Thanks,
Laszlo

>>>>> Should I add a patch before this patch
>>>>> to solve build error with -D SECURE_BOOT_ENABLE=TRUE in v4?
>>>>
>>>> That would require a sane implementation of PlatformSecureLib,
>>>> implementing a real UserPhysicalPresent().
>>>> Can you turn that around within the next few hours?
>>>
>>> My original idea is using OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.
>>> There is not enough time to implement a real UserPhysicalPresent.
>>
>> If there is not enough time to implement a real PlatformSecureLib,
>> there is no need to have Secure Boot at all. Same thing goes for
>> secure variable store (to hardware devices that are not accessible
>> from Non-secure world).
>>
>>> This patch will add when we implement real secure boot in future.
>>
>> That sounds like the best thing to do.
>>
>> Meanwhile, could you create a patch to get rid of the SECURE_BOOT
>> options completely from the .dsc/.fdf please? I don't like having it
>> in there when we know it doesn't build.
>>
>> /
>>     Leif
>>



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20 15:00             ` Ming Huang
  2018-11-20 15:20               ` Laszlo Ersek
@ 2018-11-20 16:23               ` Leif Lindholm
  1 sibling, 0 replies; 19+ messages in thread
From: Leif Lindholm @ 2018-11-20 16:23 UTC (permalink / raw)
  To: Ming Huang
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, lersek, wanghuiqiang, huangming23,
	zhangjinsong2, huangdaode, john.garry, xinliang.liu, zhangfeng56

On Tue, Nov 20, 2018 at 11:00:49PM +0800, Ming Huang wrote:
> On 11/20/2018 10:39 PM, Leif Lindholm wrote:
> > On Tue, Nov 20, 2018 at 10:29:57PM +0800, Ming Huang wrote:
> >>>>> And all Hisilicon platforms still use
> >>>>> AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
> >>>>> regardless of Secure Boot setting.
> >>>>>
> >>>>> So what problem does this patch solve? A runtime one?
> >>>>
> >>>> This patch solve bug in FlashFvbDxe.
> >>>
> >>> Yes, but what bug? What is the symptom? What _specific_ problem goes
> >>> away by adding this patch? That information should have been in the
> >>> original commit message. I have no information available to me as I
> >>> now build -rc1 to suggest that this patch should be included.
> >>
> >> The bug is that gEfiAuthenticatedVariableGuid should be used in FlashFvbDxe,
> >> not gEfiVariableGuid when enable secure boot.
> > 
> > OK, I will ask a third time: what _problem_ does this solve?
> > What is the symptom?
> > When someone uses the buggy firmware, what does not work for them?
> > This information _always_ needs to be in the commit message.
> 
> This patch is using with series v1 patch 'Hisilicon/D06: Fix SBBR-SCT AuthVar issue'
> to fix the SCT issue:
> RT.SetVariable - Set Invalid Time Base Auth Variable – FAILURE;
> RT.SetVariable - Create one Time Base Auth Variable, the expect return
> status should be EFI_SUCCESS – FAILURE.

OK, but if we don't have authenticated variables (all the way to the
hardware), then this is the correct behaviour? Making the test pass
anyway is not the correct solution.

/
    Leif


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
  2018-11-20 14:39           ` Leif Lindholm
  2018-11-20 15:00             ` Ming Huang
@ 2018-11-21  7:42             ` Ming Huang
  1 sibling, 0 replies; 19+ messages in thread
From: Ming Huang @ 2018-11-21  7:42 UTC (permalink / raw)
  To: Leif Lindholm
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, lersek, wanghuiqiang, huangming23,
	zhangjinsong2, huangdaode, john.garry, xinliang.liu, zhangfeng56



On 11/20/2018 10:39 PM, Leif Lindholm wrote:
> On Tue, Nov 20, 2018 at 10:29:57PM +0800, Ming Huang wrote:
>>>>> And all Hisilicon platforms still use
>>>>> AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
>>>>> regardless of Secure Boot setting.
>>>>>
>>>>> So what problem does this patch solve? A runtime one?
>>>>
>>>> This patch solve bug in FlashFvbDxe.
>>>
>>> Yes, but what bug? What is the symptom? What _specific_ problem goes
>>> away by adding this patch? That information should have been in the
>>> original commit message. I have no information available to me as I
>>> now build -rc1 to suggest that this patch should be included.
>>
>> The bug is that gEfiAuthenticatedVariableGuid should be used in FlashFvbDxe,
>> not gEfiVariableGuid when enable secure boot.
> 
> OK, I will ask a third time: what _problem_ does this solve?
> What is the symptom?
> When someone uses the buggy firmware, what does not work for them?
> This information _always_ needs to be in the commit message.
> 
>>>> Should I add a patch before this patch
>>>> to solve build error with -D SECURE_BOOT_ENABLE=TRUE in v4?
>>>
>>> That would require a sane implementation of PlatformSecureLib,
>>> implementing a real UserPhysicalPresent().
>>> Can you turn that around within the next few hours?
>>
>> My original idea is using OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.
>> There is not enough time to implement a real UserPhysicalPresent.
> 
> If there is not enough time to implement a real PlatformSecureLib,
> there is no need to have Secure Boot at all. Same thing goes for
> secure variable store (to hardware devices that are not accessible
> from Non-secure world).
> 
>> This patch will add when we implement real secure boot in future.
> 
> That sounds like the best thing to do.
> 
> Meanwhile, could you create a patch to get rid of the SECURE_BOOT
> options completely from the .dsc/.fdf please? I don't like having it
> in there when we know it doesn't build.

OK, I will send the patch in next series.

Thanks.

> 
> /
>     Leif
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH edk2-platforms v3 4/5] Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot
  2018-11-20  9:01 ` [PATCH edk2-platforms v3 4/5] Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot Ming Huang
@ 2019-02-11 14:45   ` Leif Lindholm
  0 siblings, 0 replies; 19+ messages in thread
From: Leif Lindholm @ 2019-02-11 14:45 UTC (permalink / raw)
  To: Ming Huang
  Cc: linaro-uefi, edk2-devel, graeme.gregory, ard.biesheuvel,
	michael.d.kinney, lersek, wanghuiqiang, huangming23,
	zhangjinsong2, huangdaode, john.garry, xinliang.liu, zhangfeng56

On Tue, Nov 20, 2018 at 05:01:49PM +0800, Ming Huang wrote:
> Linux kernel will recognize NUMA node by processor order,
> and the Node and proximity domain (PXM) will be not identical
> between BIOS and OS kernel after changing to TA(Totem A) boot,
> so adjust the NUMA node number and proximity domain (PXM) to
> match.

Is this a change that should have gone in together with edk2-platforms
cc2b26de91e09be9f9789d553e7b3e079c822efb?
("Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot")

What is the visible effect to a user of the partial change?
Failure to boot? Poor performance?

/
    Leif

> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang <ming.huang@linaro.org>
> ---
>  Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl |  28 +--
>  Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl     |  18 +-
>  Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc    | 194 ++++++++++----------
>  3 files changed, 120 insertions(+), 120 deletions(-)
> 
> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl
> index 87a2da8843e4..27fde2e09bfe 100644
> --- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl
> +++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Dsdt/Hi1620Pci.asl
> @@ -212,7 +212,7 @@ Scope(_SB)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x01)
> +    Return(0x00)
>    }
>  } // Device(PCI0)
>  
> @@ -262,7 +262,7 @@ Device (PCI1)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x01)
> +    Return(0x00)
>    }
>  } // Device(PCI1)
>  
> @@ -325,7 +325,7 @@ Device (PCI2)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x01)
> +    Return(0x00)
>    }
>  }
>  
> @@ -374,7 +374,7 @@ Device (PCI3)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x01)
> +    Return(0x00)
>    }
>  }
>  
> @@ -423,7 +423,7 @@ Device (PCI4)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x01)
> +    Return(0x00)
>    }
>  }
>  
> @@ -733,7 +733,7 @@ Device (PCI5)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x01)
> +    Return(0x00)
>    }
>  }
>  
> @@ -866,11 +866,11 @@ Device (PCI6)
>      // Never allow SHPC (no SHPC controller in this system)
>      And(CTRL,0x1D,CTRL)
>  
> -    If(LNotEqual(Arg1,One)) {  // Unknown revision
> +    If(LNotEqual(Arg1,One)) { // Unknown revision
>        Or(CDW1,0x08,CDW1)
>      }
>  
> -    If(LNotEqual(CDW3,CTRL)) {  // Capabilities bits were masked
> +    If(LNotEqual(CDW3,CTRL)) { // Capabilities bits were masked
>        Or(CDW1,0x10,CDW1)
>      }
>  
> @@ -924,7 +924,7 @@ Device (PCI6)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x03)
> +    Return(0x02)
>    }
>  } // Device(PCI6)
>  
> @@ -974,7 +974,7 @@ Device (PCI7)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x03)
> +    Return(0x02)
>    }
>  } // Device(PCI7)
>  
> @@ -1038,7 +1038,7 @@ Device (PCI8)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x03)
> +    Return(0x02)
>    }
>  }// Device(PCI8)
>  
> @@ -1087,7 +1087,7 @@ Device (PCI9)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x03)
> +    Return(0x02)
>    }
>  }// Device(PCI9)
>  
> @@ -1136,7 +1136,7 @@ Device (PCIA)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x03)
> +    Return(0x02)
>    }
>  }// Device(PCIA)
>  
> @@ -1210,7 +1210,7 @@ Device (PCIB)
>  
>    Method (_PXM, 0, NotSerialized)
>    {
> -    Return(0x03)
> +    Return(0x02)
>    }
>  }
>  
> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl
> index 08e15c17bf40..994018db96b5 100644
> --- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl
> +++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl
> @@ -53,7 +53,7 @@
>  [0004]                      PRI Interrupt : 00000000
>  [0004]                     GERR Interrupt : 00000000
>  [0004]                     Sync Interrupt : 00000000
> -[0004]                   Proximity Domain : 00000001
> +[0004]                   Proximity Domain : 00000000
>  [0004]             DeviceID mapping index : 00000002
>  
>  [0004]                         Input base : 00000000
> @@ -97,7 +97,7 @@
>  [0004]                      PRI Interrupt : 00000000
>  [0004]                     GERR Interrupt : 00000000
>  [0004]                     Sync Interrupt : 00000000
> -[0004]                   Proximity Domain : 00000001
> +[0004]                   Proximity Domain : 00000000
>  [0004]             DeviceID mapping index : 0001
>  
>  [0004]                         Input base : 00007c00
> @@ -135,7 +135,7 @@
>  [0004]                      PRI Interrupt : 00000000
>  [0004]                     GERR Interrupt : 00000000
>  [0004]                     Sync Interrupt : 00000000
> -[0004]                   Proximity Domain : 00000001
> +[0004]                   Proximity Domain : 00000000
>  [0004]             DeviceID mapping index : 00000001
>  
>  [0004]                         Input base : 00007400
> @@ -173,7 +173,7 @@
>  [0004]                      PRI Interrupt : 00000000
>  [0004]                     GERR Interrupt : 00000000
>  [0004]                     Sync Interrupt : 00000000
> -[0004]                   Proximity Domain : 00000003
> +[0004]                   Proximity Domain : 00000002
>  [0004]             DeviceID mapping index : 00000002
>  
>  [0004]                         Input base : 00008000
> @@ -217,7 +217,7 @@
>  [0004]                      PRI Interrupt : 00000000
>  [0004]                     GERR Interrupt : 00000000
>  [0004]                     Sync Interrupt : 00000000
> -[0004]                   Proximity Domain : 00000003
> +[0004]                   Proximity Domain : 00000002
>  [0004]             DeviceID mapping index : 0001
>  
>  [0004]                         Input base : 0000BC00
> @@ -255,7 +255,7 @@
>  [0004]                      PRI Interrupt : 00000000
>  [0004]                     GERR Interrupt : 00000000
>  [0004]                     Sync Interrupt : 00000000
> -[0004]                   Proximity Domain : 00000003
> +[0004]                   Proximity Domain : 00000002
>  [0004]             DeviceID mapping index : 00000001
>  
>  [0004]                         Input base : 0000B400
> @@ -288,8 +288,8 @@
>                              Read Allocate : 0
>                                   Override : 0
>  [0002]                           Reserved : 0000
> -[0001]       Memory Flags (decoded below) : 00
> -                                Coherency : 0
> +[0001]       Memory Flags (decoded below) : 01
> +                                Coherency : 1
>                           Device Attribute : 0
>  [0004]                      ATS Attribute : 00000000
>  [0004]                 PCI Segment Number : 00000000           // should match with above MCFG
> @@ -1911,7 +1911,7 @@
>  [34Ch 0844   4]                   Input base : 00000000
>  [350h 0848   4]                     ID Count : 00000001
>  [354h 0852   4]                  Output Base : 00000100
> -[358h 0856   4]             Output Reference : 00000100
> +[358h 0856   4]             Output Reference : 00000138
>  [35Ch 0860   4]        Flags (decoded below) : 00000001
>                                Single Mapping : 1
>  /* RDE device report++.*/
> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc
> index aea4c2185878..d77bddefc874 100644
> --- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc
> +++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc
> @@ -55,106 +55,106 @@ EFI_ACPI_STATIC_RESOURCE_AFFINITY_TABLE Srat = {
>    },
>  
>    {
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000000,0x00000001,0x00000000),   //GICC Affinity Processor 0
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000001,0x00000001,0x00000000),   //GICC Affinity Processor 1
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000002,0x00000001,0x00000000),   //GICC Affinity Processor 2
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000003,0x00000001,0x00000000),   //GICC Affinity Processor 3
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000004,0x00000001,0x00000000),   //GICC Affinity Processor 4
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000005,0x00000001,0x00000000),   //GICC Affinity Processor 5
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000006,0x00000001,0x00000000),   //GICC Affinity Processor 6
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000007,0x00000001,0x00000000),   //GICC Affinity Processor 7
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000008,0x00000001,0x00000000),   //GICC Affinity Processor 8
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000009,0x00000001,0x00000000),   //GICC Affinity Processor 9
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000A,0x00000001,0x00000000),   //GICC Affinity Processor 10
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000B,0x00000001,0x00000000),   //GICC Affinity Processor 11
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000C,0x00000001,0x00000000),   //GICC Affinity Processor 12
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000D,0x00000001,0x00000000),   //GICC Affinity Processor 13
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000E,0x00000001,0x00000000),   //GICC Affinity Processor 14
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000000F,0x00000001,0x00000000),   //GICC Affinity Processor 15
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000010,0x00000001,0x00000000),   //GICC Affinity Processor 16
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000011,0x00000001,0x00000000),   //GICC Affinity Processor 17
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000012,0x00000001,0x00000000),   //GICC Affinity Processor 18
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000013,0x00000001,0x00000000),   //GICC Affinity Processor 19
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000014,0x00000001,0x00000000),   //GICC Affinity Processor 20
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000015,0x00000001,0x00000000),   //GICC Affinity Processor 21
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000016,0x00000001,0x00000000),   //GICC Affinity Processor 22
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000017,0x00000001,0x00000000),   //GICC Affinity Processor 23
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000018,0x00000001,0x00000000),   //GICC Affinity Processor 24
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000019,0x00000001,0x00000000),   //GICC Affinity Processor 25
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001A,0x00000001,0x00000000),   //GICC Affinity Processor 26
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001B,0x00000001,0x00000000),   //GICC Affinity Processor 27
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001C,0x00000001,0x00000000),   //GICC Affinity Processor 28
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001D,0x00000001,0x00000000),   //GICC Affinity Processor 29
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001E,0x00000001,0x00000000),   //GICC Affinity Processor 30
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000001F,0x00000001,0x00000000),   //GICC Affinity Processor 31
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000020,0x00000001,0x00000000),   //GICC Affinity Processor 32
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000021,0x00000001,0x00000000),   //GICC Affinity Processor 33
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000022,0x00000001,0x00000000),   //GICC Affinity Processor 34
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000023,0x00000001,0x00000000),   //GICC Affinity Processor 35
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000024,0x00000001,0x00000000),   //GICC Affinity Processor 36
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000025,0x00000001,0x00000000),   //GICC Affinity Processor 37
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000026,0x00000001,0x00000000),   //GICC Affinity Processor 38
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000027,0x00000001,0x00000000),   //GICC Affinity Processor 39
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000028,0x00000001,0x00000000),   //GICC Affinity Processor 40
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000029,0x00000001,0x00000000),   //GICC Affinity Processor 41
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002A,0x00000001,0x00000000),   //GICC Affinity Processor 42
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002B,0x00000001,0x00000000),   //GICC Affinity Processor 43
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002C,0x00000001,0x00000000),   //GICC Affinity Processor 44
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002D,0x00000001,0x00000000),   //GICC Affinity Processor 45
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002E,0x00000001,0x00000000),   //GICC Affinity Processor 46
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000002F,0x00000001,0x00000000),   //GICC Affinity Processor 47
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000000,0x00000001,0x00000000),   //GICC Affinity Processor 0
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000001,0x00000001,0x00000000),   //GICC Affinity Processor 1
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000002,0x00000001,0x00000000),   //GICC Affinity Processor 2
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000003,0x00000001,0x00000000),   //GICC Affinity Processor 3
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000004,0x00000001,0x00000000),   //GICC Affinity Processor 4
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000005,0x00000001,0x00000000),   //GICC Affinity Processor 5
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000006,0x00000001,0x00000000),   //GICC Affinity Processor 6
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000007,0x00000001,0x00000000),   //GICC Affinity Processor 7
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000008,0x00000001,0x00000000),   //GICC Affinity Processor 8
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000009,0x00000001,0x00000000),   //GICC Affinity Processor 9
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000A,0x00000001,0x00000000),   //GICC Affinity Processor 10
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000B,0x00000001,0x00000000),   //GICC Affinity Processor 11
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000C,0x00000001,0x00000000),   //GICC Affinity Processor 12
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000D,0x00000001,0x00000000),   //GICC Affinity Processor 13
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000E,0x00000001,0x00000000),   //GICC Affinity Processor 14
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x0000000F,0x00000001,0x00000000),   //GICC Affinity Processor 15
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000010,0x00000001,0x00000000),   //GICC Affinity Processor 16
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000011,0x00000001,0x00000000),   //GICC Affinity Processor 17
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000012,0x00000001,0x00000000),   //GICC Affinity Processor 18
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000013,0x00000001,0x00000000),   //GICC Affinity Processor 19
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000014,0x00000001,0x00000000),   //GICC Affinity Processor 20
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000015,0x00000001,0x00000000),   //GICC Affinity Processor 21
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000016,0x00000001,0x00000000),   //GICC Affinity Processor 22
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000000,0x00000017,0x00000001,0x00000000),   //GICC Affinity Processor 23
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000018,0x00000001,0x00000000),   //GICC Affinity Processor 24
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000019,0x00000001,0x00000000),   //GICC Affinity Processor 25
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001A,0x00000001,0x00000000),   //GICC Affinity Processor 26
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001B,0x00000001,0x00000000),   //GICC Affinity Processor 27
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001C,0x00000001,0x00000000),   //GICC Affinity Processor 28
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001D,0x00000001,0x00000000),   //GICC Affinity Processor 29
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001E,0x00000001,0x00000000),   //GICC Affinity Processor 30
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000001F,0x00000001,0x00000000),   //GICC Affinity Processor 31
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000020,0x00000001,0x00000000),   //GICC Affinity Processor 32
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000021,0x00000001,0x00000000),   //GICC Affinity Processor 33
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000022,0x00000001,0x00000000),   //GICC Affinity Processor 34
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000023,0x00000001,0x00000000),   //GICC Affinity Processor 35
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000024,0x00000001,0x00000000),   //GICC Affinity Processor 36
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000025,0x00000001,0x00000000),   //GICC Affinity Processor 37
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000026,0x00000001,0x00000000),   //GICC Affinity Processor 38
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000027,0x00000001,0x00000000),   //GICC Affinity Processor 39
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000028,0x00000001,0x00000000),   //GICC Affinity Processor 40
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x00000029,0x00000001,0x00000000),   //GICC Affinity Processor 41
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002A,0x00000001,0x00000000),   //GICC Affinity Processor 42
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002B,0x00000001,0x00000000),   //GICC Affinity Processor 43
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002C,0x00000001,0x00000000),   //GICC Affinity Processor 44
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002D,0x00000001,0x00000000),   //GICC Affinity Processor 45
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002E,0x00000001,0x00000000),   //GICC Affinity Processor 46
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000001,0x0000002F,0x00000001,0x00000000),   //GICC Affinity Processor 47
>  
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000030,0x00000001,0x00000000),   //GICC Affinity Processor 48
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000031,0x00000001,0x00000000),   //GICC Affinity Processor 49
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000032,0x00000001,0x00000000),   //GICC Affinity Processor 50
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000033,0x00000001,0x00000000),   //GICC Affinity Processor 51
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000034,0x00000001,0x00000000),   //GICC Affinity Processor 52
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000035,0x00000001,0x00000000),   //GICC Affinity Processor 53
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000036,0x00000001,0x00000000),   //GICC Affinity Processor 54
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000037,0x00000001,0x00000000),   //GICC Affinity Processor 55
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000038,0x00000001,0x00000000),   //GICC Affinity Processor 56
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000039,0x00000001,0x00000000),   //GICC Affinity Processor 57
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003A,0x00000001,0x00000000),   //GICC Affinity Processor 58
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003B,0x00000001,0x00000000),   //GICC Affinity Processor 59
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003C,0x00000001,0x00000000),   //GICC Affinity Processor 60
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003D,0x00000001,0x00000000),   //GICC Affinity Processor 61
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003E,0x00000001,0x00000000),   //GICC Affinity Processor 62
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000003F,0x00000001,0x00000000),   //GICC Affinity Processor 63
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000040,0x00000001,0x00000000),   //GICC Affinity Processor 64
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000041,0x00000001,0x00000000),   //GICC Affinity Processor 65
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000042,0x00000001,0x00000000),   //GICC Affinity Processor 66
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000043,0x00000001,0x00000000),   //GICC Affinity Processor 67
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000044,0x00000001,0x00000000),   //GICC Affinity Processor 68
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000045,0x00000001,0x00000000),   //GICC Affinity Processor 69
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000046,0x00000001,0x00000000),   //GICC Affinity Processor 70
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000047,0x00000001,0x00000000),   //GICC Affinity Processor 71
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000048,0x00000001,0x00000000),   //GICC Affinity Processor 72
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000049,0x00000001,0x00000000),   //GICC Affinity Processor 73
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004A,0x00000001,0x00000000),   //GICC Affinity Processor 74
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004B,0x00000001,0x00000000),   //GICC Affinity Processor 75
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004C,0x00000001,0x00000000),   //GICC Affinity Processor 76
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004D,0x00000001,0x00000000),   //GICC Affinity Processor 77
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004E,0x00000001,0x00000000),   //GICC Affinity Processor 78
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000004F,0x00000001,0x00000000),   //GICC Affinity Processor 79
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000050,0x00000001,0x00000000),   //GICC Affinity Processor 80
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000051,0x00000001,0x00000000),   //GICC Affinity Processor 81
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000052,0x00000001,0x00000000),   //GICC Affinity Processor 82
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000053,0x00000001,0x00000000),   //GICC Affinity Processor 83
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000054,0x00000001,0x00000000),   //GICC Affinity Processor 84
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000055,0x00000001,0x00000000),   //GICC Affinity Processor 85
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000056,0x00000001,0x00000000),   //GICC Affinity Processor 86
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000057,0x00000001,0x00000000),   //GICC Affinity Processor 87
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000058,0x00000001,0x00000000),   //GICC Affinity Processor 88
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000059,0x00000001,0x00000000),   //GICC Affinity Processor 89
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005A,0x00000001,0x00000000),   //GICC Affinity Processor 90
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005B,0x00000001,0x00000000),   //GICC Affinity Processor 91
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005C,0x00000001,0x00000000),   //GICC Affinity Processor 92
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005D,0x00000001,0x00000000),   //GICC Affinity Processor 93
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005E,0x00000001,0x00000000),   //GICC Affinity Processor 94
> -    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000005F,0x00000001,0x00000000),   //GICC Affinity Processor 95
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000030,0x00000001,0x00000000),   //GICC Affinity Processor 48
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000031,0x00000001,0x00000000),   //GICC Affinity Processor 49
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000032,0x00000001,0x00000000),   //GICC Affinity Processor 50
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000033,0x00000001,0x00000000),   //GICC Affinity Processor 51
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000034,0x00000001,0x00000000),   //GICC Affinity Processor 52
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000035,0x00000001,0x00000000),   //GICC Affinity Processor 53
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000036,0x00000001,0x00000000),   //GICC Affinity Processor 54
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000037,0x00000001,0x00000000),   //GICC Affinity Processor 55
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000038,0x00000001,0x00000000),   //GICC Affinity Processor 56
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000039,0x00000001,0x00000000),   //GICC Affinity Processor 57
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003A,0x00000001,0x00000000),   //GICC Affinity Processor 58
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003B,0x00000001,0x00000000),   //GICC Affinity Processor 59
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003C,0x00000001,0x00000000),   //GICC Affinity Processor 60
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003D,0x00000001,0x00000000),   //GICC Affinity Processor 61
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003E,0x00000001,0x00000000),   //GICC Affinity Processor 62
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x0000003F,0x00000001,0x00000000),   //GICC Affinity Processor 63
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000040,0x00000001,0x00000000),   //GICC Affinity Processor 64
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000041,0x00000001,0x00000000),   //GICC Affinity Processor 65
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000042,0x00000001,0x00000000),   //GICC Affinity Processor 66
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000043,0x00000001,0x00000000),   //GICC Affinity Processor 67
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000044,0x00000001,0x00000000),   //GICC Affinity Processor 68
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000045,0x00000001,0x00000000),   //GICC Affinity Processor 69
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000046,0x00000001,0x00000000),   //GICC Affinity Processor 70
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000002,0x00000047,0x00000001,0x00000000),   //GICC Affinity Processor 71
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000048,0x00000001,0x00000000),   //GICC Affinity Processor 72
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000049,0x00000001,0x00000000),   //GICC Affinity Processor 73
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004A,0x00000001,0x00000000),   //GICC Affinity Processor 74
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004B,0x00000001,0x00000000),   //GICC Affinity Processor 75
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004C,0x00000001,0x00000000),   //GICC Affinity Processor 76
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004D,0x00000001,0x00000000),   //GICC Affinity Processor 77
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004E,0x00000001,0x00000000),   //GICC Affinity Processor 78
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000004F,0x00000001,0x00000000),   //GICC Affinity Processor 79
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000050,0x00000001,0x00000000),   //GICC Affinity Processor 80
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000051,0x00000001,0x00000000),   //GICC Affinity Processor 81
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000052,0x00000001,0x00000000),   //GICC Affinity Processor 82
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000053,0x00000001,0x00000000),   //GICC Affinity Processor 83
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000054,0x00000001,0x00000000),   //GICC Affinity Processor 84
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000055,0x00000001,0x00000000),   //GICC Affinity Processor 85
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000056,0x00000001,0x00000000),   //GICC Affinity Processor 86
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000057,0x00000001,0x00000000),   //GICC Affinity Processor 87
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000058,0x00000001,0x00000000),   //GICC Affinity Processor 88
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x00000059,0x00000001,0x00000000),   //GICC Affinity Processor 89
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005A,0x00000001,0x00000000),   //GICC Affinity Processor 90
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005B,0x00000001,0x00000000),   //GICC Affinity Processor 91
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005C,0x00000001,0x00000000),   //GICC Affinity Processor 92
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005D,0x00000001,0x00000000),   //GICC Affinity Processor 93
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005E,0x00000001,0x00000000),   //GICC Affinity Processor 94
> +    EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE_INIT(0x00000003,0x0000005F,0x00000001,0x00000000),   //GICC Affinity Processor 95
>    },
>    {
> -    EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_INIT(0x00000001, 0x00000000),
> +    EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_INIT(0x00000000, 0x00000000),
>     // EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_INIT(0x00000003, 0x00000001),
>    },
>  };
> -- 
> 2.9.5
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-02-11 14:45 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-20  9:01 [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve Ming Huang
2018-11-20  9:01 ` [PATCH edk2-platforms v3 1/5] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe Ming Huang
2018-11-20 12:13   ` Leif Lindholm
2018-11-20 12:40     ` Ming Huang
2018-11-20 12:58       ` Leif Lindholm
2018-11-20 14:29         ` Ming Huang
2018-11-20 14:39           ` Leif Lindholm
2018-11-20 15:00             ` Ming Huang
2018-11-20 15:20               ` Laszlo Ersek
2018-11-20 16:23               ` Leif Lindholm
2018-11-21  7:42             ` Ming Huang
2018-11-20 14:40           ` Ard Biesheuvel
2018-11-20 15:14             ` Laszlo Ersek
2018-11-20  9:01 ` [PATCH edk2-platforms v3 2/5] Hisilicon/D06: Modify Gic base Ming Huang
2018-11-20  9:01 ` [PATCH edk2-platforms v3 3/5] Hisilicon/D06: Correct PcdGicInterruptInterfaceBase Ming Huang
2018-11-20  9:01 ` [PATCH edk2-platforms v3 4/5] Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot Ming Huang
2019-02-11 14:45   ` Leif Lindholm
2018-11-20  9:01 ` [PATCH edk2-platforms v3 5/5] Hisilicon/D06: Move some functions to OemMiscLib Ming Huang
2018-11-20 13:02 ` [PATCH edk2-platforms v3 0/5] Fix D06 SBSA/SBBR issue and improve Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox