Re: [edk2] [PATCH edk2-platforms] sgi575/acpi: Use ACPI 6.2 specification

2018-08-30 Thread chandni cherukuri
On Thu, Aug 30, 2018 at 6:33 PM Ard Biesheuvel
 wrote:
>
> On 30 August 2018 at 13:23, Leif Lindholm  wrote:
> > On Wed, Aug 29, 2018 at 04:14:16PM +0530, Chandni Cherukuri wrote:
> >> Switched from using ACPI 6.1 to 6.2 specification for
> >> SGI575 since SBBR 1.1 requires ACPI 6.2 tables or later.
> >
> > Just to clarify - this has no impact at all on the actual generated
> > tables, right?
> >
> > We really should have a better way of dealing with this.
> > (But we don't, at the moment.)
> >

Thanks for the review Leif.
There is no impact on the generated tables with this change.
>
> I don't see the point of these changes. The whole point of ACPI's
> forward compatibility guarantees is that a ACPI 6.1 system
> automatically complies with ACPI 6.2, and so these changes are not
> necessary for compliance with SBBR 1.1 either.

Thanks for the review Ard. I will abandon this patch.

>
> >> Contributed-under: TianoCore Contribution Agreement 1.1
> >> Cc: Ard Biesheuvel 
> >> Cc: Leif Lindholm 
> >> Signed-off-by: Chandni Cherukuri 
> >> ---
> >>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc |  8 ++--
> >>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc | 48 ++--
> >>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Mcfg.aslc |  4 +-
> >>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Spcr.aslc |  6 +--
> >>  4 files changed, 33 insertions(+), 33 deletions(-)
> >>
> >> diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc 
> >> b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc
> >> index ed671f3..0183685 100644
> >> --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc
> >> +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc
> >> @@ -15,7 +15,7 @@
> >>
> >>  #include "SgiAcpiHeader.h"
> >>  #include 
> >> -#include 
> >> +#include 
> >>  #include 
> >>
> >>  #define SGI_DBG2_NUM_DEBUG_PORTS   1
> >> @@ -29,7 +29,7 @@
> >>
> >>  typedef struct {
> >>EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT Dbg2Device;
> >> -  EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTUREBaseAddressRegister;
> >> +  EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTUREBaseAddressRegister;
> >>UINT32AddressSize;
> >>UINT8 
> >> NameSpaceString[SGI_DBG2_NS_STR_LENGTH];
> >>  } DBG2_DEBUG_DEVICE_INFORMATION;
> >> @@ -56,7 +56,7 @@ typedef struct {
> >>  OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, BaseAddressRegister), /* 
> >> UINT16BaseAddressRegister Offset */  \
> >>  OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, AddressSize)  /* 
> >> UINT16AddressSize Offset */  \
> >>},  
> >>   \
> >> -  ARM_GAS32 (UartBase),/* 
> >> EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE BaseAddressRegister */ \
> >> +  ARM_GAS32 (UartBase),/* 
> >> EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE BaseAddressRegister */ \
> >>UartAddrLen, /* UINT32  AddressSize 
> >> */\
> >>UartNameStr  /* UINT8   
> >> NameSpaceString[MAX_DBG2_NAME_LEN] */ \
> >>  }
> >> @@ -64,7 +64,7 @@ typedef struct {
> >>  STATIC DBG2_TABLE Dbg2 = {
> >>{
> >>  ARM_ACPI_HEADER (
> >> -  EFI_ACPI_6_1_DEBUG_PORT_2_TABLE_SIGNATURE,
> >> +  EFI_ACPI_6_2_DEBUG_PORT_2_TABLE_SIGNATURE,
> >>DBG2_TABLE,
> >>EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION
> >>  ),
> >> diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc 
> >> b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
> >> index 46d811e..39e3f02 100644
> >> --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
> >> +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
> >> @@ -16,7 +16,7 @@
> >>  #include "SgiAcpiHeader.h"
> >>  #include 
> >>  #include 
> >> -#include 
> >> +#include 
> >>
> >>  #define SGI_PLATFORM_WATCHDOG_COUNT   2
> >>  #define SGI_PLATFORM_TIMER_COUNT  (SGI_PLATFORM_WATCHDOG_COUNT + 
> >> 1)
> >> @@ -24,7 +24,7 @@
> >>
> >>  #define SYSTEM_TIMER_BASE_ADDRESS 0x
> >>  #define GTDT_GLOBAL_FLAGS 0
> >> -#define GTDT_GTIMER_FLAGS 
> >> EFI_ACPI_6_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY
> >> +#define GTDT_GTIMER_FLAGS 
> >> EFI_ACPI_6_2_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY
> >>
> >>  #define SGI_GT_BLOCK_CTL_BASE 0x2A81
> >>  #define SGI_GT_BLOCK_FRAME1_CTL_BASE  0x2A82
> >> @@ -36,18 +36,18 @@
> >>  #define SGI_GT_BLOCK_FRAME0_GSIV  0x5C
> >>
> >>  #define SGI_GTX_TIMER_FLAGS   0
> >> -#define GTX_TIMER_SECURE  
> >> EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER
> >> +#define GTX_TIMER_SECURE  
> >> EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER
> >>  #define 

Re: [edk2] [PATCH edk2-platforms v4 11/31] Silicon/Hisilicon/Acpi: Unify HisiAcpiPlatformDxe

2018-08-30 Thread Ming



On 8/31/2018 2:39 AM, Leif Lindholm wrote:
> On Fri, Aug 24, 2018 at 12:07:23AM +0800, Ming Huang wrote:
>> The EFI_ACPI_STATIC_RESOURCE_AFFINITY_TABLE struct is used by
>> UpdateAcpiTable.c and Srat aslc. The struct may be different
>> according to chips, so move some macro to PlatformArch.h.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ming Huang 
>> Reviewed-by: Leif Lindholm 
> 
> Right, so I missed one bit on this last time around.
> Could you leave changes to
> Silicon/Hisilicon/Hi1620/Include/PlatformArch.h out here and just add
> that in the initial d06 patch?
> 
> Then, could you move this patch immediately after "Move RAS macro to
> PlatformArch"?

OK, do it in v5.

> 
> /
> Leif
> 
>> ---
>>  Silicon/Hisilicon/Hi1610/Include/PlatformArch.h |  6 
>>  Silicon/Hisilicon/Hi1620/Include/PlatformArch.h |  6 
>>  Silicon/Hisilicon/Include/Library/AcpiNextLib.h | 31 
>> ++--
>>  Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c |  2 --
>>  4 files changed, 34 insertions(+), 11 deletions(-)
>>
>> diff --git a/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h 
>> b/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h
>> index f39ae0748c..1ebddca4e5 100644
>> --- a/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h
>> +++ b/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h
>> @@ -30,6 +30,12 @@
>>  // Max NUMA node number for each node type
>>  #define MAX_NUM_PER_TYPE 8
>>  
>> +// for acpi
>> +#define NODE_IN_SOCKET  2
>> +#define CORE_NUM_PER_SOCKET 32
>> +#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT10
>> +#define EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_COUNT   8
>> +
>>  #define S1_BASE   0x400
>>  
>>  #define RASC_BASE(0x5000)
>> diff --git a/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h 
>> b/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h
>> index 9539cfdada..f3ad45f6c6 100644
>> --- a/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h
>> +++ b/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h
>> @@ -57,5 +57,11 @@
>>EFI_ACPI_ARM_CREATOR_REVISION   /* UINT32  CreatorRevision */ \
>>}
>>  
>> +// for acpi
>> +#define NODE_IN_SOCKET  2
>> +#define CORE_NUM_PER_SOCKET 48
>> +#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT16
>> +#define EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_COUNT   1
>> +
>>  #endif
>>  
>> diff --git a/Silicon/Hisilicon/Include/Library/AcpiNextLib.h 
>> b/Silicon/Hisilicon/Include/Library/AcpiNextLib.h
>> index fd05a3b960..2abffb65fc 100644
>> --- a/Silicon/Hisilicon/Include/Library/AcpiNextLib.h
>> +++ b/Silicon/Hisilicon/Include/Library/AcpiNextLib.h
>> @@ -19,6 +19,21 @@
>>  #ifndef __ACPI_NEXT_LIB_H__
>>  #define __ACPI_NEXT_LIB_H__
>>  
>> +#include 
>> +
>> +///
>> +/// ITS Affinity Structure Definition
>> +///
>> +#pragma pack(1)
>> +typedef struct {
>> +  UINT8   Type;
>> +  UINT8   Length;
>> +  UINT32  ProximityDomain;
>> +  UINT16  Reserved;
>> +  UINT32  ItsHwId;
>> +} EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE;
>> +#pragma pack()
>> +
>>  #define EFI_ACPI_6_1_GIC_ITS_INIT(GicITSHwId, GicITSBase) \
>>{ \
>>  EFI_ACPI_6_1_GIC_ITS, sizeof (EFI_ACPI_6_1_GIC_ITS_STRUCTURE), 
>> EFI_ACPI_RESERVED_WORD, \
>> @@ -42,8 +57,8 @@
>>  #define EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_INIT(   
>> \
>>  ProximityDomain, ItsId) 
>> \
>>{ 
>> \
>> -4, sizeof (EFI_ACPI_6_2_GIC_ITS_AFFINITY_STRUCTURE), ProximityDomain,   
>> \
>> -{EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE}, ItsId 
>>   \
>> +4, sizeof (EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE), ProximityDomain,   
>> \
>> +EFI_ACPI_RESERVED_WORD, ItsId   
>> \
>>}
>>  
>>  #define EFI_ACPI_6_1_MEMORY_AFFINITY_STRUCTURE_INIT(
>>   \
>> @@ -75,15 +90,13 @@
>>  // Define the number of each table type.
>>  // This is where the table layout is modified.
>>  //
>> -#define EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT  64
>> -#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT10
>> -#define EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_COUNT   8
>> +#define EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT  
>> (MAX_SOCKET*CORE_NUM_PER_SOCKET)
>>  
>>  typedef struct {
>> -  EFI_ACPI_6_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER  Header;
>> -  EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE  
>> Memory[EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT];
>> -  

[edk2] [Patch] MdeModulePkg/Ip4Dxe: Sync the direct route entry setting.

2018-08-30 Thread Jiaxin Wu
This patch is to sync the direct route entry setting in both the default
and Instance route table {Subnet, Mask, NextHope}.

Cc: Ye Ting 
Cc: Fu Siyuan 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin 
---
 .../Universal/Network/Ip4Dxe/Ip4Config2Impl.c   |  7 ---
 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 13 ++---
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c 
b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
index c19a72730e..b52542cd84 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
@@ -557,17 +557,10 @@ Ip4Config2SetDefaultAddr (
 return Status;
   }
 }
   }
 
-  Ip4AddRoute (
-IpSb->DefaultRouteTable,
-StationAddress,
-SubnetMask,
-IP4_ALLZERO_ADDRESS
-);
-
   //
   // Add a route for the connected network.
   //
   Subnet = StationAddress & SubnetMask;
 
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c 
b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
index 6a26143e30..c68dad7a3c 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
@@ -593,10 +593,11 @@ Ip4ConfigProtocol (
   IP4_SERVICE   *IpSb;
   IP4_INTERFACE *IpIf;
   EFI_STATUSStatus;
   IP4_ADDR  Ip;
   IP4_ADDR  Netmask;
+  IP4_ADDR  Subnet;
   EFI_ARP_PROTOCOL  *Arp;
   EFI_IP4_CONFIG2_PROTOCOL  *Ip4Config2;
   EFI_IP4_CONFIG2_POLICYPolicy;
 
   IpSb = IpInstance->Service;
@@ -670,14 +671,20 @@ Ip4ConfigProtocol (
 
   InsertTailList (>Interfaces, >Link);
 }
 
 //
-// Add a route to this connected network in the route table
+// Add a route to this connected network in the instance route table.
 //
-Ip4AddRoute (IpInstance->RouteTable, Ip, Netmask, IP4_ALLZERO_ADDRESS);
-
+Subnet = Ip & Netmask;
+
+Ip4AddRoute (
+  IpInstance->RouteTable, 
+  Subnet, 
+  Netmask, 
+  IP4_ALLZERO_ADDRESS
+  );
   } else {
 //
 // Use the default address. Check the state.
 //
 if (IpSb->State == IP4_SERVICE_UNSTARTED) {
-- 
2.17.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] MdeModulePkg/MdeModulePkg.uni: update PCD string per dec file change

2018-08-30 Thread Wang, Jian J
Sure. Make sense.

Regards,
Jian

> -Original Message-
> From: Zeng, Star
> Sent: Friday, August 31, 2018 9:43 AM
> To: Wang, Jian J ; edk2-devel@lists.01.org
> Cc: Dong, Eric ; Zeng, Star 
> Subject: RE: [PATCH] MdeModulePkg/MdeModulePkg.uni: update PCD string per
> dec file change
> 
> Please mention 8f2613628acf601a2a17bb64bb49ef73f85cfe2c (which updated
> the PCDs in dec) in commit log.
> 
> Reviewed that, Reviewed-by: Star Zeng 
> 
> Thanks,
> Star
> -Original Message-
> From: Wang, Jian J
> Sent: Friday, August 31, 2018 9:22 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star ; Dong, Eric 
> Subject: [PATCH] MdeModulePkg/MdeModulePkg.uni: update PCD string per dec
> file change
> 
> PcdNullPointerDetectionPropertyMask and PcdHeapGuardPropertyMask have
> been updated in dec file to reflect a new feature (non-stop mode). This patch
> updates corresponding unicode strings in uni file to match those changes.
> 
> Cc: Star Zeng 
> Cc: Eric Dong 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jian J Wang 
> ---
>  MdeModulePkg/MdeModulePkg.uni | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/MdeModulePkg.uni
> b/MdeModulePkg/MdeModulePkg.uni index 080b8a62c0..8807af801e 100644
> --- a/MdeModulePkg/MdeModulePkg.uni
> +++ b/MdeModulePkg/MdeModulePkg.uni
> @@ -1146,7 +1146,8 @@
>   
>   " If enabled, accessing
> NULL address in UEFI or SMM code can be caught.\n\n"
>   
>   "   BIT0- Enable NULL
> pointer detection for UEFI.\n"
>   
>   "   BIT1- Enable NULL
> pointer detection for SMM.\n"
> - 
>   "   BIT2..6 - Reserved
> for future uses.\n"
> + 
>   "   BIT2..5 - Reserved
> for future uses.\n"
> + 
>   "   BIT6- Enable non-
> stop mode.\n"
>   
>   "   BIT7- Disable
> NULL pointer detection just after EndOfDxe."
>   
>   " This is a workaround
> for those unsolvable NULL access issues in"
>   
>   " OptionROM, boot
> loader, etc. It can also help to avoid unnecessary"
> @@ -1225,6 +1226,7 @@
>   
>"   BIT1 - Enable UEFI pool
> guard.\n"
>   
>"   BIT2 - Enable SMM page
> guard.\n"
>   
>"   BIT3 - Enable SMM pool
> guard.\n"
> + 
>"   BIT6 - Enable non-stop
> mode.\n"
>   
>"   BIT7 - The direction of
> Guard Page for Pool Guard.\n"
>   
>"  0 - The returned pool is
> near the tail guard page.\n"
>   
>"  1 - The returned pool is
> near the head guard page."
> --
> 2.16.2.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] MdeModulePkg/MdeModulePkg.uni: update PCD string per dec file change

2018-08-30 Thread Zeng, Star
Please mention 8f2613628acf601a2a17bb64bb49ef73f85cfe2c (which updated the PCDs 
in dec) in commit log.

Reviewed that, Reviewed-by: Star Zeng 

Thanks,
Star
-Original Message-
From: Wang, Jian J 
Sent: Friday, August 31, 2018 9:22 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star ; Dong, Eric 
Subject: [PATCH] MdeModulePkg/MdeModulePkg.uni: update PCD string per dec file 
change

PcdNullPointerDetectionPropertyMask and PcdHeapGuardPropertyMask have been 
updated in dec file to reflect a new feature (non-stop mode). This patch 
updates corresponding unicode strings in uni file to match those changes.

Cc: Star Zeng 
Cc: Eric Dong 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang 
---
 MdeModulePkg/MdeModulePkg.uni | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni 
index 080b8a62c0..8807af801e 100644
--- a/MdeModulePkg/MdeModulePkg.uni
+++ b/MdeModulePkg/MdeModulePkg.uni
@@ -1146,7 +1146,8 @@

" If enabled, accessing NULL address in UEFI or SMM 
code can be caught.\n\n"

"   BIT0- Enable NULL pointer detection for UEFI.\n"

"   BIT1- Enable NULL pointer detection for SMM.\n"
-   
"   BIT2..6 - Reserved for future uses.\n"
+   
"   BIT2..5 - Reserved for future uses.\n"
+   
"   BIT6- Enable non-stop mode.\n"

"   BIT7- Disable NULL pointer detection just after 
EndOfDxe."

" This is a workaround for those unsolvable NULL access 
issues in"

" OptionROM, boot loader, etc. It can also help to 
avoid unnecessary"
@@ -1225,6 +1226,7 @@

 "   BIT1 - Enable UEFI pool guard.\n"

 "   BIT2 - Enable SMM page guard.\n"

 "   BIT3 - Enable SMM pool guard.\n"
+   
 "   BIT6 - Enable non-stop mode.\n"

 "   BIT7 - The direction of Guard Page for Pool Guard.\n"

 "  0 - The returned pool is near the tail guard 
page.\n"

 "  1 - The returned pool is near the head guard page."
--
2.16.2.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] MdeModulePkg/MdeModulePkg.uni: update PCD string per dec file change

2018-08-30 Thread Jian J Wang
PcdNullPointerDetectionPropertyMask and PcdHeapGuardPropertyMask have
been updated in dec file to reflect a new feature (non-stop mode). This
patch updates corresponding unicode strings in uni file to match those
changes.

Cc: Star Zeng 
Cc: Eric Dong 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang 
---
 MdeModulePkg/MdeModulePkg.uni | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni
index 080b8a62c0..8807af801e 100644
--- a/MdeModulePkg/MdeModulePkg.uni
+++ b/MdeModulePkg/MdeModulePkg.uni
@@ -1146,7 +1146,8 @@

" If enabled, accessing NULL address in UEFI or SMM 
code can be caught.\n\n"

