[edk2] [Patch] Build Spec: Add rules for structure pcd display in the report

2018-07-31 Thread Yonghong Zhu
Cc: Liming Gao 
Cc: Michael Kinney 
Cc: Kevin W Shaw 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu 
---
 13_build_reports/136_global_pcd_section.md | 32 +-
 1 file changed, 23 insertions(+), 9 deletions(-)

diff --git a/13_build_reports/136_global_pcd_section.md 
b/13_build_reports/136_global_pcd_section.md
index 64bda35..1a072b3 100644
--- a/13_build_reports/136_global_pcd_section.md
+++ b/13_build_reports/136_global_pcd_section.md
@@ -142,44 +142,58 @@ These lines are formatted as:
 **
 **Note:** Global PCD section is present when **PCD** is specified in **-Y**
 option.
 **
 
- 13.6.2.4 Field value for Structure PCD
-If the Pcd is a Structure Pcd, every field value that user specified in DSC/DEC
-file and build command will print out. The field value is from DSC/DEC file or
-build command, not from the final structure byte array, and the field order is
-same as it in DSC/DEC file. when the field value is from build command, tool 
will
-additional print a *B Flag.
+ 13.6.2.4 Rules for Structure PCD
+If the Pcd is a Structure Pcd, it display in the report file would have two 
parts.
+One is the final Pcd value and its field value, the field value is from FDF 
file,
+DSC file PCD Section or build option, not from the final structure byte array,
+and the field order is sorted by the field name. When the field value from DSC 
file
+PCD Section, it will not have additional *P Flag, when the field value from 
FDF file,
+it will have additional *F Flag before the field name, when the field value 
from
+build option, it will have additional *B Flag before the field name. The other 
part
+is the DEC default value and its field value, this part is optional. The field 
value
+in this part is from DEC file, and the field order is sorted by the field name.
+
+**
+**Note:** When the structure Pcd have some value from build option, no matter 
whether
+the value is same with FDF or DSC file or DEC file, there will display a *B 
Flag before
+the PCD name. When the structure Pcd have some value from FDF file, no matter 
whether
+the value is same with DSC file or DEC file, there will display a *F Flag 
before the
+PCD name. When the structure Pcd value have some value from DSC file PCD 
section, no
+matter whether the value is same with DEC file, there will display a *P Flag 
before
+the PCD name.
+**
 
  Example
 
 ```
 gEfiMdePkgTokenSpaceGuid
 *B TestDynamicExHii   : DEXHII(TEST) (SKU1) (STANDARD) = {
 
0xff,0x01,0x00,0x2e,0xf6,0x08,0x6f,0x19,0x5c,0x8e,0x49,0x91,0x57,0x00,0x00,0x00,
 0x00,0x64,0x00,0x00,0x00}
.A = 0x1
-   *B  .C = 0x0
.Array = {0x2e,0xf6,0x08,0x6f,0x19,0x5c,0x8e,0x49,0x91,0x57}
+   *B  .C = 0x0
.D = 0x64
   : DEXHII(TEST) (SKU1) (Manufacturing) = {
 
0xff,0x02,0x00,0x2e,0xf6,0x08,0x6f,0x20,0x5c,0x8e,0x49,0x91,0x57,0x00,0x00,0x00,
 0x00,0x68,0x00,0x00,0x00}
.A = 0x2
-   *B  .C = 0x0
.Array = {0x2e,0xf6,0x08,0x6f,0x20,0x5c,0x8e,0x49,0x91,0x57}
+   *B  .C = 0x0
.D = 0x68
 DEC DEFAULT = {0xFF,0xFF}
.A = 0xF
.C = 0xF
 *P TestFix:  FIXED   (TEST) = {
 
0xff,0x02,0x00,0x2e,0xf6,0x08,0x6f,0x19,0x5c,0x8e,0x49,0x91,0x57,0x00,0x00,0x00,
 0x00,0x64,0x00,0x00,0x00}
.A = 0x2
-   .C = 0x0
.Array = {0x2e,0xf6,0x08,0x6f,0x19,0x5c,0x8e,0x49,0x91,0x57}
+   .C = 0x0
.D = 0x64
 DEC DEFAULT = {0xFF,0xFF}
.A = 0xF
.C = 0xF
 ```
-- 
2.6.1.windows.1

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


Re: [edk2] [Patch] NetworkPkg/HttpDxe: Stripped square brackets in IPv6 expressed HostName.

2018-07-31 Thread Fu, Siyuan
OK, the patch is good with me.

Reviewed-by: Fu Siyuan 