"   BIT0- Enable NULL pointer detection for UEFI.\n"

"   BIT1- Enable NULL pointer detection for SMM.\n"
-   
"   BIT2..6 - Reserved for future uses.\n"
+   
"   BIT2..5 - Reserved for future uses.\n"
+   
"   BIT6- Enable non-stop mode.\n"

"   BIT7- Disable NULL pointer detection just after 
EndOfDxe."

" This is a workaround for those unsolvable NULL access 
issues in"

" OptionROM, boot loader, etc. It can also help to 
avoid unnecessary"
@@ -1225,6 +1226,7 @@

 "   BIT1 - Enable UEFI pool guard.\n"

 "   BIT2 - Enable SMM page guard.\n"

 "   BIT3 - Enable SMM pool guard.\n"
+   
 "   BIT6 - Enable non-stop mode.\n"

 "   BIT7 - The direction of Guard Page for Pool Guard.\n"

 "  0 - The returned pool is near the tail guard 
page.\n"

 "  1 - The returned pool is near the head guard page."
-- 
2.16.2.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] Missing ‘or’ in CLA

2018-08-30 Thread Henri Yandell
The CLA is missing an ‘or’ in section 3.

See https://github.com/tianocore/edk2/pull/133/files for an example of the
specific text.

Thanks,

Hen
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 00/31] Upload for D06 platform

2018-08-30 Thread Leif Lindholm
Allright, we're getting close.

Please generate a v5 based on my comments for v4.
If that does not require changes to edk2-non-osi, there is no need to
generate a v5 of that.

_But_, one big overarching issue:
Every commit in the series needs to be buildable. For D03, D05 and D06.
There are many ordering issues in this version. Please ensure

Basically, before you submit v5, I want you to:
1) create a copy of the branch you intend to submit, rebased onto
   origin/master
2) build it for all of those platforms, in DEBUG and RELEASE mode
3) If that causes any build failures, fix those
   3.1) if those changes require any reordering of patches, goto 1
4) git reset --hard HEAD~1
5) if current commit is not origin/master, goto 2

I have a very hackish script called "check-bisect.sh" which I have
just added to uefi-tools. This takes care of steps 2-5 automatically,
stopping and reporting on any build failures. 1 needs to be repeated
manually.

Best Regards,

Leif

On Fri, Aug 24, 2018 at 12:07:12AM +0800, Ming Huang wrote:
> The major features of this patchset include:
> 1 D06 source code;
> 2 Unify some D0x modules;
> 
> Change since v2: (1~3 have reviewed in v3)
> 1 Modify "Wait for all disk ready" patch as communication, update SAS driver 
> binary also;
> 2 Modify OemNicLib, set Mac to 0xFF while eeprom don't contain valid Mac;
> 3 Remove .h file from Apei.inf;
> 4 Replace "Support SPCR table switch" with 
> EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe;
>   And remove EnableSpcr field from patch "Add Hi1620OemConfigUiLib";
>   And move some lines from patch "Support SPCR table switch" to patch 
> "Enable/disable SMMU";
> 5 Move I2CLib set before D06 patch;
> 6 Drop patch "Add some Lpc macro to LpcLib.h";
> 7 Drop Oem Shell commands patch;
> 8 Move PLATFORM_SAS_NOTIFY API to edk2-non-osi;
> 9 Modify Signed-off-by and add Reviewed-by;
> 10 Change include "PlatformArch.h" to ;
> 11 Modify other comments in v2/v3;
> 
> Code can also be found in github: 
> https://github.com/hisilicon/OpenPlatformPkg.git
> branch: d06-platform-v4
> 
> 
> Heyi Guo (3):
>   Hisilicon/D06: Add Debug Serial Port Init Driver
>   Hisilicon/Hi1620: Add ACPI PPTT table
>   Platform/Hisilicon/D06: Enable ACPI PPTT
> 
> Luqi Jiang (1):
>   Hisilicon/D06: add apei driver
> 
> Ming Huang (21):
>   Silicon/Hisilicon/Acpi: Move some macro to PlatformArch.h
>   Silicon/Hisilicon: Fix I2CLib enable fail issue
>   Silicon/Hisilicon: Add I2CLib delay for HNS auto config
>   Hisilicon/D06: Add several base file for D06
>   Platform/Hisilicon/D06: Add M41T83RealTimeClockLib
>   Platform/Hisilicon/D06: Add edk2-non-osi components for D06
>   Hisilicon/D06: Add OemMiscLibD06
>   Silicon/Hisilicon/D06: Wait for all disk ready
>   Silicon/Hisilicon/Acpi: Unify HisiAcpiPlatformDxe
>   Hisilicon/D06: Add ACPI Tables for D06
>   Silicon/Hisilicon/D06: Stop watchdog
>   Platform/Hisilicon/D06: Add OemNicLib
>   Platform/Hisilicon/D06: Add OemNicConfig2P Driver
>   Platform/Hisilicon/D06: Add EarlyConfigPeim peim
>   Platform/Hisilicon/D06: Add PciHostBridgeLib
>   Platform/Hisilicon/D06: Add capsule upgrade support
>   Silicon/Hisilicon: Add I2C Bus Exception handle function
>   Silicon/Hisilicon/Setup: Support SPCR table switch
>   Silicon/Hisilicon/setup: Enable/disable SMMU
>   Hisilicon/D06: Add PciPlatformLib
>   Platform/Hisilicon/D0x: Update version string to 18.08
> 
> Sun Yuanchen (2):
>   Silicon/Hisilicon/D0x: Move RAS macro to PlatformArch.h
>   Hisilicon/D0x: Update SMBIOS type9 info
> 
> Yang XinYi (2):
>   Hisilicon/D06: Add Hi1620OemConfigUiLib
>   Silicon/Hisilicon/Setup: Add Setup Item "EnableGOP"
> 
> ZhenYao (1):
>   Silicon/Hisilicon: Modify for close slave core clock.
> 
> shaochangliang (1):
>   Silicon/Hisilicon: Optimize I2CLib for HNS config CDR time
> 
>  Platform/Hisilicon/D06/D06.dec|   29 +
>  Silicon/Hisilicon/Hi1610/Hi1610.dec   |   23 +
>  Silicon/Hisilicon/Hi1616/Hi1616.dec   |   23 +
>  Silicon/Hisilicon/Hi1620/Hi1620.dec   |   23 +
>  Silicon/Hisilicon/HisiPkg.dec |1 +
>  Platform/Hisilicon/D03/D03.dsc|2 +-
>  Platform/Hisilicon/D05/D05.dsc|2 +-
>  Platform/Hisilicon/D06/D06.dsc|  489 
>  Platform/Hisilicon/D06/D06.fdf|  445 
>  .../OemMiscLib2P/OemMiscLib2PHi1610.inf   |1 +
>  .../Library/OemMiscLibD05/OemMiscLibD05.inf   |1 +
>  .../OemNicConfig2PHi1620/OemNicConfig2P.inf   |   43 +
>  .../SystemFirmwareDescriptor.inf  |   50 +
>  .../EarlyConfigPeim/EarlyConfigPeimD06.inf|   50 +
>  .../Library/OemMiscLibD06/OemMiscLibD06.inf   |   51 +
>  .../D06/Library/OemNicLib/OemNicLib.inf   |   35 +
>  .../PciHostBridgeLib/PciHostBridgeLib.inf |   36 +
>  .../HisiAcpiPlatformDxe/AcpiPlatformDxe.inf   |3 +-
>  .../Hi1610AcpiTables/AcpiTablesHi1610.inf |2 +-
>  .../Hi1616/D05AcpiTables/AcpiTablesHi1616.inf |2 +-
>  

[edk2] Regression with PXE boot on OvmfPkg/VirtioNetDxe driver on aarch64 system

2018-08-30 Thread aaron . young
  We have encountered what we believe to be a regression in the 
OvmfPkg/VirtioNetDxe driver.


  This regression causes PXE boot to fail with the following ASSERT:

ASSERT 
[VirtioNetDxe]/builddir/build/BUILD/ovmf-92d07e48907f/OvmfPkg/VirtioNetDxe/SnpSharedHelpers.c(184): 
((BOOLEAN)(0==1))


  The failure was encountered on a aarch64/Armv8 system (Ampere server) 
using the latest mainline (edk2.git/master) code as of 8-28-2018.


  On a hunch, I reverted the following patchset which resulted in PXE 
boot being successful - which suggests this patchset is likely the culprit:


https://lists.01.org/pipermail/edk2-devel/2017-September/014679.html

  The command used to initiate the VM PXE boot/install is:

  virt-install --name guest1  --vcpus 16 --ram 32000 --arch aarch64 
--disk guest1.img,size=100 --network 
type=direct,source=enP4p1s0,model=virtio --pxe


  NOTE that I also tried simply removing the offending ASSERT() and PXE 
boot still fails with multiple errors (exceptions of some sort that I 
didn't log).



  What I'd like to know:

  1. Is this a known failure?
  2. Was aarch64 given much testing with this new patchset?
  3. Is reverting this patchset a safe workaround for now until a fix 
is found? Or is there another simple workaround perhaps?


  4. Any hunches what the issue could be?


  Thanks for any info/help/suggestions,

  -Aaron Young

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] Remove EDK package from edk2 master

2018-08-30 Thread Kinney, Michael D
Hi Jaben,

There is a branch for MinnowMax in edk2-platforms that is
tied to UDK2017.


https://github.com/tianocore/edk2-platforms/tree/devel-MinnowBoardMax-UDK2017

I agree that the Vlv2*Pkg in edk2/master should be migrated
to edk2-platforms.  These packages build with the rest of the
content in edk2/master, so the landing zone would be 
edk2-platforms/master.  This means there is still a requirement
to remove the use of EdkCompatibilityPkg from that version.

Thanks,

Mike

> -Original Message-
> From: Carsey, Jaben
> Sent: Thursday, August 30, 2018 12:15 PM
> To: Kinney, Michael D ;
> Laszlo Ersek ; Gao, Liming
> ; edk2-devel@lists.01.org; Kinney,
> Michael D 
> Subject: RE: [edk2] Remove EDK package from edk2 master
> 
> Should we move that to edk2-platforms and then it can use
> a UDK release instead of adding dependencies to master?
> 
> Thanks
> -Jaben
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-
> boun...@lists.01.org] On Behalf Of
> > Kinney, Michael D
> > Sent: Thursday, August 30, 2018 11:50 AM
> > To: Laszlo Ersek ; Gao, Liming
> ;
> > edk2-devel@lists.01.org; Kinney, Michael D
> 
> > Subject: Re: [edk2] Remove EDK package from edk2 master
> >
> > Liming,
> >
> > The Vlv2TbltDevicePkg in edk2/master is using
> EdkCompatibilityPkg.
> >
> > I have entered a new bug to remove this use of the
> EdkCompatibilityPkg
> > and added it as a dependency.
> >
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1132
> >
> > Thanks,
> >
> > Mike
> >
> > > -Original Message-
> > > From: edk2-devel [mailto:edk2-devel-
> boun...@lists.01.org]
> > > On Behalf Of Laszlo Ersek
> > > Sent: Thursday, August 30, 2018 2:06 AM
> > > To: Gao, Liming ; edk2-
> > > de...@lists.01.org
> > > Subject: Re: [edk2] Remove EDK package from edk2
> master
> > >
> > > On 08/30/18 03:36, Gao, Liming wrote:
> > > > EDK2 plans to retire EDK style packages. Below BZ
> > > requests to remove FatBinPkg, EdkShellPkg,
> EdkShellBinPkg
> > > and EdkCompatiblityPkg from edk2 master. They can be
> > > replaced by Edk2 FatPkg, ShellBinPkg and ShellPkg.
> > > UnixPkg is an empty package. So, it is also suggested
> to
> > > be removed. But, they are all kept in edk2 existing
> > > branches for reference. Once they are removed, edk2
> > > platform dsc/fdf will be updated to use edk2
> > > FatPkg/ShellBinPkg/ShellPkg. If you have any comments
> on
> > > this change, please reply to this mail.
> > > >
> > > >
> > >
> 1106
> > > >
> > > > EDK2
> > > >
> > > > Code
> > > >
> > > > Remove UnixPkg from
> > >
> edk2/master > > d=1106>
> > > >
> > > >
> > >
> 1105
> > > >
> > > > EDK2
> > > >
> > > > Code
> > > >
> > > > Remove FatBinPkg from
> > >
> edk2/master > > d=1105>
> > > >
> > > >
> > >
> 1107
> > > >
> > > > EDK2
> > > >
> > > > Code
> > > >
> > > > Remove EdkShellPkg from
> > >
> edk2/master > > d=1107>
> > > >
> > > >
> > >
> 1108
> > > >
> > > > EDK2
> > > >
> > > > Code
> > > >
> > > > Remove EdkShellBinPkg from
> > >
> edk2/master > > d=1108>
> > > >
> > > >
> > >
> 1103
> > > >
> > > > EDK2
> > > >
> > > > Code
> > > >
> > > > delete EdkCompatibilityPkg from
> > >
> edk2/master > > d=1103>
> > >
> > > Sounds good to me.
> > >
> > > Thanks,
> > > Laszlo
> > > ___
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] Remove EDK package from edk2 master

2018-08-30 Thread Carsey, Jaben
Should we move that to edk2-platforms and then it can use a UDK release instead 
of adding dependencies to master?

Thanks
-Jaben

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Kinney, Michael D
> Sent: Thursday, August 30, 2018 11:50 AM
> To: Laszlo Ersek ; Gao, Liming ;
> edk2-devel@lists.01.org; Kinney, Michael D 
> Subject: Re: [edk2] Remove EDK package from edk2 master
> 
> Liming,
> 
> The Vlv2TbltDevicePkg in edk2/master is using EdkCompatibilityPkg.
> 
> I have entered a new bug to remove this use of the EdkCompatibilityPkg
> and added it as a dependency.
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1132
> 
> Thanks,
> 
> Mike
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org]
> > On Behalf Of Laszlo Ersek
> > Sent: Thursday, August 30, 2018 2:06 AM
> > To: Gao, Liming ; edk2-
> > de...@lists.01.org
> > Subject: Re: [edk2] Remove EDK package from edk2 master
> >
> > On 08/30/18 03:36, Gao, Liming wrote:
> > > EDK2 plans to retire EDK style packages. Below BZ
> > requests to remove FatBinPkg, EdkShellPkg, EdkShellBinPkg
> > and EdkCompatiblityPkg from edk2 master. They can be
> > replaced by Edk2 FatPkg, ShellBinPkg and ShellPkg.
> > UnixPkg is an empty package. So, it is also suggested to
> > be removed. But, they are all kept in edk2 existing
> > branches for reference. Once they are removed, edk2
> > platform dsc/fdf will be updated to use edk2
> > FatPkg/ShellBinPkg/ShellPkg. If you have any comments on
> > this change, please reply to this mail.
> > >
> > >
> > 1106
> > >
> > > EDK2
> > >
> > > Code
> > >
> > > Remove UnixPkg from
> > edk2/master > d=1106>
> > >
> > >
> > 1105
> > >
> > > EDK2
> > >
> > > Code
> > >
> > > Remove FatBinPkg from
> > edk2/master > d=1105>
> > >
> > >
> > 1107
> > >
> > > EDK2
> > >
> > > Code
> > >
> > > Remove EdkShellPkg from
> > edk2/master > d=1107>
> > >
> > >
> > 1108
> > >
> > > EDK2
> > >
> > > Code
> > >
> > > Remove EdkShellBinPkg from
> > edk2/master > d=1108>
> > >
> > >
> > 1103
> > >
> > > EDK2
> > >
> > > Code
> > >
> > > delete EdkCompatibilityPkg from
> > edk2/master > d=1103>
> >
> > Sounds good to me.
> >
> > Thanks,
> > Laszlo
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 07/31] Platform/Hisilicon/D06: Add M41T83RealTimeClockLib

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:19AM +0800, Ming Huang wrote:
> Add M41T83RealTimeClockLib for RTC.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 

Reviewed-by: Leif Lindholm 


> ---
>  Platform/Hisilicon/D06/D06.dsc  
> |   1 +
>  Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf 
> |  46 ++
>  Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h  
> | 158 ++
>  Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c   
> | 559 
>  4 files changed, 764 insertions(+)
> 
> diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc
> index d14fce1159..27358f8c78 100644
> --- a/Platform/Hisilicon/D06/D06.dsc
> +++ b/Platform/Hisilicon/D06/D06.dsc
> @@ -65,6 +65,7 @@
>CpldIoLib|Silicon/Hisilicon/Library/CpldIoLib/CpldIoLib.inf
>  
>TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
> +  
> RealTimeClockLib|Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf
>  
>CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
>
> GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
> diff --git 
> a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf 
> b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf
> new file mode 100644
> index 00..e0bf6b3f24
> --- /dev/null
> +++ 
> b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf
> @@ -0,0 +1,46 @@
> +#/** @file
> +#
> +#  Copyright (c) 2018, Hisilicon Limited. All rights reserved.
> +#  Copyright (c) 2018, Linaro Limited. All rights reserved.
> +#
> +#  This program and the accompanying materials
> +#  are licensed and made available under the terms and conditions of the BSD 
> License
> +#  which accompanies this distribution.  The full text of the license may be 
> found at
> +#  http://opensource.org/licenses/bsd-license.php
> +#
> +#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +#
> +#**/
> +
> +[Defines]
> +  INF_VERSION= 0x0001001A
> +  BASE_NAME  = M41T83RealTimeClockLib
> +  FILE_GUID  = 470DFB96-E205-4515-A75E-2E60F853E79D
> +  MODULE_TYPE= BASE
> +  VERSION_STRING = 1.0
> +  LIBRARY_CLASS  = RealTimeClockLib
> +
> +[Sources.common]
> +  M41T83RealTimeClockLib.c
> +
> +[Packages]
> +  EmbeddedPkg/EmbeddedPkg.dec
> +  MdePkg/MdePkg.dec
> +  Platform/Hisilicon/D06/D06.dec
> +  Silicon/Hisilicon/HisiPkg.dec
> +
> +[LibraryClasses]
> +  BaseMemoryLib
> +  CpldIoLib
> +  DebugLib
> +  I2CLib
> +  IoLib
> +  PcdLib
> +  TimeBaseLib
> +  TimerLib
> +  UefiLib
> +  UefiRuntimeLib# Use EFiAtRuntime to check stage
> +
> +[Depex]
> +  gEfiCpuArchProtocolGuid
> diff --git 
> a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h 
> b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h
> new file mode 100644
> index 00..d985055d9b
> --- /dev/null
> +++ b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h
> @@ -0,0 +1,158 @@
> +/** @file
> +
> +  Copyright (c) 2018, Hisilicon Limited. All rights reserved.
> +  Copyright (c) 2018, Linaro Limited. All rights reserved.
> +
> +  This program and the accompanying materials
> +  are licensed and made available under the terms and conditions of the BSD 
> License
> +  which accompanies this distribution.  The full text of the license may be 
> found at
> +  http://opensource.org/licenses/bsd-license.php
> +
> +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +
> +**/
> +
> +#ifndef __M41T83_REAL_TIME_CLOCK_H__
> +#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_MS3
> +// 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_MACROSECOND2
> +
> +#define M41T83_REGADDR_DOTSECONDS   0x00
> +#define M41T83_REGADDR_SECONDS  0x01
> +#define M41T83_REGADDR_MINUTES  0x02
> +#define M41T83_REGADDR_HOURS0x03
> +#define M41T83_REGADDR_WEEK_DAY 0x04
> +#define M41T83_REGADDR_DAY  0x05
> +#define M41T83_REGADDR_MONTH0x06
> +#define M41T83_REGADDR_YEAR 0x07
> +#define M41T83_REGADDR_ALARM1SEC0x0E
> +#define M41T83_REGADDR_ALARM1MIN0x0D
> +#define 

Re: [edk2] [PATCH edk2-platforms v4 08/31] Platform/Hisilicon/D06: Add edk2-non-osi components for D06

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:20AM +0800, Ming Huang wrote:
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 

Reviewed-by: Leif Lindholm 

> ---
>  Platform/Hisilicon/D06/D06.dsc |  7 +++
>  Platform/Hisilicon/D06/D06.fdf | 17 +
>  2 files changed, 24 insertions(+)
> 
> diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc
> index 27358f8c78..94454569f6 100644
> --- a/Platform/Hisilicon/D06/D06.dsc
> +++ b/Platform/Hisilicon/D06/D06.dsc
> @@ -41,6 +41,8 @@
>  
>I2CLib|Silicon/Hisilicon/Library/I2CLib/I2CLib.inf
>TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
> +  IpmiCmdLib|Silicon/Hisilicon/Library/IpmiCmdLib/IpmiCmdLib.inf
> +
>NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
>DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
>HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> @@ -64,8 +66,12 @@
>  
>CpldIoLib|Silicon/Hisilicon/Library/CpldIoLib/CpldIoLib.inf
>  
> +  SerdesLib|Silicon/Hisilicon/Hi1620/Library/Hi1620Serdes/Hi1620SerdesLib.inf
> +
>TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
>
> RealTimeClockLib|Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf
> +  
> OemAddressMapLib|Platform/Hisilicon/D06/Library/OemAddressMapD06/OemAddressMapD06.inf
> +  
> PlatformSysCtrlLib|Silicon/Hisilicon/Hi1620/Library/PlatformSysCtrlLibHi1620/PlatformSysCtrlLibHi1620.inf
>  
>CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
>
> GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
> @@ -81,6 +87,7 @@
># USB Requirements
>UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
>  
> +  LpcLib|Silicon/Hisilicon/Hi1620/Library/LpcLibHi1620/LpcLib.inf
>
> SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
>  !if $(SECURE_BOOT_ENABLE) == TRUE
>FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
> diff --git a/Platform/Hisilicon/D06/D06.fdf b/Platform/Hisilicon/D06/D06.fdf
> index 9567ede0ad..07fe096f61 100644
> --- a/Platform/Hisilicon/D06/D06.fdf
> +++ b/Platform/Hisilicon/D06/D06.fdf
> @@ -56,6 +56,7 @@ NumBlocks = 0x40
>  
>  0x|0x0010
>  gArmTokenSpaceGuid.PcdSecureFvBaseAddress|gArmTokenSpaceGuid.PcdSecureFvSize
> +FILE = Platform/Hisilicon/D06/Sec/FVMAIN_SEC.Fv
>  
>  0x0010|0x0028
>  gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
> @@ -163,6 +164,7 @@ READ_LOCK_STATUS   = TRUE
>INF MdeModulePkg/Core/Dxe/DxeMain.inf
>INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>  
> +  INF Platform/Hisilicon/D06/Drivers/IoInitDxe/IoInitDxe.inf
>#
># PI DXE Drivers producing Architectural Protocols (EFI Services)
>#
> @@ -170,6 +172,7 @@ READ_LOCK_STATUS   = TRUE
>INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
>  
>INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> +  INF Platform/Hisilicon/D06/Drivers/SFC/SfcDxeDriver.inf
>  
>  
>INF Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
> @@ -225,10 +228,15 @@ READ_LOCK_STATUS   = TRUE
>INF MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
>INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
>  
> +  INF 
> Platform/Hisilicon/D06/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.inf
> +  INF Platform/Hisilicon/D06/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf
>INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
>INF Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
>INF Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.inf
> +  INF Platform/Hisilicon/D06/Drivers/TransferSmbiosInfo/TransSmbiosInfo.inf
> +  INF Platform/Hisilicon/D06/Drivers/IpmiMiscOpDxe/IpmiMiscOpDxe.inf
>  
> +  INF Platform/Hisilicon/D06/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.inf
>  
>  
>INF 
> Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClassDxe.inf
> @@ -246,6 +254,7 @@ READ_LOCK_STATUS   = TRUE
>#
>#Network
>#
> +  INF Platform/Hisilicon/D06/Drivers/Net/SnpHi1620NewDxe/SnpDxe.inf
>  
>INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
>INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
> @@ -282,8 +291,14 @@ READ_LOCK_STATUS   = TRUE
>INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
>INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> +  INF Platform/Hisilicon/D06/Drivers/PcieRasInitDxe/PcieRasInitDxe.inf
> +  INF Platform/Hisilicon/D06/Drivers/RasInitDxe/RasInitDxe.inf
>  
> +  # VGA Driver
> +  #
> +  INF Platform/Hisilicon/D06/Drivers/Sm750Dxe/UefiSmi.inf
>INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
> +  INF Platform/Hisilicon/D06/Drivers/Sas/SasDxeDriver.inf
>INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
>INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
>INF 

Re: [edk2] [PATCH edk2-platforms v4 14/31] Hisilicon/D06: Add Hi1620OemConfigUiLib

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:26AM +0800, Ming Huang wrote:
> From: Yang XinYi 
> 
> This library is added for oem setup menu item.
> Setup item include:
> 1 DDR option item;
> 2 BMC option item;
> 3 Ras option item;
> 4 Misc option item;
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 

Reviewed-by: Leif Lindholm 

> ---
>  Silicon/Hisilicon/HisiPkg.dec   |   
> 1 +
>  Platform/Hisilicon/D06/D06.dsc  |   
> 5 +-
>  Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf   |   
> 2 +-
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigUiLib.inf|  
> 68 
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.h   | 
> 142 
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigUi.h |  
> 64 
>  Silicon/Hisilicon/Include/Library/OemConfigData.h   |  
> 83 +
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr  |  
> 89 +
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c   | 
> 362 
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MemoryConfig.hfr  | 
> 154 +
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MemoryConfig.uni  | 
> 103 ++
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.hfr|  
> 34 ++
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.uni|  
> 27 ++
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigUiLib.uni|  
> 24 ++
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigUiLibStrings.uni |  
> 42 +++
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/PcieConfig.hfr| 
> 219 
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/PcieConfigStrings.uni | 
> 111 ++
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/PciePortConfig.hfr| 
> 167 +
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/RasConfig.hfr | 
> 172 ++
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/RasConfig.uni |  
> 85 +
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/iBMCConfig.hfr|  
> 81 +
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/iBMCConfig.uni|  
> 34 ++
>  22 files changed, 2067 insertions(+), 2 deletions(-)
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 29/31] Silicon/Hisilicon/setup: Enable/disable SMMU

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:41AM +0800, Ming Huang wrote:
> Select without SMMU iort while SMMU item is disable,
> Select with SMMU iort while SMMU item is enable.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 

Reviewed-by: Leif Lindholm 

> ---
>  Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf |  1 +
>  Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c   | 89 
> 
>  2 files changed, 90 insertions(+)
> 
> diff --git 
> a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf 
> b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf
> index 281a4f2ebd..3d133aff85 100644
> --- a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf
> +++ b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf
> @@ -51,6 +51,7 @@
>  
>  [Guids]
>gHisiEfiMemoryMapGuid
> +  gOemConfigGuid
>  
>  [Pcd]
>gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile## CONSUMES
> diff --git a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c 
> b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c
> index 54f49977c3..c2c8f687b0 100644
> --- a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c
> +++ b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c
> @@ -16,12 +16,98 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
> +#include 
>  #include 
>  
>  #define CORECOUNT(X) ((X) * CORE_NUM_PER_SOCKET)
>  
> +#define FIELD_IORT_NODE_OFFSET 40
> +
> +typedef enum {
> +  NodeTypeIts = 0,
> +  NodeTypeNameComponent,
> +  NodeTypePciRC,
> +  NodeTypeSmmuV1,
> +  NodeTypeSmmuV3,
> +  NodeTypePMCG
> +} IORT_NODE_TYPE;
> +
> +#pragma pack(1)
> +typedef struct {
> +  UINT8   Type;
> +  UINT16  Length;
> +  UINT8   Revision;
> +  UINT32  Reserved;
> +  UINT32  IdMapNumber;
> +  UINT32  IdArrayOffset;
> +} IORT_NODE_HEAD;
> +#pragma pack()
> +
> +BOOLEAN
> +IsIortWithSmmu (
> +  IN EFI_ACPI_DESCRIPTION_HEADER  *TableHeader
> +  )
> +{
> +  UINT32   *NodeOffset;
> +  UINT32   NextOffset;
> +  IORT_NODE_HEAD   *Node;
> +
> +  NodeOffset = (UINT32 *)((UINT8 *)TableHeader + FIELD_IORT_NODE_OFFSET);
> +  NextOffset = *NodeOffset;
> +
> +  while (NextOffset < TableHeader->Length) {
> +Node = (IORT_NODE_HEAD *)((UINT8 *)TableHeader + NextOffset);
> +NextOffset += Node->Length;
> +
> +if ((Node->Type == NodeTypeSmmuV1) || (Node->Type == NodeTypeSmmuV3)) {
> +  return TRUE;
> +}
> +  }
> +
> +  return FALSE;
> +}
> +
> +EFI_STATUS
> +SelectIort (
> +  IN EFI_ACPI_DESCRIPTION_HEADER  *TableHeader
> +  )
> +{
> +  EFI_STATUS  Status;
> +  UINTN   Size;
> +  OEM_CONFIG_DATA Configuration;
> +
> +  Configuration.EnableSmmu = 0;
> +  Size = sizeof (OEM_CONFIG_DATA);
> +  Status = gRT->GetVariable (
> +  OEM_CONFIG_NAME,
> +  ,
> +  NULL,
> +  ,
> +  
> +  );
> +  if (EFI_ERROR (Status)) {
> +DEBUG ((DEBUG_ERROR, "Get OemConfig variable (%r).\n", Status));
> +  }
> +
> +  Status =  EFI_SUCCESS;
> +  if (IsIortWithSmmu (TableHeader)) {
> +if (!Configuration.EnableSmmu) {
> +  Status = EFI_ABORTED;
> +}
> +  } else {
> +if (Configuration.EnableSmmu) {
> +  Status = EFI_ABORTED;
> +}
> +  }
> +  DEBUG ((DEBUG_INFO, "SmmuEnable=%x, return %r for Iort table.\n",
> +  Configuration.EnableSmmu, Status));
> +
> +  return Status;
> +}
> +
>  STATIC
>  VOID
>  RemoveUnusedMemoryNode (
> @@ -130,6 +216,9 @@ UpdateAcpiTable (
>case EFI_ACPI_6_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE:
>  Status = UpdateSlit (TableHeader);
>  break;
> +  case EFI_ACPI_6_2_IO_REMAPPING_TABLE_SIGNATURE:
> +Status = SelectIort (TableHeader);
> +break;
>}
>return Status;
>  }
> -- 
> 2.18.0
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 28/31] Silicon/Hisilicon/Setup: Support SPCR table switch

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:40AM +0800, Ming Huang wrote:
> If install SPCR table, KVM will not output while install or boot
> some OS, like ubuntu, so add SPCR switch setup item and set it
> disable by default.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 

Reviewed-by: Leif Lindholm 

> ---
>  Platform/Hisilicon/D06/D06.dsc | 1 +
>  Platform/Hisilicon/D06/D06.fdf | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc
> index fad6fcc747..e6bebfb78b 100644
> --- a/Platform/Hisilicon/D06/D06.dsc
> +++ b/Platform/Hisilicon/D06/D06.dsc
> @@ -325,6 +325,7 @@
>MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
>MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
>MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> +  EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.inf
>  
>MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
>  
> diff --git a/Platform/Hisilicon/D06/D06.fdf b/Platform/Hisilicon/D06/D06.fdf
> index 8c3f4f9932..6580a5971a 100644
> --- a/Platform/Hisilicon/D06/D06.fdf
> +++ b/Platform/Hisilicon/D06/D06.fdf
> @@ -200,6 +200,7 @@ READ_LOCK_STATUS   = TRUE
>INF 
> MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
>INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
>INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> +  INF EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.inf
>  
>INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
> -- 
> 2.18.0
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 27/31] Silicon/Hisilicon: Add I2C Bus Exception handle function

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:39AM +0800, Ming Huang wrote:
> During the period of I2c accessing, if the board is reset
> unexpectedly, and because the I2c client can not reset,
> the SDA will be always pull down, then it cause I2C bus
> Exception.
> 
> Follow the Hi1620 I2C FS chapter 1.8.2 design, add I2C
> Bus Exception handle function. It will Config SCL and SDA
> to GPIO, and set the reversal frequency of SCL to 10KHz.
> 
> The implementation of functions is in edk2-non-osi.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 

Reviewed-by: Leif Lindholm 

> ---
>  Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h 
> b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
> index 3ccfc6bee3..a232e52ed7 100644
> --- a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
> +++ b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
> @@ -106,4 +106,7 @@ VOID DisableClusterClock(UINTN CpuClusterBase);
>  VOID EnableClusterClock(UINTN CpuClusterBase);
>  VOID DisableSocketClock (UINT8 Skt);
>  
> +EFI_STATUS EFIAPI HandleI2CException (UINT32 Socket, UINT32 Port);
> +EFI_STATUS EFIAPI HandleI2CExceptionBySocket (UINT32 Socket);
> +
>  #endif
> -- 
> 2.18.0
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 26/31] Silicon/Hisilicon: Modify for close slave core clock.

2018-08-30 Thread Leif Lindholm
Please update also subject and description to use "disable" and
"enable" instead of "close" and "open".

On Fri, Aug 24, 2018 at 12:07:38AM +0800, Ming Huang wrote:
> From: ZhenYao 
> 
> When BIOS booting, the power consumption is too high, so need close
> some clusters clock that don't work to reduce power consumption.
> 
> The implementation of functions is in edk2-non-osi.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 
> ---
>  Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h 
> b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
> index ec2b9a36e7..3ccfc6bee3 100644
> --- a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
> +++ b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h
> @@ -102,5 +102,8 @@ VOID PlatformEventBroadcastConfig(VOID);
>  UINTN GetDjtagRegBase(UINT32 NodeId);
>  VOID LlcCleanInvalidateAsm(VOID);
>  VOID PlatformMdioInit(VOID);
> +VOID DisableClusterClock(UINTN CpuClusterBase);
> +VOID EnableClusterClock(UINTN CpuClusterBase);
> +VOID DisableSocketClock (UINT8 Skt);
>  
>  #endif
> -- 
> 2.18.0
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] Remove EDK package from edk2 master

2018-08-30 Thread Kinney, Michael D
Liming,

The Vlv2TbltDevicePkg in edk2/master is using EdkCompatibilityPkg.

I have entered a new bug to remove this use of the EdkCompatibilityPkg
and added it as a dependency.

https://bugzilla.tianocore.org/show_bug.cgi?id=1132

Thanks,

Mike

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org]
> On Behalf Of Laszlo Ersek
> Sent: Thursday, August 30, 2018 2:06 AM
> To: Gao, Liming ; edk2-
> de...@lists.01.org
> Subject: Re: [edk2] Remove EDK package from edk2 master
> 
> On 08/30/18 03:36, Gao, Liming wrote:
> > EDK2 plans to retire EDK style packages. Below BZ
> requests to remove FatBinPkg, EdkShellPkg, EdkShellBinPkg
> and EdkCompatiblityPkg from edk2 master. They can be
> replaced by Edk2 FatPkg, ShellBinPkg and ShellPkg.
> UnixPkg is an empty package. So, it is also suggested to
> be removed. But, they are all kept in edk2 existing
> branches for reference. Once they are removed, edk2
> platform dsc/fdf will be updated to use edk2
> FatPkg/ShellBinPkg/ShellPkg. If you have any comments on
> this change, please reply to this mail.
> >
> >
> 1106
> >
> > EDK2
> >
> > Code
> >
> > Remove UnixPkg from
> edk2/master d=1106>
> >
> >
> 1105
> >
> > EDK2
> >
> > Code
> >
> > Remove FatBinPkg from
> edk2/master d=1105>
> >
> >
> 1107
> >
> > EDK2
> >
> > Code
> >
> > Remove EdkShellPkg from
> edk2/master d=1107>
> >
> >
> 1108
> >
> > EDK2
> >
> > Code
> >
> > Remove EdkShellBinPkg from
> edk2/master d=1108>
> >
> >
> 1103
> >
> > EDK2
> >
> > Code
> >
> > delete EdkCompatibilityPkg from
> edk2/master d=1103>
> 
> Sounds good to me.
> 
> Thanks,
> Laszlo
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 25/31] Platform/Hisilicon/D06: Add capsule upgrade support

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:37AM +0800, Ming Huang wrote:
> This module support updating the boot CPU firmware only.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 
> Reviewed-by: Leif Lindholm 

Ard also gave you a Reviewed-by for this patch, please add that in v5.