> -Original Message-
> From: Wu, Jiaxin
> Sent: Wednesday, August 1, 2018 10:42 AM
> To: Fu, Siyuan ; edk2-devel@lists.01.org
> Cc: Ye, Ting ; Laszlo Ersek 
> Subject: RE: [Patch] NetworkPkg/HttpDxe: Stripped square brackets in IPv6
> expressed HostName.
> 
> Hi Siyuan,
> 
> Even we have one lib for us to get the IPv6 address, I still prefer to use
> the patch did, because the format returned from the HttpUrlGetIp6 is
> EFI_IPv6_ADDRESS, we have to transform it to CHAR8, which means we also
> need another lib included here to do that. Actually, the patch is quite
> simply even than API did. What do you think?
> 
> Thanks,
> Jiaxin
> 
> > -Original Message-
> > From: Fu, Siyuan
> > Sent: Wednesday, August 1, 2018 10:06 AM
> > To: Wu, Jiaxin ; edk2-devel@lists.01.org
> > Cc: Ye, Ting ; Laszlo Ersek 
> > Subject: RE: [Patch] NetworkPkg/HttpDxe: Stripped square brackets in
> IPv6
> > expressed HostName.
> >
> > Hi, Jiaxin
> >
> > The HttpLib already has HttpUrlGetIp6() for this.
> >
> > BestRegards
> > Fu Siyuan
> >
> > > -Original Message-
> > > From: Wu, Jiaxin
> > > Sent: Wednesday, August 1, 2018 9:55 AM
> > > To: edk2-devel@lists.01.org
> > > Cc: Ye, Ting ; Fu, Siyuan ;
> Laszlo
> > > Ersek ; Wu, Jiaxin 
> > > Subject: [Patch] NetworkPkg/HttpDxe: Stripped square brackets in IPv6
> > > expressed HostName.
> > >
> > > In URI, the colon (:) is used to terminate the HostName path before
> > > a port number. However, if HostName is expressed as IPv6 format, colon
> > > characters in IPv6 addresses will conflict with the colon before port
> > > number. To alleviate this conflict in URI, the IPv6 expressed HostName
> > > are enclosed in square brackets ([]). To record the real IPv6 HostName,
> > > square brackets should be stripped.
> > >
> > > Cc: Ye Ting 
> > > Cc: Fu Siyuan 
> > > Cc: Laszlo Ersek 
> > > Contributed-under: TianoCore Contribution Agreement 1.0
> > > Signed-off-by: Wu Jiaxin 
> > > ---
> > >  NetworkPkg/HttpDxe/HttpImpl.c | 17 ++---
> > >  1 file changed, 14 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/NetworkPkg/HttpDxe/HttpImpl.c
> > b/NetworkPkg/HttpDxe/HttpImpl.c
> > > index 17deceb395..e05ee9344b 100644
> > > --- a/NetworkPkg/HttpDxe/HttpImpl.c
> > > +++ b/NetworkPkg/HttpDxe/HttpImpl.c
> > > @@ -403,14 +403,25 @@ EfiHttpRequest (
> > >  Status = HttpParseUrl (Url, (UINT32) AsciiStrLen (Url), FALSE,
> > > );
> > >  if (EFI_ERROR (Status)) {
> > >goto Error1;
> > >  }
> > >
> > > -HostName   = NULL;
> > > -Status = HttpUrlGetHostName (Url, UrlParser, );
> > > +Status = HttpUrlGetHostName (Url, UrlParser, );
> > >  if (EFI_ERROR (Status)) {
> > > - goto Error1;
> > > +  goto Error1;
> > > +}
> > > +
> > > +if (HttpInstance->LocalAddressIsIPv6 && AsciiStrSize (HostName) >
> 2
> > > &&
> > > +HostName[0] == '[' && *(HostName + (AsciiStrSize (HostName) -
> 2))
> > > == ']') {
> > > +  //
> > > +  // HostName format is expressed as IPv6, so, remove '[' and ']'.
> > > +  //
> > > +  HostNameSize = AsciiStrSize (HostName) - 2;
> > > +
> > > +  CopyMem (HostName, HostName + 1, HostNameSize - 1);
> > > +
> > > +  *(HostName + HostNameSize - 1) = '\0';
> > >  }
> > >
> > >  Status = HttpUrlGetPort (Url, UrlParser, );
> > >  if (EFI_ERROR (Status)) {
> > >if (HttpInstance->UseHttps) {
> > > --
> > > 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] [UDK2017] SecurityPkg OpalPasswordSupportLib: Add check to avoid potential buffer overflow.

2018-07-31 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com

> -Original Message-
> From: Dong, Eric
> Sent: Wednesday, August 1, 2018 10:33 AM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A ; Yao, Jiewen 
> Subject: RE: [edk2] [Patch] [UDK2017] SecurityPkg OpalPasswordSupportLib:
> Add check to avoid potential buffer overflow.
> 
> Hi Hao & Jiewen,
> 
> This patch has been verified by the original reporter, also pass regression 
> test
> done by myself.
> 
> Thanks,
> Eric
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Eric
> > Dong
> > Sent: Tuesday, July 31, 2018 1:16 PM
> > To: edk2-devel@lists.01.org
> > Cc: Wu, Hao A ; Yao, Jiewen 
> > Subject: [edk2] [Patch] [UDK2017] SecurityPkg OpalPasswordSupportLib:
> Add
> > check to avoid potential buffer overflow.
> >
> > Current code not check the CommunicationBuffer size before use it. Attacker
> > can read beyond the end of the (untrusted) commbuffer into controlled
> > memory. Attacker can get access outside of valid SMM memory regions. This
> > patch add check before use it.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Eric Dong 
> > Cc: Yao Jiewen 
> > Cc: Wu Hao 
> > ---
> >  .../Include/Library/OpalPasswordSupportLib.h   |  3 +-
> >  .../OpalPasswordSupportLib.c   | 55
> +++---
> >  .../OpalPasswordSupportNotify.h|  2 +-
> >  .../Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.h |  6 +--
> >  4 files changed, 42 insertions(+), 24 deletions(-)
> >
> > diff --git a/SecurityPkg/Include/Library/OpalPasswordSupportLib.h
> > b/SecurityPkg/Include/Library/OpalPasswordSupportLib.h
> > index e616c763f0..ad45e9e3b7 100644
> > --- a/SecurityPkg/Include/Library/OpalPasswordSupportLib.h
> > +++ b/SecurityPkg/Include/Library/OpalPasswordSupportLib.h
> > @@ -19,6 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> > KIND, EITHER EXPRESS OR IMPLIED.
> >  #include 
> >  #include 
> >
> > +#define OPAL_PASSWORD_MAX_LENGTH 32
> >
> >  #pragma pack(1)
> >
> > @@ -76,7 +77,7 @@ typedef struct {
> >  typedef struct {
> >LIST_ENTRY Link;
> >
> > -  UINT8  Password[32];
> > +  UINT8
> Password[OPAL_PASSWORD_MAX_LENGTH];
> >UINT8  PasswordLength;
> >
> >EFI_DEVICE_PATH_PROTOCOL   OpalDevicePath;
> > diff --git
> > a/SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportLib.c
> > b/SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportLib.c
> > index 837582359e..e377e9ca79 100644
> > ---
> a/SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportLib.c
> > +++
> b/SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportLib.
> > +++ c
> > @@ -14,8 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> > KIND, EITHER EXPRESS OR IMPLIED.
> >
> >  #include "OpalPasswordSupportNotify.h"
> >
> > -#define OPAL_PASSWORD_MAX_LENGTH 32
> > -
> >  LIST_ENTRY   mDeviceList = INITIALIZE_LIST_HEAD_VARIABLE
> > (mDeviceList);
> >  BOOLEAN  gInSmm = FALSE;
> >  EFI_GUID gOpalPasswordNotifyProtocolGuid =
> > OPAL_PASSWORD_NOTIFY_PROTOCOL_GUID;
> > @@ -663,34 +661,53 @@ SmmOpalPasswordHandler (
> >EFI_STATUSStatus;
> >OPAL_SMM_COMMUNICATE_HEADER   *SmmFunctionHeader;
> >UINTN TempCommBufferSize;
> > -  UINT8 *NewPassword;
> > -  UINT8 PasswordLength;
> > -  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;
> > +  UINTN RemainedDevicePathSize;
> > +  OPAL_COMM_DEVICE_LIST *DeviceBuffer;
> >
> >if (CommBuffer == NULL || CommBufferSize == NULL) {
> >  return EFI_SUCCESS;
> >}
> >
> > +  Status = EFI_SUCCESS;
> > +  DeviceBuffer = NULL;
> > +
> >TempCommBufferSize = *CommBufferSize;
> >if (TempCommBufferSize < OFFSET_OF
> > (OPAL_SMM_COMMUNICATE_HEADER, Data)) {
> >  return EFI_SUCCESS;
> >}
> > -
> > -  Status   = EFI_SUCCESS;
> > -  SmmFunctionHeader = (OPAL_SMM_COMMUNICATE_HEADER
> > *)CommBuffer;
> > -
> > -  DevicePath = &((OPAL_COMM_DEVICE_LIST*)(SmmFunctionHeader-
> > >Data))->OpalDevicePath;
> > -  PasswordLength = ((OPAL_COMM_DEVICE_LIST*)(SmmFunctionHeader-
> > >Data))->PasswordLength;
> > -  NewPassword = ((OPAL_COMM_DEVICE_LIST*)(SmmFunctionHeader-
> > >Data))->Password;
> > +  SmmFunctionHeader = (OPAL_SMM_COMMUNICATE_HEADER
> > *)CommBuffer;
> >
> >switch (SmmFunctionHeader->Function) {
> >  case SMM_FUNCTION_SET_OPAL_PASSWORD:
> > -if (OpalPasswordIsFullZero (NewPassword) || PasswordLength == 0)
> {
> > -  Status = EFI_INVALID_PARAMETER;
> > -  goto EXIT;
> > -}
> > +  if (TempCommBufferSize <= OFFSET_OF
> > (OPAL_SMM_COMMUNICATE_HEADER, Data) + OFFSET_OF
> > (OPAL_COMM_DEVICE_LIST, OpalDevicePath)) {
> > +return EFI_SUCCESS;
> > +  }
> > +
> > +  

Re: [edk2] [Patch] NetworkPkg/HttpDxe: Stripped square brackets in IPv6 expressed HostName.

2018-07-31 Thread Wu, Jiaxin
Hi Siyuan,

Even we have one lib for us to get the IPv6 address, I still prefer to use the 
patch did, because the format returned from the HttpUrlGetIp6 is 
EFI_IPv6_ADDRESS, we have to transform it to CHAR8, which means we also need 
another lib included here to do that. Actually, the patch is quite simply even 
than API did. What do you think?

Thanks,
Jiaxin

> -Original Message-
> From: Fu, Siyuan
> Sent: Wednesday, August 1, 2018 10:06 AM
> To: Wu, Jiaxin ; edk2-devel@lists.01.org
> Cc: Ye, Ting ; Laszlo Ersek 
> Subject: RE: [Patch] NetworkPkg/HttpDxe: Stripped square brackets in IPv6
> expressed HostName.
> 
> Hi, Jiaxin
> 
> The HttpLib already has HttpUrlGetIp6() for this.
> 
> BestRegards
> Fu Siyuan
> 
> > -Original Message-
> > From: Wu, Jiaxin
> > Sent: Wednesday, August 1, 2018 9:55 AM
> > To: edk2-devel@lists.01.org
> > Cc: Ye, Ting ; Fu, Siyuan ; Laszlo
> > Ersek ; Wu, Jiaxin 
> > Subject: [Patch] NetworkPkg/HttpDxe: Stripped square brackets in IPv6
> > expressed HostName.
> >
> > In URI, the colon (:) is used to terminate the HostName path before
> > a port number. However, if HostName is expressed as IPv6 format, colon
> > characters in IPv6 addresses will conflict with the colon before port
> > number. To alleviate this conflict in URI, the IPv6 expressed HostName
> > are enclosed in square brackets ([]). To record the real IPv6 HostName,
> > square brackets should be stripped.
> >
> > Cc: Ye Ting 
> > Cc: Fu Siyuan 
> > Cc: Laszlo Ersek 
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Wu Jiaxin 
> > ---
> >  NetworkPkg/HttpDxe/HttpImpl.c | 17 ++---
> >  1 file changed, 14 insertions(+), 3 deletions(-)
> >
> > diff --git a/NetworkPkg/HttpDxe/HttpImpl.c
> b/NetworkPkg/HttpDxe/HttpImpl.c
> > index 17deceb395..e05ee9344b 100644
> > --- a/NetworkPkg/HttpDxe/HttpImpl.c
> > +++ b/NetworkPkg/HttpDxe/HttpImpl.c
> > @@ -403,14 +403,25 @@ EfiHttpRequest (
> >  Status = HttpParseUrl (Url, (UINT32) AsciiStrLen (Url), FALSE,
> > );
> >  if (EFI_ERROR (Status)) {
> >goto Error1;
> >  }
> >
> > -HostName   = NULL;
> > -Status = HttpUrlGetHostName (Url, UrlParser, );
> > +Status = HttpUrlGetHostName (Url, UrlParser, );
> >  if (EFI_ERROR (Status)) {
> > - goto Error1;
> > +  goto Error1;
> > +}
> > +
> > +if (HttpInstance->LocalAddressIsIPv6 && AsciiStrSize (HostName) > 2
> > &&
> > +HostName[0] == '[' && *(HostName + (AsciiStrSize (HostName) - 2))
> > == ']') {
> > +  //
> > +  // HostName format is expressed as IPv6, so, remove '[' and ']'.
> > +  //
> > +  HostNameSize = AsciiStrSize (HostName) - 2;
> > +
> > +  CopyMem (HostName, HostName + 1, HostNameSize - 1);
> > +
> > +  *(HostName + HostNameSize - 1) = '\0';
> >  }
> >
> >  Status = HttpUrlGetPort (Url, UrlParser, );
> >  if (EFI_ERROR (Status)) {
> >if (HttpInstance->UseHttps) {
> > --
> > 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] [UDK2017] SecurityPkg OpalPasswordSupportLib: Add check to avoid potential buffer overflow.

2018-07-31 Thread Dong, Eric
Hi Hao & Jiewen,

This patch has been verified by the original reporter, also pass regression 
test done by myself.

Thanks,
Eric

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Eric
> Dong
> Sent: Tuesday, July 31, 2018 1:16 PM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A ; Yao, Jiewen 
> Subject: [edk2] [Patch] [UDK2017] SecurityPkg OpalPasswordSupportLib: Add
> check to avoid potential buffer overflow.
> 
> Current code not check the CommunicationBuffer size before use it. Attacker
> can read beyond the end of the (untrusted) commbuffer into controlled
> memory. Attacker can get access outside of valid SMM memory regions. This
> patch add check before use it.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Eric Dong 
> Cc: Yao Jiewen 
> Cc: Wu Hao 
> ---
>  .../Include/Library/OpalPasswordSupportLib.h   |  3 +-
>  .../OpalPasswordSupportLib.c   | 55 
> +++---
>  .../OpalPasswordSupportNotify.h|  2 +-
>  .../Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.h |  6 +--
>  4 files changed, 42 insertions(+), 24 deletions(-)
> 
> diff --git a/SecurityPkg/Include/Library/OpalPasswordSupportLib.h
> b/SecurityPkg/Include/Library/OpalPasswordSupportLib.h
> index e616c763f0..ad45e9e3b7 100644
> --- a/SecurityPkg/Include/Library/OpalPasswordSupportLib.h
> +++ b/SecurityPkg/Include/Library/OpalPasswordSupportLib.h
> @@ -19,6 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> KIND, EITHER EXPRESS OR IMPLIED.
>  #include 
>  #include 
> 
> +#define OPAL_PASSWORD_MAX_LENGTH 32
> 
>  #pragma pack(1)
> 
> @@ -76,7 +77,7 @@ typedef struct {
>  typedef struct {
>LIST_ENTRY Link;
> 
> -  UINT8  Password[32];
> +  UINT8  Password[OPAL_PASSWORD_MAX_LENGTH];
>UINT8  PasswordLength;
> 
>EFI_DEVICE_PATH_PROTOCOL   OpalDevicePath;
> diff --git
> a/SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportLib.c
> b/SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportLib.c
> index 837582359e..e377e9ca79 100644
> --- a/SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportLib.c
> +++ b/SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportLib.
> +++ c
> @@ -14,8 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> KIND, EITHER EXPRESS OR IMPLIED.
> 
>  #include "OpalPasswordSupportNotify.h"
> 
> -#define OPAL_PASSWORD_MAX_LENGTH 32
> -
>  LIST_ENTRY   mDeviceList = INITIALIZE_LIST_HEAD_VARIABLE
> (mDeviceList);
>  BOOLEAN  gInSmm = FALSE;
>  EFI_GUID gOpalPasswordNotifyProtocolGuid =
> OPAL_PASSWORD_NOTIFY_PROTOCOL_GUID;
> @@ -663,34 +661,53 @@ SmmOpalPasswordHandler (
>EFI_STATUSStatus;
>OPAL_SMM_COMMUNICATE_HEADER   *SmmFunctionHeader;
>UINTN TempCommBufferSize;
> -  UINT8 *NewPassword;
> -  UINT8 PasswordLength;
> -  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;
> +  UINTN RemainedDevicePathSize;
> +  OPAL_COMM_DEVICE_LIST *DeviceBuffer;
> 
>if (CommBuffer == NULL || CommBufferSize == NULL) {
>  return EFI_SUCCESS;
>}
> 
> +  Status = EFI_SUCCESS;
> +  DeviceBuffer = NULL;
> +
>TempCommBufferSize = *CommBufferSize;
>if (TempCommBufferSize < OFFSET_OF
> (OPAL_SMM_COMMUNICATE_HEADER, Data)) {
>  return EFI_SUCCESS;
>}
> -
> -  Status   = EFI_SUCCESS;
> -  SmmFunctionHeader = (OPAL_SMM_COMMUNICATE_HEADER
> *)CommBuffer;
> -
> -  DevicePath = &((OPAL_COMM_DEVICE_LIST*)(SmmFunctionHeader-
> >Data))->OpalDevicePath;
> -  PasswordLength = ((OPAL_COMM_DEVICE_LIST*)(SmmFunctionHeader-
> >Data))->PasswordLength;
> -  NewPassword = ((OPAL_COMM_DEVICE_LIST*)(SmmFunctionHeader-
> >Data))->Password;
> +  SmmFunctionHeader = (OPAL_SMM_COMMUNICATE_HEADER
> *)CommBuffer;
> 
>switch (SmmFunctionHeader->Function) {
>  case SMM_FUNCTION_SET_OPAL_PASSWORD:
> -if (OpalPasswordIsFullZero (NewPassword) || PasswordLength == 0) {
> -  Status = EFI_INVALID_PARAMETER;
> -  goto EXIT;
> -}
> +  if (TempCommBufferSize <= OFFSET_OF
> (OPAL_SMM_COMMUNICATE_HEADER, Data) + OFFSET_OF
> (OPAL_COMM_DEVICE_LIST, OpalDevicePath)) {
> +return EFI_SUCCESS;
> +  }
> +
> +  DeviceBuffer = AllocateCopyPool (TempCommBufferSize - OFFSET_OF
> (OPAL_SMM_COMMUNICATE_HEADER, Data), SmmFunctionHeader->Data);
> +  if (DeviceBuffer == NULL) {
> +Status = EFI_OUT_OF_RESOURCES;
> +goto EXIT;
> +  }
> 
> -Status = OpalSavePasswordToSmm (DevicePath, NewPassword,
> PasswordLength);
> +  //
> +  // Validate the DevicePath.
> +  //
> +  RemainedDevicePathSize = TempCommBufferSize - OFFSET_OF
> (OPAL_SMM_COMMUNICATE_HEADER, Data)
> +- 

Re: [edk2] [Patch] NetworkPkg/HttpDxe: Stripped square brackets in IPv6 expressed HostName.

2018-07-31 Thread Fu, Siyuan
Hi, Jiaxin

The HttpLib already has HttpUrlGetIp6() for this.

BestRegards
Fu Siyuan

> -Original Message-
> From: Wu, Jiaxin
> Sent: Wednesday, August 1, 2018 9:55 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan ; Laszlo
> Ersek ; Wu, Jiaxin 
> Subject: [Patch] NetworkPkg/HttpDxe: Stripped square brackets in IPv6
> expressed HostName.
> 
> In URI, the colon (:) is used to terminate the HostName path before
> a port number. However, if HostName is expressed as IPv6 format, colon
> characters in IPv6 addresses will conflict with the colon before port
> number. To alleviate this conflict in URI, the IPv6 expressed HostName
> are enclosed in square brackets ([]). To record the real IPv6 HostName,
> square brackets should be stripped.
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Cc: Laszlo Ersek 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Wu Jiaxin 
> ---
>  NetworkPkg/HttpDxe/HttpImpl.c | 17 ++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
> index 17deceb395..e05ee9344b 100644
> --- a/NetworkPkg/HttpDxe/HttpImpl.c
> +++ b/NetworkPkg/HttpDxe/HttpImpl.c
> @@ -403,14 +403,25 @@ EfiHttpRequest (
>  Status = HttpParseUrl (Url, (UINT32) AsciiStrLen (Url), FALSE,
> );
>  if (EFI_ERROR (Status)) {
>goto Error1;
>  }
> 
> -HostName   = NULL;
> -Status = HttpUrlGetHostName (Url, UrlParser, );
> +Status = HttpUrlGetHostName (Url, UrlParser, );
>  if (EFI_ERROR (Status)) {
> - goto Error1;
> +  goto Error1;
> +}
> +
> +if (HttpInstance->LocalAddressIsIPv6 && AsciiStrSize (HostName) > 2
> &&
> +HostName[0] == '[' && *(HostName + (AsciiStrSize (HostName) - 2))
> == ']') {
> +  //
> +  // HostName format is expressed as IPv6, so, remove '[' and ']'.
> +  //
> +  HostNameSize = AsciiStrSize (HostName) - 2;
> +
> +  CopyMem (HostName, HostName + 1, HostNameSize - 1);
> +
> +  *(HostName + HostNameSize - 1) = '\0';
>  }
> 
>  Status = HttpUrlGetPort (Url, UrlParser, );
>  if (EFI_ERROR (Status)) {
>if (HttpInstance->UseHttps) {
> --
> 2.17.1.windows.2

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


[edk2] [Patch] NetworkPkg/HttpDxe: Stripped square brackets in IPv6 expressed HostName.

2018-07-31 Thread Jiaxin Wu
In URI, the colon (:) is used to terminate the HostName path before
a port number. However, if HostName is expressed as IPv6 format, colon
characters in IPv6 addresses will conflict with the colon before port
number. To alleviate this conflict in URI, the IPv6 expressed HostName
are enclosed in square brackets ([]). To record the real IPv6 HostName,
square brackets should be stripped.

Cc: Ye Ting 
Cc: Fu Siyuan 
Cc: Laszlo Ersek 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin 
---
 NetworkPkg/HttpDxe/HttpImpl.c | 17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index 17deceb395..e05ee9344b 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -403,14 +403,25 @@ EfiHttpRequest (
 Status = HttpParseUrl (Url, (UINT32) AsciiStrLen (Url), FALSE, );
 if (EFI_ERROR (Status)) {
   goto Error1;
 }
 
-HostName   = NULL;
-Status = HttpUrlGetHostName (Url, UrlParser, );
+Status = HttpUrlGetHostName (Url, UrlParser, );
 if (EFI_ERROR (Status)) {
- goto Error1;
+  goto Error1;
+}
+
+if (HttpInstance->LocalAddressIsIPv6 && AsciiStrSize (HostName) > 2 &&
+HostName[0] == '[' && *(HostName + (AsciiStrSize (HostName) - 2)) == 
']') {
+  //
+  // HostName format is expressed as IPv6, so, remove '[' and ']'.
+  //
+  HostNameSize = AsciiStrSize (HostName) - 2;
+
+  CopyMem (HostName, HostName + 1, HostNameSize - 1);
+
+  *(HostName + HostNameSize - 1) = '\0';
 }
 
 Status = HttpUrlGetPort (Url, UrlParser, );
 if (EFI_ERROR (Status)) {
   if (HttpInstance->UseHttps) {
-- 
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] BaseTools: Use pickle to replace cPickle

2018-07-31 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: Tuesday, July 31, 2018 8:24 PM
To: edk2-devel@lists.01.org
Cc: Gao, Liming 
Subject: [edk2] [PATCH] BaseTools: Use pickle to replace cPickle

From: Yunhua Feng 

Use pickle to replace cPickle because of python3 removed cPickle

Cc: Liming Gao 
Cc: Yonghong Zhu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng 
---
 BaseTools/Source/Python/Common/Misc.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/Common/Misc.py 
b/BaseTools/Source/Python/Common/Misc.py
index fd948c727a..74a5f0bca5 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -19,11 +19,11 @@ import Common.LongFilePathOs as os  import sys  import 
string  import threading  import time  import re -import cPickle
+import pickle
 import array
 import shutil
 from struct import pack
 from UserDict import IterableUserDict
 from UserList import UserList
@@ -497,11 +497,11 @@ def SaveFileOnChange(File, Content, IsBinaryFile=True):
 #
 def DataDump(Data, File):
 Fd = None
 try:
 Fd = open(File, 'wb')
-cPickle.dump(Data, Fd, cPickle.HIGHEST_PROTOCOL)
+pickle.dump(Data, Fd, pickle.HIGHEST_PROTOCOL)
 except:
 EdkLogger.error("", FILE_OPEN_FAILURE, ExtraData=File, 
RaiseError=False)
 finally:
 if Fd is not None:
 Fd.close()
@@ -516,11 +516,11 @@ def DataDump(Data, File):
 def DataRestore(File):
 Data = None
 Fd = None
 try:
 Fd = open(File, 'rb')
-Data = cPickle.load(Fd)
+Data = pickle.load(Fd)
 except Exception as e:
 EdkLogger.verbose("Failed to load [%s]\n\t%s" % (File, str(e)))
 Data = None
 finally:
 if Fd is not None:
--
2.12.2.windows.2

___
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: remove unused import thread

2018-07-31 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: Tuesday, July 31, 2018 8:21 PM
To: edk2-devel@lists.01.org
Cc: Gao, Liming 
Subject: [edk2] [PATCH] BaseTools: remove unused import thread

From: Yunhua Feng 

remove unused import thread

Cc: Liming Gao 
Cc: Yonghong Zhu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng 
---
 BaseTools/Source/Python/Common/Misc.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/BaseTools/Source/Python/Common/Misc.py 
b/BaseTools/Source/Python/Common/Misc.py
index 79d1ff28f5..fd948c727a 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -16,11 +16,10 @@
 #
 from __future__ import absolute_import
 import Common.LongFilePathOs as os
 import sys
 import string
-import thread
 import threading
 import time
 import re
 import cPickle
 import array
-- 
2.12.2.windows.2

___
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 3/3] Platform/Microsoft: Add Lauterbach debug library

2018-07-31 Thread Ard Biesheuvel
On 31 July 2018 at 22:56, Leif Lindholm  wrote:
> On Tue, Jul 17, 2018 at 02:05:45AM +, Chris Co wrote:
>> This debug library provides support for importing symbols to
>> debug using Lauterbach.
>>
>> Derived from: ArmPkg\Library\DebugPeCoffExtraActionLib
>
> I'm not seeing any difference between this one and the original other
> than the addition of the Microsoft copyright statement and updating of
> the debug printouts to modern style.
>
> I would be happy to take this as a patch to the original, but I don't
> see what benefit this copy brings. What prevents you from using the
> original?
>

The 'data.load.elf' statement in
PeCoffLoaderRelocateImageExtraAction() is particular to Lauterbach
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms 3/3] Platform/Microsoft: Add Lauterbach debug library

2018-07-31 Thread Leif Lindholm
On Tue, Jul 17, 2018 at 02:05:45AM +, Chris Co wrote:
> This debug library provides support for importing symbols to
> debug using Lauterbach.
> 
> Derived from: ArmPkg\Library\DebugPeCoffExtraActionLib

I'm not seeing any difference between this one and the original other
than the addition of the Microsoft copyright statement and updating of
the debug printouts to modern style.

I would be happy to take this as a patch to the original, but I don't
see what benefit this copy brings. What prevents you from using the
original?

/
Leif

> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Christopher Co 
> ---
>  
> Platform/Microsoft/Library/LauterbachPeCoffExtraActionLib/LauterbachPeCoffExtraActionLib.c
>| 142 
>  
> Platform/Microsoft/Library/LauterbachPeCoffExtraActionLib/LauterbachPeCoffExtraActionLib.inf
>  |  41 ++
>  2 files changed, 183 insertions(+)
> 
> diff --git 
> a/Platform/Microsoft/Library/LauterbachPeCoffExtraActionLib/LauterbachPeCoffExtraActionLib.c
>  
> b/Platform/Microsoft/Library/LauterbachPeCoffExtraActionLib/LauterbachPeCoffExtraActionLib.c
> new file mode 100644
> index ..0adfacdbe5cf
> --- /dev/null
> +++ 
> b/Platform/Microsoft/Library/LauterbachPeCoffExtraActionLib/LauterbachPeCoffExtraActionLib.c
> @@ -0,0 +1,142 @@
> +/**@file
> +
> +Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
> +Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
> +Portions copyright (c) 2011 - 2012, ARM Ltd. All rights reserved.
> +Copyright (c) Microsoft Corporation. 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 
> +#include 
> +
> +
> +/**
> +  If the build is done on cygwin the paths are cygpaths.
> +  /cygdrive/c/tmp.txt vs c:\tmp.txt so we need to convert
> +  them to work with RVD commands
> +
> +  @param  Name  Path to convert if needed
> +
> +**/
> +CHAR8 *
> +DeCygwinPathIfNeeded (
> +  IN  CHAR8   *Name,
> +  IN  CHAR8   *Temp,
> +  IN  UINTN   Size
> +  )
> +{
> +  CHAR8   *Ptr;
> +  UINTN   Index;
> +  UINTN   Index2;
> +
> +  Ptr = AsciiStrStr (Name, "/cygdrive/");
> +  if (Ptr == NULL) {
> +return Name;
> +  }
> +
> +  for (Index = 9, Index2 = 0; (Index < (Size + 9)) && (Ptr[Index] != '\0'); 
> Index++, Index2++) {
> +Temp[Index2] = Ptr[Index];
> +if (Temp[Index2] == '/') {
> +  Temp[Index2] = '\\' ;
> +  }
> +
> +if (Index2 == 1) {
> +  Temp[Index2 - 1] = Ptr[Index];
> +  Temp[Index2] = ':';
> +}
> +  }
> +
> +  return Temp;
> +}
> +
> +
> +/**
> +  Performs additional actions after a PE/COFF image has been loaded and 
> relocated.
> +
> +  If ImageContext is NULL, then ASSERT().
> +
> +  @param  ImageContext  Pointer to the image context structure that 
> describes the
> +PE/COFF image that has already been loaded and 
> relocated.
> +
> +**/
> +VOID
> +EFIAPI
> +PeCoffLoaderRelocateImageExtraAction (
> +  IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext
> +  )
> +{
> +#if !defined(MDEPKG_NDEBUG)
> +  CHAR8 Temp[512];
> +#endif
> +
> +  if (ImageContext->PdbPointer) {
> +#ifdef __CC_ARM
> +#if (__ARMCC_VERSION < 50)
> +// Print out the command for the RVD debugger to load symbols for this 
> image
> +DEBUG ((DEBUG_LOAD | DEBUG_INFO, "load /a /ni /np %a &0x%p\n", 
> DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), 
> (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));
> +#else
> +// Print out the command for the DS-5 to load symbols for this image
> +DEBUG ((DEBUG_LOAD | DEBUG_INFO, "add-symbol-file %a 0x%p\n", 
> DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), 
> (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));
> +#endif
> +#elif __GNUC__
> +// This may not work correctly if you generate PE/COFF directlyas then 
> the Offset would not be required
> +DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Data.load.elf %a /reloc .text at 0x%p 
> /nocode /noclear\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, 
> sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + 
> ImageContext->SizeOfHeaders)));
> +#else
> +DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Loading driver at 0x%11p 
> EntryPoint=0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress, 
> FUNCTION_ENTRY_POINT (ImageContext->EntryPoint)));
> +#endif
> +  } else {
> +DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Loading driver 

Re: [edk2] [PATCH edk2-platforms 2/3] Platform/Microsoft: Add MsPkg

2018-07-31 Thread Leif Lindholm
On Tue, Jul 17, 2018 at 02:05:43AM +, Chris Co wrote:
> MsPkg is a collection of libraries and drivers that are specific
> to supporting Windows IoT Core but are not Platform/Silicon specific.

Minor comments inline.

> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Christopher Co 
> ---
>  Platform/Microsoft/MsPkg.dec | 42 
>  Platform/Microsoft/MsPkg.dsc | 32 +++
>  2 files changed, 74 insertions(+)
> 
> diff --git a/Platform/Microsoft/MsPkg.dec b/Platform/Microsoft/MsPkg.dec
> new file mode 100644
> index ..ff17a016943c
> --- /dev/null
> +++ b/Platform/Microsoft/MsPkg.dec
> @@ -0,0 +1,42 @@
> +#/** @file
> +#  A package that contains generic headers and components.
> +#
> +#  Copyright (c) Microsoft Corporation. All rights reserved.

Please add a year to the copyright statement.

> +#
> +#  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  = 0x00010005

0x0001001a is the current version, unless there's a specific reason
for holding back.

> +  PACKAGE_NAME   = MsPkg
> +  PACKAGE_GUID   = DC909FB7-F45E-4D7F-BF10-327BD9BFA21C
> +  PACKAGE_VERSION= 0.1
> +
> +[Includes.common]
> +  Include# Root include for the package
> +
> +[LibraryClasses.common]
> +
> +[Guids.common]
> +  gMsPkgTokenSpaceGuid = { 0x3ecb4bb9, 0xb80a, 0x4efd, { 0x92, 0xb8, 0x3a, 
> 0x16, 0xe0, 0xc8, 0x19, 0xb } }
> +
> +[PcdsFixedAtBuild.common]
> +  gMsPkgTokenSpaceGuid.PcdSecureBootEnable|FALSE|BOOLEAN|0x00
> +
> +  #
> +  # The DevicePath to a partition on a writeable media used for logging and 
> misc
> +  # storage purposes. SD card DevicePath example:
> +  # 
> gMsPkgTokenSpaceGuid.PcdStorageMediaPartitionDevicePath|L"VenHw(AAFB8DAA-7340-43AC-8D49-0CCE14812489,0300)/SD(0x0)/HD(1,MBR,0xAE420040,0x1000,0x2)"
> +  #
> +  gMsPkgTokenSpaceGuid.PcdStorageMediaPartitionDevicePath|L""|VOID*|0x03
> +
> +[Protocols.common]
> +  gEfiSdhcProtocolGuid = { 0x46055b0f, 0x992a, 0x4ad7, { 0x8f, 0x81, 0x14, 
> 0x81, 0x86, 0xff, 0xdf, 0x72 } }
> +  gEfiRpmbIoProtocolGuid = { 0xfbaee5b2, 0x8b0, 0x41b8, { 0xb0, 0xb0, 0x86, 
> 0xb7, 0x2e, 0xed, 0x1b, 0xb6 } }

Please sort by name alphabetically where no other more logical
ordering exists.

> diff --git a/Platform/Microsoft/MsPkg.dsc b/Platform/Microsoft/MsPkg.dsc
> new file mode 100644
> index ..b43902cbb04d
> --- /dev/null
> +++ b/Platform/Microsoft/MsPkg.dsc
> @@ -0,0 +1,32 @@
> +## @file
> +#  A package that contains generic headers and components.
> +#
> +#  Copyright (c) Microsoft Corporation. All rights reserved.

Year.

> +#
> +#   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.
> +#
> +#   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]
> +  PLATFORM_NAME  = MsPkg
> +  PLATFORM_GUID  = 2F78367E-9C74-4FBE-82E7-1D2DAAF18CC6
> +  PLATFORM_VERSION   = 0.01
> +  DSC_SPECIFICATION  = 0x00010005

0x0001001a

> +  OUTPUT_DIRECTORY   = Build/MsPkg
> +  SUPPORTED_ARCHITECTURES= ARM|AARCH64
> +  BUILD_TARGETS  = DEBUG|RELEASE

DEBUG|NOOPT|RELEASE ?

/
Leif

> +  SKUID_IDENTIFIER   = DEFAULT
> +
> +[PcdsFeatureFlag]
> +
> +[PcdsFixedAtBuild]
> +
> +[LibraryClasses]
> +
> +[Components]
> +  Platform/Microsoft/Drivers/SdMmcDxe/SdMmcDxe.inf
> -- 
> 2.16.2.gvfs.1.33.gf5370f1
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-platforms 1/3] Platform/Microsoft: Add SdMmc Dxe Driver

2018-07-31 Thread Leif Lindholm
Hi Chris,

On Tue, Jul 17, 2018 at 02:05:42AM +, Chris Co wrote:
> This SdMmc driver adds support to boot Windows from SD and eMMC.
> It implements RPMB protocol support for eMMC, unique device path
> creation for each slot on the SD bus, high speed modes,
> eMMC bus width auto-detection, and support for high capacity
> SDXC cards.
> 
> Derived from: EmbeddedPkg\Universal\MmcDxe

Hmm, I'm already slightly unhappy that we have duplication between
EmbeddedPkg and MdeModulePkg (not to mention the extra fork for
Marvell's XenonDxe).

I'm obviously keen for the added functionality to be available to more
platforms. Is there any way for this support to be added into either
the EmbeddedPkg or the MdeModulePkg driver?

(Deferring comments on specific content.)

/
Leif

> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Christopher Co 
> ---
>  Platform/Microsoft/Drivers/SdMmcDxe/BlockIo.c|  526 ++
>  Platform/Microsoft/Drivers/SdMmcDxe/Debug.c  |  358 
>  Platform/Microsoft/Drivers/SdMmcDxe/Protocol.c   | 1774 
>  Platform/Microsoft/Drivers/SdMmcDxe/Protocol.h   |  231 +++
>  Platform/Microsoft/Drivers/SdMmcDxe/RpmbIo.c |  611 +++
>  Platform/Microsoft/Drivers/SdMmcDxe/SdMmc.c  |  892 ++
>  Platform/Microsoft/Drivers/SdMmcDxe/SdMmc.h  |  529 ++
>  Platform/Microsoft/Drivers/SdMmcDxe/SdMmcDxe.inf |   50 +
>  Platform/Microsoft/Drivers/SdMmcDxe/SdMmcHw.h|  506 ++
>  Platform/Microsoft/Include/Protocol/RpmbIo.h |  262 +++
>  Platform/Microsoft/Include/Protocol/Sdhc.h   |  197 +++
>  11 files changed, 5936 insertions(+)
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [Patch] BaseTools/BinToPcd: Fix Python 2.7.x compatibility issue

2018-07-31 Thread Kinney, Michael D
https://bugzilla.tianocore.org/show_bug.cgi?id=1042

Convert Buffer to type bytearray before converting to a
string of hex byte values so the type of items in Buffer is
consistent for both Python 2.7.x and Python 3.x.

Cc: YanYan Sun 
Cc: Yonghong Zhu 
Cc: Liming Gao 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney 
---
 BaseTools/Scripts/BinToPcd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Scripts/BinToPcd.py b/BaseTools/Scripts/BinToPcd.py
index c42e37bd11..25b74f6004 100644
--- a/BaseTools/Scripts/BinToPcd.py
+++ b/BaseTools/Scripts/BinToPcd.py
@@ -66,7 +66,7 @@ if __name__ == '__main__':
 #
 # If Xdr flag is not set, then concatenate all the data
 #
-Buffer = b''.join (Buffer)
+Buffer = bytearray (b''.join (Buffer))
 #
 # Return a PCD value of the form '{0x01, 0x02, ...}' along with the 
PCD length in bytes
 #
-- 
2.14.2.windows.3

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


Re: [edk2] :Build error

2018-07-31 Thread Jose Trujillo
Here is the file attached Liming...


‐‐‐ Original Message ‐‐‐
On July 31, 2018 3:52 PM, Gao, Liming  wrote:

> Could you attach 
> /home/bios_dev//4.8.1/edk2/Build/CorebootPayloadPkgX64/RELEASE_CBSDK/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib/DEBUG/AutoGen.h?
>
> I don't understand why report error in AutoGen.h.
>
> Thanks
> Liming
>
> > -Original Message-
> > From: Jose Trujillo [mailto:ce.au...@protonmail.com]
> > Sent: Tuesday, July 31, 2018 4:52 PM
> > To: Gao, Liming liming@intel.com
> > Subject: RE: [edk2] :Build error
> > CBSDK
> > Coreboot Toolkit.
> > The definition is added to Conf/tools_def.txt
> > "# CBSDK is spun off from the GCC5 template"
> > Thank you
> > Jose Trujillo
> > ‐‐‐ Original Message ‐‐‐
> > On July 31, 2018 9:27 AM, Gao, Liming liming@intel.com wrote:
> >
> > > Which tool chain is used? What is CBSDK?
> > >
> > > > -Original Message-
> > > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > > > Jose Trujillo
> > >
> > > > Sent: Monday, July 30, 2018 9:26 PM
> > > > To: edk2-devel@lists.01.org
> > > > Subject: [edk2] :Build error
> > > > Dear Tianocore developers:
> > > > I am getting the following error during the making of the latest EDK2.
> > > > vUDK2017 also fail with the same errors reported.
> > > > I tried to find on the internet the fix but I couldn't so far.
> > > > I will appreciate any advice on the issue.
> > > > --beginning of the error 
> > > > dump--
> >
> > > > In file included from
> >
> > /home/bios_dev//4.8.1/edk2/Build/CorebootPayloadPkgX64/RELEASE_
> > CBSDK/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/
> >
> > > > DxeCpuExceptionHandlerLib/DEBUG/AutoGen.h:18:0,
> > > > from :0:
> >
> > /home/bios_dev//4.8.1/edk2/MdePkg/Include/Library/PcdLib.h:103:45:
> > error: ‘_PCD_VALUE_PcdCpuKnownGoodStackSize’
> >
> > > > undeclared here (not in a function); did you mean
> > > > ‘_PCD_SIZE_PcdCpuKnownGoodStackSize’?
> > >
> > > > #define FixedPcdGet32(TokenName) PCD_VALUE##TokenName
> > > > ^
> >
> > /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandler
> > Lib/CpuExceptionCommon.h:58:3: note: in expansion of
> >
> > > > macro ‘FixedPcdGet32’
> > > > FixedPcdGet32 (PcdCpuKnownGoodStackSize)
> > > > ^
> >
> > /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandler
> > Lib/DxeException.c:30:39: note: in expansion of macro
> >
> > > > ‘CPU_KNOWN_GOOD_STACK_SIZE’
> > > > CPU_KNOWN_GOOD_STACK_SIZE];
> > > > ^
> >
> > /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandler
> > Lib/DxeException.c: In function
> >
> > > > ‘InitializeCpuExceptionHandlersEx’:
> >
> > /home/bios_dev//4.8.1/edk2/MdePkg/Include/Library/PcdLib.h:148:54:
> > error: ‘_PCD_VALUE_PcdCpuStackSwitchExceptionList’
> >
> > > > undeclared (first use in this function); did you mean
> > > > ‘_PCD_SIZE_PcdCpuStackSwitchExceptionList’?
> > >
> > > > #define FixedPcdGetPtr(TokenName) ((VOID
> > > > *)PCD_VALUE##TokenName)
> > >
> > > > ^
> >
> > /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandler
> > Lib/CpuExceptionCommon.h:55:3: note: in expansion of
> >
> > > > macro ‘FixedPcdGetPtr’
> > > > FixedPcdGetPtr (PcdCpuStackSwitchExceptionList)
> > > > ^~
> >
> > /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandler
> > Lib/DxeException.c:275:45: note: in expansion of macro
> >
> > > > ‘CPU_STACK_SWITCH_EXCEPTION_LIST’
> > > > EssData.X64.StackSwitchExceptions =
> > > > CPU_STACK_SWITCH_EXCEPTION_LIST;
> > >
> > > > ^~~
> >
> > /home/bios_dev//4.8.1/edk2/MdePkg/Include/Library/PcdLib.h:148:54:
> > note: each undeclared identifier is reported only once for
> >
> > > > each function it appears in
> > > > #define FixedPcdGetPtr(TokenName) ((VOID
> > > > *)PCD_VALUE##TokenName)
> > >
> > > > ^
> >
> > /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandler
> > Lib/CpuExceptionCommon.h:55:3: note: in expansion of
> >
> > > > macro ‘FixedPcdGetPtr’
> > > > FixedPcdGetPtr (PcdCpuStackSwitchExceptionList)
> > > > ^~
> >
> > /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandler
> > Lib/DxeException.c:275:45: note: in expansion of macro
> >
> > > > ‘CPU_STACK_SWITCH_EXCEPTION_LIST’
> > > > EssData.X64.StackSwitchExceptions =
> > > > CPU_STACK_SWITCH_EXCEPTION_LIST;
> > >
> > > > ^~~
> > > > make: *** [GNUmakefile:410:
> >
> > /home/bios_dev//4.8.1/edk2/Build/CorebootPayloadPkgX64/RELEASE_
> > CBSDK/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/
> >
> > > > DxeCpuExceptionHandlerLib/OUTPUT/DxeException.obj] Error 1
> > > > build.py...
> > > > : error 7000: Failed to execute command
> > > > make tbuild
> >
> > [/home/bios_dev//4.8.1/edk2/Build/CorebootPayloadPkgX64/RELEASE_
> > CBSDK/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib
> >
> 

[edk2] [PATCH] BaseTools: Use pickle to replace cPickle

2018-07-31 Thread Yonghong Zhu
From: Yunhua Feng 

Use pickle to replace cPickle because of python3 removed cPickle

Cc: Liming Gao 
Cc: Yonghong Zhu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng 
---
 BaseTools/Source/Python/Common/Misc.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/Common/Misc.py 
b/BaseTools/Source/Python/Common/Misc.py
index fd948c727a..74a5f0bca5 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -19,11 +19,11 @@ import Common.LongFilePathOs as os
 import sys
 import string
 import threading
 import time
 import re
-import cPickle
+import pickle
 import array
 import shutil
 from struct import pack
 from UserDict import IterableUserDict
 from UserList import UserList
@@ -497,11 +497,11 @@ def SaveFileOnChange(File, Content, IsBinaryFile=True):
 #
 def DataDump(Data, File):
 Fd = None
 try:
 Fd = open(File, 'wb')
-cPickle.dump(Data, Fd, cPickle.HIGHEST_PROTOCOL)
+pickle.dump(Data, Fd, pickle.HIGHEST_PROTOCOL)
 except:
 EdkLogger.error("", FILE_OPEN_FAILURE, ExtraData=File, 
RaiseError=False)
 finally:
 if Fd is not None:
 Fd.close()
@@ -516,11 +516,11 @@ def DataDump(Data, File):
 def DataRestore(File):
 Data = None
 Fd = None
 try:
 Fd = open(File, 'rb')
-Data = cPickle.load(Fd)
+Data = pickle.load(Fd)
 except Exception as e:
 EdkLogger.verbose("Failed to load [%s]\n\t%s" % (File, str(e)))
 Data = None
 finally:
 if Fd is not None:
-- 
2.12.2.windows.2

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


[edk2] [PATCH] BaseTools: remove unused import thread

2018-07-31 Thread Yonghong Zhu
From: Yunhua Feng 

remove unused import thread

Cc: Liming Gao 
Cc: Yonghong Zhu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng 
---
 BaseTools/Source/Python/Common/Misc.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/BaseTools/Source/Python/Common/Misc.py 
b/BaseTools/Source/Python/Common/Misc.py
index 79d1ff28f5..fd948c727a 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -16,11 +16,10 @@
 #
 from __future__ import absolute_import
 import Common.LongFilePathOs as os
 import sys
 import string
-import thread
 import threading
 import time
 import re
 import cPickle
 import array
-- 
2.12.2.windows.2

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


[edk2] [PATCH] BaseTools: Guid.xref doesn't specify the correct GUID value for Driver

2018-07-31 Thread Yonghong Zhu
From: Yunhua Feng 

In DSC, we can define the driver with the different FILE GUID. So,
this driver name and its FILE GUID should also be listed in Build
output Guid.xref. But now, Guid.xref still lists the driver
MODULE_GUID.

The case in Platform.dsc:
  MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf {

  FILE_GUID = 3A4A354F-6935-40fa-B19C-500EEEBF0BC2

  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
  }

Cc: Liming Gao 
Cc: Yonghong Zhu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng 
---
 BaseTools/Source/Python/GenFds/GenFds.py | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/GenFds/GenFds.py 
b/BaseTools/Source/Python/GenFds/GenFds.py
index a7c1e6c853..156aae1d0e 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -603,19 +603,28 @@ class GenFds :
 GuidXRefFileName = os.path.join(GenFdsGlobalVariable.FvDir, 
"Guid.xref")
 GuidXRefFile = BytesIO('')
 GuidDict = {}
 ModuleList = []
 FileGuidList = []
+GuidPattern = re.compile("\s*([0-9a-fA-F]){8}-"
+   "([0-9a-fA-F]){4}-"
+   "([0-9a-fA-F]){4}-"
+   "([0-9a-fA-F]){4}-"
+   "([0-9a-fA-F]){12}\s*")
 for Arch in ArchList:
 PlatformDataBase = 
BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, 
GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
 for ModuleFile in PlatformDataBase.Modules:
 Module = BuildDb.BuildObject[ModuleFile, Arch, 
GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
 if Module in ModuleList:
 continue
 else:
 ModuleList.append(Module)
-GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName))
+GuidMatch = GuidPattern.match(ModuleFile.BaseName)
+if GuidMatch is not None:
+GuidXRefFile.write("%s %s\n" % (ModuleFile.BaseName, 
Module.BaseName))
+else:
+GuidXRefFile.write("%s %s\n" % (Module.Guid, 
Module.BaseName))
 for key, item in Module.Protocols.items():
 GuidDict[key] = item
 for key, item in Module.Guids.items():
 GuidDict[key] = item
 for key, item in Module.Ppis.items():
-- 
2.12.2.windows.2

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


Re: [edk2] [PATCH] SignedCapsulePkg SystemFirmwareReportDxe: Try LocateProtocol

2018-07-31 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Star
> Zeng
> Sent: Tuesday, July 31, 2018 8:58 AM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D ; Yao, Jiewen
> ; Zeng, Star 
> Subject: [edk2] [PATCH] SignedCapsulePkg SystemFirmwareReportDxe: Try
> LocateProtocol
> 
> Try LocateProtocol after HandleProtocol fails to be compatible
> with old SystemFirmwareUpdateDxe.
> 
> Cc: Michael D Kinney 
> Cc: Jiewen Yao 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng 
> ---
>  .../SystemFirmwareUpdate/SystemFirmwareReportDxe.c | 29
> ++
>  1 file changed, 18 insertions(+), 11 deletions(-)
> 
> diff --git
> a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.c
> b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.c
> index fb7b63be9d13..8802404c9a6b 100644
> ---
> a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.c
> +++
> b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.c
> @@ -202,17 +202,24 @@ FmpSetImage (
>(VOID **)
>);
>if (EFI_ERROR(Status)) {
> -DEBUG((DEBUG_INFO, "(Agent)SetImage - SystemFmpProtocol - %r\n",
> Status));
> -SystemFmpPrivate->LastAttempt.LastAttemptStatus =
> LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;
> -VarStatus = gRT->SetVariable(
> -   SYSTEM_FMP_LAST_ATTEMPT_VARIABLE_NAME,
> -   ,
> -   EFI_VARIABLE_NON_VOLATILE |
> EFI_VARIABLE_BOOTSERVICE_ACCESS,
> -   sizeof(SystemFmpPrivate->LastAttempt),
> -   >LastAttempt
> -   );
> -DEBUG((DEBUG_INFO, "(Agent)SetLastAttemp - %r\n", VarStatus));
> -return Status;
> +Status = gBS->LocateProtocol (
> +,
> +NULL,
> +(VOID **)
> +);
> +if (EFI_ERROR(Status)) {
> +  DEBUG((DEBUG_INFO, "(Agent)SetImage - SystemFmpProtocol - %r\n",
> Status));
> +  SystemFmpPrivate->LastAttempt.LastAttemptStatus =
> LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;
> +  VarStatus = gRT->SetVariable(
> +
> SYSTEM_FMP_LAST_ATTEMPT_VARIABLE_NAME,
> + ,
> + EFI_VARIABLE_NON_VOLATILE |
> EFI_VARIABLE_BOOTSERVICE_ACCESS,
> + sizeof(SystemFmpPrivate->LastAttempt),
> + >LastAttempt
> + );
> +  DEBUG((DEBUG_INFO, "(Agent)SetLastAttemp - %r\n", VarStatus));
> +  return Status;
> +}
>}
> 
>return SystemFmp->SetImage(SystemFmp, ImageIndex, Image, ImageSize,
> VendorCode, Progress, AbortReason);
> --
> 2.7.0.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] :Build error

2018-07-31 Thread Gao, Liming
Which tool chain is used? What is CBSDK?

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jose 
> Trujillo
> Sent: Monday, July 30, 2018 9:26 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] :Build error
> 
> Dear Tianocore developers:
> 
> I am getting the following error during the making of the latest EDK2.
> vUDK2017 also fail with the same errors reported.
> I tried to find on the internet the fix but I couldn't so far.
> I will appreciate any advice on the issue.
> 
> --beginning of the error 
> dump---
> In file included from
> /home/bios_dev//4.8.1/edk2/Build/CorebootPayloadPkgX64/RELEASE_CBSDK/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/
> DxeCpuExceptionHandlerLib/DEBUG/AutoGen.h:18:0,
>  from :0:
> /home/bios_dev//4.8.1/edk2/MdePkg/Include/Library/PcdLib.h:103:45: error: 
> ‘_PCD_VALUE_PcdCpuKnownGoodStackSize’
> undeclared here (not in a function); did you mean 
> ‘_PCD_SIZE_PcdCpuKnownGoodStackSize’?
> #define FixedPcdGet32(TokenName)_PCD_VALUE_##TokenName
>  ^
> /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h:58:3:
>  note: in expansion of
> macro ‘FixedPcdGet32’
>FixedPcdGet32 (PcdCpuKnownGoodStackSize)
>^
> /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c:30:39:
>  note: in expansion of macro
> ‘CPU_KNOWN_GOOD_STACK_SIZE’
>CPU_KNOWN_GOOD_STACK_SIZE];
>^
> /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c:
>  In function
> ‘InitializeCpuExceptionHandlersEx’:
> /home/bios_dev//4.8.1/edk2/MdePkg/Include/Library/PcdLib.h:148:54: error: 
> ‘_PCD_VALUE_PcdCpuStackSwitchExceptionList’
> undeclared (first use in this function); did you mean 
> ‘_PCD_SIZE_PcdCpuStackSwitchExceptionList’?
> #define FixedPcdGetPtr(TokenName)   ((VOID *)_PCD_VALUE_##TokenName)
>   ^
> /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h:55:3:
>  note: in expansion of
> macro ‘FixedPcdGetPtr’
>FixedPcdGetPtr (PcdCpuStackSwitchExceptionList)
>^~
> /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c:275:45:
>  note: in expansion of macro
> ‘CPU_STACK_SWITCH_EXCEPTION_LIST’
>  EssData.X64.StackSwitchExceptions = CPU_STACK_SWITCH_EXCEPTION_LIST;
>  ^~~
> /home/bios_dev//4.8.1/edk2/MdePkg/Include/Library/PcdLib.h:148:54: note: 
> each undeclared identifier is reported only once for
> each function it appears in
> #define FixedPcdGetPtr(TokenName)   ((VOID *)_PCD_VALUE_##TokenName)
>   ^
> /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h:55:3:
>  note: in expansion of
> macro ‘FixedPcdGetPtr’
>FixedPcdGetPtr (PcdCpuStackSwitchExceptionList)
>^~
> /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c:275:45:
>  note: in expansion of macro
> ‘CPU_STACK_SWITCH_EXCEPTION_LIST’
>  EssData.X64.StackSwitchExceptions = CPU_STACK_SWITCH_EXCEPTION_LIST;
>  ^~~
> make: *** [GNUmakefile:410:
> /home/bios_dev//4.8.1/edk2/Build/CorebootPayloadPkgX64/RELEASE_CBSDK/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/
> DxeCpuExceptionHandlerLib/OUTPUT/DxeException.obj] Error 1
> 
> build.py...
> : error 7000: Failed to execute command
> make tbuild
> [/home/bios_dev//4.8.1/edk2/Build/CorebootPayloadPkgX64/RELEASE_CBSDK/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib
> /DxeCpuExceptionHandlerLib]
> 
> build.py...
> : error F002: Failed to build module
> /home/bios_dev//4.8.1/edk2/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
>  [X64, CBSDK,
> RELEASE]
> -End
> Thank you in advance,
> Jose Trujillo.
> ___
> 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