/
Leif
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 24/31] Hisilicon/D06: add apei driver

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:36AM +0800, Ming Huang wrote:
> From: Luqi Jiang 
> 
> This driver provide a means for the platform to
> convey error information to OSPM.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 

As far as I can see, this addresses all of my feedback:
Reviewed-by: Leif Lindholm 

> ---
>  Platform/Hisilicon/D06/D06.dsc   |   1 +
>  Platform/Hisilicon/D06/D06.fdf   |   1 +
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Apei.inf   |  59 +++
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Apei.h |  41 +++
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Bert/Bert.h|  43 +++
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Einj/Einj.h| 146 
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/ErrorSource/Ghes.h | 110 ++
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Erst/Erst.h| 140 
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Hest/Hest.h|  59 +++
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/OemApeiHi1620.h|  43 +++
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Apei.c | 108 ++
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Bert/Bert.c|  91 +
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Einj/Einj.c| 349 
> ++
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/ErrorSource/Ghes.c | 330 
> +
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Erst/Erst.c| 374 
> 
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/Hest/Hest.c| 118 ++
>  Silicon/Hisilicon/Hi1620/Drivers/Apei/OemApeiHi1620.c| 337 
> ++
>  17 files changed, 2350 insertions(+)
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 19/31] Platform/Hisilicon/D06: Add OemNicLib

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:31AM +0800, Ming Huang wrote:
> OemNicLib provide nic related api like GetMac,SetMac.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 
> ---
>  Platform/Hisilicon/D06/D06.dsc |   1 +
>  Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.inf |  35 ++
>  Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.c   | 570 
> 
>  3 files changed, 606 insertions(+)
> 
> diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc
> index 06249d8a5b..e18badf3b3 100644
> --- a/Platform/Hisilicon/D06/D06.dsc
> +++ b/Platform/Hisilicon/D06/D06.dsc
> @@ -90,6 +90,7 @@
>  
>LpcLib|Silicon/Hisilicon/Hi1620/Library/LpcLibHi1620/LpcLib.inf
>
> SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
> +  OemNicLib|Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.inf
>  !if $(SECURE_BOOT_ENABLE) == TRUE
>FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
>  !endif
> diff --git a/Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.inf 
> b/Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.inf
> new file mode 100644
> index 00..3b0bd2d60c
> --- /dev/null
> +++ b/Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.inf
> @@ -0,0 +1,35 @@
> +#/** @file
> +#
> +#Copyright (c) 2018, Hisilicon Limited. All rights reserved.
> +#Copyright (c) 2017, Linaro Limited. All rights reserved.
> +#
> +#This program and the accompanying materials
> +#are licensed and made available under the terms and conditions of the 
> BSD License
> +#which accompanies this distribution. The full text of the license may 
> be found at
> +#http://opensource.org/licenses/bsd-license.php
> +#
> +#THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +#WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +#
> +#**/
> +
> +[Defines]
> +  INF_VERSION= 0x0001001A
> +  BASE_NAME  = OemNicLib
> +  FILE_GUID  = 520F872C-FFCF-4EF3-AC01-85BDB0816DCE
> +  MODULE_TYPE= BASE
> +  VERSION_STRING = 1.0
> +  LIBRARY_CLASS  = OemNicLib
> +
> +[Sources.common]
> +  OemNicLib.c
> +
> +[Packages]
> +  ArmPkg/ArmPkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +  MdePkg/MdePkg.dec
> +  Silicon/Hisilicon/HisiPkg.dec
> +
> +[LibraryClasses]
> +  CpldIoLib
> +  I2CLib
> diff --git a/Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.c 
> b/Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.c
> new file mode 100644
> index 00..6ecf9c8f0a
> --- /dev/null
> +++ b/Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.c
> @@ -0,0 +1,570 @@
> +/** @file
> +*
> +*  Copyright (c) 2018, Hisilicon Limited. All rights reserved.
> +*  Copyright (c) 2017, Linaro Limited. All rights reserved.
> +*
> +*  This program and the accompanying materials
> +*  are licensed and made available under the terms and conditions of the BSD 
> License
> +*  which accompanies this distribution.  The full text of the license may be 
> found at
> +*  http://opensource.org/licenses/bsd-license.php
> +*
> +*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +*
> +**/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define CPU2_SFP2_100G_CARD_OFFSET   0x25
> +#define CPU1_SFP1_LOCATE_OFFSET  0x16
> +#define CPU1_SFP0_LOCATE_OFFSET  0x12
> +#define CPU2_SFP1_LOCATE_OFFSET  0x21
> +#define CPU2_SFP0_LOCATE_OFFSET  0x19
> +#define CPU2_SFP2_10G_GE_CARD_OFFSET 0x25
> +
> +#define SFP_10G_SPEED   10
> +#define SFP_25G_SPEED   25
> +#define SFP_100G_SPEED  100
> +#define SFP_GE_SPEED1
> +
> +#define SFP_GE_SPEED_VAL_VENDOR_FINISAR 0x0C
> +#define SFP_GE_SPEED_VAL0x0D
> +#define SFP_10G_SPEED_VAL   0x67
> +#define SFP_25G_SPEED_VAL   0xFF
> +
> +#define CARD_PRESENT_100G   (BIT7)
> +#define CARD_PRESENT_10G(BIT0)
> +#define SELECT_SFP_BY_INDEX(index)  (1 << (index - 1))
> +#define SPF_SPEED_OFFSET12
> +
> +#define SFP_DEVICE_ADDRESS 0x50
> +#define CPU1_9545_I2C_ADDR 0x70
> +#define CPU2_9545_I2C_ADDR 0x71
> +
> +#define FIBER_PRESENT 0
> +#define CARD_PRESENT  1
> +#define I2C_PORT_SFP  4
> +#define CPU2_I2C_PORT_SFP 5
> +
> +#define SOCKET_0 0
> +#define SOCKET_1 1
> +#define EEPROM_I2C_PORT  4
> +#define EEPROM_PAGE_SIZE 0x40
> +#define MAC_ADDR_LEN 6
> +#define I2C_OFFSET_EEPROM_ETH0   (0xc00)
> +#define I2C_SLAVEADDR_EEPROM (0x52)
> +
> +#pragma pack(1)
> +typedef struct {
> +  UINT16 Crc16;
> +  UINT16 MacLen;
> +  UINT8  Mac[MAC_ADDR_LEN];
> +} NIC_MAC_ADDRESS;
> +#pragma pack()
> +
> +ETH_PRODUCT_DESC 

Re: [edk2] [PATCH edk2-platforms v4 16/31] Silicon/Hisilicon/Setup: Add Setup Item "EnableGOP"

2018-08-30 Thread Leif Lindholm
Can you add Hi1620 to the subject line, so it's clear that this is a
D06-specific library?

With that
Reviewed-by: Leif Lindholm 

/
Leif

On Fri, Aug 24, 2018 at 12:07:28AM +0800, Ming Huang wrote:
> From: Yang XinYi 
> 
> Add Setup Item "EnableGOP" for D06, This Item only takes
> effect on SM750. The SM750 is a VGA device under BMC and
> the KVM output to SM750.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 
> ---
>  Silicon/Hisilicon/Include/Library/OemConfigData.h| 1 +
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c| 1 +
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.hfr | 7 +++
>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.uni | 4 ++--
>  4 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/Silicon/Hisilicon/Include/Library/OemConfigData.h 
> b/Silicon/Hisilicon/Include/Library/OemConfigData.h
> index 8ab402144c..f120e3123c 100644
> --- a/Silicon/Hisilicon/Include/Library/OemConfigData.h
> +++ b/Silicon/Hisilicon/Include/Library/OemConfigData.h
> @@ -60,6 +60,7 @@ typedef struct {
>/*Misc Config*/
>UINT8 EnableSmmu;
>UINT8 EnableFdtTable;
> +  UINT8 EnableGOP;
>/*RAS Config*/
>UINT8 EnRasSupport;
>UINT8 EnPoison;
> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c 
> b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c
> index f49fb3533b..012d45bc02 100644
> --- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c
> +++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c
> @@ -294,6 +294,7 @@ OemConfigUiLibConstructor (
>//
>Configuration.EnableSmmu = 1;
>Configuration.EnableFdtTable = 0;
> +  Configuration.EnableGOP = 0;
>//
>//Set the default value of the Ras option
>//
> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.hfr 
> b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.hfr
> index 819c2b988d..16ce27b95b 100644
> --- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.hfr
> +++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.hfr
> @@ -31,4 +31,11 @@ form formid = MISC_CONFIG_FORM_ID,
>option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = 0;
>  endoneof;
>  
> +oneof varid   = OEM_CONFIG_DATA.EnableGOP,
> +  prompt  = STRING_TOKEN(STR_ENABLE_GOP_FRAME_BUFFER),
> +  help= STRING_TOKEN(STR_ENABLE_GOP_FRAME_BUFFER_HELP),
> +  option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT;
> +  option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = 0;
> +endoneof;
> +
>  endform;
> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.uni 
> b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.uni
> index 53eb1622c4..2fd92fedff 100644
> --- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.uni
> +++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/MiscConfig.uni
> @@ -23,5 +23,5 @@
>  #string STR_FDT_CONFIG_HELP#language en-US  "Enable or Disable 
> Fdt Table."
>  #string STR_ENABLE_SPCR_TABLE  #language en-US  "Support SPCR"
>  #string STR_ENABLE_SPCR_HELP   #language en-US  "Enable or Disable 
> SPCR Table."
> -#string STR_ENABLE_GOP_FRAME_BUFFER#language en-US  "Support GOP FB"
> -#string STR_ENABLE_GOP_FRAME_BUFFER_HELP #language en-US  "Enable or 
> Disable GOP frame buffer."
> +#string STR_ENABLE_GOP_FRAME_BUFFER#language en-US  "Support GOP FB for 
> SM750"
> +#string STR_ENABLE_GOP_FRAME_BUFFER_HELP #language en-US  "Enable or 
> Disable GOP frame buffer for SM750."
> -- 
> 2.18.0
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 11/31] Silicon/Hisilicon/Acpi: Unify HisiAcpiPlatformDxe

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:23AM +0800, Ming Huang wrote:
> The EFI_ACPI_STATIC_RESOURCE_AFFINITY_TABLE struct is used by
> UpdateAcpiTable.c and Srat aslc. The struct may be different
> according to chips, so move some macro to PlatformArch.h.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 
> Reviewed-by: Leif Lindholm 

Right, so I missed one bit on this last time around.
Could you leave changes to
Silicon/Hisilicon/Hi1620/Include/PlatformArch.h out here and just add
that in the initial d06 patch?

Then, could you move this patch immediately after "Move RAS macro to
PlatformArch"?

/
Leif

> ---
>  Silicon/Hisilicon/Hi1610/Include/PlatformArch.h |  6 
>  Silicon/Hisilicon/Hi1620/Include/PlatformArch.h |  6 
>  Silicon/Hisilicon/Include/Library/AcpiNextLib.h | 31 
> ++--
>  Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c |  2 --
>  4 files changed, 34 insertions(+), 11 deletions(-)
> 
> diff --git a/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h 
> b/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h
> index f39ae0748c..1ebddca4e5 100644
> --- a/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h
> +++ b/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h
> @@ -30,6 +30,12 @@
>  // Max NUMA node number for each node type
>  #define MAX_NUM_PER_TYPE 8
>  
> +// for acpi
> +#define NODE_IN_SOCKET  2
> +#define CORE_NUM_PER_SOCKET 32
> +#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT10
> +#define EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_COUNT   8
> +
>  #define S1_BASE   0x400
>  
>  #define RASC_BASE(0x5000)
> diff --git a/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h 
> b/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h
> index 9539cfdada..f3ad45f6c6 100644
> --- a/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h
> +++ b/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h
> @@ -57,5 +57,11 @@
>EFI_ACPI_ARM_CREATOR_REVISION   /* UINT32  CreatorRevision */ \
>}
>  
> +// for acpi
> +#define NODE_IN_SOCKET  2
> +#define CORE_NUM_PER_SOCKET 48
> +#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT16
> +#define EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_COUNT   1
> +
>  #endif
>  
> diff --git a/Silicon/Hisilicon/Include/Library/AcpiNextLib.h 
> b/Silicon/Hisilicon/Include/Library/AcpiNextLib.h
> index fd05a3b960..2abffb65fc 100644
> --- a/Silicon/Hisilicon/Include/Library/AcpiNextLib.h
> +++ b/Silicon/Hisilicon/Include/Library/AcpiNextLib.h
> @@ -19,6 +19,21 @@
>  #ifndef __ACPI_NEXT_LIB_H__
>  #define __ACPI_NEXT_LIB_H__
>  
> +#include 
> +
> +///
> +/// ITS Affinity Structure Definition
> +///
> +#pragma pack(1)
> +typedef struct {
> +  UINT8   Type;
> +  UINT8   Length;
> +  UINT32  ProximityDomain;
> +  UINT16  Reserved;
> +  UINT32  ItsHwId;
> +} EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE;
> +#pragma pack()
> +
>  #define EFI_ACPI_6_1_GIC_ITS_INIT(GicITSHwId, GicITSBase) \
>{ \
>  EFI_ACPI_6_1_GIC_ITS, sizeof (EFI_ACPI_6_1_GIC_ITS_STRUCTURE), 
> EFI_ACPI_RESERVED_WORD, \
> @@ -42,8 +57,8 @@
>  #define EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_INIT(
>\
>  ProximityDomain, ItsId)  
>\
>{  
>\
> -4, sizeof (EFI_ACPI_6_2_GIC_ITS_AFFINITY_STRUCTURE), ProximityDomain,
>\
> -{EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE}, ItsId  
>  \
> +4, sizeof (EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE), ProximityDomain,
>\
> +EFI_ACPI_RESERVED_WORD, ItsId
>\
>}
>  
>  #define EFI_ACPI_6_1_MEMORY_AFFINITY_STRUCTURE_INIT( 
>  \
> @@ -75,15 +90,13 @@
>  // Define the number of each table type.
>  // This is where the table layout is modified.
>  //
> -#define EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT  64
> -#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT10
> -#define EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_COUNT   8
> +#define EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT  
> (MAX_SOCKET*CORE_NUM_PER_SOCKET)
>  
>  typedef struct {
> -  EFI_ACPI_6_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER  Header;
> -  EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE  
> Memory[EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT];
> -  EFI_ACPI_6_0_GICC_AFFINITY_STRUCTURE
> Gicc[EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT];
> -  EFI_ACPI_6_2_GIC_ITS_AFFINITY_STRUCTURE 
> 

Re: [edk2] [PATCH edk2-platforms v4 01/31] Silicon/Hisilicon/Acpi: Move some macro to PlatformArch.h

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:13AM +0800, Ming Huang wrote:
> ARM_ACPI_HEADER is used by a unify module in HwPkg,
> so move some macro to PlatformArch.h for unify D0x.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 

Reviewed-by: Leif Lindholm 
1,3-5/31 pushed as:
342330470f..1d331a2eaa

/
Leif

> ---
>  Silicon/Hisilicon/Hi1610/Hi1610.dec| 23 
> +
>  Silicon/Hisilicon/Hi1616/Hi1616.dec| 23 
> +
>  Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/AcpiTablesHi1610.inf |  2 +-
>  Silicon/Hisilicon/Hi1616/D05AcpiTables/AcpiTablesHi1616.inf|  2 +-
>  Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/Hi1610Platform.h | 27 
> +++-
>  Silicon/Hisilicon/Hi1610/Include/PlatformArch.h| 24 
> +
>  Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h| 24 
> +
>  Silicon/Hisilicon/Hi1616/Include/PlatformArch.h| 23 
> +
>  8 files changed, 99 insertions(+), 49 deletions(-)
> 
> diff --git a/Silicon/Hisilicon/Hi1610/Hi1610.dec 
> b/Silicon/Hisilicon/Hi1610/Hi1610.dec
> new file mode 100644
> index 00..6ea4867662
> --- /dev/null
> +++ b/Silicon/Hisilicon/Hi1610/Hi1610.dec
> @@ -0,0 +1,23 @@
> +#/** @file
> +#
> +#Copyright (c) 2018, Hisilicon Limited. All rights reserved.
> +#Copyright (c) 2018, Linaro Limited. All rights reserved.
> +#
> +#This program and the accompanying materials
> +#are licensed and made available under the terms and conditions of the 
> BSD License
> +#which accompanies this distribution. The full text of the license may 
> be found at
> +#http://opensource.org/licenses/bsd-license.php
> +#
> +#THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +#WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +#
> +#**/
> +
> +[Defines]
> +  DEC_SPECIFICATION  = 0x0001001A
> +  PACKAGE_NAME   = Hi1610Pkg
> +  PACKAGE_GUID   = 0063d37d-adab-47b4-9926-af83539ea167
> +  PACKAGE_VERSION= 0.1
> +
> +[Includes]
> +  Include
> diff --git a/Silicon/Hisilicon/Hi1616/Hi1616.dec 
> b/Silicon/Hisilicon/Hi1616/Hi1616.dec
> new file mode 100644
> index 00..7dad0ab91a
> --- /dev/null
> +++ b/Silicon/Hisilicon/Hi1616/Hi1616.dec
> @@ -0,0 +1,23 @@
> +#/** @file
> +#
> +#Copyright (c) 2018, Hisilicon Limited. All rights reserved.
> +#Copyright (c) 2018, Linaro Limited. All rights reserved.
> +#
> +#This program and the accompanying materials
> +#are licensed and made available under the terms and conditions of the 
> BSD License
> +#which accompanies this distribution. The full text of the license may 
> be found at
> +#http://opensource.org/licenses/bsd-license.php
> +#
> +#THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +#WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +#
> +#**/
> +
> +[Defines]
> +  DEC_SPECIFICATION  = 0x0001001A
> +  PACKAGE_NAME   = Hi1616Pkg
> +  PACKAGE_GUID   = 8a64c436-bcd6-4850-9de3-f9c922bb815a
> +  PACKAGE_VERSION= 0.1
> +
> +[Includes]
> +  Include
> diff --git a/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/AcpiTablesHi1610.inf 
> b/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/AcpiTablesHi1610.inf
> index 9577d96b23..caef3da460 100644
> --- a/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/AcpiTablesHi1610.inf
> +++ b/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/AcpiTablesHi1610.inf
> @@ -40,7 +40,7 @@
>EmbeddedPkg/EmbeddedPkg.dec
>MdePkg/MdePkg.dec
>MdeModulePkg/MdeModulePkg.dec
> -
> +  Silicon/Hisilicon/Hi1610/Hi1610.dec
>Silicon/Hisilicon/HisiPkg.dec
>  
>  [FixedPcd]
> diff --git a/Silicon/Hisilicon/Hi1616/D05AcpiTables/AcpiTablesHi1616.inf 
> b/Silicon/Hisilicon/Hi1616/D05AcpiTables/AcpiTablesHi1616.inf
> index bb279c8e42..d313936b89 100644
> --- a/Silicon/Hisilicon/Hi1616/D05AcpiTables/AcpiTablesHi1616.inf
> +++ b/Silicon/Hisilicon/Hi1616/D05AcpiTables/AcpiTablesHi1616.inf
> @@ -43,7 +43,7 @@
>EmbeddedPkg/EmbeddedPkg.dec
>MdePkg/MdePkg.dec
>MdeModulePkg/MdeModulePkg.dec
> -
> +  Silicon/Hisilicon/Hi1616/Hi1616.dec
>Silicon/Hisilicon/HisiPkg.dec
>  
>  [FixedPcd]
> diff --git a/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/Hi1610Platform.h 
> b/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/Hi1610Platform.h
> index 5a95b02055..4b1e4d3aad 100644
> --- a/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/Hi1610Platform.h
> +++ b/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/Hi1610Platform.h
> @@ -1,8 +1,8 @@
>  /** @file
>  *
>  *  Copyright (c) 2011-2015, ARM Limited. All rights reserved.
> -*  Copyright (c) 2015, Hisilicon Limited. All rights reserved.
> -*  Copyright (c) 2015, Linaro Limited. All rights reserved.
> +*  Copyright (c) 2015-2018, Hisilicon 

Re: [edk2] [PATCH edk2-platforms v4 02/31] Silicon/Hisilicon/D0x: Move RAS macro to PlatformArch.h

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:14AM +0800, Ming Huang wrote:
> From: Sun Yuanchen 
> 
> Move some RAS macros definition to PlatformArch.h for
> unifying D0x
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Sun Yuanchen 

This still has incorrect sign-off in v4. Please address.

/
Leif

> Reviewed-by: Leif Lindholm 
> ---
>  Silicon/Hisilicon/Hi1610/Include/PlatformArch.h |  9 +++--
>  Silicon/Hisilicon/Hi1616/Include/PlatformArch.h | 12 
>  2 files changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h 
> b/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h
> index 2ff076901e..f39ae0748c 100644
> --- a/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h
> +++ b/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h
> @@ -1,7 +1,7 @@
>  /** @file
>  *
> -*  Copyright (c) 2015, Hisilicon Limited. All rights reserved.
> -*  Copyright (c) 2015, Linaro Limited. All rights reserved.
> +*  Copyright (c) 2015 - 2018, Hisilicon Limited. All rights reserved.
> +*  Copyright (c) 2015 - 2018, Linaro Limited. All rights reserved.
>  *
>  *  This program and the accompanying materials
>  *  are licensed and made available under the terms and conditions of the BSD 
> License
> @@ -32,6 +32,11 @@
>  
>  #define S1_BASE   0x400
>  
> +#define RASC_BASE(0x5000)
> +/* configuration register for Rank statistical information */
> +#define RASC_CFG_INFOIDX_REG (RASC_BASE + 0x5C)
> +/* configuration register for Sparing level */
> +#define RASC_CFG_SPLVL_REG   (RASC_BASE + 0xB8)
>  
>  //
>  // ACPI table information used to initialize tables.
> diff --git a/Silicon/Hisilicon/Hi1616/Include/PlatformArch.h 
> b/Silicon/Hisilicon/Hi1616/Include/PlatformArch.h
> index 60a60593be..e02e4bdabd 100644
> --- a/Silicon/Hisilicon/Hi1616/Include/PlatformArch.h
> +++ b/Silicon/Hisilicon/Hi1616/Include/PlatformArch.h
> @@ -30,6 +30,18 @@
>  // Max NUMA node number for each node type
>  #define MAX_NUM_PER_TYPE 8
>  
> +#define RASC_BASE(0x5000)
> +/* configuration register for Rank statistical information */
> +#define RASC_CFG_INFOIDX_REG (RASC_BASE + 0x5C)
> +/* configuration register for Sparing level */
> +#define RASC_CFG_SPLVL_REG   (RASC_BASE + 0xB8)
> +
> +// for acpi
> +#define NODE_IN_SOCKET  2
> +#define CORE_NUM_PER_SOCKET 32
> +#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT10
> +#define EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_COUNT   8
> +
>  #define S1_BASE   0x400
>  
>  //
> -- 
> 2.18.0
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 06/31] Hisilicon/D06: Add several base file for D06

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:18AM +0800, Ming Huang wrote:
> Add several base head files and add several build
> files for D06.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 
> Reviewed-by: Leif Lindholm 
> ---
>  Platform/Hisilicon/D06/D06.dec   |  29 ++
>  Silicon/Hisilicon/Hi1620/Hi1620.dec  |  23 +
>  Platform/Hisilicon/D06/D06.dsc   | 455 
> 
>  Platform/Hisilicon/D06/D06.fdf   | 351 +++
>  Platform/Hisilicon/D06/Include/Library/CpldD06.h |  37 ++
>  Silicon/Hisilicon/Hi1620/Include/Library/SerdesLib.h |  85 
>  Silicon/Hisilicon/Hi1620/Include/PlatformArch.h  |  61 +++
>  Silicon/Hisilicon/Include/Library/OemAddressMapLib.h |   6 +
>  Silicon/Hisilicon/Include/Library/OemNicLib.h|  57 +++
>  9 files changed, 1104 insertions(+)
> 

> diff --git a/Platform/Hisilicon/D06/D06.fdf b/Platform/Hisilicon/D06/D06.fdf
> new file mode 100644
> index 00..9567ede0ad
> --- /dev/null
> +++ b/Platform/Hisilicon/D06/D06.fdf
> @@ -0,0 +1,351 @@

> +
> +#
> +# FV Section
> +#
> +# [FV] section is used to define what components or modules are placed 
> within a flash
> +# device file.  This section also defines order the components and modules 
> are positioned
> +# within the image.  The [FV] section consists of define statements, set 
> statements and
> +# module statements.
> +#
> +
> +
> +[FV.FvMain]
> +BlockSize  = 0x40
> +NumBlocks  = 0 # This FV gets compressed so make it just big 
> enough
> +FvAlignment= 16# FV alignment and FV attributes setting.
> +ERASE_POLARITY = 1
> +MEMORY_MAPPED  = TRUE
> +STICKY_WRITE   = TRUE
> +LOCK_CAP   = TRUE
> +LOCK_STATUS= TRUE
> +WRITE_DISABLED_CAP = TRUE
> +WRITE_ENABLED_CAP  = TRUE
> +WRITE_STATUS   = TRUE
> +WRITE_LOCK_CAP = TRUE
> +WRITE_LOCK_STATUS  = TRUE
> +READ_DISABLED_CAP  = TRUE
> +READ_ENABLED_CAP   = TRUE
> +READ_STATUS= TRUE
> +READ_LOCK_CAP  = TRUE
> +READ_LOCK_STATUS   = TRUE
> +
> +  APRIORI DXE {
> +INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
> +  }
> +
> +  INF MdeModulePkg/Core/Dxe/DxeMain.inf
> +  INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
> +
> +  #
> +  # PI DXE Drivers producing Architectural Protocols (EFI Services)
> +  #
> +  INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
> +  INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
> +
> +  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> +
> +
> +  INF Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
> +  INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
> +  INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
> +
> +  INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> +  INF 
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
> +
> +!if $(SECURE_BOOT_ENABLE) == TRUE
> +  INF 
> SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
> +!endif
> +
> +  INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
> +  INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
> +  INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
> +
> +  INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
> +
> +  #
> +  # Multiple Console IO support
> +  #
> +  INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
> +  INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
> +  INF 
> MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
> +  INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
> +  INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> +
> +  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
> +  INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
> +
> +  INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
> +
> +  #
> +  # FAT filesystem + GPT/MBR partitioning
> +  #
> +  INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
> +  INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
> +  INF FatPkg/EnhancedFatDxe/Fat.inf
> +  INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
> +  INF 
> IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
> +
> +  #
> +  # Usb Support
> +  #
> +
> +
> +  INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
> +
> +  INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
> +  INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
> +  INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
> +  INF MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
> +  INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
> +
> +  INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
> +  INF 

Re: [edk2] [PATCH edk2-platforms v4 10/31] Silicon/Hisilicon/D06: Wait for all disk ready

2018-08-30 Thread Leif Lindholm
On 23 August 2018 at 17:07, Ming Huang  wrote:
>
> This patch is relative to D06 SasDxe driver. The SasDxe set a
> variable to notice this libray. Here Wait for all disk ready
> for 15S at most.
>
> D06:
> For using straight-through hard disk backboard, some disk need
> 15 seconds to ready. Actually, wait less 15 seconds here(minus
> the time from end of SAS driver to here).
> For using expander backboard, wait less 6 seconds here(minus
> the time from end of SAS driver to here).
>
> D03/D05:
> As Sas driver don't install PLATFORM_SAS_NOTIFY Protocol, D03/D05
> will skip waiting here.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 
> ---
>
 Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
|  4 +++
>  Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
| 37 
>  2 files changed, 41 insertions(+)
>
> diff --git
a/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
b/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> index 7a53befc44..415f8ee36e 100644
> ---
a/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> +++
b/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> @@ -36,6 +36,7 @@
>  [Packages]
>MdeModulePkg/MdeModulePkg.dec
>MdePkg/MdePkg.dec
> +  Silicon/Hisilicon/HisiliconNonOsi.dec
>Silicon/Hisilicon/HisiPkg.dec
>
>  [LibraryClasses]
> @@ -49,6 +50,7 @@
>MemoryAllocationLib
>PcdLib
>PrintLib
> +  TimerLib
>UefiBootManagerLib
>UefiBootServicesTableLib
>UefiLib
> @@ -67,8 +69,10 @@
>  [Guids]
>gEfiEndOfDxeEventGroupGuid
>gEfiTtyTermGuid
> +  gOemConfigGuid

This patch still adds a dependency on this guid, but it is not introduced
until 14/31, so it breaks the build at 10,11,12,13/31.
Also, it is not required for this patch. So introduce it only with the code
that first uses it.

/
Leif

>
>  [Protocols]
>gEfiGenericMemTestProtocolGuid
>gEfiLoadedImageProtocolGuid
>gEsrtManagementProtocolGuid
> +  gPlatformSasNotifyProtocolGuid
> diff --git
a/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
b/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
> index aa6db929ca..77295d0111 100644
> --- a/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
> +++ b/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
> @@ -20,6 +20,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -29,6 +30,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>
> @@ -554,6 +556,40 @@ PlatformBootManagerBeforeConsole (
>PlatformRegisterOptionsAndKeys ();
>  }
>
> +STATIC
> +VOID
> +WaitForDiskReady (
> +  VOID
> +  )
> +{
> +  EFI_STATUSStatus;
> +  UINT32Index;
> +  PLATFORM_SAS_NOTIFY   *SasNotify;
> +
> +  Status = gBS->LocateProtocol (
> +  ,
> +  NULL,
> +  (VOID **));
> +  if (EFI_ERROR (Status)) {
> +DEBUG ((DEBUG_INFO, "Locate SasPlatformNotify:%r\n", Status));
> +return;
> +  }
> +
> +  // Wait for 30 seconds at most.
> +  for (Index = 0; Index < 30; Index++) {
> +Status = gBS->CheckEvent (SasNotify->WaitDiskEvent);
> +if (!EFI_ERROR (Status)) {
> +  DEBUG ((DEBUG_INFO, "WaitDiskEvent is signaled.\n"));
> +  EfiBootManagerConnectAll ();
> +  break;
> +}
> +DEBUG ((DEBUG_ERROR, "%a", Index == 0 ? "Wait for disk." : "."));
> +MicroSecondDelay (1000 * 1000);
> +  }
> +
> +  return;
> +}
> +
>  /**
>Do the platform specific action after the console is ready
>Possible things that can be done in PlatformBootManagerAfterConsole:
> @@ -583,6 +619,7 @@ PlatformBootManagerAfterConsole (
>// Connect the rest of the devices.
>//
>EfiBootManagerConnectAll ();
> +  WaitForDiskReady ();
>
>//
>// Enumerate all possible boot options.
> --
> 2.18.0
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms v4 30/31] Hisilicon/D06: Add PciPlatformLib

2018-08-30 Thread Leif Lindholm
On Fri, Aug 24, 2018 at 12:07:42AM +0800, Ming Huang wrote:
> Add a Null PciPlatformLib for build D06. The switch generic
> PciHostBridge patch set add two api for PciPlatform driver,
> so need to implement the two api for D06.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang 
> Reviewed-by: Leif Lindholm 

This library is required to build
Silicon/Hisilicon/Drivers/PciPlatform/PciPlatform.inf, which exists in
D06.dsc from the original revision in:
Hisilicon/D06: Add several base file for D06

This breaks the build on every commit between these two points.
If you are OK with the idea, I can just squash them together.

There is nothing interesting done in this code anyway - it's just glue.

Regards,

Leif

> ---
>  Platform/Hisilicon/D06/D06.dsc   
>   |  1 +
>  
> Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf
>  | 30 +
>  Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c 
>   | 67 
>  3 files changed, 98 insertions(+)
> 
> diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc
> index e6bebfb78b..e828010abf 100644
> --- a/Platform/Hisilicon/D06/D06.dsc
> +++ b/Platform/Hisilicon/D06/D06.dsc
> @@ -95,6 +95,7 @@
>FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
>  !endif
>PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
> +  
> PciPlatformLib|Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf
>  
>  [LibraryClasses.common.SEC]
>
> ArmPlatformLib|Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLibSec.inf
> diff --git 
> a/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf
>  
> b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf
> new file mode 100644
> index 00..7648322522
> --- /dev/null
> +++ 
> b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf
> @@ -0,0 +1,30 @@
> +## @file
> +# PCI Segment Library for Hisilicon Hi1610/Hi1616 SoC with multiple RCs
> +#
> +# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
> +# Copyright (c) 2017 - 2018, Linaro Ltd. All rights reserved.
> +# Copyright (c) 2018, Hisilicon Ltd. All rights reserved.
> +#
> +#  This program and the accompanying materials
> +#  are licensed and made available under the terms and conditions of the BSD 
> License
> +#  which accompanies this distribution. The full text of the license may be 
> found at
> +#  http://opensource.org/licenses/bsd-license.php.
> +#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +#
> +#
> +##
> +
> +[Defines]
> +  INF_VERSION= 0x0001001A
> +  BASE_NAME  = Hi1620PciPlatformLib
> +  FILE_GUID  = 29ba30da-68bc-46a5-888f-c65dabb67fd8
> +  MODULE_TYPE= BASE
> +  VERSION_STRING = 1.0
> +  LIBRARY_CLASS  = PciPlatformLib
> +
> +[Sources]
> +  Hi1620PciPlatformLib.c
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> diff --git 
> a/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c
>  
> b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c
> new file mode 100644
> index 00..ff77974c0f
> --- /dev/null
> +++ 
> b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c
> @@ -0,0 +1,67 @@
> +/** @file
> +*
> +*  Copyright (c) 2018, Hisilicon Limited. All rights reserved.
> +*  Copyright (c) 2018, Linaro Limited. All rights reserved.
> +*
> +*  This program and the accompanying materials
> +*  are licensed and made available under the terms and conditions of the BSD 
> License
> +*  which accompanies this distribution.  The full text of the license may be 
> found at
> +*  http://opensource.org/licenses/bsd-license.php
> +*
> +*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +*
> +**/
> +
> +#include 
> +#include 
> +
> +
> +/*++
> +
> +Routine Description:
> +
> +  Perform Platform initialization first in PciPlatform.
> +
> +Arguments:
> +
> +Returns:
> +
> + VOID.
> +
> +--*/
> +VOID
> +EFIAPI
> +PciInitPlatform (
> +  VOID
> +  )
> +{
> +  return;
> +}
> +
> +/*++
> +
> +Routine Description:
> +
> +  Perform Platform initialization by the phase indicated.
> +
> +Arguments:
> +
> +  HostBridge-  The associated PCI host bridge handle.
> +  Phase -  The phase of the PCI controller enumeration.
> +  ChipsetPhase  -  Defines the execution phase of the PCI chipset driver.
> +
> +Returns:
> +
> +--*/
> +VOID
> +EFIAPI
> +PhaseNotifyPlatform (
> +  IN  EFI_HANDLE HostBridge,
> +  IN  

Re: [edk2] [PATCH v1 1/1] BaseTools: minimize assignment processing

2018-08-30 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu  

Best Regards,
Zhu Yonghong


-Original Message-
From: Carsey, Jaben 
Sent: Wednesday, August 29, 2018 6:51 AM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong ; Gao, Liming 
Subject: [PATCH v1 1/1] BaseTools: minimize assignment processing

Reverse the checking and only assign once to each variable.

Cc: Yonghong Zhu 
Cc: Liming Gao 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey 
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py 
b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 748452623fd3..e4f5cba156c5 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -1534,15 +1534,16 @@ class DscBuildData(PlatformBuildClassObject):
 PcdValueDict[PcdCName, TokenSpaceGuid] = {SkuName:(PcdValue, 
DatumType, MaxDatumSize)}
 
 for ((PcdCName, TokenSpaceGuid), PcdSetting) in 
PcdValueDict.iteritems():
-PcdValue = None
-DatumType = None
-MaxDatumSize = None
-if TAB_COMMON in PcdSetting:
-PcdValue, DatumType, MaxDatumSize = PcdSetting[TAB_COMMON]
-if TAB_DEFAULT in PcdSetting:
-PcdValue, DatumType, MaxDatumSize = PcdSetting[TAB_DEFAULT]
 if self.SkuIdMgr.SystemSkuId in PcdSetting:
 PcdValue, DatumType, MaxDatumSize = 
PcdSetting[self.SkuIdMgr.SystemSkuId]
+elif TAB_DEFAULT in PcdSetting:
+PcdValue, DatumType, MaxDatumSize = PcdSetting[TAB_DEFAULT]
+elif TAB_COMMON in PcdSetting:
+PcdValue, DatumType, MaxDatumSize = PcdSetting[TAB_COMMON]
+else:
+PcdValue = None
+DatumType = None
+MaxDatumSize = None
 
 Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
 PcdCName,
-- 
2.16.2.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v1 1/1] BaseTools: Clarify a DSC parsing error about PCDs

2018-08-30 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu 

Best Regards,
Zhu Yonghong


-Original Message-
From: Carsey, Jaben 
Sent: Wednesday, August 29, 2018 11:16 PM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong ; Gao, Liming ; 
Hamel, Lee M 
Subject: [PATCH v1 1/1] BaseTools: Clarify a DSC parsing error about PCDs

This error needs the information about which DEC files were searched.

Cc: Yonghong Zhu 
Cc: Liming Gao 
Cc: Lee Hamel 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey 
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py 
b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 748452623fd3..0c4f2a928c39 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -859,7 +859,7 @@ class DscBuildData(PlatformBuildClassObject):
 
 if (PcdCName, TokenSpaceGuid) not in self._DecPcds:
 EdkLogger.error('build', PARSER_ERROR,
-"Pcd (%s.%s) defined in DSC is not declared in DEC 
files. Arch: ['%s']" % (TokenSpaceGuid, PcdCName, self._Arch),
+"Pcd (%s.%s) defined in DSC is not declared in DEC 
files referenced in INF files in FDF. Arch: ['%s']" % (TokenSpaceGuid, 
PcdCName, self._Arch),
 File=self.MetaFile, Line=LineNo)
 ValueList, IsValid, Index = AnalyzeDscPcd(Setting, PcdType, 
self._DecPcds[PcdCName, TokenSpaceGuid].DatumType)
 if not IsValid:
-- 
2.16.2.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms] sgi575/acpi: Use ACPI 6.2 specification

2018-08-30 Thread Ard Biesheuvel
On 30 August 2018 at 13:23, Leif Lindholm  wrote:
> On Wed, Aug 29, 2018 at 04:14:16PM +0530, Chandni Cherukuri wrote:
>> Switched from using ACPI 6.1 to 6.2 specification for
>> SGI575 since SBBR 1.1 requires ACPI 6.2 tables or later.
>
> Just to clarify - this has no impact at all on the actual generated
> tables, right?
>
> We really should have a better way of dealing with this.
> (But we don't, at the moment.)
>

I don't see the point of these changes. The whole point of ACPI's
forward compatibility guarantees is that a ACPI 6.1 system
automatically complies with ACPI 6.2, and so these changes are not
necessary for compliance with SBBR 1.1 either.

>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Cc: Ard Biesheuvel 
>> Cc: Leif Lindholm 
>> Signed-off-by: Chandni Cherukuri 
>> ---
>>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc |  8 ++--
>>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc | 48 ++--
>>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Mcfg.aslc |  4 +-
>>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Spcr.aslc |  6 +--
>>  4 files changed, 33 insertions(+), 33 deletions(-)
>>
>> diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc 
>> b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc
>> index ed671f3..0183685 100644
>> --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc
>> +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc
>> @@ -15,7 +15,7 @@
>>
>>  #include "SgiAcpiHeader.h"
>>  #include 
>> -#include 
>> +#include 
>>  #include 
>>
>>  #define SGI_DBG2_NUM_DEBUG_PORTS   1
>> @@ -29,7 +29,7 @@
>>
>>  typedef struct {
>>EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT Dbg2Device;
>> -  EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTUREBaseAddressRegister;
>> +  EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTUREBaseAddressRegister;
>>UINT32AddressSize;
>>UINT8 
>> NameSpaceString[SGI_DBG2_NS_STR_LENGTH];
>>  } DBG2_DEBUG_DEVICE_INFORMATION;
>> @@ -56,7 +56,7 @@ typedef struct {
>>  OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, BaseAddressRegister), /* 
>> UINT16BaseAddressRegister Offset */  \
>>  OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, AddressSize)  /* 
>> UINT16AddressSize Offset */  \
>>},
>> \
>> -  ARM_GAS32 (UartBase),/* 
>> EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE BaseAddressRegister */ \
>> +  ARM_GAS32 (UartBase),/* 
>> EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE BaseAddressRegister */ \
>>UartAddrLen, /* UINT32  AddressSize 
>> */\
>>UartNameStr  /* UINT8   
>> NameSpaceString[MAX_DBG2_NAME_LEN] */ \
>>  }
>> @@ -64,7 +64,7 @@ typedef struct {
>>  STATIC DBG2_TABLE Dbg2 = {
>>{
>>  ARM_ACPI_HEADER (
>> -  EFI_ACPI_6_1_DEBUG_PORT_2_TABLE_SIGNATURE,
>> +  EFI_ACPI_6_2_DEBUG_PORT_2_TABLE_SIGNATURE,
>>DBG2_TABLE,
>>EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION
>>  ),
>> diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc 
>> b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
>> index 46d811e..39e3f02 100644
>> --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
>> +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
>> @@ -16,7 +16,7 @@
>>  #include "SgiAcpiHeader.h"
>>  #include 
>>  #include 
>> -#include 
>> +#include 
>>
>>  #define SGI_PLATFORM_WATCHDOG_COUNT   2
>>  #define SGI_PLATFORM_TIMER_COUNT  (SGI_PLATFORM_WATCHDOG_COUNT + 1)
>> @@ -24,7 +24,7 @@
>>
>>  #define SYSTEM_TIMER_BASE_ADDRESS 0x
>>  #define GTDT_GLOBAL_FLAGS 0
>> -#define GTDT_GTIMER_FLAGS 
>> EFI_ACPI_6_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY
>> +#define GTDT_GTIMER_FLAGS 
>> EFI_ACPI_6_2_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY
>>
>>  #define SGI_GT_BLOCK_CTL_BASE 0x2A81
>>  #define SGI_GT_BLOCK_FRAME1_CTL_BASE  0x2A82
>> @@ -36,18 +36,18 @@
>>  #define SGI_GT_BLOCK_FRAME0_GSIV  0x5C
>>
>>  #define SGI_GTX_TIMER_FLAGS   0
>> -#define GTX_TIMER_SECURE  
>> EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER
>> +#define GTX_TIMER_SECURE  
>> EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER
>>  #define GTX_TIMER_NON_SECURE  0
>> -#define GTX_TIMER_SAVE_CONTEXT
>> EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY
>> +#define GTX_TIMER_SAVE_CONTEXT
>> EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY
>>  #define SGI_GTX_COMMON_FLAGS_S(GTX_TIMER_SAVE_CONTEXT | 
>> GTX_TIMER_SECURE)
>>  #define SGI_GTX_COMMON_FLAGS_NS   (GTX_TIMER_SAVE_CONTEXT | 
>> GTX_TIMER_NON_SECURE)

Re: [edk2] [PATCH v1 1/1] BaseTools: Refactor to remove functionally equivalent functions

2018-08-30 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu  

Best Regards,
Zhu Yonghong


-Original Message-
From: Carsey, Jaben 
Sent: Wednesday, August 29, 2018 10:42 PM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong ; Gao, Liming 
Subject: [PATCH v1 1/1] BaseTools: Refactor to remove functionally equivalent 
functions

IsSupportedArch and IsBinaryModule return the same value under the same 
curcimstances.  Remove newer one with fewer callers and send them to the other 
function.

Cc: Yonghong Zhu 
Cc: Liming Gao 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey 
---
 BaseTools/Source/Python/AutoGen/AutoGen.py| 4 ++--
 BaseTools/Source/Python/Workspace/InfBuildData.py | 8 +---
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py 
b/BaseTools/Source/Python/AutoGen/AutoGen.py
index eb1b28388967..5c0df45bb90a 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1092,7 +1092,7 @@ class PlatformAutoGen(AutoGen):
 for Inf in self._AsBuildInfList:
 InfClass = PathClass(NormPath(Inf), GlobalData.gWorkspace, 
self.Arch)
 M = self.BuildDatabase[InfClass, self.Arch, self.BuildTarget, 
self.ToolChain]
-if not M.IsSupportedArch:
+if not M.IsBinaryModule:
 continue
 self._AsBuildModuleList.append(InfClass)
 # get library/modules for build @@ -1347,7 +1347,7 @@ class 
PlatformAutoGen(AutoGen):
 # If a module INF in FDF but not in current arch's DSC module 
list, it must be module (either binary or source)
 # for different Arch. PCDs in source module for different Arch 
is already added before, so skip the source module here.
 # For binary module, if in current arch, we need to list the 
PCDs into database.
-if not M.IsSupportedArch:
+if not M.IsBinaryModule:
 continue
 # Override the module PCD setting by platform setting
 ModulePcdList = self.ApplyPcdSetting(M, M.Pcds) diff --git 
a/BaseTools/Source/Python/Workspace/InfBuildData.py 
b/BaseTools/Source/Python/Workspace/InfBuildData.py
index 7c3d712efe63..44ced491ad55 100644
--- a/BaseTools/Source/Python/Workspace/InfBuildData.py
+++ b/BaseTools/Source/Python/Workspace/InfBuildData.py
@@ -578,12 +578,7 @@ class InfBuildData(ModuleBuildClassObject):
 EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, 
ExtraData=ErrorInfo, File=self.MetaFile)
 
 return Binaries
-## Check whether it exists the binaries with current ARCH in AsBuild INF
-def _IsSupportedArch(self):
-if self._GetBinaries() and not self._GetSourceFiles():
-return True
-else:
-return False
+
 ## Retrieve source files
 def _GetSourceFiles(self):
 # Ignore all source files in a binary build mode @@ -1170,4 +1165,3 @@ 
class InfBuildData(ModuleBuildClassObject):
 Depex   = property(_GetDepex)
 DepexExpression = property(_GetDepexExpression)
 IsBinaryModule  = property(_IsBinaryModule)
-IsSupportedArch = property(_IsSupportedArch)
--
2.16.2.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] BaseTools: include variable namespace GUIDs of HII PCDs in Guid.xref

2018-08-30 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu  

Best Regards,
Zhu Yonghong


-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong 
Zhu
Sent: Wednesday, August 29, 2018 11:57 AM
To: edk2-devel@lists.01.org
Cc: Gao, Liming 
Subject: [edk2] [Patch] BaseTools: include variable namespace GUIDs of HII PCDs 
in Guid.xref

From: zhijufan 

[PcdsDynamicHii]
gFooTokenSpaceGuid.PcdBar|L"Variable"|gVarNameSpaceGuid|0x0|FALSE|NV,BS

This patch add the variable namespace GUIDs in "Guid.xref" that are used with 
dynamic HII PCDs.

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=452
Cc: Liming Gao 
Cc: Yonghong Zhu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan 
---
 BaseTools/Source/Python/GenFds/GenFds.py | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/BaseTools/Source/Python/GenFds/GenFds.py 
b/BaseTools/Source/Python/GenFds/GenFds.py
index 2307a19..9dec9c5 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -601,16 +601,27 @@ class GenFds :
 print(ModuleObj.BaseName + ' ' + ModuleObj.ModuleType)
 
 def GenerateGuidXRefFile(BuildDb, ArchList, FdfParserObj):
 GuidXRefFileName = os.path.join(GenFdsGlobalVariable.FvDir, 
"Guid.xref")
 GuidXRefFile = BytesIO('')
+PkgGuidDict = {}
 GuidDict = {}
 ModuleList = []
 FileGuidList = []
 GuidPattern = gGuidPattern
 for Arch in ArchList:
 PlatformDataBase = 
BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, 
GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
+PkgList = 
GenFdsGlobalVariable.WorkSpace.GetPackageList(GenFdsGlobalVariable.ActivePlatform,
 Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag)
+for P in PkgList:
+PkgGuidDict.update(P.Guids)
+for Name, Guid in PlatformDataBase.Pcds:
+Pcd = PlatformDataBase.Pcds[Name, Guid]
+if Pcd.Type in [TAB_PCDS_DYNAMIC_HII, TAB_PCDS_DYNAMIC_EX_HII]:
+for SkuId in Pcd.SkuInfoList:
+Sku = Pcd.SkuInfoList[SkuId]
+if Sku.VariableGuid and Sku.VariableGuid in 
PkgGuidDict.keys():
+GuidDict[Sku.VariableGuid] = 
+ PkgGuidDict[Sku.VariableGuid]
 for ModuleFile in PlatformDataBase.Modules:
 Module = BuildDb.BuildObject[ModuleFile, Arch, 
GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
 if Module in ModuleList:
 continue
 else:
--
2.6.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms] sgi575/acpi: Use ACPI 6.2 specification

2018-08-30 Thread Leif Lindholm
On Wed, Aug 29, 2018 at 04:14:16PM +0530, Chandni Cherukuri wrote:
> Switched from using ACPI 6.1 to 6.2 specification for
> SGI575 since SBBR 1.1 requires ACPI 6.2 tables or later.

Just to clarify - this has no impact at all on the actual generated
tables, right?

We really should have a better way of dealing with this.
(But we don't, at the moment.)

/
Leif

> Contributed-under: TianoCore Contribution Agreement 1.1
> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> Signed-off-by: Chandni Cherukuri 
> ---
>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc |  8 ++--
>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc | 48 ++--
>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Mcfg.aslc |  4 +-
>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Spcr.aslc |  6 +--
>  4 files changed, 33 insertions(+), 33 deletions(-)
> 
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc 
> b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc
> index ed671f3..0183685 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc
> +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc
> @@ -15,7 +15,7 @@
>  
>  #include "SgiAcpiHeader.h"
>  #include 
> -#include 
> +#include 
>  #include 
>  
>  #define SGI_DBG2_NUM_DEBUG_PORTS   1
> @@ -29,7 +29,7 @@
>  
>  typedef struct {
>EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT Dbg2Device;
> -  EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTUREBaseAddressRegister;
> +  EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTUREBaseAddressRegister;
>UINT32AddressSize;
>UINT8 
> NameSpaceString[SGI_DBG2_NS_STR_LENGTH];
>  } DBG2_DEBUG_DEVICE_INFORMATION;
> @@ -56,7 +56,7 @@ typedef struct {
>  OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, BaseAddressRegister), /* 
> UINT16BaseAddressRegister Offset */  \
>  OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, AddressSize)  /* 
> UINT16AddressSize Offset */  \
>}, 
>\
> -  ARM_GAS32 (UartBase),/* 
> EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE BaseAddressRegister */ \
> +  ARM_GAS32 (UartBase),/* 
> EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE BaseAddressRegister */ \
>UartAddrLen, /* UINT32  AddressSize */ 
>\
>UartNameStr  /* UINT8   
> NameSpaceString[MAX_DBG2_NAME_LEN] */ \
>  }
> @@ -64,7 +64,7 @@ typedef struct {
>  STATIC DBG2_TABLE Dbg2 = {
>{
>  ARM_ACPI_HEADER (
> -  EFI_ACPI_6_1_DEBUG_PORT_2_TABLE_SIGNATURE,
> +  EFI_ACPI_6_2_DEBUG_PORT_2_TABLE_SIGNATURE,
>DBG2_TABLE,
>EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION
>  ),
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc 
> b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
> index 46d811e..39e3f02 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
> +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
> @@ -16,7 +16,7 @@
>  #include "SgiAcpiHeader.h"
>  #include 
>  #include 
> -#include 
> +#include 
>  
>  #define SGI_PLATFORM_WATCHDOG_COUNT   2
>  #define SGI_PLATFORM_TIMER_COUNT  (SGI_PLATFORM_WATCHDOG_COUNT + 1)
> @@ -24,7 +24,7 @@
>  
>  #define SYSTEM_TIMER_BASE_ADDRESS 0x
>  #define GTDT_GLOBAL_FLAGS 0
> -#define GTDT_GTIMER_FLAGS 
> EFI_ACPI_6_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY
> +#define GTDT_GTIMER_FLAGS 
> EFI_ACPI_6_2_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY
>  
>  #define SGI_GT_BLOCK_CTL_BASE 0x2A81
>  #define SGI_GT_BLOCK_FRAME1_CTL_BASE  0x2A82
> @@ -36,18 +36,18 @@
>  #define SGI_GT_BLOCK_FRAME0_GSIV  0x5C
>  
>  #define SGI_GTX_TIMER_FLAGS   0
> -#define GTX_TIMER_SECURE  
> EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER
> +#define GTX_TIMER_SECURE  
> EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER
>  #define GTX_TIMER_NON_SECURE  0
> -#define GTX_TIMER_SAVE_CONTEXT
> EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY
> +#define GTX_TIMER_SAVE_CONTEXT
> EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY
>  #define SGI_GTX_COMMON_FLAGS_S(GTX_TIMER_SAVE_CONTEXT | 
> GTX_TIMER_SECURE)
>  #define SGI_GTX_COMMON_FLAGS_NS   (GTX_TIMER_SAVE_CONTEXT | 
> GTX_TIMER_NON_SECURE)
>  
> -#define EFI_ACPI_6_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT(\
> +#define EFI_ACPI_6_2_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT(\
>RefreshFramePhysicalAddress, ControlFramePhysicalAddress,   \
>WatchdogTimerGSIV, WatchdogTimerFlags)  \
>{   \
> -

Re: [edk2] [PATCH 1/2] MdeModulePkg PeiCore: Handle multiple FV images in one FV file

2018-08-30 Thread Gao, Liming
Reviewed-by: Liming Gao 

>-Original Message-
>From: Zeng, Star
>Sent: Wednesday, August 29, 2018 5:38 PM
>To: edk2-devel@lists.01.org
>Cc: Zeng, Star ; Gao, Liming ;
>Yao, Jiewen 
>Subject: [PATCH 1/2] MdeModulePkg PeiCore: Handle multiple FV images in
>one FV file
>
>REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1131
>
>PI spec and BaseTools supports to generate multiple FV images
>in one FV file.
>This patch is to update PeiCore to handle the case.
>
>Cc: Liming Gao 
>Cc: Jiewen Yao 
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Star Zeng 
>---
> MdeModulePkg/Core/Pei/FwVol/FwVol.c | 267 +++-
>
> MdeModulePkg/Core/Pei/PeiMain.h |   2 +-
> 2 files changed, 145 insertions(+), 124 deletions(-)
>
>diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
>b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
>index 65c485549718..7ea503a10fb5 100644
>--- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
>+++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
>@@ -1358,7 +1358,7 @@ GetFvUsedSize (
> }
>
> /**
>-  Get Fv image from the FV type file, then install FV INFO(2) ppi, Build FV 
>hob.
>+  Get Fv image(s) from the FV type file, then install FV INFO(2) ppi, Build 
>FV(2,
>3) hob.
>
>   @param PrivateData  PeiCore's private data structure
>   @param ParentFvCoreHandle   Pointer of EFI_CORE_FV_HANDLE to parent
>Fv image that contain this Fv image.
>@@ -1391,6 +1391,7 @@ ProcessFvFile (
>   UINT32AuthenticationStatus;
>   UINT32FvUsedSize;
>   UINT8 EraseByte;
>+  UINTN Index;
>
>   //
>   // Check if this EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE file has
>already
>@@ -1412,144 +1413,164 @@ ProcessFvFile (
>   ParentFvPpi= ParentFvCoreHandle->FvPpi;
>
>   //
>-  // Find FvImage in FvFile
>+  // Find FvImage(s) in FvFile
>   //
>-  AuthenticationStatus = 0;
>-  if ((ParentFvPpi->Signature ==
>EFI_PEI_FIRMWARE_VOLUME_PPI_SIGNATURE) &&
>-  (ParentFvPpi->Revision == EFI_PEI_FIRMWARE_VOLUME_PPI_REVISION))
>{
>-Status = ParentFvPpi->FindSectionByType2 (
>-ParentFvPpi,
>-EFI_SECTION_FIRMWARE_VOLUME_IMAGE,
>-0,
>-ParentFvFileHandle,
>-(VOID **),
>-
>-);
>-  } else {
>-Status = ParentFvPpi->FindSectionByType (
>-ParentFvPpi,
>-EFI_SECTION_FIRMWARE_VOLUME_IMAGE,
>-ParentFvFileHandle,
>-(VOID **)
>-);
>-  }
>-  if (EFI_ERROR (Status)) {
>-return Status;
>-  }
>-
>-  Status = VerifyPeim (PrivateData, ParentFvHandle, ParentFvFileHandle,
>AuthenticationStatus);
>-  if (Status == EFI_SECURITY_VIOLATION) {
>-return Status;
>-  }
>-
>-  //
>-  // If EFI_FVB2_WEAK_ALIGNMENT is set in the volume header then the first
>byte of the volume
>-  // can be aligned on any power-of-two boundary. A weakly aligned volume
>can not be moved from
>-  // its initial linked location and maintain its alignment.
>-  //
>-  if ((ReadUnaligned32 (>Attributes) &
>EFI_FVB2_WEAK_ALIGNMENT) != EFI_FVB2_WEAK_ALIGNMENT) {
>-//
>-// FvAlignment must be greater than or equal to 8 bytes of the minimum
>FFS alignment value.
>-//
>-FvAlignment = 1 << ((ReadUnaligned32 (>Attributes) &
>EFI_FVB2_ALIGNMENT) >> 16);
>-if (FvAlignment < 8) {
>-  FvAlignment = 8;
>+  Index = 0;
>+  do {
>+AuthenticationStatus = 0;
>+if ((ParentFvPpi->Signature ==
>EFI_PEI_FIRMWARE_VOLUME_PPI_SIGNATURE) &&
>+(ParentFvPpi->Revision ==
>EFI_PEI_FIRMWARE_VOLUME_PPI_REVISION)) {
>+  Status = ParentFvPpi->FindSectionByType2 (
>+  ParentFvPpi,
>+  EFI_SECTION_FIRMWARE_VOLUME_IMAGE,
>+  Index,
>+  ParentFvFileHandle,
>+  (VOID **),
>+  
>+  );
>+} else {
>+  //
>+  // Old FvPpi has no parameter to input SearchInstance,
>+  // only one instance is supported.
>+  //
>+  if (Index > 0) {
>+break;
>+  }
>+  Status = ParentFvPpi->FindSectionByType (
>+  ParentFvPpi,
>+  EFI_SECTION_FIRMWARE_VOLUME_IMAGE,
>+  ParentFvFileHandle,
>+  (VOID **)
>+  );
>+}
>+if (EFI_ERROR (Status)) {
>+  break;
> }
>
>-DEBUG ((
>-  DEBUG_INFO,
>-  "%a() FV at 0x%x, FvAlignment required is 0x%x\n",
>-  __FUNCTION__,
>-  FvHeader,
>-  FvAlignment
>-  ));
>+Status = VerifyPeim (PrivateData, ParentFvHandle, ParentFvFileHandle,
>AuthenticationStatus);
>+if (Status == 

Re: [edk2] [PATCH 2/2] MdeModulePkg DxeCore: Handle multiple FV images in one FV file

2018-08-30 Thread Zeng, Star
Oh, yes, agree. I should update description.

Thanks,
Star
-Original Message-
From: Gao, Liming 
Sent: Thursday, August 30, 2018 5:55 PM
To: Zeng, Star ; edk2-devel@lists.01.org
Cc: Yao, Jiewen 
Subject: RE: [PATCH 2/2] MdeModulePkg DxeCore: Handle multiple FV images in one 
FV file

Star:
  You change the parameter name in the function. Please also update the 
function description to match the function implementation. 

Thanks
Liming
>-Original Message-
>From: Zeng, Star
>Sent: Wednesday, August 29, 2018 5:38 PM
>To: edk2-devel@lists.01.org
>Cc: Zeng, Star ; Gao, Liming 
>; Yao, Jiewen 
>Subject: [PATCH 2/2] MdeModulePkg DxeCore: Handle multiple FV images in 
>one FV file
>
>REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1131
>
>PI spec and BaseTools supports to generate multiple FV images in one FV 
>file.
>This patch is to update DxeCore to handle the case.
>
>Cc: Liming Gao 
>Cc: Jiewen Yao 
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Star Zeng 
>---
> MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 241 ++-
>---
> 1 file changed, 128 insertions(+), 113 deletions(-)
>
>diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
>b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
>index f72c47a9e54c..086a590ef4e3 100644
>--- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
>+++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
>@@ -184,14 +184,13 @@ CoreAddToDriverList (
>   );
>
> /**
>-  Get the driver from the FV through driver name, and produce a FVB 
>protocol on FvHandle.
>+  Get Fv image(s) from the FV through file name, and produce FVB 
>+ protocol
>for every Fv image(s).
>
>   @param  FvThe FIRMWARE_VOLUME protocol installed on the 
> FV.
>   @param  FvHandle  The handle which FVB protocol installed on.
>   @param  DriverNameThe driver guid specified.
>
>   @retval EFI_OUT_OF_RESOURCES  No enough memory or other resource.
>-  @retval EFI_VOLUME_CORRUPTED  Corrupted volume.
>   @retval EFI_SUCCESS   Function successfully returned.
>
> **/
>@@ -199,7 +198,7 @@ EFI_STATUS
> CoreProcessFvImageFile (
>   IN  EFI_FIRMWARE_VOLUME2_PROTOCOL   *Fv,
>   IN  EFI_HANDLE  FvHandle,
>-  IN  EFI_GUID*DriverName
>+  IN  EFI_GUID*FileName
>   );
>
>
>@@ -1004,14 +1003,13 @@ GetFvUsedSize (  }
>
> /**
>-  Get the driver from the FV through driver name, and produce a FVB 
>protocol on FvHandle.
>+  Get Fv image(s) from the FV through file name, and produce FVB 
>+ protocol
>for every Fv image(s).
>
>   @param  FvThe FIRMWARE_VOLUME protocol installed on the 
> FV.
>   @param  FvHandle  The handle which FVB protocol installed on.
>   @param  DriverNameThe driver guid specified.
>
>   @retval EFI_OUT_OF_RESOURCES  No enough memory or other resource.
>-  @retval EFI_VOLUME_CORRUPTED  Corrupted volume.
>   @retval EFI_SUCCESS   Function successfully returned.
>
> **/
>@@ -1019,7 +1017,7 @@ EFI_STATUS
> CoreProcessFvImageFile (
>   IN  EFI_FIRMWARE_VOLUME2_PROTOCOL   *Fv,
>   IN  EFI_HANDLE  FvHandle,
>-  IN  EFI_GUID*DriverName
>+  IN  EFI_GUID*FileName
>   )
> {
>   EFI_STATUS  Status;
>@@ -1033,141 +1031,158 @@ CoreProcessFvImageFile (
>   EFI_DEVICE_PATH_PROTOCOL*FvFileDevicePath;
>   UINT32  FvUsedSize;
>   UINT8   EraseByte;
>+  UINTN   Index;
>
>   //
>-  // Read the first (and only the first) firmware volume section
>+  // Read firmware volume section(s)
>   //
>   SectionType   = EFI_SECTION_FIRMWARE_VOLUME_IMAGE;
>-  FvHeader  = NULL;
>-  FvAlignment   = 0;
>-  Buffer= NULL;
>-  BufferSize= 0;
>-  AlignedBuffer = NULL;
>-  Status = Fv->ReadSection (
>- Fv,
>- DriverName,
>- SectionType,
>- 0,
>- ,
>- ,
>- 
>- );
>-  if (!EFI_ERROR (Status)) {
>- //
>-// Evaluate the authentication status of the Firmware Volume through
>-// Security Architectural Protocol
>-//
>-if (gSecurity != NULL) {
>-  FvFileDevicePath = CoreFvToDevicePath (Fv, FvHandle, DriverName);
>-  Status = gSecurity->FileAuthenticationState (
>-gSecurity,
>-AuthenticationStatus,
>-FvFileDevicePath
>-);
>-  if (FvFileDevicePath != NULL) {
>-FreePool (FvFileDevicePath);
>-  }
>
>-  if (Status != EFI_SUCCESS) {
>-//
>-// Security check failed. The firmware volume should not be used for 
>any
>purpose.
>-//
>-if (Buffer != NULL) {
>-  FreePool (Buffer);
>+  Index = 0;
>+  do {
>+FvHeader  = 

Re: [edk2] [PATCH 2/2] MdeModulePkg DxeCore: Handle multiple FV images in one FV file

2018-08-30 Thread Gao, Liming
Star:
  You change the parameter name in the function. Please also update the 
function description to match the function implementation. 

Thanks
Liming
>-Original Message-
>From: Zeng, Star
>Sent: Wednesday, August 29, 2018 5:38 PM
>To: edk2-devel@lists.01.org
>Cc: Zeng, Star ; Gao, Liming ;
>Yao, Jiewen 
>Subject: [PATCH 2/2] MdeModulePkg DxeCore: Handle multiple FV images in
>one FV file
>
>REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1131
>
>PI spec and BaseTools supports to generate multiple FV images
>in one FV file.
>This patch is to update DxeCore to handle the case.
>
>Cc: Liming Gao 
>Cc: Jiewen Yao 
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Star Zeng 
>---
> MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 241 ++-
>---
> 1 file changed, 128 insertions(+), 113 deletions(-)
>
>diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
>b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
>index f72c47a9e54c..086a590ef4e3 100644
>--- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
>+++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
>@@ -184,14 +184,13 @@ CoreAddToDriverList (
>   );
>
> /**
>-  Get the driver from the FV through driver name, and produce a FVB
>protocol on FvHandle.
>+  Get Fv image(s) from the FV through file name, and produce FVB protocol
>for every Fv image(s).
>
>   @param  FvThe FIRMWARE_VOLUME protocol installed on the 
> FV.
>   @param  FvHandle  The handle which FVB protocol installed on.
>   @param  DriverNameThe driver guid specified.
>
>   @retval EFI_OUT_OF_RESOURCES  No enough memory or other resource.
>-  @retval EFI_VOLUME_CORRUPTED  Corrupted volume.
>   @retval EFI_SUCCESS   Function successfully returned.
>
> **/
>@@ -199,7 +198,7 @@ EFI_STATUS
> CoreProcessFvImageFile (
>   IN  EFI_FIRMWARE_VOLUME2_PROTOCOL   *Fv,
>   IN  EFI_HANDLE  FvHandle,
>-  IN  EFI_GUID*DriverName
>+  IN  EFI_GUID*FileName
>   );
>
>
>@@ -1004,14 +1003,13 @@ GetFvUsedSize (
> }
>
> /**
>-  Get the driver from the FV through driver name, and produce a FVB
>protocol on FvHandle.
>+  Get Fv image(s) from the FV through file name, and produce FVB protocol
>for every Fv image(s).
>
>   @param  FvThe FIRMWARE_VOLUME protocol installed on the 
> FV.
>   @param  FvHandle  The handle which FVB protocol installed on.
>   @param  DriverNameThe driver guid specified.
>
>   @retval EFI_OUT_OF_RESOURCES  No enough memory or other resource.
>-  @retval EFI_VOLUME_CORRUPTED  Corrupted volume.
>   @retval EFI_SUCCESS   Function successfully returned.
>
> **/
>@@ -1019,7 +1017,7 @@ EFI_STATUS
> CoreProcessFvImageFile (
>   IN  EFI_FIRMWARE_VOLUME2_PROTOCOL   *Fv,
>   IN  EFI_HANDLE  FvHandle,
>-  IN  EFI_GUID*DriverName
>+  IN  EFI_GUID*FileName
>   )
> {
>   EFI_STATUS  Status;
>@@ -1033,141 +1031,158 @@ CoreProcessFvImageFile (
>   EFI_DEVICE_PATH_PROTOCOL*FvFileDevicePath;
>   UINT32  FvUsedSize;
>   UINT8   EraseByte;
>+  UINTN   Index;
>
>   //
>-  // Read the first (and only the first) firmware volume section
>+  // Read firmware volume section(s)
>   //
>   SectionType   = EFI_SECTION_FIRMWARE_VOLUME_IMAGE;
>-  FvHeader  = NULL;
>-  FvAlignment   = 0;
>-  Buffer= NULL;
>-  BufferSize= 0;
>-  AlignedBuffer = NULL;
>-  Status = Fv->ReadSection (
>- Fv,
>- DriverName,
>- SectionType,
>- 0,
>- ,
>- ,
>- 
>- );
>-  if (!EFI_ERROR (Status)) {
>- //
>-// Evaluate the authentication status of the Firmware Volume through
>-// Security Architectural Protocol
>-//
>-if (gSecurity != NULL) {
>-  FvFileDevicePath = CoreFvToDevicePath (Fv, FvHandle, DriverName);
>-  Status = gSecurity->FileAuthenticationState (
>-gSecurity,
>-AuthenticationStatus,
>-FvFileDevicePath
>-);
>-  if (FvFileDevicePath != NULL) {
>-FreePool (FvFileDevicePath);
>-  }
>
>-  if (Status != EFI_SUCCESS) {
>-//
>-// Security check failed. The firmware volume should not be used for 
>any
>purpose.
>-//
>-if (Buffer != NULL) {
>-  FreePool (Buffer);
>+  Index = 0;
>+  do {
>+FvHeader  = NULL;
>+FvAlignment   = 0;
>+Buffer= NULL;
>+BufferSize= 0;
>+AlignedBuffer = NULL;
>+Status = Fv->ReadSection (
>+   Fv,
>+   FileName,
>+   SectionType,
>+   Index,
>+   ,
>+  

[edk2] [Patch] BaseTools: Enable LTO option in XCODE5 tool chain

2018-08-30 Thread Liming Gao
LTO option can achieve the better image size and boot performance.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao 
Cc: Andrew Fish 
---
 BaseTools/Conf/tools_def.template | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index a22b96c..f9bd41e 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -6824,9 +6824,9 @@ RELEASE_XCODE5_*_MTOC_FLAGS = -align 0x20
 
 # IA-32 definitions
 
-  DEBUG_XCODE5_IA32_DLINK_FLAGS  = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e 
_$(IMAGE_ENTRY_POINT) -preload -segalign 0x20  -pie -all_load -dead_strip 
-seg1addr 0x240 -read_only_relocs suppress -map 
$(DEST_DIR_DEBUG)/$(BASE_NAME).map
+  DEBUG_XCODE5_IA32_DLINK_FLAGS  = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e 
_$(IMAGE_ENTRY_POINT) -preload -segalign 0x20  -pie -all_load -dead_strip 
-seg1addr 0x240 -read_only_relocs suppress -map 
$(DEST_DIR_DEBUG)/$(BASE_NAME).map -object_path_lto 
$(DEST_DIR_DEBUG)/$(BASE_NAME).lto
   NOOPT_XCODE5_IA32_DLINK_FLAGS  = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e 
_$(IMAGE_ENTRY_POINT) -preload -segalign 0x20  -pie -all_load -dead_strip 
-seg1addr 0x240 -read_only_relocs suppress -map 
$(DEST_DIR_DEBUG)/$(BASE_NAME).map
-RELEASE_XCODE5_IA32_DLINK_FLAGS  = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e 
_$(IMAGE_ENTRY_POINT) -preload -segalign 0x20  -pie -all_load -dead_strip 
-seg1addr 0x240 -read_only_relocs suppress -map 
$(DEST_DIR_DEBUG)/$(BASE_NAME).map
+RELEASE_XCODE5_IA32_DLINK_FLAGS  = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e 
_$(IMAGE_ENTRY_POINT) -preload -segalign 0x20  -pie -all_load -dead_strip 
-seg1addr 0x240 -read_only_relocs suppress -map 
$(DEST_DIR_DEBUG)/$(BASE_NAME).map -object_path_lto 
$(DEST_DIR_DEBUG)/$(BASE_NAME).lto
 
 *_XCODE5_IA32_SLINK_FLAGS  = -static -o
   DEBUG_XCODE5_IA32_ASM_FLAGS  = -arch i386 -g
@@ -6835,16 +6835,16 @@ RELEASE_XCODE5_IA32_ASM_FLAGS  = -arch i386
   *_XCODE5_IA32_NASM_FLAGS = -f macho32
 
 
-  DEBUG_XCODE5_IA32_CC_FLAGS   = -arch i386 -c -g -Os   -Wall -Werror 
-include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin 
-fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields 
-msoft-float -Wno-unused-parameter -Wno-missing-braces 
-Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare 
-Wno-varargs 
-ftrap-function=undefined_behavior_has_been_optimized_away_by_clang 
$(PLATFORM_FLAGS)
-RELEASE_XCODE5_IA32_CC_FLAGS   = -arch i386 -c-Os   -Wall -Werror 
-include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin 
-fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields 
-msoft-float -Wno-unused-parameter -Wno-missing-braces 
-Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare 
-Wno-varargs -Wno-unused-const-variable 
-ftrap-function=undefined_behavior_has_been_optimized_away_by_clang 
$(PLATFORM_FLAGS)
+  DEBUG_XCODE5_IA32_CC_FLAGS   = -arch i386 -c -g -Os -flto -Wall -Werror 
-include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin 
-fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields 
-msoft-float -Wno-unused-parameter -Wno-missing-braces 
-Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare 
-Wno-varargs 
-ftrap-function=undefined_behavior_has_been_optimized_away_by_clang 
$(PLATFORM_FLAGS)
+RELEASE_XCODE5_IA32_CC_FLAGS   = -arch i386 -c-Os -flto -Wall -Werror 
-include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin 
-fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields 
-msoft-float -Wno-unused-parameter -Wno-missing-braces 
-Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare 
-Wno-varargs -Wno-unused-const-variable 
-ftrap-function=undefined_behavior_has_been_optimized_away_by_clang 
$(PLATFORM_FLAGS)
   NOOPT_XCODE5_IA32_CC_FLAGS   = -arch i386 -c -g -O0   -Wall -Werror 
-include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin 
-fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields 
-msoft-float -Wno-unused-parameter -Wno-missing-braces 
-Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare 
-Wno-varargs 
-ftrap-function=undefined_behavior_has_been_optimized_away_by_clang 
$(PLATFORM_FLAGS)
 
 ##
 # X64 definitions
 ##
-  DEBUG_XCODE5_X64_DLINK_FLAGS  = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e 
_$(IMAGE_ENTRY_POINT) -preload -segalign 0x20  -pie -all_load -dead_strip 
-seg1addr 0x240 -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+  DEBUG_XCODE5_X64_DLINK_FLAGS  = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e 
_$(IMAGE_ENTRY_POINT) -preload -segalign 0x20  -pie -all_load -dead_strip 
-seg1addr 0x240 -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map -object_path_lto 

Re: [edk2] Remove EDK package from edk2 master

2018-08-30 Thread Laszlo Ersek
On 08/30/18 03:36, Gao, Liming wrote:
> EDK2 plans to retire EDK style packages. Below BZ requests to remove 
> FatBinPkg, EdkShellPkg, EdkShellBinPkg and EdkCompatiblityPkg from edk2 
> master. They can be replaced by Edk2 FatPkg, ShellBinPkg and ShellPkg. 
> UnixPkg is an empty package. So, it is also suggested to be removed. But, 
> they are all kept in edk2 existing branches for reference. Once they are 
> removed, edk2 platform dsc/fdf will be updated to use edk2 
> FatPkg/ShellBinPkg/ShellPkg. If you have any comments on this change, please 
> reply to this mail.
> 
> 1106
> 
> EDK2
> 
> Code
> 
> Remove UnixPkg from 
> edk2/master
> 
> 1105
> 
> EDK2
> 
> Code
> 
> Remove FatBinPkg from 
> edk2/master
> 
> 1107
> 
> EDK2
> 
> Code
> 
> Remove EdkShellPkg from 
> edk2/master
> 
> 1108
> 
> EDK2
> 
> Code
> 
> Remove EdkShellBinPkg from 
> edk2/master
> 
> 1103
> 
> EDK2
> 
> Code
> 
> delete EdkCompatibilityPkg from 
> edk2/master

Sounds good to me.

Thanks,
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2] MdeModulePkg/Network: Add 32bit subnet mask support for IP4 PXE boot.

2018-08-30 Thread Wu, Jiaxin
Reviewed-by: Jiaxin Wu 


> -Original Message-
> From: Fu, Siyuan
> Sent: Wednesday, August 29, 2018 4:53 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Wu, Jiaxin 
> Subject: [PATCH v2] MdeModulePkg/Network: Add 32bit subnet mask
> support for IP4 PXE boot.
> 
> V2 update:
> The original patch has a problem, that if an IP child which not using default
> address is
> configured with /32 subnet mask, while the gateway is configured to the
> default route table,
> then the gateway won't take effect on that IP child. This patch fixed the
> problem.
> 
> This patch updates IP4 stack to support 32bit subnet mask in PXE boot
> process.
> When 32bit subnet mask is used, the IP4 driver couldn't use the subnet mask
> to determine
> whether destination IP address is on-link or not, so it will always try to 
> send
> all the
> packets to the destination IP address directly first, if failed it will 
> continue
> to try the default gateway.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Fu Siyuan 
> Cc: Ye Ting 
> Cc: Wu Jiaxin 
> ---
>  MdeModulePkg/Include/Library/NetLib.h |   5 +-
>  MdeModulePkg/Library/DxeNetLib/DxeNetLib.c|  13 +-
>  .../Universal/Network/Ip4Dxe/Ip4Common.h  |   2 +-
>  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c | 117
> --
>  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h |   5 +-
>  .../Universal/Network/Ip4Dxe/Ip4Impl.c|   2 +-
>  .../Universal/Network/Ip4Dxe/Ip4Output.c  |  11 +-
>  .../Universal/Network/Ip4Dxe/Ip4Route.c   |  26 +++-
>  .../Universal/Network/Ip4Dxe/Ip4Route.h   |   9 +-
>  .../Universal/Network/Mtftp4Dxe/Mtftp4Impl.c  |   6 +-
>  10 files changed, 163 insertions(+), 33 deletions(-)
> 
> diff --git a/MdeModulePkg/Include/Library/NetLib.h
> b/MdeModulePkg/Include/Library/NetLib.h
> index ef7bc429c1..b7ef99c7b5 100644
> --- a/MdeModulePkg/Include/Library/NetLib.h
> +++ b/MdeModulePkg/Include/Library/NetLib.h
> @@ -422,8 +422,9 @@ NetGetIpClass (
> 
>If all bits of the host address of IP are 0 or 1, IP is also not a valid 
> unicast
> address,
>except when the originator is one of the endpoints of a point-to-point link
> with a 31-bit
> -  mask (RFC3021).
> -
> +  mask (RFC3021), or a 32bit NetMask (all 0xFF) is used for special network
> environment (e.g.
> +  PPP link).
> +
>@param[in]  IpThe IP to check against.
>@param[in]  NetMask   The mask of the IP.
> 
> diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
> b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
> index bf8f5523e6..63f4724062 100644
> --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
> +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
> @@ -654,8 +654,9 @@ NetGetIpClass (
> 
>If all bits of the host address of IP are 0 or 1, IP is also not a valid 
> unicast
> address,
>except when the originator is one of the endpoints of a point-to-point link
> with a 31-bit
> -  mask (RFC3021).
> -
> +  mask (RFC3021), or a 32bit NetMask (all 0xFF) is used for special network
> environment (e.g.
> +  PPP link).
> +
>@param[in]  IpThe IP to check against.
>@param[in]  NetMask   The mask of the IP.
> 
> @@ -669,18 +670,20 @@ NetIp4IsUnicast (
>IN IP4_ADDR   NetMask
>)
>  {
> +  INTN   MaskLength;
> +
>ASSERT (NetMask != 0);
> 
>if (Ip == 0 || IP4_IS_LOCAL_BROADCAST (Ip)) {
>  return FALSE;
>}
> 
> -  if (NetGetMaskLength (NetMask) != 31) {
> +  MaskLength = NetGetMaskLength (NetMask);
> +  ASSERT ((MaskLength >= 0) && (MaskLength <= IP4_MASK_NUM));
> +  if (MaskLength < 31) {
>  if (((Ip &~NetMask) == ~NetMask) || ((Ip &~NetMask) == 0)) {
>return FALSE;
>  }
> -  } else {
> -return TRUE;
>}
> 
>return TRUE;
> diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h
> b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h
> index e0fffc9d0d..994a81f4de 100644
> --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h
> +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h
> @@ -55,7 +55,7 @@ typedef struct _IP4_SERVICEIP4_SERVICE;
>  /// Compose the fragment field to be used in the IP4 header.
>  ///
>  #define IP4_HEAD_FRAGMENT_FIELD(Df, Mf, Offset) \
> -((UINT16)(((Df) ? 0x4000 : 0) | ((Mf) ? 0x2000 : 0) | (((Offset) >> 3) &
> 0x1fff)))
> +((UINT16)(((Df) ? IP4_HEAD_DF_MASK : 0) | ((Mf) ?
> IP4_HEAD_MF_MASK : 0) | (((Offset) >> 3) & IP4_HEAD_OFFSET_MASK)))
> 
>  #define IP4_LAST_FRAGMENT(FragmentField)  \
>(((FragmentField) & IP4_HEAD_MF_MASK) == 0)
> diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
> b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
> index 6e0e3290c7..b0172283b7 100644
> --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
> +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
> @@ -138,6 +138,7 @@ Ip4CancelFrameArp (
>@param[in]  CallBack  Call back function to execute if transmission
>   

Re: [edk2] [Patch 2/2] ShellPkg: Update Ifconfig command to accept 32bit subnet mask.

2018-08-30 Thread Wu, Jiaxin
Reviewed-by: Jiaxin Wu 


> -Original Message-
> From: Fu, Siyuan
> Sent: Tuesday, August 28, 2018 9:53 AM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu ; Ye, Ting ; Wu, Jiaxin
> 
> Subject: [Patch 2/2] ShellPkg: Update Ifconfig command to accept 32bit
> subnet mask.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Fu Siyuan 
> Cc: Ruiyu Ni 
> Cc: Ye Ting 
> Cc: Wu Jiaxin 
> ---
>  ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
> b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
> index 52415e0ad0..e9f644c739 100644
> --- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
> +++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
> @@ -1032,6 +1032,7 @@ IfConfigSetInterfaceInfo (
>SubnetMask  = NTOHL (SubnetMask);
>TempGateway = NTOHL (TempGateway);
>if ((SubnetMask != 0) &&
> +  (SubnetMask != 0xu) &&
>!NetIp4IsUnicast (TempGateway, SubnetMask)) {
>  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> (STR_IFCONFIG_INVALID_GATEWAY), gShellNetwork1HiiHandle, VarArg-
> >Arg);
>  ShellStatus = SHELL_INVALID_PARAMETER;
> --
> 2.18.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] BaseTools: Fixed the PcdValue trailing zero issue.

2018-08-30 Thread Gao, Liming
Reviewed-by: Liming Gao 

>-Original Message-
>From: Feng, Bob C
>Sent: Tuesday, August 28, 2018 6:23 PM
>To: edk2-devel@lists.01.org
>Cc: Feng, Bob C ; Gao, Liming 
>Subject: [Patch] BaseTools: Fixed the PcdValue trailing zero issue.
>
>1. Not append trailing zero for PcdValue
>2. make sure the point to Variable Name in PCD
>DataBase 2 bytes aligned.
>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Bob Feng 
>Cc: Liming Gao 
>---
> BaseTools/Source/Python/AutoGen/GenPcdDb.py   | 6 ++
> BaseTools/Source/Python/Common/StringUtils.py | 7 +--
> 2 files changed, 7 insertions(+), 6 deletions(-)
>
>diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py
>b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
>index 2176bbefeb..5b260cd515 100644
>--- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py
>+++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
>@@ -1182,10 +1182,16 @@ def CreatePcdDatabasePhaseSpecificAutoGen
>(Platform, DynamicPcdList, Phase):
> Pcd.InitString = 'INIT'
> # Store all variable names of one HII PCD under different SKU 
> to
>stringTable
> # and calculate the VariableHeadStringIndex
>
> VariableNameStructure = StringToArray(Sku.VariableName)
>+
>+#  Make pointer of VaraibleName(HII PCD) 2 bytes aligned
>+VariableNameStructureBytes =
>VariableNameStructure.lstrip("{").rstrip("}").split(",")
>+if len(VariableNameStructureBytes) % 2:
>+VariableNameStructure = "{%s,0x00}" %
>",".join(VariableNameStructureBytes)
>+
> if VariableNameStructure not in Dict['STRING_TABLE_VALUE']:
> Dict['STRING_TABLE_CNAME'].append(CName)
> Dict['STRING_TABLE_GUID'].append(TokenSpaceGuid)
> if StringTableIndex == 0:
> Dict['STRING_TABLE_INDEX'].append('')
>diff --git a/BaseTools/Source/Python/Common/StringUtils.py
>b/BaseTools/Source/Python/Common/StringUtils.py
>index da2949dbad..d5afde7a95 100644
>--- a/BaseTools/Source/Python/Common/StringUtils.py
>+++ b/BaseTools/Source/Python/Common/StringUtils.py
>@@ -833,16 +833,11 @@ def StringToArray(String):
> if StringLen % 2:
> return "{%s,0x00}" % ",".join("0x%02x" % ord(C) for C in 
> String[1:-1])
> else:
> return "{%s,0x00,0x00}" % ",".join("0x%02x" % ord(C) for C in
>String[1:-1])
> elif String.startswith('{'):
>-StringLen = len(String.split(","))
>-if StringLen % 2:
>-return "{%s,0x00}" % ",".join(C.strip() for C in 
>String[1:-1].split(','))
>-else:
>-return "{%s}" % ",".join(C.strip() for C in 
>String[1:-1].split(','))
>-
>+return "{%s}" % ",".join(C.strip() for C in String[1:-1].split(','))
> else:
> if len(String.split()) % 2:
> return '{%s,0}' % ','.join(String.split())
> else:
> return '{%s,0,0}' % ','.join(String.split())
>--
>2.16.2.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] reg: Clarification required on ISCSI Initiator Implementation

2018-08-30 Thread Ye, Ting
Hi Siva,

The EFI_ISCSI_INITIATOR_NAME_PROTOCOL defined in UEFI specification supports 
only one iSCSI initiator name in UEFI system. 
In our implementation UEFI iSCSI is a single iSCSI initiator node but can 
maintain more than one NIC device/port.

Thanks,
Ting

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of 
Sivaraman Nainar
Sent: Thursday, August 30, 2018 1:59 PM
To: edk2-devel@lists.01.org
Subject: [edk2] reg: Clarification required on ISCSI Initiator Implementation

Hello All,

As per the current ISCSI implementation there is only one Initiator name 
maintained even when there are multiple MAC and attempts are made from an UEFI 
system.

Is there history behind not allowing to change the Initiator Name specific to 
MAC ?

Thanks
Siva
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] BaseTools: Check pcd DefaultValue and SkuId EBNF.

2018-08-30 Thread Gao, Liming
Reviewed-by: Liming Gao 

>-Original Message-
>From: Feng, Bob C
>Sent: Monday, August 27, 2018 9:30 AM
>To: edk2-devel@lists.01.org
>Cc: Zhao, ZhiqiangX ; Gao, Liming
>; Zhu, Yonghong ; Feng,
>Bob C 
>Subject: [PATCH] BaseTools: Check pcd DefaultValue and SkuId EBNF.
>
>From: Zhaozh1x 
>
>1. When assign dynamic hii pcd value in dsc file,
>missed the DefaultValue, build should be fail.
>2. Check the EBNF of SkuId.
>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: ZhiqiangX Zhao 
>Cc: Liming Gao 
>Cc: Yonghong Zhu 
>Cc: Bob Feng 
>---
> BaseTools/Source/Python/Common/Misc.py| 4 +++-
> BaseTools/Source/Python/Workspace/DscBuildData.py | 6 +++---
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
>diff --git a/BaseTools/Source/Python/Common/Misc.py
>b/BaseTools/Source/Python/Common/Misc.py
>index 74a5f0bca5..8debb0fdf8 100644
>--- a/BaseTools/Source/Python/Common/Misc.py
>+++ b/BaseTools/Source/Python/Common/Misc.py
>@@ -1525,6 +1525,7 @@ def AnalyzeDscPcd(Setting, PcdType, DataType=''):
> Size = -1
> return [VpdOffset, str(Size), Value], IsValid, 2
> elif PcdType in (MODEL_PCD_DYNAMIC_HII,
>MODEL_PCD_DYNAMIC_EX_HII):
>+IsValid = (3 <= len(FieldList) <= 5)
> HiiString = FieldList[0]
> Guid = Offset = Value = Attribute = ''
> if len(FieldList) > 1:
>@@ -1533,9 +1534,10 @@ def AnalyzeDscPcd(Setting, PcdType, DataType=''):
> Offset = FieldList[2]
> if len(FieldList) > 3:
> Value = FieldList[3]
>+if not Value:
>+IsValid = False
> if len(FieldList) > 4:
> Attribute = FieldList[4]
>-IsValid = (3 <= len(FieldList) <= 5)
> return [HiiString, Guid, Offset, Value, Attribute], IsValid, 3
> return [], False, 0
>
>diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py
>b/BaseTools/Source/Python/Workspace/DscBuildData.py
>index e8b36a3868..dd30067491 100644
>--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
>+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
>@@ -92,7 +92,7 @@ LIBS = -lCommon
> '''
>
> variablePattern = re.compile(r'[\t\s]*0[xX][a-fA-F0-9]+$')
>-
>+SkuIdPattern = re.compile(r'^[a-zA-Z_][a-zA-Z0-9_]*$')
> ## regular expressions for finding decimal and hex numbers
> Pattern = re.compile('^[1-9]\d*|0$')
> HexPattern = re.compile(r'0[xX][0-9a-fA-F]+$')
>@@ -646,8 +646,8 @@ class DscBuildData(PlatformBuildClassObject):
> if not Pattern.match(Record[0]) and not
>HexPattern.match(Record[0]):
> EdkLogger.error('build', FORMAT_INVALID, "The format of 
> the Sku
>ID number is invalid. It only support Integer and HexNumber",
> File=self.MetaFile, Line=Record[-1])
>-if not IsValidWord(Record[1]):
>-EdkLogger.error('build', FORMAT_INVALID, "The format of 
>the Sku
>ID name is invalid. The correct format is '(a-zA-Z0-9_)(a-zA-Z0-9_-.)*'",
>+if not SkuIdPattern.match(Record[1]) or (Record[2] and not
>SkuIdPattern.match(Record[2])):
>+EdkLogger.error('build', FORMAT_INVALID, "The format of 
>the Sku
>ID name is invalid. The correct format is '(a-zA-Z_)(a-zA-Z0-9_)*'",
> File=self.MetaFile, Line=Record[-1])
> self._SkuIds[Record[1].upper()] = 
> (str(DscBuildData.ToInt(Record[0])),
>Record[1].upper(), Record[2].upper())
> if TAB_DEFAULT not in self._SkuIds:
>--
>2.14.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel