Re: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.

2019-07-10 Thread Liming Gao
Thanks for your CC.

The change is OK. Reviewed-by: Liming Gao 

>-Original Message-
>From: Dong, Eric
>Sent: Thursday, July 11, 2019 2:40 PM
>To: devel@edk2.groups.io; Dong, Eric ; Gao, Liming
>; Kinney, Michael D 
>Cc: Ni, Ray ; Laszlo Ersek 
>Subject: RE: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol
>definition.
>
>Hi Liming,  Mike,
>
>Can you help to review this patch?
>
>Thanks,
>Eric
>
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>> Dong, Eric
>> Sent: Wednesday, July 10, 2019 3:56 PM
>> To: devel@edk2.groups.io
>> Cc: Ni, Ray ; Laszlo Ersek 
>> Subject: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol
>> definition.
>>
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1937
>>
>> EFI MM MP Protocol is defined in the PI 1.5 specification.
>>
>> The MM MP protocol provides a set of functions to allow execution of
>> procedures on processors that have entered MM. This protocol has the
>> following properties:
>> 1. The caller can invoke execution of a procedure on a processor, other than
>> the caller, that has also entered MM. Supports blocking and non-blocking
>> modes of operation.
>> 2. The caller can invoke a procedure on multiple processors. Supports
>> blocking and non-blocking modes of operation.
>>
>> Cc: Ray Ni 
>> Cc: Laszlo Ersek 
>> Signed-off-by: Eric Dong 
>> Reviewed-by: Ray Ni 
>> ---
>>  MdePkg/Include/Pi/PiMultiPhase.h |  16 ++
>>  MdePkg/Include/Protocol/MmMp.h   | 333
>> +++
>>  MdePkg/MdePkg.dec|   3 +
>>  3 files changed, 352 insertions(+)
>>  create mode 100644 MdePkg/Include/Protocol/MmMp.h
>>
>> diff --git a/MdePkg/Include/Pi/PiMultiPhase.h
>> b/MdePkg/Include/Pi/PiMultiPhase.h
>> index eb12527767..a5056799e1 100644
>> --- a/MdePkg/Include/Pi/PiMultiPhase.h
>> +++ b/MdePkg/Include/Pi/PiMultiPhase.h
>> @@ -176,4 +176,20 @@ VOID
>>IN OUT VOID  *Buffer
>>);
>>
>> +/**
>> +  The function prototype for invoking a function on an Application
>Processor.
>> +
>> +  This definition is used by the UEFI MM MP Serices Protocol.
>> +
>> +  @param[in] ProcedureArgumentThe pointer to private data buffer.
>> +
>> +  @retval EFI_SUCCESS Excutive the procedure successfully
>> +
>> +**/
>> +typedef
>> +EFI_STATUS
>> +(EFIAPI *EFI_AP_PROCEDURE2)(
>> +  IN VOID  *ProcedureArgument
>> +);
>> +
>>  #endif
>> diff --git a/MdePkg/Include/Protocol/MmMp.h
>> b/MdePkg/Include/Protocol/MmMp.h new file mode 100644 index
>> 00..beace1386c
>> --- /dev/null
>> +++ b/MdePkg/Include/Protocol/MmMp.h
>> @@ -0,0 +1,333 @@
>> +/** @file
>> +  EFI MM MP Protocol is defined in the PI 1.5 specification.
>> +
>> +  The MM MP protocol provides a set of functions to allow execution of
>> + procedures on processors that  have entered MM. This protocol has the
>> following properties:
>> +  1. The caller can only invoke execution of a procedure on a processor,
>> other than the caller, that
>> + has also entered MM.
>> +  2. It is possible to invoke a procedure on multiple processors. Supports
>> blocking and non-blocking
>> + modes of operation.
>> +
>> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
>> +  SPDX-License-Identifier: BSD-2-Clause-Patent
>> +
>> +**/
>> +
>> +#ifndef _MM_MP_H_
>> +#define _MM_MP_H_
>> +
>> +#include 
>> +
>> +#define EFI_MM_MP_PROTOCOL_GUID \
>> +  { \
>> +0x5d5450d7, 0x990c, 0x4180, {0xa8, 0x3, 0x8e, 0x63, 0xf0, 0x60,
>> +0x83, 0x7  }  \
>> +  }
>> +
>> +//
>> +// Revision definition.
>> +//
>> +#define EFI_MM_MP_PROTOCOL_REVISION0x00
>> +
>> +//
>> +// Attribute flags
>> +//
>> +#define EFI_MM_MP_TIMEOUT_SUPPORTED0x01
>> +
>> +//
>> +// Completion token
>> +//
>> +typedef VOID* MM_COMPLETION;
>> +
>> +typedef struct {
>> +  MM_COMPLETION  Completion;
>> +  EFI_STATUS Status;
>> +} MM_DISPATCH_COMPLETION_TOKEN;
>> +
>> +typedef struct _EFI_MM_MP_PROTOCOL  EFI_MM_MP_PROTOCOL;
>> +
>> +/**
>> +  Service to retrieves the number of logical processor in the platform.
>> +
>> +  @param[in]  ThisThe EFI_MM_MP_PROTOCOL instance.
>> +  @param[out] NumberOfProcessors  Pointer to the total number of logical
>> processors in the system,
>> +  including the BSP and all APs.
>> +
>> +  @retval EFI_SUCCESS The number of processors was retrieved
>> successfully
>> +  @retval EFI_INVALID_PARAMETER   NumberOfProcessors is NULL
>> +**/
>> +typedef
>> +EFI_STATUS
>> +(EFIAPI *EFI_MM_GET_NUMBER_OF_PROCESSORS) (
>> +  IN CONST EFI_MM_MP_PROTOCOL  *This,
>> +  OUT  UINTN   *NumberOfProcessors
>> +);
>> +
>> +
>> +/**
>> +  This service allows the caller to invoke a procedure one of the
>> +application processors (AP). This
>> +  function uses an optional token parameter to support blocking and
>> +non-blocking modes. If the token
>> +  is passed into the call, the function will operate in a non-blocking
>> +fashion and the caller can

Re: [edk2-devel] [Patch 1/1] BaseTools: Fixed the issue when ToolDefinitionFile is not generated

2019-07-10 Thread Liming Gao
Reviewed-by: Liming Gao 

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Bob Feng
>Sent: Thursday, July 11, 2019 8:58 AM
>To: devel@edk2.groups.io
>Cc: Gao, Liming ; Feng, Bob C 
>Subject: [edk2-devel] [Patch 1/1] BaseTools: Fixed the issue when
>ToolDefinitionFile is not generated
>
>ToolDefinitionFile is generated by PlatformAutoGen.ToolDefinition()
>Code assume ToolDefinition is always called before using
>ToolDefinitionFile, but in some cases, it's not true.
>
>This patch is to fix this issue.
>
>Cc: Liming Gao 
>Signed-off-by: Bob Feng 
>---
> BaseTools/Source/Python/AutoGen/AutoGen.py | 9 ++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
>b/BaseTools/Source/Python/AutoGen/AutoGen.py
>index c0d0ca15867b..5cfaf2141af0 100644
>--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
>+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
>@@ -1910,22 +1910,25 @@ class PlatformAutoGen(AutoGen):
> if Attr == "FLAGS":
> MakeFlags = Value
> else:
> ToolsDef += "%s_%s = %s\n" % (Tool, Attr, Value)
> ToolsDef += "\n"
>-
>-SaveFileOnChange(self.ToolDefinitionFile, ToolsDef, False)
>+tool_def_file = os.path.join(self.MakeFileDir, "TOOLS_DEF." + 
>self.Arch)
>+SaveFileOnChange(tool_def_file, ToolsDef, False)
> for DllPath in DllPathList:
> os.environ["PATH"] = DllPath + os.pathsep + os.environ["PATH"]
> os.environ["MAKE_FLAGS"] = MakeFlags
>
> return RetVal
>
> ## Return the paths of tools
> @cached_property
> def ToolDefinitionFile(self):
>-return os.path.join(self.MakeFileDir, "TOOLS_DEF." + self.Arch)
>+tool_def_file = os.path.join(self.MakeFileDir, "TOOLS_DEF." + 
>self.Arch)
>+if not os.path.exists(tool_def_file):
>+self.ToolDefinition
>+return tool_def_file
>
> ## Retrieve the toolchain family of given toolchain tag. Default to 
> 'MSFT'.
> @cached_property
> def ToolChainFamily(self):
> ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDatabase
>--
>2.20.1.windows.1
>
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43582): https://edk2.groups.io/g/devel/message/43582
Mute This Topic: https://groups.io/mt/32422788/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [ PATCH v2 1/2] Readme.md: add submodule policy and clone commands

2019-07-10 Thread Wang, Jian J
Liming,

> -Original Message-
> From: Gao, Liming
> Sent: Wednesday, July 10, 2019 3:44 PM
> To: devel@edk2.groups.io; Wang, Jian J 
> Cc: Leif Lindholm ; Kinney, Michael D
> 
> Subject: RE: [edk2-devel] [ PATCH v2 1/2] Readme.md: add submodule
> policy and clone commands
> 
> Jian:
> 
> >-Original Message-
> >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> >Wang, Jian J
> >Sent: Wednesday, July 10, 2019 2:10 PM
> >To: devel@edk2.groups.io
> >Cc: Leif Lindholm ; Kinney, Michael D
> >; Gao, Liming 
> >Subject: [edk2-devel] [ PATCH v2 1/2] Readme.md: add submodule policy
> and
> >clone commands
> >
> >> v2: update wording per Leif's and others' comments
> >
> >REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1910
> >
> >A section 'Submodules' is added to clarify the submodule policy
> >in edk2 repo. Git commands are also added to show the correct
> >way to clone submodule repos, in which '--recursive' is removed
> >because it's not needed but recommended in other document.
> >
> >Related commits:
> >Openssl-1.1.1b upgrade: acfb90911840c38a0beb9bcfe0065668244d2b4d
> >berkeley-softfloat-3:   3cc57695df5a6e8c65fb46b993836c315cabf49d
> >
> >Cc: Leif Lindholm 
> >Cc: Michael D Kinney 
> >Cc: Liming Gao 
> >Signed-off-by: Jian J Wang 
> >---
> > Readme.md | 28 
> > 1 file changed, 28 insertions(+)
> >
> >diff --git a/Readme.md b/Readme.md
> >index e564c6c09b..c475468655 100644
> >--- a/Readme.md
> >+++ b/Readme.md
> >@@ -143,3 +143,31 @@ Signed-off-by: Contributor Name
> >
> >   the change.  Each line should be less than ~70 characters.
> > * `Signed-off-by` is the contributor's signature identifying them
> >   by their real/legal name and their email address.
> >+
> >+# Submodules
> >+
> >+As a general policy, submodule chain should be avoided in EDK II repo
> >+as possible as we can. Currently EDK II  contains two submodules
> Here, I understand to avoid the child submodule, and the root submodule is
> allowed.
> Besides, there is two spaces between EDK II  contains. Please take care.
> 

No exactly. I think it's dependency chain, i.e. one submodule depends on
another submodule. It's out of our control that one submodule imports
other submodules in its repo. What about changing the first statement to
following:

Submodule is allowed to import 3rd party code into EDK II repo. But
submodules that require further submodules should be avoided as possible
as we can.

And I'll remove the extra space here.

> >+
> >+- CryptoPkg/Library/OpensslLib/openssl
> >+- ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3
> >+
> >+The latter one is actually required by previous one. It's inevitable
> >+in openssl-1.1.1 (since stable201905) for floating point parameter
> >+conversion, but should be dropped once there's no such need in future
> >+release of openssl.
> >+
> >+To get a full, buildable EDK II repository, use following two steps
> >+of git command
> >+
> >+```
> >+$ git clone https://github.com/tianocore/edk2.git
> >+$ git submodule update --init
> >+```
> >+
> Please also give the update command for submodule.
> 

I'll add it.

> Thanks
> Liming
> >+Note: When cloning submodule repos, '--recursive' option is not
> >+recommended. EDK II itself will not use any code/feature from
> >+submodules in above submodules. So using '--recursive' adds a
> >+dependency on being able to reach servers we do not actually want
> >+any code from, as well as needlessly downloading code we will not
> >+use.
> >--
> >2.17.1.windows.2
> >
> >
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43581): https://edk2.groups.io/g/devel/message/43581
Mute This Topic: https://groups.io/mt/32413655/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] GCC compiler version

2019-07-10 Thread Gary Lin
On Thu, Jul 11, 2019 at 05:07:49AM +,  Liming Gao  wrote:
> Hi, all
>   Recently, I find some failure with the different GCC compiler version. I 
> want to collect which GCC version are used by you. Now, I use GCC 5.5 for the 
> verification. It may be a little old.
> 
Hi Liming,

I'm using openSUSE Tumbleweed which basically uses the latest stable
version of everything. The current gcc version is 9.1.1.

Thanks,

Gary Lin

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43580): https://edk2.groups.io/g/devel/message/43580
Mute This Topic: https://groups.io/mt/32427285/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.

2019-07-10 Thread Ni, Ray
+ MdePkg maintainers

We need to follow the open source community process to include MdePkg
maintainers for this change review.

Laszlo,
You are in the Cc list and had given Regression-Tested-By for V3 patch series.
It would be great if you could give patch owner a hint to avoid breaking the 
process
though I understand it's not responsibility of the people in the CC list. 😊

Thanks,
Ray


> -Original Message-
> From: Dong, Eric
> Sent: Wednesday, July 10, 2019 3:56 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Laszlo Ersek 
> Subject: [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1937
> 
> EFI MM MP Protocol is defined in the PI 1.5 specification.
> 
> The MM MP protocol provides a set of functions to allow execution of
> procedures on processors that have entered MM. This protocol has the
> following properties:
> 1. The caller can invoke execution of a procedure on a processor, other than
> the caller, that has also entered MM. Supports blocking and non-blocking
> modes of operation.
> 2. The caller can invoke a procedure on multiple processors. Supports
> blocking and non-blocking modes of operation.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Signed-off-by: Eric Dong 
> Reviewed-by: Ray Ni 
> ---
>  MdePkg/Include/Pi/PiMultiPhase.h |  16 ++
>  MdePkg/Include/Protocol/MmMp.h   | 333
> +++
>  MdePkg/MdePkg.dec|   3 +
>  3 files changed, 352 insertions(+)
>  create mode 100644 MdePkg/Include/Protocol/MmMp.h
> 
> diff --git a/MdePkg/Include/Pi/PiMultiPhase.h
> b/MdePkg/Include/Pi/PiMultiPhase.h
> index eb12527767..a5056799e1 100644
> --- a/MdePkg/Include/Pi/PiMultiPhase.h
> +++ b/MdePkg/Include/Pi/PiMultiPhase.h
> @@ -176,4 +176,20 @@ VOID
>IN OUT VOID  *Buffer
>);
> 
> +/**
> +  The function prototype for invoking a function on an Application Processor.
> +
> +  This definition is used by the UEFI MM MP Serices Protocol.
> +
> +  @param[in] ProcedureArgumentThe pointer to private data buffer.
> +
> +  @retval EFI_SUCCESS Excutive the procedure successfully
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EFI_AP_PROCEDURE2)(
> +  IN VOID  *ProcedureArgument
> +);
> +
>  #endif
> diff --git a/MdePkg/Include/Protocol/MmMp.h
> b/MdePkg/Include/Protocol/MmMp.h new file mode 100644 index
> 00..beace1386c
> --- /dev/null
> +++ b/MdePkg/Include/Protocol/MmMp.h
> @@ -0,0 +1,333 @@
> +/** @file
> +  EFI MM MP Protocol is defined in the PI 1.5 specification.
> +
> +  The MM MP protocol provides a set of functions to allow execution of
> + procedures on processors that  have entered MM. This protocol has the
> following properties:
> +  1. The caller can only invoke execution of a procedure on a processor,
> other than the caller, that
> + has also entered MM.
> +  2. It is possible to invoke a procedure on multiple processors. Supports
> blocking and non-blocking
> + modes of operation.
> +
> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _MM_MP_H_
> +#define _MM_MP_H_
> +
> +#include 
> +
> +#define EFI_MM_MP_PROTOCOL_GUID \
> +  { \
> +0x5d5450d7, 0x990c, 0x4180, {0xa8, 0x3, 0x8e, 0x63, 0xf0, 0x60,
> +0x83, 0x7  }  \
> +  }
> +
> +//
> +// Revision definition.
> +//
> +#define EFI_MM_MP_PROTOCOL_REVISION0x00
> +
> +//
> +// Attribute flags
> +//
> +#define EFI_MM_MP_TIMEOUT_SUPPORTED0x01
> +
> +//
> +// Completion token
> +//
> +typedef VOID* MM_COMPLETION;
> +
> +typedef struct {
> +  MM_COMPLETION  Completion;
> +  EFI_STATUS Status;
> +} MM_DISPATCH_COMPLETION_TOKEN;
> +
> +typedef struct _EFI_MM_MP_PROTOCOL  EFI_MM_MP_PROTOCOL;
> +
> +/**
> +  Service to retrieves the number of logical processor in the platform.
> +
> +  @param[in]  ThisThe EFI_MM_MP_PROTOCOL instance.
> +  @param[out] NumberOfProcessors  Pointer to the total number of logical
> processors in the system,
> +  including the BSP and all APs.
> +
> +  @retval EFI_SUCCESS The number of processors was retrieved
> successfully
> +  @retval EFI_INVALID_PARAMETER   NumberOfProcessors is NULL
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EFI_MM_GET_NUMBER_OF_PROCESSORS) (
> +  IN CONST EFI_MM_MP_PROTOCOL  *This,
> +  OUT  UINTN   *NumberOfProcessors
> +);
> +
> +
> +/**
> +  This service allows the caller to invoke a procedure one of the
> +application processors (AP). This
> +  function uses an optional token parameter to support blocking and
> +non-blocking modes. If the token
> +  is passed into the call, the function will operate in a non-blocking
> +fashion and the caller can
> +  check for completion with CheckOnProcedure or WaitForProcedure.
> +
> +  @param[in] This   The EFI_MM_MP_PROTOCOL instance.
> +  @param[in] Procedure  A pointer to the procedure to be run 
> on
> the des

Re: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.

2019-07-10 Thread Dong, Eric
Hi Liming,  Mike,

Can you help to review this patch? 

Thanks,
Eric

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Dong, Eric
> Sent: Wednesday, July 10, 2019 3:56 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Laszlo Ersek 
> Subject: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol
> definition.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1937
> 
> EFI MM MP Protocol is defined in the PI 1.5 specification.
> 
> The MM MP protocol provides a set of functions to allow execution of
> procedures on processors that have entered MM. This protocol has the
> following properties:
> 1. The caller can invoke execution of a procedure on a processor, other than
> the caller, that has also entered MM. Supports blocking and non-blocking
> modes of operation.
> 2. The caller can invoke a procedure on multiple processors. Supports
> blocking and non-blocking modes of operation.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Signed-off-by: Eric Dong 
> Reviewed-by: Ray Ni 
> ---
>  MdePkg/Include/Pi/PiMultiPhase.h |  16 ++
>  MdePkg/Include/Protocol/MmMp.h   | 333
> +++
>  MdePkg/MdePkg.dec|   3 +
>  3 files changed, 352 insertions(+)
>  create mode 100644 MdePkg/Include/Protocol/MmMp.h
> 
> diff --git a/MdePkg/Include/Pi/PiMultiPhase.h
> b/MdePkg/Include/Pi/PiMultiPhase.h
> index eb12527767..a5056799e1 100644
> --- a/MdePkg/Include/Pi/PiMultiPhase.h
> +++ b/MdePkg/Include/Pi/PiMultiPhase.h
> @@ -176,4 +176,20 @@ VOID
>IN OUT VOID  *Buffer
>);
> 
> +/**
> +  The function prototype for invoking a function on an Application Processor.
> +
> +  This definition is used by the UEFI MM MP Serices Protocol.
> +
> +  @param[in] ProcedureArgumentThe pointer to private data buffer.
> +
> +  @retval EFI_SUCCESS Excutive the procedure successfully
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EFI_AP_PROCEDURE2)(
> +  IN VOID  *ProcedureArgument
> +);
> +
>  #endif
> diff --git a/MdePkg/Include/Protocol/MmMp.h
> b/MdePkg/Include/Protocol/MmMp.h new file mode 100644 index
> 00..beace1386c
> --- /dev/null
> +++ b/MdePkg/Include/Protocol/MmMp.h
> @@ -0,0 +1,333 @@
> +/** @file
> +  EFI MM MP Protocol is defined in the PI 1.5 specification.
> +
> +  The MM MP protocol provides a set of functions to allow execution of
> + procedures on processors that  have entered MM. This protocol has the
> following properties:
> +  1. The caller can only invoke execution of a procedure on a processor,
> other than the caller, that
> + has also entered MM.
> +  2. It is possible to invoke a procedure on multiple processors. Supports
> blocking and non-blocking
> + modes of operation.
> +
> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _MM_MP_H_
> +#define _MM_MP_H_
> +
> +#include 
> +
> +#define EFI_MM_MP_PROTOCOL_GUID \
> +  { \
> +0x5d5450d7, 0x990c, 0x4180, {0xa8, 0x3, 0x8e, 0x63, 0xf0, 0x60,
> +0x83, 0x7  }  \
> +  }
> +
> +//
> +// Revision definition.
> +//
> +#define EFI_MM_MP_PROTOCOL_REVISION0x00
> +
> +//
> +// Attribute flags
> +//
> +#define EFI_MM_MP_TIMEOUT_SUPPORTED0x01
> +
> +//
> +// Completion token
> +//
> +typedef VOID* MM_COMPLETION;
> +
> +typedef struct {
> +  MM_COMPLETION  Completion;
> +  EFI_STATUS Status;
> +} MM_DISPATCH_COMPLETION_TOKEN;
> +
> +typedef struct _EFI_MM_MP_PROTOCOL  EFI_MM_MP_PROTOCOL;
> +
> +/**
> +  Service to retrieves the number of logical processor in the platform.
> +
> +  @param[in]  ThisThe EFI_MM_MP_PROTOCOL instance.
> +  @param[out] NumberOfProcessors  Pointer to the total number of logical
> processors in the system,
> +  including the BSP and all APs.
> +
> +  @retval EFI_SUCCESS The number of processors was retrieved
> successfully
> +  @retval EFI_INVALID_PARAMETER   NumberOfProcessors is NULL
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EFI_MM_GET_NUMBER_OF_PROCESSORS) (
> +  IN CONST EFI_MM_MP_PROTOCOL  *This,
> +  OUT  UINTN   *NumberOfProcessors
> +);
> +
> +
> +/**
> +  This service allows the caller to invoke a procedure one of the
> +application processors (AP). This
> +  function uses an optional token parameter to support blocking and
> +non-blocking modes. If the token
> +  is passed into the call, the function will operate in a non-blocking
> +fashion and the caller can
> +  check for completion with CheckOnProcedure or WaitForProcedure.
> +
> +  @param[in] This   The EFI_MM_MP_PROTOCOL instance.
> +  @param[in] Procedure  A pointer to the procedure to be run 
> on
> the designated target
> +AP of the system. Type 
> EFI_AP_PROCEDURE2 is defined
> below in
> +related definitions.
> +  @param[in] CpuNumber  The zero-ba

Re: [edk2-devel] [edk2-platforms Patch 10/28] Vlv2TbltDevicePkg/bld_vlv.sh: Create Vlv.ROM

2019-07-10 Thread Gary Lin
On Thu, Jul 11, 2019 at 04:52:10AM +,  Sun, Zailiang  wrote:
> Gary,
> 
> I suggest remove the first line "From: Gary Lin " from the 
> description section since you have appended the "signed-off-by" declaration.
> 
Hi Zailiang,

That is added by Mike. I'm totally fine if you remove it when pushing
the commits.

Thanks,

Gary Lin

> > -Original Message-
> > From: Kinney, Michael D
> > Sent: Thursday, July 11, 2019 3:05 AM
> > To: devel@edk2.groups.io
> > Cc: Gary Lin ; Sun, Zailiang ; Qian,
> > Yi 
> > Subject: [edk2-platforms Patch 10/28] Vlv2TbltDevicePkg/bld_vlv.sh: Create
> > Vlv.ROM
> > 
> > From: Gary Lin 
> > 
> > The scripts for PlatformCapsuleGcc.dsc need Vlv.ROM.
> > 
> > Cc: Zailiang Sun 
> > Cc: Yi Qian 
> > Cc: Michael D Kinney 
> > Signed-off-by: Gary Lin 
> > ---
> >  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> > b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> > index 7fd5f44264..c68e59398a 100755
> > --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> > +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> > @@ -199,6 +199,8 @@ echo Skip "Running fce..."
> > 
> > ##
> > **
> >  ## Build Capsules
> > 
> > ##
> > **
> > +cp -f
> > $WORKSPACE/Build/Vlv2TbltDevicePkg/${TARGET}_${TOOL_CHAIN_TAG}/F
> > V/VLV.fd \
> > +
> > $WORKSPACE/Build/Vlv2TbltDevicePkg/${TARGET}_${TOOL_CHAIN_TAG}/F
> > V/Vlv.ROM
> >  build -p $PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
> > 
> >  echo
> > --
> > 2.21.0.windows.1
> 
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43577): https://edk2.groups.io/g/devel/message/43577
Mute This Topic: https://groups.io/mt/32419743/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] GCC compiler version

2019-07-10 Thread Liming Gao
Hi, all
  Recently, I find some failure with the different GCC compiler version. I want 
to collect which GCC version are used by you. Now, I use GCC 5.5 for the 
verification. It may be a little old.

Thanks
Liming

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43576): https://edk2.groups.io/g/devel/message/43576
Mute This Topic: https://groups.io/mt/32427285/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 16/28] Vlv2TbltDevicePkg: Update Linux build scripts

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Michael D Kinney
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Gary Lin 
> Subject: [edk2-devel] [edk2-platforms Patch 16/28] Vlv2TbltDevicePkg:
> Update Linux build scripts
> 
> * Do not change WORKSPACE env var.
>   Assume it is set before running script.
> * Access Conf dir relative to WORKSPACE
> * Run Build_IFWI.sh from the Vlv2Tbl2DevicePkg dir
> * run bld_vlv.sh from same dir as Build_IFWI.sh
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Gary Lin 
> Signed-off-by: Michael D Kinney 
> ---
>  .../Intel/Vlv2TbltDevicePkg/Build_IFWI.sh |  5 +-
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh   | 49 ++-
>  2 files changed, 26 insertions(+), 28 deletions(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> index 2a22309f5f..f8954cc9cd 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> @@ -85,13 +85,10 @@ else
>IFWI_Suffix="/S $3"
>  fi
> 
> -## Go to root directory
> -cd ../../..
> -
>  ## Build BIOS
>  echo
> "==
> "
>  echo "Build_IFWI:  Calling BIOS build Script..."
> -./Platform/Intel/$PLATFORM_PACKAGE/bld_vlv.sh $Build_Flags
> $Platform_Type $Build_Target
> +. bld_vlv.sh $Build_Flags $Platform_Type $Build_Target
> 
>  echo
>  echo Finished Building BIOS.
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> index c68e59398a..aac8534677 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -26,7 +26,6 @@ echo -e $(date)
> 
> ##
> **
>  ## Initial Setup
> 
> ##
> **
> -export WORKSPACE=$(pwd)
>  #build_threads=($NUMBER_OF_PROCESSORS)+1
>  Build_Flags=
>  exitCode=0
> @@ -38,31 +37,31 @@ export PLATFORM_PATH=$WORKSPACE/edk2-
> platforms/Platform/Intel/
>  export SILICON_PATH=$WORKSPACE/edk2-platforms/Silicon/Intel/
>  export BINARY_PATH=$WORKSPACE/edk2-non-osi/Silicon/Intel/
>  export
> PACKAGES_PATH=$PLATFORM_PATH:$SILICON_PATH:$BINARY_PATH:$COR
> E_PATH
> -cd ./edk2
> 
>  ## Clean up previous build files.
> -if [ -e $CORE_PATH/EDK2.log ]; then
> -  rm $CORE_PATH/EDK2.log
> +if [ -e $WORKSPACE/EDK2.log ]; then
> +  rm $WORKSPACE/EDK2.log
>  fi
> 
> -if [ -e $CORE_PATH/Unitool.log ]; then
> -  rm $CORE_PATH/Unitool.log
> +if [ -e $WORKSPACE/Unitool.log ]; then
> +  rm $WORKSPACE/Unitool.log
>  fi
> 
> -if [ -e $CORE_PATH/Conf/target.txt ]; then
> -  rm $CORE_PATH/Conf/target.txt
> +if [ -e $WORKSPACE/Conf/target.txt ]; then
> +  rm $WORKSPACE/Conf/target.txt
>  fi
> 
> -if [ -e $CORE_PATH/Conf/tools_def.txt ]; then
> -  rm $CORE_PATH/Conf/tools_def.txt
> +if [ -e $WORKSPACE/Conf/tools_def.txt ]; then
> +  rm $WORKSPACE/Conf/tools_def.txt
>  fi
> 
> -if [ -e $CORE_PATH/Conf/build_rule.txt ]; then
> -  rm $CORE_PATH/Conf/build_rule.txt
> +if [ -e $WORKSPACE/Conf/build_rule.txt ]; then
> +  rm $WORKSPACE/Conf/build_rule.txt
>  fi
> 
>  ## Setup EDK environment. Edksetup puts new copies of target.txt,
> tools_def.txt, build_rule.txt in WorkSpace\Conf  ## Also run edksetup as
> soon as possible to avoid it from changing environment variables we're
> overriding
> +cd $CORE_PATH
>  . edksetup.sh BaseTools
>  make -C BaseTools
> 
> @@ -72,6 +71,8 @@
> PLATFORM_PKG_PATH=$PLATFORM_PATH/$PLATFORM_PACKAGE
>  config_file=$PLATFORM_PKG_PATH/PlatformPkgConfig.dsc
>  auto_config_inc=$PLATFORM_PKG_PATH/AutoPlatformCFG.txt
> 
> +cd $PLATFORM_PKG_PATH
> +
>  ## create new AutoPlatformCFG.txt file
>  if [ -f "$auto_config_inc" ]; then
>rm $auto_config_inc
> @@ -149,11 +150,11 @@ echo "Ensuring correct build directory is present for
> GenBiosId..."
> 
>  echo Modifying Conf files for this build...
>  ## Remove lines with these tags from target.txt -sed -i
> '/^ACTIVE_PLATFORM/d' Conf/target.txt -sed -i '/^TARGET /d'
> Conf/target.txt -sed -i '/^TARGET_ARCH/d' Conf/target.txt -sed -i
> '/^TOOL_CHAIN_TAG/d' Conf/target.txt -sed -i
> '/^MAX_CONCURRENT_THREAD_NUMBER/d' Conf/target.txt
> +sed -i '/^ACTIVE_PLATFORM/d' $WORKSPACE/Conf/target.txt sed -i
> +'/^TARGET /d' $WORKSPACE/Conf/target.txt sed -i '/^TARGET_ARCH/d'
> +$WORKSPACE/Conf/target.txt sed -i '/^TOOL_CHAIN_TAG/d'
> +$WORKSPACE/Conf/target.txt sed -i
> '/^MAX_CONCURRENT_THREAD_NUMBER/d'
> +$WORKSPACE/Conf/target.txt
> 
>  gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')  case $gcc_version in
> @@ -174,15 +175,15 @@ esac
> 
>  ACTIVE_PLATFORM=$PLATFORM_PKG_PATH/PlatformPkgGcc"$Arch".dsc
>  export TOOL_CHAIN_TAG=$TARGET_TOOLS
> -MAX_CONCURRENT_THREAD_NUMBER=1
> -echo ACTIVE_PLATFORM = $ACTIVE_PLATFORM   

Re: [edk2-devel] [edk2-platforms Patch 27/28] Vlv2TbltDevicePkg: Only build capsules for X64

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Gary Lin 
> Subject: [edk2-platforms Patch 27/28] Vlv2TbltDevicePkg: Only build capsules
> for X64
> 
> Only build capsules for X64 builds.  More changes are required to build IA32
> capsules.
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Gary Lin 
> Signed-off-by: Michael D Kinney 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat | 6 +-
> Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh  | 6 +-
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat
> index c39b8ccd62..99c1068663 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat
> @@ -277,7 +277,11 @@ if %ERRORLEVEL% NEQ 0 goto BldFail  ::echo FD
> successfully updated with default Hii values.
> 
>  @REM build capsule here
> -call build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
> +if "%Arch%"=="X64" (
> +  echo Invoking EDK2 build for capsules...
> +  echo build -t %TOOL_CHAIN_TAG% -p
> +%PLATFORM_PACKAGE%\PlatformCapsule.dsc
> +  call build -t %TOOL_CHAIN_TAG% -p
> +%PLATFORM_PACKAGE%\PlatformCapsule.dsc
> +)
> 
>  goto Exit
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> index d32beb6a45..0d1ea60ac6 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -224,7 +224,11 @@ cp -f $BUILD_PATH/FV/VLV.fd
> $BUILD_PATH/FV/Vlv.ROM
> 
> ##
> **
>  ## Build Capsules
> 
> ##
> **
> -build -p $PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
> +if [ $Arch == "X64" ]; then
> +  echo "Invoking EDK2 build for capsules..."
> +  echo build -t $TOOL_CHAIN_TAG -p
> +$PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
> +  build -t $TOOL_CHAIN_TAG -p
> $PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
> +fi
> 
>  echo
>  echo  The EDKII BIOS build has successfully completed. 
> --
> --
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43573): https://edk2.groups.io/g/devel/message/43573
Mute This Topic: https://groups.io/mt/32419749/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 28/28] Vlv2TbltDevicePkg: Update Readme.md for multiple repos

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Gary Lin 
> Subject: [edk2-platforms Patch 28/28] Vlv2TbltDevicePkg: Update
> Readme.md for multiple repos
> 
> Update Readme.md with instructions to clone content from the edk2, edk2-
> platforms, and edk2-non-osi repositories and build Vlv2TbltDevicePkg for
> Windows and Linux.
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Gary Lin 
> Signed-off-by: Michael D Kinney 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/Readme.md | 145 ++---
>  1 file changed, 69 insertions(+), 76 deletions(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Readme.md
> b/Platform/Intel/Vlv2TbltDevicePkg/Readme.md
> index cbbb465b69..97180ef7af 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Readme.md
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Readme.md
> @@ -42,39 +42,27 @@ the MinnowBoard MAX firmware and generates UEFI
> Capsules that can be used to  update the MinnowBoard MAX firmware and
> three sample devices.
> 
>  ```
> -git clone --recurse-submodules https://github.com/tianocore/edk2.git
> +git clone https://github.com/tianocore/edk2.git
> +cd edk2
> +git submodule update --init
> +cd ..
> +git clone https://github.com/tianocore/edk2-platforms.git
> +git clone https://github.com/tianocore/edk2-non-osi.git
> 
>  powershell "& {[Net.ServicePointManager]::SecurityProtocol =
> [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri
> "https://indy.fulgan.com/SSL/openssl-1.0.2r-x64_86-win64.zip -OutFile
> openssl-1.0.2r-x64_86-win64.zip"}"
>  powershell Expand-Archive openssl-1.0.2r-x64_86-win64.zip
> 
> -powershell "& {[Net.ServicePointManager]::SecurityProtocol =
> [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri
> "https://firmware.intel.com/sites/default/files/MinnowBoardMax-
> Development190216.zip -OutFile MinnowBoardMax-
> Development190216.zip"}"
> -powershell Expand-Archive MinnowBoardMax-Development190216.zip
> -sleep 1
> -rename MinnowBoardMax-Development190216 Vlv2Binaries -cd
> Vlv2Binaries -powershell Expand-Archive Vlv2SocBinPkg.zip .
> -sleep 1
> -cd ..
> -
>  powershell "& {[Net.ServicePointManager]::SecurityProtocol =
> [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri
> "https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win64/nasm-
> 2.13.03-win64.zip -OutFile nasm-2.13.03-win64.zip"}"
>  powershell Expand-Archive nasm-2.13.03-win64.zip .
> 
> -mkdir Conf
> -
>  set WORKSPACE=%CD%
> -set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
> -set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike
> -set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries
> -path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-
> 1.0.2r-x64_86-win64
> +set
> +PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-
> platforms\Silicon\Intel
> +;%WORKSPACE%\edk2-platforms\Platform\Intel;%WORKSPACE%\edk2-
> non-osi\Sil
> +icon\Intel
> +path=%path%;%WORKSPACE%\openssl-1.0.2r-x64_86-win64
>  set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
> 
> -cd %WORKSPACE%\edk2
> +cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg
> 
> -call edkSetup.bat Rebuild
> -
> -cd Vlv2TbltDevicePkg
> -
> -Build_IFWI.bat /m /y MNW2 Debug
> +Build_IFWI.bat /m MNW2 Debug
>  ```
> 
>  Once all the code and tools are downloaded and installed, only the following
> @@ -83,48 +71,50 @@ directory used to install the source and binaries.
> 
>  ```
>  set WORKSPACE=%CD%
> -set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
> -set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike
> -set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries
> -path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-
> 1.0.2r-x64_86-win64
> +set
> +PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-
> platforms\Silicon\Intel
> +;%WORKSPACE%\edk2-platforms\Platform\Intel;%WORKSPACE%\edk2-
> non-osi\Sil
> +icon\Intel
> +path=%path%;%WORKSPACE%\openssl-1.0.2r-x64_86-win64
>  set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
> -
> -cd %WORKSPACE%\edk2
> -
> -call edkSetup.bat Rebuild
>  ```
> 
>  Once the environment is setup, the MinnowBoard MAX firmware and
> capsules can be  rebuilt using the following commands.
> 
> -* Build Debug Image
> +* Build X64 Debug Image with report file
> 
>  ```
> -cd Vlv2TbltDevicePkg
> +cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg
>  Build_IFWI.bat /m /y MNW2 Debug
>  ```
> 
> -* Build Release Image
> +* Build X64 Release Image with build log
> 
>  ```
> -cd Vlv2TbltDevicePkg
> -Build_IFWI.bat /m /y MNW2 Release
> +cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg
> +Build_IFWI.bat /m /l MNW2 Release
>  ```
> 
> -The generated firmware image is the newest `.bin` file in
> `edk2/Vlv2TbltDevicePkg/Stitch`.
> -The file is in the form `MNW2MAX1.X64.0084.D01..bin`.
> +* Build IA32 Debug Image
> 
> -The CapsuleApp and generated UEFI Capsules are in
> `Build/Vlv2TbltDevicePkg/Capsules`
> +```
> +cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg
> +Build_IF

Re: [edk2-devel] [edk2-platforms Patch 26/28] Vlv2TbltDevicePkg: Clean up all build scripts

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Gary Lin 
> Subject: [edk2-platforms Patch 26/28] Vlv2TbltDevicePkg: Clean up all build
> scripts
> 
> * Remove cln.sh
> * Remove unused PlatformDefintions.h file
> * Remove unused defines from DSC files
> * Make Windows and Linux script more consistent
> * Remove unused options from Windows/Linux scripts
> * Remove unused defines from Windows/Linux scripts
> * Do not modify Target.txt in Conf directory.  Instead,
>   pass all build flags on the command line
> * Generate build report in the build output directory
> * Generate build logs in the build output directory
> * Do not delete files from Conf directory
> * Update clean operation to only clean one platform target
> * Do not generate AutoPlatformCFG.txt file anymore
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Gary Lin 
> Signed-off-by: Michael D Kinney 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/.gitignore   |   5 -
>  .../Intel/Vlv2TbltDevicePkg/Build_IFWI.bat|  75 ++---
>  .../Intel/Vlv2TbltDevicePkg/Build_IFWI.sh |  57 +++
>  .../Include/PlatformDefinitions.h |  43 -
>  .../Vlv2TbltDevicePkg/PlatformPkgConfig.dsc   |   2 -
>  .../Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc  |  55 +-
>  .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc   |  53 +-
>  .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc |  53 +-
>  .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc  |  55 +-
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat  | 120 ++---
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh   | 159 --
>  Platform/Intel/Vlv2TbltDevicePkg/cln.sh   |  62 ---
>  12 files changed, 156 insertions(+), 583 deletions(-)  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/.gitignore
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Include/PlatformDefinitions.h
>  delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/cln.sh
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/.gitignore
> b/Platform/Intel/Vlv2TbltDevicePkg/.gitignore
> deleted file mode 100644
> index c7698262ad..00
> --- a/Platform/Intel/Vlv2TbltDevicePkg/.gitignore
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -AutoPlatformCFG.txt
> -Stitch/Stitching.log
> -Stitch/MNW*.bin
> -Stitch/MNW*.rom
> -Stitch/MNW*.rom.orig
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat
> b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat
> index 44759c617f..f65aa61f4a 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat
> @@ -9,15 +9,9 @@
> 
>  SetLocal EnableDelayedExpansion EnableExtensions
> 
> -@REM Go to work space directory.
> -cd ..
> -cd ..
> -
>  :: Assign initial values
>  set exitCode=0
>  set "Build_Flags= "
> -set "Stitch_Flags= "
> -set Arch=X64
>  set PLATFORM_PACKAGE=Vlv2TbltDevicePkg
> 
>  set PLATFORM_PATH=%WORKSPACE%
> @@ -42,11 +36,6 @@ if not
> exist %PLATFORM_PATH%\%PLATFORM_PACKAGE% (  :OptLoop  if /i
> "%~1"=="/?" goto Usage
> 
> -if /i "%~1"=="/q" (
> -set Build_Flags=%Build_Flags% /q
> -shift
> -goto OptLoop
> -)
>  if /i "%~1"=="/l" (
>  set Build_Flags=%Build_Flags% /l
>  shift
> @@ -67,53 +56,17 @@ if /i "%~1" == "/c" (
>  shift
>  goto OptLoop
>  )
> -if /i "%~1" == "/ECP" (
> -set Build_Flags=%Build_Flags% /ecp
> -shift
> -goto OptLoop
> -)
> -
> -if /i "%~1"=="/s" (
> -set Build_Flags=%Build_Flags% /s
> -shift
> -goto OptLoop
> -)
> -
>  if /i "%~1"=="/x64" (
> -set Arch=X64
>  set Build_Flags=%Build_Flags% /x64
>  shift
>  goto OptLoop
>  )
> -
>  if /i "%~1"=="/IA32" (
> -set Arch=IA32
>  set Build_Flags=%Build_Flags% /IA32
>  shift
>  goto OptLoop
>  )
> 
> -if /i "%~1"=="/nG" (
> -set Stitch_Flags=%Stitch_Flags% /nG
> -shift
> -goto OptLoop
> -)
> -if /i "%~1"=="/nM" (
> -set Stitch_Flags=%Stitch_Flags% /nM
> -shift
> -goto OptLoop
> -)
> -if /i "%~1"=="/nB" (
> -set Stitch_Flags=%Stitch_Flags% /nB
> -shift
> -goto OptLoop
> -)
> -if /i "%~1"=="/yL" (
> -set Stitch_Flags=%Stitch_Flags% /yL
> -shift
> -goto OptLoop
> -)
> -
>  :: Require 2 input parameters
>  if "%~2"=="" goto Usage
> 
> @@ -125,7 +78,7 @@ set Build_Target=%~2
>  echo
> ==
> 
>  echo Build_IFWI:  Calling BIOS build Script...
> 
> -
> call %PLATFORM_PATH%\%PLATFORM_PACKAGE%\bld_vlv.bat %Build_Flag
> s%  %Platform_Type% %Build_Target%
> +call %PLATFORM_PATH%\%PLATFORM_PACKAGE%\bld_vlv.bat %Build_Fla
> gs%
> +%Platform_Type% %Build_Target%
> 
>  if %ERRORLEVEL% NEQ 0 (
>  echo echo  -- Error Building BIOS  & echo.
> @@ -139,23 +92,21 @@ goto Exit
>  :Usage
>  echo Script to build BIOS firmware and stitch the entire IFWI.
>  echo.
> -echo Usage: Build_IFWI.bat [options]  PlatformType  BuildTarget  [IFWI
> Suf

Re: [edk2-devel] [edk2-platforms Patch 25/28] Vlv2DeviceRefCodePlg/AcpiTablesPCAT: Fix ASL error

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Gary Lin 
> Subject: [edk2-platforms Patch 25/28]
> Vlv2DeviceRefCodePlg/AcpiTablesPCAT: Fix ASL error
> 
> Remove use of a method to read a register from a BAR and instead access
> the register directly.  Resolves the following error from the latest iasl
> compiler.
> 
>   Or(ShiftLeft(Derefof(Index(CDCT, \_SB.PCI0.GFX0.MCHK.DCFE)), 21),PARM,
> PARM)
> 
> Error 6163 - Object is created temporarily in another method
>  and cannot be accessed ^ (\_SB.PCI0.GFX0.MCHK.DCFE)
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Gary Lin 
> Signed-off-by: Michael D Kinney 
> ---
>  .../AcpiTablesPCAT/IgdOGBDA.ASL| 14 --
>  .../AcpiTablesPCAT/IgdOpRn.ASL | 18 +-
>  2 files changed, 13 insertions(+), 19 deletions(-)
> 
> diff --git
> a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL
> b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL
> index 4482db6906..379fca7379 100644
> --- a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL
> +++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL
> @@ -1,6 +1,6 @@
>  /*++
> 
> -Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
> +Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -125,7 +125,17 @@ Method (GBDA, 0, Serialized)
> 
>  // Report the graphics frequency based on
> DISPLAY_CLOCK_FREQUENCY_ENCODING [MMADR+0x20C8]
> 
> -Or(ShiftLeft(Derefof(Index(CDCT, \_SB.PCI0.GFX0.MCHK.DCFE)),
> 21),PARM, PARM)
> +If (LNotEqual (MADR, 0x))
> +  {
> +OperationRegion(IGMM,SystemMemory,MADR,0x3000)
> +Field(IGMM,AnyAcc, NoLock, Preserve)
> +{
> +  Offset(0X20C8),
> +  ,4,
> +  DCFE,4, // DISPLAY_CLOCK_FREQUENCY_ENCODING
> +}
> +Or(ShiftLeft(Derefof(Index(CDCT, DCFE)), 21),PARM, PARM)
> +  }
> 
>  Store(1, GESF)  // Set the modified settings flag
>  Return(SUCC)
> diff --git
> a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL
> b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL
> index 8575fbfe6c..386ad3e65e 100644
> --- a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL
> +++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL
> @@ -1,6 +1,6 @@
>  /*++
> 
> -Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
> +Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -70,22 +70,6 @@ Field(IGDP, AnyAcc, NoLock, Preserve)
>ASLS,   32,// Reg 0xFC, Address of the IGD OpRegion
>  }
> 
> -Method (MCHK, 0, Serialized)
> -{
> -
> -  If (LNotEqual (MADR, 0x))
> -  {
> -OperationRegion(IGMM,SystemMemory,MADR,0x3000)
> -Field(IGMM,AnyAcc, NoLock, Preserve)
> -{
> -  Offset(0X20C8),
> -  ,4,
> -  DCFE,4, // DISPLAY_CLOCK_FREQUENCY_ENCODING
> -}
> -  }
> -}
> -
> -
>  //  Define an OperationRegion to cover the IGD OpRegion layout.
> 
>  OperationRegion(IGDM, SystemMemory, ASLB, 0x2000)
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43571): https://edk2.groups.io/g/devel/message/43571
Mute This Topic: https://groups.io/mt/32419754/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 22/28] Vlv2TbltDevicePkg: Add GCC IA32 build support

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Gary Lin 
> Subject: [edk2-platforms Patch 22/28] Vlv2TbltDevicePkg: Add GCC IA32 build
> support
> 
> * Remove CpuIa32Lib that contains inline assembly
>   that is not compatible with GCC builds.  Use BaseLib
>   functions for CPUID and MSR access and the CPUID and
>   MSR defintions from the UefiCpuPkg.
> * Add PlatformPkgGccIa32.dsc
> * Add /IA32 flag to Build_IFWI.sh
> * Add /IA32 flag to bld_vlv.sh
> * Remove unused references to gEfiPlatformCpuInfoGuid
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Gary Lin 
> Signed-off-by: Michael D Kinney 
> ---
>  .../AcpiPlatform/AcpiPlatform.c   |   1 -
>  .../Intel/Vlv2TbltDevicePkg/Build_IFWI.sh |   4 +
>  .../Include/Guid/PlatformCpuInfo.h|  16 +-
>  .../Include/Library/CpuIA32.h | 345 --
>  .../Library/CpuIA32Lib/CpuIA32Lib.inf |  41 ---
>  .../Library/CpuIA32Lib/EfiCpuVersion.c|  70 
>  .../Library/CpuIA32Lib/IA32/CpuIA32.S | 223 ---
>  .../Library/CpuIA32Lib/IA32/CpuIA32.asm   | 206 ---
>  .../Library/CpuIA32Lib/IA32/CpuIA32.c | 177 -
>  .../Library/CpuIA32Lib/X64/Cpu.S  | 207 ---
>  .../Library/CpuIA32Lib/X64/Cpu.asm| 222 ---
>  .../MonoStatusCode/MonoStatusCode.inf |   1 -
>  .../PlatformInitPei/MemoryCallback.c  |  11 +-
>  .../PlatformInitPei/PlatformEarlyInit.h   |   4 +-
>  .../PlatformInitPei/PlatformInitPei.inf   |   1 -
>  .../PlatformPei/PlatformPei.inf   |   1 -
>  ...formPkgIA32.dsc => PlatformPkgGccIA32.dsc} |  28 +-
>  .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc   |   1 -
>  .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc |   1 -
>  .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc  |   1 -
>  .../PlatformSetupDxe/PlatformSetupDxe.h   |   1 -
>  .../PlatformSetupDxe/PlatformSetupDxe.inf |   2 +-
>  .../PlatformSetupDxe/SetupInfoRecords.c   |  42 ++-
>  .../Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c   |  12 +-
>  .../Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf |   1 +
>  .../SmBiosMiscDxe/MiscOemType0x90Function.c   |  37 +-
>  .../SmBiosMiscDxe/MiscOemType0x94Function.c   |  10 +-
>  .../MiscProcessorInformationFunction.c|   3 +-
>  .../SmBiosMiscDxe/SmBiosMiscDxe.inf   |   1 -
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh   |   7 +-
>  30 files changed, 97 insertions(+), 1580 deletions(-)
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Include/Library/CpuIA32.h
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/CpuIA32Lib.inf
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/EfiCpuVersion.c
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/IA32/CpuIA32.S
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/IA32/CpuIA32.asm
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/IA32/CpuIA32.c
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/X64/Cpu.S
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/X64/Cpu.asm
>  copy Platform/Intel/Vlv2TbltDevicePkg/{PlatformPkgIA32.dsc =>
> PlatformPkgGccIA32.dsc} (96%)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
> b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
> index 72edc1bc1e..479ffa61a0 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
> @@ -36,7 +36,6 @@ Abstract:
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> index 422e90ca6c..349f0c7ba7 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> @@ -63,6 +63,10 @@ for (( i=1; i<=$#; ))
>Arch=X64
>Build_Flags="$Build_Flags /x64"
>shift
> +elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/IA32" ]; then
> +  Arch=IA32
> +  Build_Flags="$Build_Flags /IA32"
> +  shift
>  elif [ "$1" == "/nG" ]; then
>Stitch_Flags="$Stitch_Flags /nG"
>shift
> diff --git
> a/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformCpuInfo.h
> b/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformCpuInfo.h
> index f1756662bd..eec167da3a 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformCpuInfo.h
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformCpuInfo.h
> @@ -1,12 +1,9 @@
>  /*++
> 
> -  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.
> -
> 
> +  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.
> +
>SPDX-License-Identifi

Re: [edk2-devel] [edk2-platforms Patch 21/28] Vlv2TbltDevicePkg: Re-enable BIOS ID feature

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Gary Lin 
> Subject: [edk2-platforms Patch 21/28] Vlv2TbltDevicePkg: Re-enable BIOS ID
> feature
> 
> Add back BIOSID feature using GenBiosId.py script and BiosIdLib from the
> BoardModulePkg.  Remove the VLV2 specific BiosIdLib implementation.
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Gary Lin 
> Signed-off-by: Michael D Kinney 
> ---
>  .../Include/Library/BiosIdLib.h   | 86 
>  .../Library/BiosIdLib/BiosIdLib.c | 98 ---
>  .../Library/BiosIdLib/BiosIdLib.inf   | 33 ---
>  .../PlatformDxe/PlatformDxe.inf   |  5 +-
>  .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf   |  7 ++
>  .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf  |  7 ++
>  .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc   |  2 +-
>  .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc |  2 +-
>  .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc  |  2 +-
>  .../PlatformSetupDxe/PlatformSetupDxe.inf |  3 +-
>  .../SmBiosMiscDxe/MiscBiosVendorFunction.c| 49 +-
>  .../SmBiosMiscDxe/SmBiosMiscDxe.inf   |  8 +-
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat  | 27 +
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh   | 46 +
>  14 files changed, 100 insertions(+), 275 deletions(-)  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c
>  delete mode 100644
> Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h
> b/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h
> deleted file mode 100644
> index bd08c9a80f..00
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h
> +++ /dev/null
> @@ -1,86 +0,0 @@
> -/*++
> -
> -  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.
> -
> -  SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -Module Name:
> -
> -  BiosIdLib.h
> -
> -Abstract:
> -
> -  BIOS ID library definitions.
> -
> -  This library provides functions to get BIOS ID, VERSION, DATE and TIME
> -
> ---*/
> -
> -#ifndef _BIOS_ID_LIB_H_
> -#define _BIOS_ID_LIB_H_
> -
> -//
> -// BIOS ID string format:
> -//
> -//
> $(BOARD_ID)$(BOARD_REV).$(OEM_ID).$(VERSION_MAJOR).$(BUILD_TYPE
> )$(VERSION_MINOR).YYMMDDHHMM
> -//
> -// Example: "TRFTCRB1.86C.0008.D03.0506081529"
> -//
> -#pragma pack(1)
> -
> -typedef struct {
> -  CHAR16  BoardId[7];   // "TRFTCRB"
> -  CHAR16  BoardRev; // "1"
> -  CHAR16  Dot1; // "."
> -  CHAR16  OemId[3]; // "86C"
> -  CHAR16  Dot2; // "."
> -  CHAR16  VersionMajor[4];  // "0008"
> -  CHAR16  Dot3; // "."
> -  CHAR16  BuildType;// "D"
> -  CHAR16  VersionMinor[2];  // "03"
> -  CHAR16  Dot4; // "."
> -  CHAR16  TimeStamp[10];// "YYMMDDHHMM"
> -  CHAR16  NullTerminator;   // 0x
> -} BIOS_ID_STRING;
> -
> -#define MEM_IFWIVER_START   0x7E
> -#define MEM_IFWIVER_LENGTH  0x1000
> -
> -typedef struct _MANIFEST_OEM_DATA{
> -  UINT32 Signature;
> -  unsigned char  FillNull[0x39];
> -  UINT32 IFWIVersionLen;
> -  unsigned char  IFWIVersion[32];
> -}MANIFEST_OEM_DATA;
> -
> -//
> -// A signature precedes the BIOS ID string in the FV to enable search by
> external tools.
> -//
> -typedef struct {
> -  UINT8   Signature[8]; // "$IBIOSI$"
> -  BIOS_ID_STRING  BiosIdString; // "TRFTCRB1.86C.0008.D03.0506081529"
> -} BIOS_ID_IMAGE;
> -
> -#pragma pack()
> -
> -/**
> -  This function returns the Version & Release Date and Time by getting and
> converting
> -  BIOS ID.
> -
> -  @param[in] BiosVersion The Bios Version out of the conversion.
> -  @param[in] BiosReleaseDate The Bios Release Date out of the
> conversion.
> -  @param[in] BiosReleaseTime The Bios Release Time out of the
> conversion.
> -
> -  @retval EFI_SUCCESSBIOS Version & Release Date and Time have
> been got successfully.
> -  @retval EFI_NOT_FOUND  BiosId image is not found, and no parameter
> will be modified.
> -  @retval EFI_INVALID_PARAMETER  All the parameters are NULL.
> -
> -**/
> -EFI_STATUS
> -GetBiosVersionDateTime (
> -  OUT CHAR16*BiosVersion, OPTIONAL
> -  OUT CHAR16*BiosReleaseDate, OPTIONAL
> -  OUT CHAR16*BiosReleaseTime OPTIONAL
> -  );
> -
> -#endif
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c
> b/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c
> deleted file mode 100644
> index f6ab37313c..00
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c
> +++ /dev/null
> @@ -1,98 +0,0 @@
> -/*++
>

Re: [edk2-devel] [edk2-platforms Patch 19/28] Vlv2DeviceRefCodePkg: Remove redundant gEfiSpiProtocolGuid

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Gary Lin 
> Subject: [edk2-platforms Patch 19/28] Vlv2DeviceRefCodePkg: Remove
> redundant gEfiSpiProtocolGuid
> 
> Remove redundant declaration of gEfiSpiProtocolGuid
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Gary Lin 
> Signed-off-by: Michael D Kinney 
> ---
>  Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
> b/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
> index 1af1ed757c..97af1d2f41 100644
> --- a/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
> +++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
> @@ -39,7 +39,6 @@ [Protocols]
>gEfiSpiProtocolGuid   = { 0x1156efc6, 0xea32, 0x4396, 
> {0xb5, 0xd5,
> 0x26, 0x93, 0x2e, 0x83, 0xc3, 0x13}}
>gMemInfoProtocolGuid  = { 0x6f20f7c8, 0xe5ef, 0x4f21, 
> {0x8d, 0x19,
> 0xed, 0xc5, 0xf0, 0xc4, 0x96, 0xae}}
>gEfiSdHostIoProtocolGuid  = { 0xb63f8ec7, 0xa9c9, 0x4472, 
> {0xa4, 0xc0,
> 0x4d, 0x8b, 0xf3, 0x65, 0xcc, 0x51}}
> -  gEfiSpiProtocolGuid   = { 0x1156efc6, 0xea32, 0x4396, 
> {0xb5, 0xd5,
> 0x26, 0x93, 0x2e, 0x83, 0xc3, 0x13}}
>gEfiSmmSpiProtocolGuid= { 0xD9072C35, 0xEB8F, 0x43AD, 
> {0xA2,
> 0x20, 0x34, 0xD4, 0x0E, 0x2A, 0x82, 0x85}}
>gEfiSmmIchnDispatchProtocolGuid   = { 0xc50b323e, 0x9075, 0x4f2a, { 
> 0xac,
> 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc}}
>gEfiSmmIchnDispatchExProtocolGuid = { 0x3920405B, 0xC897, 0x44DA,
> {0x88, 0xF3, 0x4C, 0x49, 0x8A, 0x6F, 0xF7, 0x36}}
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43568): https://edk2.groups.io/g/devel/message/43568
Mute This Topic: https://groups.io/mt/32419747/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 17/28] Vlvt2TbltDevicePkg: Fix NULL pointer access in SmbiosMiscDxe

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Gary Lin 
> Subject: [edk2-platforms Patch 17/28] Vlvt2TbltDevicePkg: Fix NULL pointer
> access in SmbiosMiscDxe
> 
> Handle case where no Simple Network Protocols are found.
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Gary Lin 
> Signed-off-by: Michael D Kinney 
> ---
>  .../MiscBaseBoardManufacturerFunction.c| 14 +-
>  .../SmBiosMiscDxe/MiscSystemManufacturerFunction.c | 14 +
> -
>  2 files changed, 18 insertions(+), 10 deletions(-)
> 
> diff --git
> a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufa
> cturerFunction.c
> b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufa
> cturerFunction.c
> index 4e02486853..8eddc5c2a6 100644
> ---
> a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufa
> cturerFunction.c
> +++
> b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufa
> cturerFunction.c
> @@ -130,11 +130,15 @@
> MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer)
>//
>//Get the MAC string
>//
> -  Status = NetLibGetMacString (
> - *Handles,
> - NULL,
> - &MacStr
> - );
> +  if (Handles == NULL) {
> +Status = EFI_NOT_FOUND;
> +  } else {
> +Status = NetLibGetMacString (
> +   *Handles,
> +   NULL,
> +   &MacStr
> +   );
> +  }
>if (EFI_ERROR (Status)) {
>  MacStr = L"";
>}
> diff --git
> a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufactu
> rerFunction.c
> b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufactu
> rerFunction.c
> index da660cb3a8..b18dbd6ae2 100644
> ---
> a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufactu
> rerFunction.c
> +++
> b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufactu
> rerFunction.c
> @@ -212,11 +212,15 @@ AddSmbiosManuCallback (
>//
>//Get the MAC string
>//
> -  Status = NetLibGetMacString (
> - *Handles,
> - NULL,
> - &MacStr
> - );
> +  if (Handles == NULL) {
> +Status = EFI_NOT_FOUND;
> +  } else {
> +Status = NetLibGetMacString (
> +   *Handles,
> +   NULL,
> +   &MacStr
> +   );
> +  }
>if (EFI_ERROR (Status)) {
>  MacStr = L"";
>}
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43566): https://edk2.groups.io/g/devel/message/43566
Mute This Topic: https://groups.io/mt/32419741/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 20/28] Vlv2TbltDevicePkg: Remove redundant gEfiSpiProtocolGuid

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Gary Lin 
> Subject: [edk2-platforms Patch 20/28] Vlv2TbltDevicePkg: Remove
> redundant gEfiSpiProtocolGuid
> 
> Remove redundant declaration of gEfiSpiProtocolGuid.
> This protocol is defined in Vlv2DeviceRefCodePkg.
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Gary Lin 
> Signed-off-by: Michael D Kinney 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
> b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
> index abe9d7e3a0..970d2db42a 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
> @@ -187,7 +187,6 @@ [Protocols]
>  #  gEfiSpiBusProtocolGuid =  { 0x137b3044, 0xf6d7, 0x473e, { 0xa6, 0x25, 
> 0x9f,
> 0xb9, 0x25, 0x5, 0xc1, 0x80 } }
> 
>  #  gLpssDummyProtocolGuid = { 0xaf4cc162, 0xd41c, 0x455a, { 0xab, 0x45,
> 0x6d, 0xbc, 0xc1, 0xcd, 0x32, 0xf3 } }
> -  gEfiSpiProtocolGuid   = { 0x1156efc6, 0xea32, 0x4396, { 0xb5, 
> 0xd5,
> 0x26, 0x93, 0x2e, 0x83, 0xc3, 0x13 }}
>gEfiGpioOperationProtocolGuid = { 0x38DDFE8F, 0x8991, 0x44AA, { 0x98,
> 0x89, 0x83, 0xF4, 0x91, 0x84, 0x65, 0xB0 }}
>gEfiEsrtOperationProtocolGuid = { 0x4549AB47, 0x6E60, 0x4293, { 0xB9,
> 0x1D, 0x31, 0xB6, 0x10, 0xAD, 0x80, 0x56 }}
> 
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43567): https://edk2.groups.io/g/devel/message/43567
Mute This Topic: https://groups.io/mt/32419748/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 10/28] Vlv2TbltDevicePkg/bld_vlv.sh: Create Vlv.ROM

2019-07-10 Thread Sun, Zailiang
Gary,

I suggest remove the first line "From: Gary Lin " from the 
description section since you have appended the "signed-off-by" declaration.

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin ; Sun, Zailiang ; Qian,
> Yi 
> Subject: [edk2-platforms Patch 10/28] Vlv2TbltDevicePkg/bld_vlv.sh: Create
> Vlv.ROM
> 
> From: Gary Lin 
> 
> The scripts for PlatformCapsuleGcc.dsc need Vlv.ROM.
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> index 7fd5f44264..c68e59398a 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -199,6 +199,8 @@ echo Skip "Running fce..."
> 
> ##
> **
>  ## Build Capsules
> 
> ##
> **
> +cp -f
> $WORKSPACE/Build/Vlv2TbltDevicePkg/${TARGET}_${TOOL_CHAIN_TAG}/F
> V/VLV.fd \
> +
> $WORKSPACE/Build/Vlv2TbltDevicePkg/${TARGET}_${TOOL_CHAIN_TAG}/F
> V/Vlv.ROM
>  build -p $PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
> 
>  echo
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43565): https://edk2.groups.io/g/devel/message/43565
Mute This Topic: https://groups.io/mt/32419743/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 06/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update the script to fit edk2-platforms

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin ; Sun, Zailiang ; Qian,
> Yi 
> Subject: [edk2-platforms Patch 06/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update
> the script to fit edk2-platforms
> 
> From: Gary Lin 
> 
> * Add "set -e" to exit immediately on error
> 
> * Update the paths to fit the directory changes
> 
>   WORKSPACE
> +--edk2 (CORE)
> |
> +--edk2-platforms
> |   |
> |   +---Platform
> |   ||
> |   |+---Intel
> |   | |
> |   | +---Vlv2TbltDevicePkg (PLATFORM)
> |   |
> |   +---Silicon
> ||
> |+---Intel
> | |
> | +---Vlv2DeviceRefCodePkg (SILICON)
> |
> +--edk2-non-osi
> |
> +---Silicon
>  |
>  +---Intel
>   |
>   +---Vlv2SocBinPkg (BINARY)
> 
> * Sync a part of bld_vlv.sh from the devel-MinnowBoardMax-UDK2017
> branch
>   to enable capsule building
> 
> * Export TARGET and TOOL_CHAIN_TAG so that the GenerateCapsule scripts
>   can use those variables
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 57 -
>  1 file changed, 33 insertions(+), 24 deletions(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> index 27772f47de..0aa1edfb22 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -7,7 +7,7 @@ function Usage() {
>echo
> "**
> *"
>echo "Build BIOS rom for VLV platforms."
>echo
> -  echo "Usage: bld_vlv.bat  PlatformType [Build Target]"
> +  echo "Usage: bld_vlv.sh  PlatformType [Build Target]"
>echo
>echo
>echo "   Platform Types:  MNW2"
> @@ -19,44 +19,52 @@ function Usage() {
>exit 0
>  }
> 
> +set -e
> 
> +cd ..
>  echo -e $(date)
> 
> ##
> **
>  ## Initial Setup
> 
> ##
> **
> -#WORKSPACE=$(pwd)
> +export WORKSPACE=$(pwd)
>  #build_threads=($NUMBER_OF_PROCESSORS)+1
>  Build_Flags=
>  exitCode=0
>  Arch=X64
>  SpiLock=0
> 
> +export CORE_PATH=$WORKSPACE/edk2
> +export PLATFORM_PATH=$WORKSPACE/edk2-platforms/Platform/Intel/
> +export SILICON_PATH=$WORKSPACE/edk2-platforms/Silicon/Intel/
> +export BINARY_PATH=$WORKSPACE/edk2-non-osi/Silicon/Intel/
> +export
> +PACKAGES_PATH=$PLATFORM_PATH:$SILICON_PATH:$BINARY_PATH:$CO
> RE_PATH
> +cd ./edk2
> +
>  ## Clean up previous build files.
> -if [ -e $(pwd)/EDK2.log ]; then
> -  rm $(pwd)/EDK2.log
> +if [ -e $CORE_PATH/EDK2.log ]; then
> +  rm $CORE_PATH/EDK2.log
>  fi
> 
> -if [ -e $(pwd)/Unitool.log ]; then
> -  rm $(pwd)/Unitool.log
> +if [ -e $CORE_PATH/Unitool.log ]; then
> +  rm $CORE_PATH/Unitool.log
>  fi
> 
> -if [ -e $(pwd)/Conf/target.txt ]; then
> -  rm $(pwd)/Conf/target.txt
> +if [ -e $CORE_PATH/Conf/target.txt ]; then
> +  rm $CORE_PATH/Conf/target.txt
>  fi
> 
> -if [ -e $(pwd)/Conf/BiosId.env ]; then
> -  rm $(pwd)/Conf/BiosId.env
> +if [ -e $CORE_PATH/Conf/BiosId.env ]; then
> +  rm $CORE_PATH/Conf/BiosId.env
>  fi
> 
> -if [ -e $(pwd)/Conf/tools_def.txt ]; then
> -  rm $(pwd)/Conf/tools_def.txt
> +if [ -e $CORE_PATH/Conf/tools_def.txt ]; then
> +  rm $CORE_PATH/Conf/tools_def.txt
>  fi
> 
> -if [ -e $(pwd)/Conf/build_rule.txt ]; then
> -  rm $(pwd)/Conf/build_rule.txt
> +if [ -e $CORE_PATH/Conf/build_rule.txt ]; then
> +  rm $CORE_PATH/Conf/build_rule.txt
>  fi
> 
> -
>  ## Setup EDK environment. Edksetup puts new copies of target.txt,
> tools_def.txt, build_rule.txt in WorkSpace\Conf  ## Also run edksetup as
> soon as possible to avoid it from changing environment variables we're
> overriding  . edksetup.sh BaseTools @@ -64,8 +72,9 @@ make -C BaseTools
> 
>  ## Define platform specific environment variables.
>  PLATFORM_PACKAGE=Vlv2TbltDevicePkg
> -config_file=$WORKSPACE/$PLATFORM_PACKAGE/PlatformPkgConfig.dsc
> -
> auto_config_inc=$WORKSPACE/$PLATFORM_PACKAGE/AutoPlatformCFG.tx
> t
> +PLATFORM_PKG_PATH=$PLATFORM_PATH/$PLATFORM_PACKAGE
> +config_file=$PLATFORM_PKG_PATH/PlatformPkgConfig.dsc
> +auto_config_inc=$PLATFORM_PKG_PATH/AutoPlatformCFG.txt
> 
>  ## create new AutoPlatformCFG.txt file
>  if [ -f "$auto_config_inc" ]; then
> @@ -112,10 +121,10 @@ fi
> 
>  ## Remove the values for Platform_Type and Build_Target from BiosIdX.env
> and stage in Conf  if [ $Arch == "IA32" ]; then
> -  cp $PLATFORM_PACKAGE/BiosIdR.envConf/BiosId.env
> +  cp $PLATFORM_PKG_PATH/BiosIdR

Re: [edk2-devel] [edk2-platforms Patch 08/28] Vlv2TbltDevicePkg/bld_vlv.sh: Remove BiosId.env completely

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin ; Sun, Zailiang ; Qian,
> Yi 
> Subject: [edk2-platforms Patch 08/28] Vlv2TbltDevicePkg/bld_vlv.sh:
> Remove BiosId.env completely
> 
> From: Gary Lin 
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 25 +++--
>  1 file changed, 3 insertions(+), 22 deletions(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> index 0aa1edfb22..bceea99b2d 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -53,10 +53,6 @@ if [ -e $CORE_PATH/Conf/target.txt ]; then
>rm $CORE_PATH/Conf/target.txt
>  fi
> 
> -if [ -e $CORE_PATH/Conf/BiosId.env ]; then
> -  rm $CORE_PATH/Conf/BiosId.env
> -fi
> -
>  if [ -e $CORE_PATH/Conf/tools_def.txt ]; then
>rm $CORE_PATH/Conf/tools_def.txt
>  fi
> @@ -119,18 +115,11 @@ if [ "$2" == "" ]; then
>Usage
>  fi
> 
> -## Remove the values for Platform_Type and Build_Target from BiosIdX.env
> and stage in Conf  if [ $Arch == "IA32" ]; then
> -  cp $PLATFORM_PKG_PATH/BiosIdR.env Conf/BiosId.env
> -  echo DEFINE X64_CONFIG = FALSE  >> $auto_config_inc
> +  echo DEFINE X64_CONFIG = FALSE >> $auto_config_inc
>  else
> -  cp $PLATFORM_PKG_PATH/BiosIdx64R.env Conf/BiosId.env
> -  echo DEFINE X64_CONFIG = TRUE   >> $auto_config_inc
> +  echo DEFINE X64_CONFIG = TRUE  >> $auto_config_inc
>  fi
> -sed -i '/^BOARD_ID/d' Conf/BiosId.env
> -sed -i '/^BUILD_TYPE/d' Conf/BiosId.env
> -
> -
> 
>  ## -- Build flags settings for each Platform --
>  ##AlpineValley (ALPV):  SVP_PF_BUILD = TRUE,   ENBDT_PF_BUILD =
> FALSE,  TABLET_PF_BUILD = FALSE,  BYTI_PF_BUILD = FALSE, IVI_PF_BUILD =
> FALSE
> @@ -141,26 +130,18 @@ sed -i '/^BUILD_TYPE/d' Conf/BiosId.env
>  ##FFD8 (BLAK):  SVP_PF_BUILD = FALSE,  ENBDT_PF_BUILD = FALSE,
> TABLET_PF_BUILD = TRUE,   BYTI_PF_BUILD = FALSE, IVI_PF_BUILD = FALSE
>  echo "Setting  $1  platform configuration and BIOS ID..."
>  if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "MNW2" ]; then
> -  echo BOARD_ID = MNW2MAX >> Conf/BiosId.env
> -  echo DEFINE ENBDT_PF_BUILD = TRUE  >> $auto_config_inc
> +  echo DEFINE ENBDT_PF_BUILD = TRUE >> $auto_config_inc
>  else
>echo "Error - Unsupported PlatformType: $1"
>Usage
>  fi
> 
> -Platform_Type=$1
> -
>  if [ "$(echo $2 | tr 'a-z' 'A-Z')" == "RELEASE" ]; then
>export TARGET=RELEASE
> -  BUILD_TYPE=R
> -  echo BUILD_TYPE = R >> Conf/BiosId.env  else
>export TARGET=DEBUG
> -  BUILD_TYPE=D
> -  echo BUILD_TYPE = D >> Conf/BiosId.env  fi
> 
> -
> 
> ##
> **
>  ## Additional EDK Build Setup/Configuration
> 
> ##
> **
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43563): https://edk2.groups.io/g/devel/message/43563
Mute This Topic: https://groups.io/mt/32419746/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 07/28] Vlv2TbltDevicePkg: Add the missing headers to inf files

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin ; Sun, Zailiang ; Qian,
> Yi 
> Subject: [edk2-platforms Patch 07/28] Vlv2TbltDevicePkg: Add the missing
> headers to inf files
> 
> From: Gary Lin 
> 
> Some headers files are not listed in the inf files.
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  .../Library/FlashDeviceLib/FlashDeviceLib.inf | 2 +-
>  .../Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf | 8 +---
>  .../Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf   | 1 +
>  3 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git
> a/Platform/Intel/Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.in
> f
> b/Platform/Intel/Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.i
> nf
> index 4ef48cc12b..4f5678594a 100644
> ---
> a/Platform/Intel/Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.in
> f
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDevic
> +++ eLib.inf
> @@ -26,7 +26,7 @@ [Defines]
> 
>  [Sources]
>FlashDeviceLib.c
> -
> +  SpiChipDefinitions.h
> 
>  [Packages]
>MdePkg/MdePkg.dec
> diff --git
> a/Platform/Intel/Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf
> b/Platform/Intel/Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf
> index 9d4823d488..d2ca8f5b88 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf
> @@ -4,10 +4,12 @@
>  # ICH SMM Library that layers on top of the I/O Library to directly  #  
> access
> SMM power management registers.
>  # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
> -#
> 
> +#
> +
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> -#
> 
> +#
> +
>  #
>  #
>  #
> @@ -30,7 +32,7 @@ [Defines]
> 
>  [Sources]
>PchSmmLib.c
> -
> +  CommonHeader.h
> 
>  [Packages]
>MdePkg/MdePkg.dec
> diff --git
> a/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf
> b/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf
> index d429310ac4..c5e3cf4d55 100644
> ---
> a/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf
> +++
> b/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf
> @@ -29,6 +29,7 @@ [sources.common]
>PlatformStatusCode.c
>PlatformStatusCode.h
>PeiPostCode.c
> +  EfiStatusCode.h
> 
>  [Packages]
>MdePkg/MdePkg.dec
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43562): https://edk2.groups.io/g/devel/message/43562
Mute This Topic: https://groups.io/mt/32419744/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 09/28] Vlv2TbltDevicePkg/bld_vlv.sh: Correct the path to PlatformCapsuleGcc.dsc

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin ; Sun, Zailiang ; Qian,
> Yi 
> Subject: [edk2-platforms Patch 09/28] Vlv2TbltDevicePkg/bld_vlv.sh: Correct
> the path to PlatformCapsuleGcc.dsc
> 
> From: Gary Lin 
> 
> For the gcc build, we should use PlatformCapsuleGcc.dsc instead of
> PlatformCapsule.dsc.
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> index bceea99b2d..7fd5f44264 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -199,7 +199,7 @@ echo Skip "Running fce..."
> 
> ##
> **
>  ## Build Capsules
> 
> ##
> **
> -build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
> +build -p $PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
> 
>  echo
>  echo  The EDKII BIOS build has successfully completed. 
> --
> --
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43564): https://edk2.groups.io/g/devel/message/43564
Mute This Topic: https://groups.io/mt/32419739/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 04/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update the gcc version detection

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin ; Sun, Zailiang ; Qian,
> Yi 
> Subject: [edk2-platforms Patch 04/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update
> the gcc version detection
> 
> From: Gary Lin 
> 
> Borrow the logic from OvmfPkg/build.sh
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 19 +--
>  1 file changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> index bca112db2b..d312063428 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -170,12 +170,19 @@ sed -i '/^MAX_CONCURRENT_THREAD_NUMBER/d'
> Conf/target.txt
> 
>  gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')  case $gcc_version in
> -4.9.*|4.1[0-9].*|5.*.*|6.*.*)
> -  TARGET_TOOLS=GCC49
> -  ;;
> -*)
> -  TARGET_TOOLS=GCC48
> -  ;;
> +  [1-3].*|4.[0-7].*)
> +echo MNW2 requires GCC4.8 or later
> +exit 1
> +;;
> +  4.8.*)
> +TARGET_TOOLS=GCC48
> +;;
> +  4.9.*|6.[0-2].*)
> +TARGET_TOOLS=GCC49
> +;;
> +  *)
> +TARGET_TOOLS=GCC5
> +;;
>  esac
> 
>  ACTIVE_PLATFORM=$PLATFORM_PACKAGE/PlatformPkgGcc"$Arch".dsc
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43559): https://edk2.groups.io/g/devel/message/43559
Mute This Topic: https://groups.io/mt/32419731/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 05/28] Vlv2TbltDevicePkg/bld_vlv.sh: Remove ECP completely

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin ; Sun, Zailiang ; Qian,
> Yi 
> Subject: [edk2-platforms Patch 05/28] Vlv2TbltDevicePkg/bld_vlv.sh:
> Remove ECP completely
> 
> From: Gary Lin 
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> index d312063428..27772f47de 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -67,9 +67,6 @@ PLATFORM_PACKAGE=Vlv2TbltDevicePkg
>  config_file=$WORKSPACE/$PLATFORM_PACKAGE/PlatformPkgConfig.dsc
> 
> auto_config_inc=$WORKSPACE/$PLATFORM_PACKAGE/AutoPlatformCFG.tx
> t
> 
> -## default ECP (override with /ECP flag) -
> EDK_SOURCE=$WORKSPACE/EdkCompatibilityPkg
> -
>  ## create new AutoPlatformCFG.txt file
>  if [ -f "$auto_config_inc" ]; then
>rm $auto_config_inc
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43560): https://edk2.groups.io/g/devel/message/43560
Mute This Topic: https://groups.io/mt/32419732/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 02/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Change the root directory path

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin ; Sun, Zailiang ; Qian,
> Yi 
> Subject: [edk2-platforms Patch 02/28] Vlv2TbltDevicePkg/Build_IFWI.sh:
> Change the root directory path
> 
> From: Gary Lin 
> 
> Also make Build_IFWI.sh executable
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)  mode change 100644 => 100755
> Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> old mode 100644
> new mode 100755
> index 7063b7470d..2a22309f5f
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> @@ -86,12 +86,12 @@ else
>  fi
> 
>  ## Go to root directory
> -cd ..
> +cd ../../..
> 
>  ## Build BIOS
>  echo
> "==
> "
>  echo "Build_IFWI:  Calling BIOS build Script..."
> -./$PLATFORM_PACKAGE/bld_vlv.sh $Build_Flags $Platform_Type
> $Build_Target
> +./Platform/Intel/$PLATFORM_PACKAGE/bld_vlv.sh $Build_Flags
> +$Platform_Type $Build_Target
> 
>  echo
>  echo Finished Building BIOS.
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43557): https://edk2.groups.io/g/devel/message/43557
Mute This Topic: https://groups.io/mt/32419729/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 03/28] Vlv2TbltDevicePkg/bld_vlv.sh: Fix the log name

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin ; Sun, Zailiang ; Qian,
> Yi 
> Subject: [edk2-platforms Patch 03/28] Vlv2TbltDevicePkg/bld_vlv.sh: Fix the
> log name
> 
> From: Gary Lin 
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)  mode change 100644 => 100755
> Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> old mode 100644
> new mode 100755
> index 1eefa5de73..bca112db2b
> --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
> @@ -89,7 +89,7 @@ for (( i=1; i<=$#; ))
>Build_Flags="$Build_Flags --quiet"
>shift
>  elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/L" ]; then
> -  Build_Flags="$Build_Flags -j EKD2.log"
> +  Build_Flags="$Build_Flags -j EDK2.log"
>shift
>  elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/C" ]; then
>echo Removing previous build files ...
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43558): https://edk2.groups.io/g/devel/message/43558
Mute This Topic: https://groups.io/mt/32419730/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 01/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Add "set -e" to exit on error

2019-07-10 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:05 AM
> To: devel@edk2.groups.io
> Cc: Gary Lin ; Sun, Zailiang ; Qian,
> Yi 
> Subject: [edk2-platforms Patch 01/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Add
> "set -e" to exit on error
> 
> From: Gary Lin 
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> index 4a11a1cba9..7063b7470d 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
> @@ -19,6 +19,8 @@ function Usage ( ) {
>exit 0
>  }
> 
> +set -e
> +
>  ## Assign initial values
>  exitCode=0
>  Build_Flags=
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43556): https://edk2.groups.io/g/devel/message/43556
Mute This Topic: https://groups.io/mt/32419728/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-DscSpecification PATCH v1] DSC document: Support HOST_APPLICATION ModuleType

2019-07-10 Thread Liming Gao
Reviewed-by: Liming Gao 

>-Original Message-
>From: Lu, XiaoyuX
>Sent: Thursday, July 11, 2019 12:13 PM
>To: devel@edk2.groups.io
>Cc: Lu, XiaoyuX ; Gao, Liming ;
>Yao, Jiewen 
>Subject: [edk2-DscSpecification PATCH v1] DSC document: Support
>HOST_APPLICATION ModuleType
>
>REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1952
>
>INF spec add a new MODULE_TYPE HOST_APPLICATION, so this
>SPEC also need be updated to support this type.
>
>Cc: Liming Gao 
>Cc: Jiewen Yao 
>Signed-off-by: Xiaoyu Lu 
>---
> 1_introduction/12_terms.md | 6 +++---
> 3_edk_ii_dsc_file_format/33_platform_dsc_definition.md | 1 +
> README.md  | 1 +
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
>diff --git a/1_introduction/12_terms.md b/1_introduction/12_terms.md
>index ffd8bb6..b1b3286 100644
>--- a/1_introduction/12_terms.md
>+++ b/1_introduction/12_terms.md
>@@ -227,9 +227,9 @@ All libraries and components belong to one of the
>following module types:
> with a similar set of requirements. A module that is of module type `BASE`,
> depends only on headers and libraries provided in the MDE, while a module
>that
> is of module type DXE_DRIVER depends on common DXE components. The
>EDK II build
>-system also permits modules of type `USER_DEFINED`. These modules will
>not be
>-processed by the EDK II Build system. For a definition of the various module
>-types, see Appendix C.
>+system also permits modules of type `USER_DEFINED` and
>`HOST_APPLICATOIN`.
>+These modules will not be processed by the EDK II Build system. For a
>+definition of the various module types, see Appendix C.
>
> **Package**
>
>diff --git a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
>b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
>index 0679ff0..b31d286 100644
>--- a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
>+++ b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
>@@ -263,6 +263,7 @@ The following are common definitions used by multiple
>section types.
>{"DXE_RUNTIME_DRIVER"} {"DXE_SAL_DRIVER"}
>{"DXE_SMM_DRIVER"} {"UEFI_DRIVER"}
>{"UEFI_APPLICATION"} {"USER_DEFINED"}
>+   {"HOST_APPLICATION"}
>::=  [" " ]*
>   ::= {} {}
>   ::=  0x0A 0x0D
>diff --git a/README.md b/README.md
>index 5d774f5..42febaf 100644
>--- a/README.md
>+++ b/README.md
>@@ -195,3 +195,4 @@ Copyright (c) 2006-2017, Intel Corporation. All rights
>reserved.
> || Add !error statement section
>||
> ||[#1110](https://bugzilla.tianocore.org/show_bug.cgi?id=1110)
>Extend exclamation statement's keyword to case-insensitive
>||
> | 1.29 | [#1453](https://bugzilla.tianocore.org/show_bug.cgi?id=1453)
>Update DSC spec to remove EDK related contents
>| Mar 2019  |
>+| 1.30 | [#1952](https://bugzilla.tianocore.org/show_bug.cgi?id=1952)  add
>HOST_APPLIACTION ModuleTpye
>| July 2019  |
>--
>2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43555): https://edk2.groups.io/g/devel/message/43555
Mute This Topic: https://groups.io/mt/32426961/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-DscSpecification PATCH v1] DSC document: Support HOST_APPLICATION ModuleType

2019-07-10 Thread Xiaoyu Lu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1952

INF spec add a new MODULE_TYPE HOST_APPLICATION, so this
SPEC also need be updated to support this type.

Cc: Liming Gao 
Cc: Jiewen Yao 
Signed-off-by: Xiaoyu Lu 
---
 1_introduction/12_terms.md | 6 +++---
 3_edk_ii_dsc_file_format/33_platform_dsc_definition.md | 1 +
 README.md  | 1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/1_introduction/12_terms.md b/1_introduction/12_terms.md
index ffd8bb6..b1b3286 100644
--- a/1_introduction/12_terms.md
+++ b/1_introduction/12_terms.md
@@ -227,9 +227,9 @@ All libraries and components belong to one of the following 
module types:
 with a similar set of requirements. A module that is of module type `BASE`,
 depends only on headers and libraries provided in the MDE, while a module that
 is of module type DXE_DRIVER depends on common DXE components. The EDK II build
-system also permits modules of type `USER_DEFINED`. These modules will not be
-processed by the EDK II Build system. For a definition of the various module
-types, see Appendix C.
+system also permits modules of type `USER_DEFINED` and `HOST_APPLICATOIN`.
+These modules will not be processed by the EDK II Build system. For a
+definition of the various module types, see Appendix C.
 
 **Package**
 
diff --git a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md 
b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
index 0679ff0..b31d286 100644
--- a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
+++ b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
@@ -263,6 +263,7 @@ The following are common definitions used by multiple 
section types.
{"DXE_RUNTIME_DRIVER"} {"DXE_SAL_DRIVER"}
{"DXE_SMM_DRIVER"} {"UEFI_DRIVER"}
{"UEFI_APPLICATION"} {"USER_DEFINED"}
+   {"HOST_APPLICATION"}
::=  [" " ]*
   ::= {} {}
   ::=  0x0A 0x0D
diff --git a/README.md b/README.md
index 5d774f5..42febaf 100644
--- a/README.md
+++ b/README.md
@@ -195,3 +195,4 @@ Copyright (c) 2006-2017, Intel Corporation. All rights 
reserved.
 || Add !error statement section


 ||
 ||[#1110](https://bugzilla.tianocore.org/show_bug.cgi?id=1110) 
Extend exclamation statement's keyword to case-insensitive  

 |  
  |
 | 1.29 | [#1453](https://bugzilla.tianocore.org/show_bug.cgi?id=1453) 
Update DSC spec to remove EDK related contents  



  | Mar 2019  |
+| 1.30 | [#1952](https://bugzilla.tianocore.org/show_bug.cgi?id=1952)  add 
HOST_APPLIACTION ModuleTpye 

 | July 2019  |
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43554): https://edk2.groups.io/g/devel/message/43554
Mute This Topic: https://groups.io/mt/32426961/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v2 2/3] MdePkg/BaseLib.h: Update IA32_CR4 structure for 5-level paging

2019-07-10 Thread Ni, Ray
Laszlo, Mike,

An update to my revert proposal, I will only revert the below 2 patches:

7c5010c7f88b790f4524c4a5311819e3af5e2752
* MdePkg/BaseLib.h: Update IA32_CR4 structure for 5-level paging

7365eb2c8cf1d7112330d09918c0c67e8d0b827a
* UefiCpuPkg/PiSmmCpu: Enable 5 level paging when CPU supports


Will keep the below patch in github.
7e56f8928d8461d820a81a50908adf648279f1dc
* UefiCpuPkg/PiSmmCpu: Change variable names and comments to follow SDM

Is it good to you?
Or the revert process needs to revert whole patch series?

Can you or someone else guide me where the revert process is documented?

Thanks,
Ray

> -Original Message-
> From: Ni, Ray
> Sent: Thursday, July 11, 2019 11:25 AM
> To: Kinney, Michael D ; Laszlo Ersek
> ; devel@edk2.groups.io; Dong, Eric
> 
> Cc: Leif Lindholm ; Gao, Liming
> 
> Subject: RE: [edk2-devel] [PATCH v2 2/3] MdePkg/BaseLib.h: Update
> IA32_CR4 structure for 5-level paging
> 
> Laszlo, Mike,
> Sorry I did violate the process.
> I had two assumptions which led me violate the process:
> 1. Reviewed-by from UefiCpuPkg maintainers on this IA32_CR4 change is
> more important
> than that from MdePkg maintainers. In another word, I thought if
> UefiCpuPkg maintainers
> agree with this change, MdePkg maintainers should have no concerns.
> (It's a wrong assumption. MdePkg maintainers may have some general
> suggestions, e.g.:
> name, location, comments and etc..)
> 2. This change is directly from the published white paper and there is no
> other option regarding
>  this IA32_CR4 change.
> (It's a wrong assumption. MdePkg maintainers may have some general
> suggestions, e.g.:
> name, location, comments and etc..)
> 
> I agree I should get Reviewed-by tag from MdePkg maintainers. My
> assumptions are wrong.
> 
> To strictly follow the process, I will:
> 1. Post a patch series to revert the 3 patches.
>  Since this change doesn't break any functionality (does break the 
> process),
> I will wait for
>  Reviewed-by from each package maintainer and make sure push the
> patches after 24h.
> 2. After step #1, post a new patch series to add the 3 patches back with
> Reviewed-by tag from
> Eric and Mike, Regression-Tested-by from you.
> 
> Do you think it follows the existing process?
> 
> Sorry again for this violation.
> 
> Thanks,
> Ray
> 
> 
> > -Original Message-
> > From: Kinney, Michael D
> > Sent: Thursday, July 11, 2019 3:39 AM
> > To: Laszlo Ersek ; devel@edk2.groups.io; Dong, Eric
> > ; Ni, Ray ; Kinney, Michael D
> > 
> > Cc: Leif Lindholm ; Gao, Liming
> > 
> > Subject: RE: [edk2-devel] [PATCH v2 2/3] MdePkg/BaseLib.h: Update
> > IA32_CR4 structure for 5-level paging
> >
> > Laszlo,
> >
> > I agree with your feedback.  Process must be followed.
> >
> > I also agree that it may make sense to add some more maintainers to
> > the MdePkg, especially for some of the content in MdePkg that is
> > closely related to the UefiCpuPkg content.
> >
> > I have reviewed this patch to the BaseLib.h.  The new LA57 bit added
> > to IA32_CR4 matches the documentation in the white paper referenced in
> > the series.
> >
> > Reviewed-by: Michael D Kinney 
> >
> > Thanks,
> >
> > Mike
> >
> >
> > > -Original Message-
> > > From: Laszlo Ersek [mailto:ler...@redhat.com]
> > > Sent: Wednesday, July 10, 2019 10:17 AM
> > > To: devel@edk2.groups.io; Dong, Eric ; Ni, Ray
> > > 
> > > Cc: Leif Lindholm ; Gao, Liming
> > > ; Kinney, Michael D
> > > 
> > > Subject: Re: [edk2-devel] [PATCH v2 2/3]
> > > MdePkg/BaseLib.h: Update IA32_CR4 structure for 5-level paging
> > >
> > > Ray, Eric,
> > >
> > > (+Liming, +Mike, +Leif)
> > >
> > > On 07/09/19 03:04, Dong, Eric wrote:
> > > > Reviewed-by: Eric Dong 
> > > >
> > > >> -Original Message-
> > > >> From: Ni, Ray
> > > >> Sent: Wednesday, July 3, 2019 2:54 PM
> > > >> To: devel@edk2.groups.io
> > > >> Cc: Dong, Eric ; Laszlo Ersek
> > > >> 
> > > >> Subject: [PATCH v2 2/3] MdePkg/BaseLib.h: Update
> > > IA32_CR4 structure
> > > >> for 5-level paging
> > > >>
> > > >> 5-level paging is documented in white paper:
> > > >>
> > > https://software.intel.com/sites/default/files/managed/2b
> > > /80/5-
> > > >> level_paging_white_paper.pdf
> > > >>
> > > >> Commit f8113e25001e715390127f23e2197252cbd6d1a2
> > > >> changed Cpuid.h already.
> > > >>
> > > >> This patch updates IA32_CR4 structure to include LA57
> > > field.
> > > >>
> > > >> Signed-off-by: Ray Ni 
> > > >> Cc: Eric Dong 
> > > >> Regression-tested-by: Laszlo Ersek 
> > > >> ---
> > > >>  MdePkg/Include/Library/BaseLib.h | 3 ++-
> > > >>  1 file changed, 2 insertions(+), 1 deletion(-)
> > > >>
> > > >> diff --git a/MdePkg/Include/Library/BaseLib.h
> > > >> b/MdePkg/Include/Library/BaseLib.h
> > > >> index ebd7dd274c..a22bfc9fad 100644
> > > >> --- a/MdePkg/Include/Library/BaseLib.h
> > > >> +++ b/MdePkg/Include/Library/BaseLib.h
> > > >> @@ -5324,7 +5324,8 @@ typedef union {
> > > >>  UINT32  OSXMMEXCPT:1;   ///< Operating System

Re: [edk2-devel] [ PATCH v2 1/2] Readme.md: add submodule policy and clone commands

2019-07-10 Thread Wang, Jian J
Mike,

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 1:28 AM
> To: Leif Lindholm ; Kinney, Michael D
> 
> Cc: Wang, Jian J ; devel@edk2.groups.io; Gao,
> Liming 
> Subject: RE: [ PATCH v2 1/2] Readme.md: add submodule policy and clone
> commands
> 
> 
> 
> > -Original Message-
> > From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> > Sent: Wednesday, July 10, 2019 10:18 AM
> > To: Kinney, Michael D 
> > Cc: Wang, Jian J ;
> > devel@edk2.groups.io; Gao, Liming 
> > Subject: Re: [ PATCH v2 1/2] Readme.md: add submodule
> > policy and clone commands
> >
> > On Wed, Jul 10, 2019 at 05:08:32PM +, Kinney, Michael
> > D wrote:
> > > Leif,
> > >
> > > I think the following command has to be run from the
> > git dir that the
> > > edk2 repo was cloned into.
> > >
> > > $ git submodule update --init
> > >
> > > So I think the correct instructions would be:
> > >
> > > $ git clone https://github.com/tianocore/edk2.git
> > > $ cd edk2
> > > $ git submodule update --init
> >
> > I only said I reviewed it, not that the review was
> > correct ;)
> >
> > Yeah, good catch. I just mentally filtered out the clone
> > bit.
> >
> > > $ cd ..
> >
> > Why would you want to leave?
> 
> Because the commands the follow are more clone commands for
> edk2-platforms and edk2-non-osi.  Could move the submodule
> init action for the edk2 repo after all the clone operations.
> 

Thanks for catching the issue. I'll update the edk2/Readme.md. 
Then the edk2-platforms/Readme.md has the same issue. It will be
updated as well.

Regards,
Jian

> >
> > /
> > Leif
> >
> > > Mike
> > >
> > > > -Original Message-
> > > > From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> > > > Sent: Wednesday, July 10, 2019 7:27 AM
> > > > To: Wang, Jian J 
> > > > Cc: devel@edk2.groups.io; Kinney, Michael D
> > > > ; Gao, Liming
> > 
> > > > Subject: Re: [ PATCH v2 1/2] Readme.md: add submodule
> > policy and
> > > > clone commands
> > > >
> > > > On Wed, Jul 10, 2019 at 02:09:54PM +0800, Jian J Wang
> > > > wrote:
> > > > > > v2: update wording per Leif's and others'
> > comments
> > > >
> > > > Please drop the above line - version comments can go
> > below the ---
> > > > line, so they don't get included in the commit
> > message.
> > > >
> > > > With that:
> > > > Reviewed-by: Leif Lindholm 
> > > >
> > > > (although Liming had some further feedback)
> > > >
> > > > > REF:
> > > > https://bugzilla.tianocore.org/show_bug.cgi?id=1910
> > > > >
> > > > > A section 'Submodules' is added to clarify the
> > > > submodule policy in
> > > > > edk2 repo. Git commands are also added to show the
> > > > correct way to
> > > > > clone submodule repos, in which '--recursive' is
> > > > removed because it's
> > > > > not needed but recommended in other document.
> > > > >
> > > > > Related commits:
> > > > > Openssl-1.1.1b upgrade:
> > > > acfb90911840c38a0beb9bcfe0065668244d2b4d
> > > > > berkeley-softfloat-3:
> > > > 3cc57695df5a6e8c65fb46b993836c315cabf49d
> > > > >
> > > > > Cc: Leif Lindholm 
> > > > > Cc: Michael D Kinney 
> > > > > Cc: Liming Gao 
> > > > > Signed-off-by: Jian J Wang 
> > > > > ---
> > > > >  Readme.md | 28 
> > > > >  1 file changed, 28 insertions(+)
> > > > >
> > > > > diff --git a/Readme.md b/Readme.md index
> > e564c6c09b..c475468655
> > > > > 100644
> > > > > --- a/Readme.md
> > > > > +++ b/Readme.md
> > > > > @@ -143,3 +143,31 @@ Signed-off-by: Contributor
> > Name
> > > > 
> > > > >the change.  Each line should be less than ~70
> > > > characters.
> > > > >  * `Signed-off-by` is the contributor's signature
> > > > identifying them
> > > > >by their real/legal name and their email
> > address.
> > > > > +
> > > > > +# Submodules
> > > > > +
> > > > > +As a general policy, submodule chain should be
> > avoided
> > > > in EDK II repo
> > > > > +as possible as we can. Currently EDK II  contains
> > two
> > > > submodules
> > > > > +
> > > > > +- CryptoPkg/Library/OpensslLib/openssl
> > > > > +- ArmPkg/Library/ArmSoftFloatLib/berkeley-
> > softfloat-3
> > > > > +
> > > > > +The latter one is actually required by previous
> > one.
> > > > It's inevitable
> > > > > +in openssl-1.1.1 (since stable201905) for floating
> > > > point parameter
> > > > > +conversion, but should be dropped once there's no
> > such
> > > > need in future
> > > > > +release of openssl.
> > > > > +
> > > > > +To get a full, buildable EDK II repository, use
> > > > following two steps
> > > > > +of git command
> > > > > +
> > > > > +```
> > > > > +$ git clone https://github.com/tianocore/edk2.git
> > > > > +$ git submodule update --init> > +```
> > > > > +
> > > > > +Note: When cloning submodule repos, '--recursive'
> > > > option is not
> > > > > +recommended. EDK II itself will not use any
> > > > code/feature from
> > > > > +submodules in above submodules. So using '--
> > recursive'
> > > > adds a
> > > > > +dependency on being able to reach servers we do
> > not
>

Re: [edk2-devel] [PATCH v2 2/3] MdePkg/BaseLib.h: Update IA32_CR4 structure for 5-level paging

2019-07-10 Thread Ni, Ray
Laszlo, Mike,
Sorry I did violate the process.
I had two assumptions which led me violate the process:
1. Reviewed-by from UefiCpuPkg maintainers on this IA32_CR4 change is more 
important
than that from MdePkg maintainers. In another word, I thought if UefiCpuPkg 
maintainers
agree with this change, MdePkg maintainers should have no concerns.
(It's a wrong assumption. MdePkg maintainers may have some general 
suggestions, e.g.:
name, location, comments and etc..)
2. This change is directly from the published white paper and there is no other 
option regarding
 this IA32_CR4 change.
(It's a wrong assumption. MdePkg maintainers may have some general 
suggestions, e.g.:
name, location, comments and etc..)

I agree I should get Reviewed-by tag from MdePkg maintainers. My assumptions 
are wrong.

To strictly follow the process, I will:
1. Post a patch series to revert the 3 patches.
 Since this change doesn't break any functionality (does break the 
process), I will wait for
 Reviewed-by from each package maintainer and make sure push the patches 
after 24h.
2. After step #1, post a new patch series to add the 3 patches back with 
Reviewed-by tag from
Eric and Mike, Regression-Tested-by from you.

Do you think it follows the existing process?

Sorry again for this violation.

Thanks,
Ray


> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 3:39 AM
> To: Laszlo Ersek ; devel@edk2.groups.io; Dong, Eric 
> ; Ni, Ray ;
> Kinney, Michael D 
> Cc: Leif Lindholm ; Gao, Liming 
> 
> Subject: RE: [edk2-devel] [PATCH v2 2/3] MdePkg/BaseLib.h: Update IA32_CR4 
> structure for 5-level paging
> 
> Laszlo,
> 
> I agree with your feedback.  Process must be followed.
> 
> I also agree that it may make sense to add some more maintainers
> to the MdePkg, especially for some of the content in MdePkg that
> is closely related to the UefiCpuPkg content.
> 
> I have reviewed this patch to the BaseLib.h.  The new LA57 bit
> added to IA32_CR4 matches the documentation in the white paper
> referenced in the series.
> 
> Reviewed-by: Michael D Kinney 
> 
> Thanks,
> 
> Mike
> 
> 
> > -Original Message-
> > From: Laszlo Ersek [mailto:ler...@redhat.com]
> > Sent: Wednesday, July 10, 2019 10:17 AM
> > To: devel@edk2.groups.io; Dong, Eric
> > ; Ni, Ray 
> > Cc: Leif Lindholm ; Gao, Liming
> > ; Kinney, Michael D
> > 
> > Subject: Re: [edk2-devel] [PATCH v2 2/3]
> > MdePkg/BaseLib.h: Update IA32_CR4 structure for 5-level
> > paging
> >
> > Ray, Eric,
> >
> > (+Liming, +Mike, +Leif)
> >
> > On 07/09/19 03:04, Dong, Eric wrote:
> > > Reviewed-by: Eric Dong 
> > >
> > >> -Original Message-
> > >> From: Ni, Ray
> > >> Sent: Wednesday, July 3, 2019 2:54 PM
> > >> To: devel@edk2.groups.io
> > >> Cc: Dong, Eric ; Laszlo Ersek
> > >> 
> > >> Subject: [PATCH v2 2/3] MdePkg/BaseLib.h: Update
> > IA32_CR4 structure
> > >> for 5-level paging
> > >>
> > >> 5-level paging is documented in white paper:
> > >>
> > https://software.intel.com/sites/default/files/managed/2b
> > /80/5-
> > >> level_paging_white_paper.pdf
> > >>
> > >> Commit f8113e25001e715390127f23e2197252cbd6d1a2
> > >> changed Cpuid.h already.
> > >>
> > >> This patch updates IA32_CR4 structure to include LA57
> > field.
> > >>
> > >> Signed-off-by: Ray Ni 
> > >> Cc: Eric Dong 
> > >> Regression-tested-by: Laszlo Ersek 
> > >> ---
> > >>  MdePkg/Include/Library/BaseLib.h | 3 ++-
> > >>  1 file changed, 2 insertions(+), 1 deletion(-)
> > >>
> > >> diff --git a/MdePkg/Include/Library/BaseLib.h
> > >> b/MdePkg/Include/Library/BaseLib.h
> > >> index ebd7dd274c..a22bfc9fad 100644
> > >> --- a/MdePkg/Include/Library/BaseLib.h
> > >> +++ b/MdePkg/Include/Library/BaseLib.h
> > >> @@ -5324,7 +5324,8 @@ typedef union {
> > >>  UINT32  OSXMMEXCPT:1;   ///< Operating System
> > Support for
> > >>  ///< Unmasked SIMD
> > Floating Point
> > >>  ///< Exceptions.
> > >> -UINT32  Reserved_0:2;   ///< Reserved.
> > >> +UINT32  Reserved_2:1;   ///< Reserved.
> > >> +UINT32  LA57:1; ///< Linear Address
> > 57bit.
> > >>  UINT32  VMXE:1; ///< VMX Enable
> > >>  UINT32  Reserved_1:18;  ///< Reserved.
> > >>} Bits;
> >
> > I'm sorry but you will have to revert this patch series
> > immediately.
> > None of the MdePkg maintainers have approved this patch -
> > - commit 7c5010c7f88b.
> >
> > In the first place, Mike and Liming were never CC'd on
> > the patch, so they may not have noticed it, even.
> >
> > The situation is very similar to the recent SM3 crypto
> > series that I had to revert myself. An MdePkg patch was
> > pushed without package owner review.
> >
> > Can you guys please revert this series immediately,
> > without me having to do it?
> >
> >
> > If we think that MdePkg should have more "M" folks, in
> > order to distribute the review load better, then we
> > should address that problem first. Ignoring rules ju

Re: [edk2-devel] [PATCH] SecurityPkg: Don't Verify the enrolled PK in setup mode

2019-07-10 Thread Zhang, Chao B
HI Laszlo:
   There is a discussion over this issue in UEFI Manits 
https://mantis.uefi.org/mantis/view.php?id=1983
The justification lies here:
  Spec perspective:
Section 8.2.2  : In SetupMode Secure Boot Policy variables shall consider 
step 3 and 4 check to be successful.
Section 32.3.1 : If in the platform is in stepup mode, then the new PKpub 
may be signed with PKpriv
Customer needs:
 1) PK update process is complex based on current implementation – self 
signed PK is required. 2 PK images are required
- new PK signed with the old PKprivate, to be used if system is in user mode
- new self-sighed PK (new PK signed with new PKprivate) to be used if system is 
in setup mode
   2) PKpub Default can be easily updated to PK

Back to Laszlo’s question
  (1) What is the exact failure (or spec non-conformance) scenario?
 A:Please see above explanation
 (2a) whether skipping step#4 in SetupMode is a bug in the spec -- because, 
I think it is;
 A:   Please see customer needs part in above explanation
 (2b) whether the edk2 code would continue enforcing self-signedness on
  X509 certificates, if the proposed patch were applied.
  A:  After this patch, there is no self-encrypted PK check. Per 
discussion, we believe that is not a new security hole
 Even with self-proofed PK check, attacker can easily spoof a faked PK 
attack in setup mode.   Generally speaking,
 PK provision should happen in Build phase or with Physical Presence 
Asserted.


From: Laszlo Ersek [mailto:ler...@redhat.com]
Sent: Thursday, July 11, 2019 1:04 AM
To: devel@edk2.groups.io; Wang, Jian J ; Zhang, Chao B 
; Derek Lin ; Cinnamon Shia 

Subject: Re: [edk2-devel] [PATCH] SecurityPkg: Don't Verify the enrolled PK in 
setup mode

Hi,

On 07/10/19 10:50, Wang, Jian J wrote:
> Hi Derek,
>
> Please file a Bugzilla for this issue. With it addressed,
>
> Reviewed-by: Jian J Wang 
> jian.j.w...@intel.com>

I saw this patch as soon as it was posted, and I've been hoping for a
deeper discussion on the list. (I didn't ask my questions immediately
because I felt they might have been somewhat naive.) So I guess I have
to ask them now :)


(1) What is the exact failure (or spec non-conformance) scenario?

Is it the problem that, currently, even if SetupMode is 1, CustomMode
also needs to be set, for enrolling a self-signed PK?

(Looking at the patch itself, it looks like the subcondition that is
*not* the CustomMode check is relaxed; so that seems to support my
question.)


(2) Can we please confirm that the code will continue to enforce
self-signedness?

I checked the spec, and I'm a bit worried about the spec language
proper. Page 246 in UEFI-2.8 says,

  3. If the variable SetupMode==1, and the variable is a secure boot
 policy variable, then the firmware implementation shall consider
 the checks in the following steps 4 and 5 to have passed, and
 proceed with updating the variable value as outlined below.

  4. Verify the signature by:
 — extracting the EFI_VARIABLE_AUTHENTICATION_2 descriptor from the
   Data buffer;
 — using the descriptor contents and other parameters to (a)
   construct the input to the digest algorithm; (b) computing the
   digest; and (c) comparing the digest with the result of applying
   the signer’s public key to the signature.

In other words, step#4 seems to stand for verifying self-signedness, and
step#3 appears to require that *not even* self-signedness be enforced,
when in SetupMode.

Honestly, I think that step#4 should never be skipped. In other words,
self-signedness should be unconditional.

A certificate is basically a signed statement that a particular public
key belongs to a particular entity (such as "FooBar"). If *not even*
FooBar signs that statement, then the statement has *zero* credibility.
So why should we accept it for any purpose at all?

Speaking in terms of "PK" (UEFI Platform Key), specifically: what good
would a platform vendor be that failed to sign its own PK?

So, I'd like to understand:

(2a) whether skipping step#4 in SetupMode is a bug in the spec --
because, I think it is;

(2b) whether the edk2 code would continue enforcing self-signedness on
X509 certificates, if the proposed patch were applied.

Thanks!
Laszlo

> From: devel@edk2.groups.io 
> [mailto:devel@edk2.groups.io] On Behalf Of Zhang, Chao B
> Sent: Tuesday, July 09, 2019 11:39 PM
> To: devel@edk2.groups.io; 
> derek.l...@hpe.com
> Subject: Re: [edk2-devel] [PATCH] SecurityPkg: Don't Verify the enrolled PK 
> in setup mode
>
> Hi Derek:
>The patch is good to me.
>Reviewed-by : Chao Zhang 
> mailto:chao.b.zh...@intel.com>>
>
> From: 
> devel@edk2.groups.io

Re: [edk2-devel] [PATCH V2 2/4] UefiCpuPkg/CpuDxe: Implement Cpu2 protocol

2019-07-10 Thread Gao, Zhichao



> -Original Message-
> From: Dong, Eric
> Sent: Thursday, July 11, 2019 10:22 AM
> To: Gao, Zhichao ; devel@edk2.groups.io
> Cc: Sean Brogan ; Ni, Ray ;
> Laszlo Ersek ; Gao, Liming ;
> Michael Turner ; Bret Barkelew
> 
> Subject: RE: [PATCH V2 2/4] UefiCpuPkg/CpuDxe: Implement Cpu2 protocol
> 
> Hi Zhizhao,
> 
> The new add files don't have copyright info, is it ok?

I forgot add file comment for Ia32/EnableInterruptsAndSleep.c. Also lose the 
BSD+Patent License. I would add them in the future.
For the copyright:
The code is contributed by Microsoft at 
https://github.com/Microsoft/mu_basecore/blob/release/201808/MdePkg/Library/BaseLib/X64/EnableInterrupts.nasm#L48
I move the code from MdePkg to UefiCpuPkg to a single file. It is inappropriate 
to add both intel (not contributor) and Microsoft (they didn't add in the above 
link).
So I keep the copyright blank. I don't know whether it is ok without copyright.

Hi Liming,

What's your opinion?

Thanks,
Zhichao

> 
> Thanks,
> Eric
> 
> > -Original Message-
> > From: Gao, Zhichao
> > Sent: Tuesday, July 9, 2019 4:40 PM
> > To: devel@edk2.groups.io
> > Cc: Sean Brogan ; Dong, Eric
> > ; Ni, Ray ; Laszlo Ersek
> > ; Gao, Liming ; Michael
> > Turner ; Bret Barkelew
> > 
> > Subject: [PATCH V2 2/4] UefiCpuPkg/CpuDxe: Implement Cpu2 protocol
> >
> > From: Sean Brogan 
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1400
> >
> > Implement Cp2 protocol: it has one interface to enable the interrupt
> > and put cpu to sleep and wait for an interrupt.
> >
> > Cc: Eric Dong 
> > Cc: Ray Ni 
> > Cc: Laszlo Ersek 
> > Cc: Liming Gao 
> > Cc: Sean Brogan 
> > Cc: Michael Turner 
> > Cc: Bret Barkelew 
> > Signed-off-by: Zhichao Gao 
> > ---
> >  UefiCpuPkg/CpuDxe/CpuDxe.c| 38 +++
> >  UefiCpuPkg/CpuDxe/CpuDxe.h| 25 
> >  UefiCpuPkg/CpuDxe/CpuDxe.inf  |  3 ++
> >  .../CpuDxe/Ia32/EnableInterruptsAndSleep.c| 24 
> >  .../CpuDxe/X64/EnableInterruptsAndSleep.nasm  | 31 +++
> >  5 files changed, 121 insertions(+)
> >  create mode 100644
> UefiCpuPkg/CpuDxe/Ia32/EnableInterruptsAndSleep.c
> >  create mode 100644
> > UefiCpuPkg/CpuDxe/X64/EnableInterruptsAndSleep.nasm
> >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43549): https://edk2.groups.io/g/devel/message/43549
Mute This Topic: https://groups.io/mt/32403450/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH V2 2/4] UefiCpuPkg/CpuDxe: Implement Cpu2 protocol

2019-07-10 Thread Dong, Eric
Hi Zhizhao,

The new add files don't have copyright info, is it ok?

Thanks,
Eric

> -Original Message-
> From: Gao, Zhichao
> Sent: Tuesday, July 9, 2019 4:40 PM
> To: devel@edk2.groups.io
> Cc: Sean Brogan ; Dong, Eric
> ; Ni, Ray ; Laszlo Ersek
> ; Gao, Liming ; Michael Turner
> ; Bret Barkelew
> 
> Subject: [PATCH V2 2/4] UefiCpuPkg/CpuDxe: Implement Cpu2 protocol
> 
> From: Sean Brogan 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1400
> 
> Implement Cp2 protocol: it has one interface to enable the interrupt and put
> cpu to sleep and wait for an interrupt.
> 
> Cc: Eric Dong 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Cc: Liming Gao 
> Cc: Sean Brogan 
> Cc: Michael Turner 
> Cc: Bret Barkelew 
> Signed-off-by: Zhichao Gao 
> ---
>  UefiCpuPkg/CpuDxe/CpuDxe.c| 38 +++
>  UefiCpuPkg/CpuDxe/CpuDxe.h| 25 
>  UefiCpuPkg/CpuDxe/CpuDxe.inf  |  3 ++
>  .../CpuDxe/Ia32/EnableInterruptsAndSleep.c| 24 
>  .../CpuDxe/X64/EnableInterruptsAndSleep.nasm  | 31 +++
>  5 files changed, 121 insertions(+)
>  create mode 100644 UefiCpuPkg/CpuDxe/Ia32/EnableInterruptsAndSleep.c
>  create mode 100644
> UefiCpuPkg/CpuDxe/X64/EnableInterruptsAndSleep.nasm
> 
> diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
> index 7d7270e10b..2eeffcf426 100644
> --- a/UefiCpuPkg/CpuDxe/CpuDxe.c
> +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
> @@ -18,6 +18,7 @@
>  //
>  BOOLEAN   InterruptState = FALSE;
>  EFI_HANDLEmCpuHandle = NULL;
> +EFI_HANDLEmCpu2Handle = NULL;
>  BOOLEAN   mIsFlushingGCD;
>  BOOLEAN   mIsAllocatingPageTable = FALSE;
>  UINT64mValidMtrrAddressMask;
> @@ -96,6 +97,10 @@ EFI_CPU_ARCH_PROTOCOL  gCpu = {
>4   // DmaBufferAlignment
>  };
> 
> +EDKII_CPU2_PROTOCOL   gCpu2 = {
> +  CpuEnableAndWaitForInterrupt
> +};
> +
>  //
>  // CPU Arch Protocol Functions
>  //
> @@ -499,6 +504,28 @@ CpuSetMemoryAttributes (
>return AssignMemoryPageAttributes (NULL, BaseAddress, Length,
> MemoryAttributes, NULL);  }
> 
> +//
> +// CPU2 Protocol Functions
> +//
> +/**
> +  This function enables CPU interrupts and then waits for an interrupt to
> arrive.
> +
> +  @param  This  The EFI_CPU2_PROTOCOL instance.
> +
> +  @retval EFI_SUCCESS   Interrupts are enabled on the processor.
> +  @retval EFI_DEVICE_ERROR  Interrupts could not be enabled on the
> processor.
> +
> +**/
> +EFI_STATUS
> +CpuEnableAndWaitForInterrupt (
> +  IN EDKII_CPU2_PROTOCOL  *This
> +  )
> +{
> +  EnableInterruptsAndSleep ();
> +
> +  return EFI_SUCCESS;
> +}
> +
>  /**
>Initializes the valid bits mask and valid address mask for MTRRs.
> 
> @@ -1211,6 +1238,17 @@ InitializeCpu (
>);
>ASSERT_EFI_ERROR (Status);
> 
> +  //
> +  // Install CPU2 Protocol
> +  //
> +  Status = gBS->InstallMultipleProtocolInterfaces (
> +  &mCpu2Handle,
> +  &gEdkiiCpu2ProtocolGuid,
> +  &gCpu2,
> +  NULL
> +  );
> +  ASSERT_EFI_ERROR (Status);
> +
>InitializeMpSupport ();
> 
>return Status;
> diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/CpuDxe.h
> index b029be430b..c1398830ba 100644
> --- a/UefiCpuPkg/CpuDxe/CpuDxe.h
> +++ b/UefiCpuPkg/CpuDxe/CpuDxe.h
> @@ -12,6 +12,7 @@
>  #include 
> 
>  #include 
> +#include 
>  #include 
>  #include 
> 
> @@ -305,6 +306,30 @@ PageFaultExceptionHandler (
>IN EFI_SYSTEM_CONTEXT   SystemContext
>);
> 
> +/**
> +  This function enables CPU interrupts and then waits for an interrupt to
> arrive.
> +
> +  @param  This  The EFI_CPU2_PROTOCOL instance.
> +
> +  @retval EFI_SUCCESS   Interrupts are enabled on the processor.
> +  @retval EFI_DEVICE_ERROR  Interrupts could not be enabled on the
> processor.
> +
> +**/
> +EFI_STATUS
> +CpuEnableAndWaitForInterrupt (
> +  IN EDKII_CPU2_PROTOCOL  *This
> +  );
> +
> +/**
> +  Enables CPU interrupts and then waits for an interrupt to arrive.
> +
> +**/
> +VOID
> +EFIAPI
> +EnableInterruptsAndSleep (
> +  VOID
> +  );
> +
>  extern BOOLEAN mIsAllocatingPageTable;
>  extern UINTN   mNumberOfProcessors;
> 
> diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.inf
> b/UefiCpuPkg/CpuDxe/CpuDxe.inf index 57381dbc85..334ddb142f 100644
> --- a/UefiCpuPkg/CpuDxe/CpuDxe.inf
> +++ b/UefiCpuPkg/CpuDxe/CpuDxe.inf
> @@ -54,14 +54,17 @@
> 
>  [Sources.IA32]
>Ia32/CpuAsm.nasm
> +  Ia32/EnableInterruptsAndSleep.c
> 
>  [Sources.X64]
>X64/CpuAsm.nasm
> +  X64/EnableInterruptsAndSleep.nasm
> 
>  [Protocols]
>gEfiCpuArchProtocolGuid   ## PRODUCES
>gEfiMpServiceProtocolGuid ## PRODUCES
>gEfiSmmBase2ProtocolGuid  ## SOMETIMES_CONSUMES
> +  gEdkiiCpu2ProtocolGuid## PRODUCES
> 

Re: [edk2-devel] [PATCH] UefiCpuPkg/PiSmmCpu: Fix GCC7/GCC8 build failure

2019-07-10 Thread Dong, Eric
Reviewed-by: Eric Dong 

> -Original Message-
> From: Ni, Ray
> Sent: Thursday, July 11, 2019 9:17 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D ; Dong, Eric
> ; Laszlo Ersek 
> Subject: [PATCH] UefiCpuPkg/PiSmmCpu: Fix GCC7/GCC8 build failure
> 
> Signed-off-by: Ray Ni 
> Cc: Michael D Kinney 
> Cc: Eric Dong 
> Cc: Laszlo Ersek 
> ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> index c31160735a..a3b62f7787 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> @@ -571,7 +571,7 @@ ReclaimPages (
>//
>// First, find the leaf entry has the smallest access record value
>//
> -  for (Pml5Index = 0; Pml5Index < Enable5LevelPaging ? (EFI_PAGE_SIZE /
> sizeof (*Pml4)) : 1; Pml5Index++) {
> +  for (Pml5Index = 0; Pml5Index < (Enable5LevelPaging ? (EFI_PAGE_SIZE /
> sizeof (*Pml4)) : 1); Pml5Index++) {
>  if ((Pml5[Pml5Index] & IA32_PG_P) == 0 || (Pml5[Pml5Index] &
> IA32_PG_PMNT) != 0) {
>//
>// If the PML5 entry is not present or is masked, skip it
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43547): https://edk2.groups.io/g/devel/message/43547
Mute This Topic: https://groups.io/mt/32422914/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] UefiCpuPkg RegisterCpuFeaturesLib: Fix an ASSERTION issue

2019-07-10 Thread Dong, Eric
Reviewed-by: Eric Dong 

> -Original Message-
> From: Zeng, Star
> Sent: Wednesday, July 10, 2019 7:43 PM
> To: devel@edk2.groups.io
> Cc: Zeng, Star ; Laszlo Ersek ;
> Dong, Eric ; Ni, Ray ; Kumar,
> Chandana C ; Li, Kevin Y
> 
> Subject: [PATCH] UefiCpuPkg RegisterCpuFeaturesLib: Fix an ASSERTION
> issue
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1968
> 
> We met assertion like below, it happens when there is only one processor.
> 
> ASSERT_EFI_ERROR (Status = Not started)
> ASSERT [CpuFeaturesDxe] X:\XXX\XXX\RegisterCpuFeaturesLib\
>   DxeRegisterCpuFeaturesLib.c(149): !EFI_ERROR (Status)
> 
> The code should not call StartupAllAPs when there is only one processor.
> 
> Cc: Laszlo Ersek 
> Cc: Eric Dong 
> Cc: Ray Ni 
> Cc: Chandana Kumar 
> Cc: Kevin Li 
> Signed-off-by: Star Zeng 
> ---
>  .../CpuFeaturesInitialize.c   | 10 +++--
>  .../DxeRegisterCpuFeaturesLib.c   | 43 +++
>  .../PeiRegisterCpuFeaturesLib.c   | 11 +++--
>  3 files changed, 37 insertions(+), 27 deletions(-)
> 
> diff --git
> a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> index aff7ad600cad..1746f4f07f7b 100644
> --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> @@ -1071,10 +1071,12 @@ CpuFeaturesDetect (
> 
>CpuInitDataInitialize ();
> 
> -  //
> -  // Wakeup all APs for data collection.
> -  //
> -  StartupAPsWorker (CollectProcessorData, NULL);
> +  if (CpuFeaturesData->NumberOfCpus > 1) {
> +//
> +// Wakeup all APs for data collection.
> +//
> +StartupAPsWorker (CollectProcessorData, NULL);  }
> 
>//
>// Collect data on BSP
> diff --git
> a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c
> b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c
> index 9c78a2d993c4..ffd99046a6cd 100644
> ---
> a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c
> +++
> b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLi
> +++ b.c
> @@ -229,31 +229,36 @@ CpuFeaturesInitialize (
>OldBspNumber = GetProcessorIndex (CpuFeaturesData);
>CpuFeaturesData->BspNumber = OldBspNumber;
> 
> -  Status = gBS->CreateEvent (
> -  EVT_NOTIFY_WAIT,
> -  TPL_CALLBACK,
> -  EfiEventEmptyFunction,
> -  NULL,
> -  &MpEvent
> -  );
> -  ASSERT_EFI_ERROR (Status);
> +  if (CpuFeaturesData->NumberOfCpus > 1) {
> +Status = gBS->CreateEvent (
> +EVT_NOTIFY_WAIT,
> +TPL_CALLBACK,
> +EfiEventEmptyFunction,
> +NULL,
> +&MpEvent
> +);
> +ASSERT_EFI_ERROR (Status);
> +
> +//
> +// Wakeup all APs for programming.
> +//
> +StartupAPsWorker (SetProcessorRegister, MpEvent);  }
> 
> -  //
> -  // Wakeup all APs for programming.
> -  //
> -  StartupAPsWorker (SetProcessorRegister, MpEvent);
>//
>// Programming BSP
>//
>SetProcessorRegister (CpuFeaturesData);
> 
> -  //
> -  // Wait all processors to finish the task.
> -  //
> -  do {
> -Status = gBS->CheckEvent (MpEvent);
> -  } while (Status == EFI_NOT_READY);
> -  ASSERT_EFI_ERROR (Status);
> +  if (CpuFeaturesData->NumberOfCpus > 1) {
> +//
> +// Wait all processors to finish the task.
> +//
> +do {
> +  Status = gBS->CheckEvent (MpEvent);
> +} while (Status == EFI_NOT_READY);
> +ASSERT_EFI_ERROR (Status);
> +  }
> 
>//
>// Switch to new BSP if required
> diff --git
> a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
> b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
> index 2b1553f9b84b..8ad5a40e5a44 100644
> ---
> a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
> +++
> b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLi
> +++ b.c
> @@ -273,10 +273,13 @@ CpuFeaturesInitialize (
>// DXE type instance.
>//
> 
> -  //
> -  // Wakeup all APs for programming.
> -  //
> -  StartupAPsWorker (SetProcessorRegister, NULL);
> +  if (CpuFeaturesData->NumberOfCpus > 1) {
> +//
> +// Wakeup all APs for programming.
> +//
> +StartupAPsWorker (SetProcessorRegister, NULL);  }
> +
>//
>// Programming BSP
>//
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43546): https://edk2.groups.io/g/devel/message/43546
Mute This Topic: https://groups.io/mt/32415229/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch 0/7] Revert new added BfmLib/FCE/FMMT

2019-07-10 Thread Bob Feng
Reviewed-by: Feng Bob C 

-Original Message-
From: Gao, Liming 
Sent: Thursday, July 11, 2019 9:45 AM
To: devel@edk2.groups.io
Cc: Leif Lindholm ; Feng, Bob C 
Subject: [Patch 0/7] Revert new added BfmLib/FCE/FMMT

Rewrite those tools for review again.
Now, move them into edk2-staging/FceFmmt branch.

Cc: Leif Lindholm 
Cc: Feng Bob C 

Liming Gao (7):
  Revert "BaseTools/FCE: Change FCE script type in PosixLike"
  Revert "BaseTools/BfmLib: Change BfmLib script type in PosixLike"
  Revert "BaseTools/FMMT: Change FMMT script type in PosixLike"
  Revert "BaseTools: fix FCE build when edksetup not executed"
  Revert "BaseTools/FMMT: Add a tool FMMT"
  Revert "BaseTools/FCE: Add a tool FCE"
  Revert "BaseTools/BfmLib: Add a tool BfmLib"

 BaseTools/Source/C/BfmLib/BfmLib.c | 4355 -
 BaseTools/Source/C/BfmLib/BinFileManager.c | 1024 
 BaseTools/Source/C/FCE/BinaryCreate.c  |  216 -
 BaseTools/Source/C/FCE/BinaryParse.c   | 1326 
 BaseTools/Source/C/FCE/Common.c| 2183 ---
 BaseTools/Source/C/FCE/Expression.c| 2367 ---
 BaseTools/Source/C/FCE/Fce.c   | 6449 
 BaseTools/Source/C/FCE/IfrParse.c  | 4836 ---
 BaseTools/Source/C/FCE/MonotonicBasedVariable.c|  874 ---
 BaseTools/Source/C/FCE/TimeBasedVariable.c |  878 ---
 BaseTools/Source/C/FCE/Variable.c  | 1091 
 BaseTools/Source/C/FMMT/FirmwareModuleManagement.c | 2559 
 BaseTools/Source/C/FMMT/FmmtLib.c  | 5051 ---
 BaseTools/Source/C/FMMT/Rebase.c   |  846 ---
 BaseTools/BinWrappers/PosixLike/BfmLib |   29 -
 BaseTools/BinWrappers/PosixLike/FCE|   29 -
 BaseTools/BinWrappers/PosixLike/FMMT   |   29 -
 BaseTools/Source/C/BfmLib/BinFileManager.h |  439 --
 BaseTools/Source/C/BfmLib/GNUmakefile  |   15 -
 BaseTools/Source/C/BfmLib/Makefile |   17 -
 BaseTools/Source/C/FCE/BinaryCreate.h  |  157 -
 BaseTools/Source/C/FCE/BinaryParse.h   |  187 -
 BaseTools/Source/C/FCE/Common.h|  999 ---
 BaseTools/Source/C/FCE/Fce.h   |  447 --
 BaseTools/Source/C/FCE/GNUmakefile |   55 -
 BaseTools/Source/C/FCE/IfrParse.h  |  789 ---
 BaseTools/Source/C/FCE/Makefile|   19 -
 BaseTools/Source/C/FCE/MonotonicBasedVariable.h|  162 -
 BaseTools/Source/C/FCE/TimeBasedVariable.h |  166 -
 BaseTools/Source/C/FCE/Variable.h  |  154 -
 BaseTools/Source/C/FCE/VariableCommon.h|   55 -
 BaseTools/Source/C/FMMT/FirmwareModuleManagement.h |  479 --
 BaseTools/Source/C/FMMT/FmmtConf.ini   |6 -
 BaseTools/Source/C/FMMT/GNUmakefile|   16 -
 BaseTools/Source/C/FMMT/Makefile   |   17 -
 BaseTools/Source/C/FMMT/Rebase.h   |   31 -
 BaseTools/Source/C/GNUmakefile |5 +-
 BaseTools/Source/C/Makefile|5 +-
 38 files changed, 2 insertions(+), 38360 deletions(-)  delete mode 100644 
BaseTools/Source/C/BfmLib/BfmLib.c
 delete mode 100644 BaseTools/Source/C/BfmLib/BinFileManager.c
 delete mode 100644 BaseTools/Source/C/FCE/BinaryCreate.c
 delete mode 100644 BaseTools/Source/C/FCE/BinaryParse.c
 delete mode 100644 BaseTools/Source/C/FCE/Common.c  delete mode 100644 
BaseTools/Source/C/FCE/Expression.c
 delete mode 100644 BaseTools/Source/C/FCE/Fce.c  delete mode 100644 
BaseTools/Source/C/FCE/IfrParse.c  delete mode 100644 
BaseTools/Source/C/FCE/MonotonicBasedVariable.c
 delete mode 100644 BaseTools/Source/C/FCE/TimeBasedVariable.c
 delete mode 100644 BaseTools/Source/C/FCE/Variable.c  delete mode 100644 
BaseTools/Source/C/FMMT/FirmwareModuleManagement.c
 delete mode 100644 BaseTools/Source/C/FMMT/FmmtLib.c  delete mode 100644 
BaseTools/Source/C/FMMT/Rebase.c  delete mode 100755 
BaseTools/BinWrappers/PosixLike/BfmLib
 delete mode 100755 BaseTools/BinWrappers/PosixLike/FCE
 delete mode 100755 BaseTools/BinWrappers/PosixLike/FMMT
 delete mode 100644 BaseTools/Source/C/BfmLib/BinFileManager.h
 delete mode 100644 BaseTools/Source/C/BfmLib/GNUmakefile
 delete mode 100644 BaseTools/Source/C/BfmLib/Makefile
 delete mode 100644 BaseTools/Source/C/FCE/BinaryCreate.h
 delete mode 100644 BaseTools/Source/C/FCE/BinaryParse.h
 delete mode 100644 BaseTools/Source/C/FCE/Common.h  delete mode 100644 
BaseTools/Source/C/FCE/Fce.h  delete mode 100644 
BaseTools/Source/C/FCE/GNUmakefile
 delete mode 100644 BaseTools/Source/C/FCE/IfrParse.h  delete mode 100644 
BaseTools/Source/C/FCE/Makefile  delete mode 100644 
BaseTools/Source/C/FCE/MonotonicBasedVariable.h
 delete mode 100644 BaseTools/Source/C/FCE/TimeBasedVariable.h
 delete mode 100644 BaseTools/Source/C/FCE/Variable.h  delete mode 100644 
BaseTools/Source/C/FCE/

Re: [edk2-devel] [Patch v3] BaseTools: Fix GCC compiler failure in new added tools.

2019-07-10 Thread Liming Gao
Mike:
  Yes. I send the patch and revert them today. 

Thanks
Liming
>-Original Message-
>From: Kinney, Michael D
>Sent: Thursday, July 11, 2019 4:10 AM
>To: Gao, Liming ; devel@edk2.groups.io;
>leif.lindh...@linaro.org; Kinney, Michael D 
>Cc: Gao, Zhichao ; Feng, Bob C
>; Andrew Fish ; Laszlo Ersek
>
>Subject: RE: [edk2-devel] [Patch v3] BaseTools: Fix GCC compiler failure in
>new added tools.
>
>Liming,
>
>I agree that edk2-staging is a good place to work on cleaning
>these tools up.
>
>Please revert the commit of these tools today so GCC builds
>are not broken.
>
>Thanks,
>
>Mike
>
>> -Original Message-
>> From: Gao, Liming
>> Sent: Wednesday, July 10, 2019 6:43 AM
>> To: devel@edk2.groups.io; leif.lindh...@linaro.org
>> Cc: Gao, Zhichao ; Feng, Bob C
>> ; Andrew Fish ;
>> Laszlo Ersek ; Kinney, Michael D
>> 
>> Subject: RE: [edk2-devel] [Patch v3] BaseTools: Fix GCC
>> compiler failure in new added tools.
>>
>> Lefi:
>>
>> > -Original Message-
>> > From: devel@edk2.groups.io
>> [mailto:devel@edk2.groups.io] On Behalf Of
>> > Leif Lindholm
>> > Sent: Wednesday, July 10, 2019 2:26 AM
>> > To: devel@edk2.groups.io; Gao, Liming
>> 
>> > Cc: Gao, Zhichao ; Feng, Bob C
>> > ; Andrew Fish ;
>> Laszlo Ersek
>> > ; Kinney, Michael D
>> 
>> > Subject: Re: [edk2-devel] [Patch v3] BaseTools: Fix GCC
>> compiler failure in new added tools.
>> >
>> > Hi Liming,
>> >
>> > On Tue, Jul 09, 2019 at 05:53:33PM +0800, Liming Gao
>> wrote:
>> > > From: gaozhic 
>> > >
>> > > GCC 7 or 8 reports some warnings in new added
>> FCE/FMMT/BlmLib.
>> >
>> > Please list the specific warnings addressed.
>> > (But also see my comments below - I think this utility
>> needs ripping
>> > out and rewriting.)
>> >
>> > > Signed-off-by: Liming Gao 
>> > > Cc: Bob Feng 
>> > > ---
>> > > In V2:
>> > >   Fix GCC8 compiler issue.
>> > >
>> > > In V3:
>> > >   Fix snprintf wrong replacement.
>> > >
>> > >  BaseTools/Source/C/BfmLib/BfmLib.c |
>> 117 +++--
>> > >  BaseTools/Source/C/FCE/BinaryParse.c   |
>> 2 +-
>> > >  BaseTools/Source/C/FMMT/FirmwareModuleManagement.c |
>> 2 +-
>> > >  BaseTools/Source/C/FMMT/FmmtLib.c  |
>> 117 +++--
>> > >  4 files changed, 122 insertions(+), 116 deletions(-)
>> > >
>> > > diff --git a/BaseTools/Source/C/BfmLib/BfmLib.c
>> > > b/BaseTools/Source/C/BfmLib/BfmLib.c
>> > > index 9dedda3da2..8d0ec9038c 100644
>> > > --- a/BaseTools/Source/C/BfmLib/BfmLib.c
>> > > +++ b/BaseTools/Source/C/BfmLib/BfmLib.c
>> > > @@ -9,6 +9,9 @@
>> > >
>> > >  #include "BinFileManager.h"
>> > >
>> > > +#define STR_LEN_MAX_4K 4096
>> > > +#define STR_LEN_MAX_1K 1024
>> > > +
>> >
>> > Coding style 3.3.3: "Code files should not contain
>> #define and typedef
>> > statements."
>> >
>> > Move these to BinFileManager.h?
>> >
>> > >  #define EFI_TEST_FFS_ATTRIBUTES_BIT(FvbAttributes,
>> TestAttributes, Bit) \
>> > >  ( \
>> > >(BOOLEAN) ( \
>> > > @@ -116,7 +119,7 @@ LibInitializeFvStruct (
>> > >
>> > >for (Index = 0; Index < MAX_NUMBER_OF_FILES_IN_FV;
>> Index ++) {
>> > >  memset (Fv->FfsAttuibutes[Index].FfsName, '\0',
>> _MAX_PATH);
>> > > -memset (Fv->FfsAttuibutes[Index].UiName, '\0',
>> _MAX_PATH);
>> > > +memset (Fv->FfsAttuibutes[Index].UiName, '\0',
>> _MAX_PATH *
>> > > + sizeof (CHAR16));
>> > >
>> > >  Fv->FfsAttuibutes[Index].IsLeaf   =
>> TRUE;
>> > >  Fv->FfsAttuibutes[Index].TotalSectionNum  =
>> 0;
>> > > @@ -2399,153 +2402,153 @@ LibFvHeaderAttributeToStr (
>> > >
>> > >LocalStr  = NULL;
>> > >
>> > > -  LocalStr = (CHAR8 *) malloc (1024 * 4);
>> > > +  LocalStr = (CHAR8 *) malloc (STR_LEN_MAX_4K);
>> > >
>> > >if (LocalStr == NULL) {
>> > >  printf ("Out of resource, memory allocation
>> failed. \n");
>> > >  return EFI_OUT_OF_RESOURCES;
>> > >}
>> > >
>> > > -  memset (LocalStr, '\0', 1024 * 4);
>> > > +  memset (LocalStr, '\0', STR_LEN_MAX_4K);
>> > >
>> > >if (Attr == 0 || InfFile  == NULL) {
>> > >  free (LocalStr);
>> > >  return EFI_INVALID_PARAMETER;
>> > >}
>> > >
>> > > -  strncat (LocalStr, "[attributes] \n",
>> sizeof("[attributes] \n"));
>> > > +  strncat (LocalStr, "[attributes] \n",
>> STR_LEN_MAX_4K - strlen
>> > > + (LocalStr) - 1);
>> >
>> > This is a very inefficient, and difficult to read, way
>> of doing this.
>> > It also performs absolutely no error checking (making
>> any future
>> > debugging tedious at best).
>> >
>> This change is to fix gcc warning -Werror=sizeof-pointer-
>> memaccess.
>> strncat is the safe version API. So, it is used here.
>>
>> > I have to be honest - looking at this code, I think the
>> right thing to
>> > do would be to revert the commit adding it and
>> reworking the utility
>> > completely (making sure it gets serious review) before
>> merging it.
>> >
>> > I am not surprised the compilers get upset.
>> >
>> > This made me have a closer look at the patches adding
>> FCE and FMMT,

[edk2-devel] [Patch 2/7] Revert "BaseTools/BfmLib: Change BfmLib script type in PosixLike"

2019-07-10 Thread Liming Gao
This reverts commit 556bf5b3570a2290ad82c1a027740e72230baa26.
There are the concerns on code design and code quality, and
request to rewrite FCE, BfmLib and FMMT for the review.

Cc: Leif Lindholm 
Cc: Feng Bob C 
Signed-off-by: Liming Gao 
---
 BaseTools/BinWrappers/PosixLike/BfmLib | 58 +-
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/BaseTools/BinWrappers/PosixLike/BfmLib 
b/BaseTools/BinWrappers/PosixLike/BfmLib
index 0945d86d92..a244ecc095 100755
--- a/BaseTools/BinWrappers/PosixLike/BfmLib
+++ b/BaseTools/BinWrappers/PosixLike/BfmLib
@@ -1,29 +1,29 @@
-#!/usr/bin/env bash
-
-full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a 
discussion of why $0 is not a good choice here
-dir=$(dirname "$full_cmd")
-cmd=${full_cmd##*/}
-
-if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ]
-then
-  exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd"
-elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ]
-then
-  if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ]
-  then
-echo "BaseTools C Tool binary was not found ($cmd)"
-echo "You may need to run:"
-echo "  make -C $EDK_TOOLS_PATH/Source/C"
-  else
-exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@"
-  fi
-elif [ -e "$dir/../../Source/C/bin/$cmd" ]
-then
-  exec "$dir/../../Source/C/bin/$cmd" "$@"
-else
-  echo "Unable to find the real '$cmd' to run"
-  echo "This message was printed by"
-  echo "  $0"
-  exit 127
-fi
-
+#!/usr/bin/env bash
+
+full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a 
discussion of why $0 is not a good choice here
+dir=$(dirname "$full_cmd")
+cmd=${full_cmd##*/}
+
+if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ]
+then
+  exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd"
+elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ]
+then
+  if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ]
+  then
+echo "BaseTools C Tool binary was not found ($cmd)"
+echo "You may need to run:"
+echo "  make -C $EDK_TOOLS_PATH/Source/C"
+  else
+exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@"
+  fi
+elif [ -e "$dir/../../Source/C/bin/$cmd" ]
+then
+  exec "$dir/../../Source/C/bin/$cmd" "$@"
+else
+  echo "Unable to find the real '$cmd' to run"
+  echo "This message was printed by"
+  echo "  $0"
+  exit 127
+fi
+
-- 
2.13.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43538): https://edk2.groups.io/g/devel/message/43538
Mute This Topic: https://groups.io/mt/32423089/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch 3/7] Revert "BaseTools/FMMT: Change FMMT script type in PosixLike"

2019-07-10 Thread Liming Gao
This reverts commit 2112fc71b1112554bcfb75a454002d2bbeed552f.
There are the concerns on code design and code quality, and
request to rewrite FCE, BfmLib and FMMT for the review.

Cc: Leif Lindholm 
Cc: Feng Bob C 
Signed-off-by: Liming Gao 
---
 BaseTools/BinWrappers/PosixLike/FMMT | 58 ++--
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/BaseTools/BinWrappers/PosixLike/FMMT 
b/BaseTools/BinWrappers/PosixLike/FMMT
index 0945d86d92..a244ecc095 100755
--- a/BaseTools/BinWrappers/PosixLike/FMMT
+++ b/BaseTools/BinWrappers/PosixLike/FMMT
@@ -1,29 +1,29 @@
-#!/usr/bin/env bash
-
-full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a 
discussion of why $0 is not a good choice here
-dir=$(dirname "$full_cmd")
-cmd=${full_cmd##*/}
-
-if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ]
-then
-  exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd"
-elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ]
-then
-  if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ]
-  then
-echo "BaseTools C Tool binary was not found ($cmd)"
-echo "You may need to run:"
-echo "  make -C $EDK_TOOLS_PATH/Source/C"
-  else
-exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@"
-  fi
-elif [ -e "$dir/../../Source/C/bin/$cmd" ]
-then
-  exec "$dir/../../Source/C/bin/$cmd" "$@"
-else
-  echo "Unable to find the real '$cmd' to run"
-  echo "This message was printed by"
-  echo "  $0"
-  exit 127
-fi
-
+#!/usr/bin/env bash
+
+full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a 
discussion of why $0 is not a good choice here
+dir=$(dirname "$full_cmd")
+cmd=${full_cmd##*/}
+
+if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ]
+then
+  exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd"
+elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ]
+then
+  if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ]
+  then
+echo "BaseTools C Tool binary was not found ($cmd)"
+echo "You may need to run:"
+echo "  make -C $EDK_TOOLS_PATH/Source/C"
+  else
+exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@"
+  fi
+elif [ -e "$dir/../../Source/C/bin/$cmd" ]
+then
+  exec "$dir/../../Source/C/bin/$cmd" "$@"
+else
+  echo "Unable to find the real '$cmd' to run"
+  echo "This message was printed by"
+  echo "  $0"
+  exit 127
+fi
+
-- 
2.13.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43539): https://edk2.groups.io/g/devel/message/43539
Mute This Topic: https://groups.io/mt/32423090/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch 1/7] Revert "BaseTools/FCE: Change FCE script type in PosixLike"

2019-07-10 Thread Liming Gao
This reverts commit 8a842b31b93323ee3dc7631059292d30f6179cd3.
There are the concerns on code design and code quality, and
request to rewrite FCE, BfmLib and FMMT for the review.

Cc: Leif Lindholm 
Cc: Feng Bob C 
Signed-off-by: Liming Gao 
---
 BaseTools/BinWrappers/PosixLike/FCE | 58 ++---
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/BaseTools/BinWrappers/PosixLike/FCE 
b/BaseTools/BinWrappers/PosixLike/FCE
index 0945d86d92..a244ecc095 100755
--- a/BaseTools/BinWrappers/PosixLike/FCE
+++ b/BaseTools/BinWrappers/PosixLike/FCE
@@ -1,29 +1,29 @@
-#!/usr/bin/env bash
-
-full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a 
discussion of why $0 is not a good choice here
-dir=$(dirname "$full_cmd")
-cmd=${full_cmd##*/}
-
-if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ]
-then
-  exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd"
-elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ]
-then
-  if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ]
-  then
-echo "BaseTools C Tool binary was not found ($cmd)"
-echo "You may need to run:"
-echo "  make -C $EDK_TOOLS_PATH/Source/C"
-  else
-exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@"
-  fi
-elif [ -e "$dir/../../Source/C/bin/$cmd" ]
-then
-  exec "$dir/../../Source/C/bin/$cmd" "$@"
-else
-  echo "Unable to find the real '$cmd' to run"
-  echo "This message was printed by"
-  echo "  $0"
-  exit 127
-fi
-
+#!/usr/bin/env bash
+
+full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a 
discussion of why $0 is not a good choice here
+dir=$(dirname "$full_cmd")
+cmd=${full_cmd##*/}
+
+if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ]
+then
+  exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd"
+elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ]
+then
+  if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ]
+  then
+echo "BaseTools C Tool binary was not found ($cmd)"
+echo "You may need to run:"
+echo "  make -C $EDK_TOOLS_PATH/Source/C"
+  else
+exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@"
+  fi
+elif [ -e "$dir/../../Source/C/bin/$cmd" ]
+then
+  exec "$dir/../../Source/C/bin/$cmd" "$@"
+else
+  echo "Unable to find the real '$cmd' to run"
+  echo "This message was printed by"
+  echo "  $0"
+  exit 127
+fi
+
-- 
2.13.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43537): https://edk2.groups.io/g/devel/message/43537
Mute This Topic: https://groups.io/mt/32423087/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch 4/7] Revert "BaseTools: fix FCE build when edksetup not executed"

2019-07-10 Thread Liming Gao
This reverts commit d031fc07eb83c9d13bff3ebac25da458d5a47917.
There are the concerns on code design and code quality, and
request to rewrite FCE, BfmLib and FMMT for the review.

Cc: Leif Lindholm 
Cc: Feng Bob C 
Signed-off-by: Liming Gao 
---
 BaseTools/Source/C/FCE/GNUmakefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/FCE/GNUmakefile 
b/BaseTools/Source/C/FCE/GNUmakefile
index 7a7e1ef4b8..3e1b6a85e2 100644
--- a/BaseTools/Source/C/FCE/GNUmakefile
+++ b/BaseTools/Source/C/FCE/GNUmakefile
@@ -42,7 +42,7 @@ endif
 export ARCH
 export HOST_ARCH=$(ARCH)
 
-MAKEROOT ?= ..
+MAKEROOT ?= $(EDK_TOOLS_PATH)/Source/C
 
 APPNAME = FCE
 
-- 
2.13.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43540): https://edk2.groups.io/g/devel/message/43540
Mute This Topic: https://groups.io/mt/32423091/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch 0/7] Revert new added BfmLib/FCE/FMMT

2019-07-10 Thread Liming Gao
Rewrite those tools for review again.
Now, move them into edk2-staging/FceFmmt branch.

Cc: Leif Lindholm 
Cc: Feng Bob C 

Liming Gao (7):
  Revert "BaseTools/FCE: Change FCE script type in PosixLike"
  Revert "BaseTools/BfmLib: Change BfmLib script type in PosixLike"
  Revert "BaseTools/FMMT: Change FMMT script type in PosixLike"
  Revert "BaseTools: fix FCE build when edksetup not executed"
  Revert "BaseTools/FMMT: Add a tool FMMT"
  Revert "BaseTools/FCE: Add a tool FCE"
  Revert "BaseTools/BfmLib: Add a tool BfmLib"

 BaseTools/Source/C/BfmLib/BfmLib.c | 4355 -
 BaseTools/Source/C/BfmLib/BinFileManager.c | 1024 
 BaseTools/Source/C/FCE/BinaryCreate.c  |  216 -
 BaseTools/Source/C/FCE/BinaryParse.c   | 1326 
 BaseTools/Source/C/FCE/Common.c| 2183 ---
 BaseTools/Source/C/FCE/Expression.c| 2367 ---
 BaseTools/Source/C/FCE/Fce.c   | 6449 
 BaseTools/Source/C/FCE/IfrParse.c  | 4836 ---
 BaseTools/Source/C/FCE/MonotonicBasedVariable.c|  874 ---
 BaseTools/Source/C/FCE/TimeBasedVariable.c |  878 ---
 BaseTools/Source/C/FCE/Variable.c  | 1091 
 BaseTools/Source/C/FMMT/FirmwareModuleManagement.c | 2559 
 BaseTools/Source/C/FMMT/FmmtLib.c  | 5051 ---
 BaseTools/Source/C/FMMT/Rebase.c   |  846 ---
 BaseTools/BinWrappers/PosixLike/BfmLib |   29 -
 BaseTools/BinWrappers/PosixLike/FCE|   29 -
 BaseTools/BinWrappers/PosixLike/FMMT   |   29 -
 BaseTools/Source/C/BfmLib/BinFileManager.h |  439 --
 BaseTools/Source/C/BfmLib/GNUmakefile  |   15 -
 BaseTools/Source/C/BfmLib/Makefile |   17 -
 BaseTools/Source/C/FCE/BinaryCreate.h  |  157 -
 BaseTools/Source/C/FCE/BinaryParse.h   |  187 -
 BaseTools/Source/C/FCE/Common.h|  999 ---
 BaseTools/Source/C/FCE/Fce.h   |  447 --
 BaseTools/Source/C/FCE/GNUmakefile |   55 -
 BaseTools/Source/C/FCE/IfrParse.h  |  789 ---
 BaseTools/Source/C/FCE/Makefile|   19 -
 BaseTools/Source/C/FCE/MonotonicBasedVariable.h|  162 -
 BaseTools/Source/C/FCE/TimeBasedVariable.h |  166 -
 BaseTools/Source/C/FCE/Variable.h  |  154 -
 BaseTools/Source/C/FCE/VariableCommon.h|   55 -
 BaseTools/Source/C/FMMT/FirmwareModuleManagement.h |  479 --
 BaseTools/Source/C/FMMT/FmmtConf.ini   |6 -
 BaseTools/Source/C/FMMT/GNUmakefile|   16 -
 BaseTools/Source/C/FMMT/Makefile   |   17 -
 BaseTools/Source/C/FMMT/Rebase.h   |   31 -
 BaseTools/Source/C/GNUmakefile |5 +-
 BaseTools/Source/C/Makefile|5 +-
 38 files changed, 2 insertions(+), 38360 deletions(-)
 delete mode 100644 BaseTools/Source/C/BfmLib/BfmLib.c
 delete mode 100644 BaseTools/Source/C/BfmLib/BinFileManager.c
 delete mode 100644 BaseTools/Source/C/FCE/BinaryCreate.c
 delete mode 100644 BaseTools/Source/C/FCE/BinaryParse.c
 delete mode 100644 BaseTools/Source/C/FCE/Common.c
 delete mode 100644 BaseTools/Source/C/FCE/Expression.c
 delete mode 100644 BaseTools/Source/C/FCE/Fce.c
 delete mode 100644 BaseTools/Source/C/FCE/IfrParse.c
 delete mode 100644 BaseTools/Source/C/FCE/MonotonicBasedVariable.c
 delete mode 100644 BaseTools/Source/C/FCE/TimeBasedVariable.c
 delete mode 100644 BaseTools/Source/C/FCE/Variable.c
 delete mode 100644 BaseTools/Source/C/FMMT/FirmwareModuleManagement.c
 delete mode 100644 BaseTools/Source/C/FMMT/FmmtLib.c
 delete mode 100644 BaseTools/Source/C/FMMT/Rebase.c
 delete mode 100755 BaseTools/BinWrappers/PosixLike/BfmLib
 delete mode 100755 BaseTools/BinWrappers/PosixLike/FCE
 delete mode 100755 BaseTools/BinWrappers/PosixLike/FMMT
 delete mode 100644 BaseTools/Source/C/BfmLib/BinFileManager.h
 delete mode 100644 BaseTools/Source/C/BfmLib/GNUmakefile
 delete mode 100644 BaseTools/Source/C/BfmLib/Makefile
 delete mode 100644 BaseTools/Source/C/FCE/BinaryCreate.h
 delete mode 100644 BaseTools/Source/C/FCE/BinaryParse.h
 delete mode 100644 BaseTools/Source/C/FCE/Common.h
 delete mode 100644 BaseTools/Source/C/FCE/Fce.h
 delete mode 100644 BaseTools/Source/C/FCE/GNUmakefile
 delete mode 100644 BaseTools/Source/C/FCE/IfrParse.h
 delete mode 100644 BaseTools/Source/C/FCE/Makefile
 delete mode 100644 BaseTools/Source/C/FCE/MonotonicBasedVariable.h
 delete mode 100644 BaseTools/Source/C/FCE/TimeBasedVariable.h
 delete mode 100644 BaseTools/Source/C/FCE/Variable.h
 delete mode 100644 BaseTools/Source/C/FCE/VariableCommon.h
 delete mode 100644 BaseTools/Source/C/FMMT/FirmwareModuleManagement.h
 delete mode 100644 BaseTools/Source/C/FMMT/FmmtConf.ini
 delete mode 100644 BaseTools/Source/C/FMMT/GNUmakefile
 delete mode 100644 BaseTools/Sour

Re: [edk2-devel] [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement common event protocol

2019-07-10 Thread Wang, Jian J
Zhichao,

Understood now. Thanks for the information.

Regards,
Jian


> -Original Message-
> From: Gao, Zhichao
> Sent: Thursday, July 11, 2019 8:21 AM
> To: Wang, Jian J ; devel@edk2.groups.io
> Cc: Sean Brogan ; Wu, Hao A
> ; Ni, Ray ; Zeng, Star
> ; Gao, Liming ; Michael
> Turner ; Bret Barkelew
> 
> Subject: RE: [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement common
> event protocol
> 
> 
> 
> > -Original Message-
> > From: Wang, Jian J
> > Sent: Wednesday, July 10, 2019 4:47 PM
> > To: Gao, Zhichao ; devel@edk2.groups.io
> > Cc: Sean Brogan ; Wu, Hao A
> > ; Ni, Ray ; Zeng, Star
> > ; Gao, Liming ; Michael
> Turner
> > ; Bret Barkelew
> > 
> > Subject: RE: [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement
> common
> > event protocol
> >
> > Zhichao,
> >
> > > -Original Message-
> > > From: Gao, Zhichao
> > > Sent: Wednesday, July 10, 2019 8:24 AM
> > > To: Wang, Jian J ; devel@edk2.groups.io
> > > Cc: Sean Brogan ; Wu, Hao A
> > > ; Ni, Ray ; Zeng, Star
> > > ; Gao, Liming ; Michael
> > > Turner ; Bret Barkelew
> > > 
> > > Subject: RE: [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement
> > common
> > > event protocol
> > >
> > >
> > >
> > > > -Original Message-
> > > > From: Wang, Jian J
> > > > Sent: Tuesday, July 9, 2019 5:24 PM
> > > > To: Gao, Zhichao ; devel@edk2.groups.io
> > > > Cc: Sean Brogan ; Wu, Hao A
> > > > ; Ni, Ray ; Zeng, Star
> > > > ; Gao, Liming ; Michael
> > > Turner
> > > > ; Bret Barkelew
> > > > 
> > > > Subject: RE: [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement
> > > common
> > > > event protocol
> > > >
> > > > Hi Zhichao,
> > > >
> > > > One common comment: please update copy right year.
> > >
> > > I got the copyright remind before. Refer to
> > > https://edk2.groups.io/g/devel/topic/31828852#41576.
> > > This patch is almost provided from MU project and contributed by
> > > Microsoft developers, 'From:...' is the author. And they didn't add
> > > their copyright. So I think it is fine to keep the copyright.
> > >
> >
> > I mean the *year* in Intel copyright not the whole copyright.
> 
> https://edk2.groups.io/g/devel/message/41599
> https://edk2.groups.io/g/devel/message/41753
> See above message. Maybe updating the year means you are making a legal
> claim to the intellectual
> property provided by the patch on behalf of the company.
> 
> Thanks,
> Zhichao
> 
> >
> > Regards,
> > Jian
> >
> > > >
> > > > See another comment at the almost the end of the email.
> > > >
> > > > > -Original Message-
> > > > > From: Gao, Zhichao
> > > > > Sent: Tuesday, July 09, 2019 4:40 PM
> > > > > To: devel@edk2.groups.io
> > > > > Cc: Sean Brogan ; Wang, Jian J
> > > > > ; Wu, Hao A ; Ni, Ray
> > > > > ; Zeng, Star ; Gao, Liming
> > > > > ; Michael Turner
> > > > ;
> > > > > Bret Barkelew 
> > > > > Subject: [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement
> > common
> > > > event
> > > > > protocol
> > > > >
> > > > > From: Sean Brogan 
> > > > >
> > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1400
> > > > >
> > > > > If an interrupt happens between CheckEvent and gIdleLoopEvent,
> > > > > there would be a event pending during cpu sleep. So it is required
> > > > > to check the gEventPending with the interrupt disabled.
> > > > >
> > > > > Implement a protocol gEdkiiCommonEventProtocolGuid to support
> all
> > > TPL
> > > > > event for PI drivers that use HW interrput. It has two interface,
> > > > > one is to create event and the other one is to wait for event.
> > > > >
> > > > > Add 'volatile' specifier for gEfiCurrentTpl and gEventPending
> > > > > because they may be changed out of the context (interrupt context).
> > > > >
> > > > > Cc: Jian J Wang 
> > > > > Cc: Hao A Wu 
> > > > > Cc: Ray Ni 
> > > > > Cc: Star Zeng 
> > > > > Cc: Liming gao 
> > > > > Cc: Sean Brogan 
> > > > > Cc: Michael Turner 
> > > > > Cc: Bret Barkelew 
> > > > > Signed-off-by: Zhichao Gao 
> > > > > ---
> > > > >  MdeModulePkg/Core/Dxe/DxeMain.h   |  64 ++-
> > > > >  MdeModulePkg/Core/Dxe/DxeMain.inf |   2 +
> > > > >  MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c   |  22 
> > > > >  .../Core/Dxe/DxeMain/DxeProtocolNotify.c  |   1 +
> > > > >  MdeModulePkg/Core/Dxe/Event/Event.c   | 102
> > > -
> > > > > -
> > > > >  MdeModulePkg/Core/Dxe/Event/Event.h   |   2 +-
> > > > >  MdeModulePkg/Include/Protocol/Cpu2.h  |   2 +-
> > > > >  7 files changed, 181 insertions(+), 14 deletions(-)
> > > > >
> > > > > diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h
> > > > > b/MdeModulePkg/Core/Dxe/DxeMain.h index
> > > 6a64852730..38907bfe8d
> > > > 100644
> > > > > --- a/MdeModulePkg/Core/Dxe/DxeMain.h
> > > > > +++ b/MdeModulePkg/Core/Dxe/DxeMain.h
> > > > > @@ -38,6 +38,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > > > > #include   #include 
> > > > > #include 
> > > > > +#include 
> > > > >  #include 
> > > > >  #include   #include
> > > > >  @@ -47,6 +48,7 @@ SPDX-License-Identifier:
> >

Re: [edk2-devel] [PATCH v2 3/3] UefiCpuPkg/PiSmmCpu: Enable 5 level paging when CPU supports

2019-07-10 Thread Ni, Ray
Mike,
Thanks for raising this build failure.
I just tried in my Ubuntu 18 in Win10. Even GCC7 complains about this. My bad!
I just posted a fix.

Thanks,
Ray

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, July 11, 2019 4:06 AM
> To: devel@edk2.groups.io; Ni, Ray ; Kinney, Michael D 
> 
> Cc: Dong, Eric ; Laszlo Ersek 
> Subject: RE: [edk2-devel] [PATCH v2 3/3] UefiCpuPkg/PiSmmCpu: Enable 5 level 
> paging when CPU supports
> 
> Hi Ray,
> 
> I noticed a Linux/GCC build issue with this patch when using GCC version:
> 
> gcc version 8.2.1 20181215 (Red Hat 8.2.1-6) (GCC)
> 
> edk2/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c: In function 'ReclaimPages':
> edk2/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c:574:89: error: ?: using integer 
> constants in boolean context, the
> expression will always evaluate to 'true' [-Werror=int-in-bool-context]
>for (Pml5Index = 0; Pml5Index < Enable5LevelPaging ? (EFI_PAGE_SIZE / 
> sizeof (*Pml4)) : 1; Pml5Index++) {
> 
> I was able to get the build to pass if I added ().
> 
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c 
> b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> index c31160735a..a3b62f7787 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> @@ -571,7 +571,7 @@ ReclaimPages (
>//
>// First, find the leaf entry has the smallest access record value
>//
> -  for (Pml5Index = 0; Pml5Index < Enable5LevelPaging ? (EFI_PAGE_SIZE / 
> sizeof (*Pml4)) : 1; Pml5Index++) {
> +  for (Pml5Index = 0; Pml5Index < (Enable5LevelPaging ? (EFI_PAGE_SIZE / 
> sizeof (*Pml4)) : 1); Pml5Index++) {^M
>  if ((Pml5[Pml5Index] & IA32_PG_P) == 0 || (Pml5[Pml5Index] & 
> IA32_PG_PMNT) != 0) {
>//
>// If the PML5 entry is not present or is masked, skip it
> 
> Best regards,
> 
> Mike
> 
> > -Original Message-
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io]
> > On Behalf Of Ni, Ray
> > Sent: Tuesday, July 2, 2019 11:54 PM
> > To: devel@edk2.groups.io
> > Cc: Dong, Eric ; Laszlo Ersek
> > 
> > Subject: [edk2-devel] [PATCH v2 3/3] UefiCpuPkg/PiSmmCpu:
> > Enable 5 level paging when CPU supports
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1946
> >
> > The patch changes SMM environment to use 5 level paging
> > when CPU
> > supports it.
> >
> > Signed-off-by: Ray Ni 
> > Cc: Eric Dong 
> > Regression-tested-by: Laszlo Ersek 
> > ---
> >  .../PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c   |  20 +-
> >  UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c| 272
> > ++
> >  UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c   | 485
> > --
> >  UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm   |  12 +
> >  .../PiSmmCpuDxeSmm/X64/SmmProfileArch.c   |  72 ++-
> >  5 files changed, 561 insertions(+), 300 deletions(-)
> >
> > diff --git
> > a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
> > b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
> > index 069be3aaa5..55090e9c3e 100644
> > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
> > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
> > @@ -125,18 +125,36 @@ GetPageTableEntry (
> >UINTN Index2;
> >UINTN Index3;
> >UINTN Index4;
> > +  UINTN Index5;
> >UINT64*L1PageTable;
> >UINT64*L2PageTable;
> >UINT64*L3PageTable;
> >UINT64*L4PageTable;
> > +  UINT64*L5PageTable;
> > +  IA32_CR4  Cr4;
> > +  BOOLEAN   Enable5LevelPaging;
> >
> > +  Index5 = ((UINTN)RShiftU64 (Address, 48)) &
> > PAGING_PAE_INDEX_MASK;
> >Index4 = ((UINTN)RShiftU64 (Address, 39)) &
> > PAGING_PAE_INDEX_MASK;
> >Index3 = ((UINTN)Address >> 30) &
> > PAGING_PAE_INDEX_MASK;
> >Index2 = ((UINTN)Address >> 21) &
> > PAGING_PAE_INDEX_MASK;
> >Index1 = ((UINTN)Address >> 12) &
> > PAGING_PAE_INDEX_MASK;
> >
> > +  Cr4.UintN = AsmReadCr4 ();
> > +  Enable5LevelPaging = (BOOLEAN) (Cr4.Bits.LA57 == 1);
> > +
> >if (sizeof(UINTN) == sizeof(UINT64)) {
> > -L4PageTable = (UINT64 *)GetPageTableBase ();
> > +if (Enable5LevelPaging) {
> > +  L5PageTable = (UINT64 *)GetPageTableBase ();
> > +  if (L5PageTable[Index5] == 0) {
> > +*PageAttribute = PageNone;
> > +return NULL;
> > +  }
> > +
> > +  L4PageTable = (UINT64
> > *)(UINTN)(L5PageTable[Index5] & ~mAddressEncMask &
> > PAGING_4K_ADDRESS_MASK_64);
> > +} else {
> > +  L4PageTable = (UINT64 *)GetPageTableBase ();
> > +}
> >  if (L4PageTable[Index4] == 0) {
> >*PageAttribute = PageNone;
> >return NULL;
> > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> > b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> > index e2b6a2d9b2..c5131526f0 100644
> > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> > @@ -534,43 +534,78 @@ InitPaging (
> >VOID
> >   

[edk2-devel] [PATCH] UefiCpuPkg/PiSmmCpu: Fix GCC7/GCC8 build failure

2019-07-10 Thread Ni, Ray
Signed-off-by: Ray Ni 
Cc: Michael D Kinney 
Cc: Eric Dong 
Cc: Laszlo Ersek 
---
 UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
index c31160735a..a3b62f7787 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
@@ -571,7 +571,7 @@ ReclaimPages (
   //
   // First, find the leaf entry has the smallest access record value
   //
-  for (Pml5Index = 0; Pml5Index < Enable5LevelPaging ? (EFI_PAGE_SIZE / sizeof 
(*Pml4)) : 1; Pml5Index++) {
+  for (Pml5Index = 0; Pml5Index < (Enable5LevelPaging ? (EFI_PAGE_SIZE / 
sizeof (*Pml4)) : 1); Pml5Index++) {
 if ((Pml5[Pml5Index] & IA32_PG_P) == 0 || (Pml5[Pml5Index] & IA32_PG_PMNT) 
!= 0) {
   //
   // If the PML5 entry is not present or is masked, skip it
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43533): https://edk2.groups.io/g/devel/message/43533
Mute This Topic: https://groups.io/mt/32422914/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch 1/1] BaseTools: Fixed the issue when ToolDefinitionFile is not generated

2019-07-10 Thread Bob Feng
ToolDefinitionFile is generated by PlatformAutoGen.ToolDefinition()
Code assume ToolDefinition is always called before using
ToolDefinitionFile, but in some cases, it's not true.

This patch is to fix this issue.

Cc: Liming Gao 
Signed-off-by: Bob Feng 
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py 
b/BaseTools/Source/Python/AutoGen/AutoGen.py
index c0d0ca15867b..5cfaf2141af0 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1910,22 +1910,25 @@ class PlatformAutoGen(AutoGen):
 if Attr == "FLAGS":
 MakeFlags = Value
 else:
 ToolsDef += "%s_%s = %s\n" % (Tool, Attr, Value)
 ToolsDef += "\n"
-
-SaveFileOnChange(self.ToolDefinitionFile, ToolsDef, False)
+tool_def_file = os.path.join(self.MakeFileDir, "TOOLS_DEF." + 
self.Arch)
+SaveFileOnChange(tool_def_file, ToolsDef, False)
 for DllPath in DllPathList:
 os.environ["PATH"] = DllPath + os.pathsep + os.environ["PATH"]
 os.environ["MAKE_FLAGS"] = MakeFlags
 
 return RetVal
 
 ## Return the paths of tools
 @cached_property
 def ToolDefinitionFile(self):
-return os.path.join(self.MakeFileDir, "TOOLS_DEF." + self.Arch)
+tool_def_file = os.path.join(self.MakeFileDir, "TOOLS_DEF." + 
self.Arch)
+if not os.path.exists(tool_def_file):
+self.ToolDefinition
+return tool_def_file
 
 ## Retrieve the toolchain family of given toolchain tag. Default to 'MSFT'.
 @cached_property
 def ToolChainFamily(self):
 ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDatabase
-- 
2.20.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43532): https://edk2.groups.io/g/devel/message/43532
Mute This Topic: https://groups.io/mt/32422788/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement common event protocol

2019-07-10 Thread Gao, Zhichao



> -Original Message-
> From: Wang, Jian J
> Sent: Wednesday, July 10, 2019 4:47 PM
> To: Gao, Zhichao ; devel@edk2.groups.io
> Cc: Sean Brogan ; Wu, Hao A
> ; Ni, Ray ; Zeng, Star
> ; Gao, Liming ; Michael Turner
> ; Bret Barkelew
> 
> Subject: RE: [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement common
> event protocol
> 
> Zhichao,
> 
> > -Original Message-
> > From: Gao, Zhichao
> > Sent: Wednesday, July 10, 2019 8:24 AM
> > To: Wang, Jian J ; devel@edk2.groups.io
> > Cc: Sean Brogan ; Wu, Hao A
> > ; Ni, Ray ; Zeng, Star
> > ; Gao, Liming ; Michael
> > Turner ; Bret Barkelew
> > 
> > Subject: RE: [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement
> common
> > event protocol
> >
> >
> >
> > > -Original Message-
> > > From: Wang, Jian J
> > > Sent: Tuesday, July 9, 2019 5:24 PM
> > > To: Gao, Zhichao ; devel@edk2.groups.io
> > > Cc: Sean Brogan ; Wu, Hao A
> > > ; Ni, Ray ; Zeng, Star
> > > ; Gao, Liming ; Michael
> > Turner
> > > ; Bret Barkelew
> > > 
> > > Subject: RE: [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement
> > common
> > > event protocol
> > >
> > > Hi Zhichao,
> > >
> > > One common comment: please update copy right year.
> >
> > I got the copyright remind before. Refer to
> > https://edk2.groups.io/g/devel/topic/31828852#41576.
> > This patch is almost provided from MU project and contributed by
> > Microsoft developers, 'From:...' is the author. And they didn't add
> > their copyright. So I think it is fine to keep the copyright.
> >
> 
> I mean the *year* in Intel copyright not the whole copyright.

https://edk2.groups.io/g/devel/message/41599
https://edk2.groups.io/g/devel/message/41753
See above message. Maybe updating the year means you are making a legal claim 
to the intellectual
property provided by the patch on behalf of the company.

Thanks,
Zhichao

> 
> Regards,
> Jian
> 
> > >
> > > See another comment at the almost the end of the email.
> > >
> > > > -Original Message-
> > > > From: Gao, Zhichao
> > > > Sent: Tuesday, July 09, 2019 4:40 PM
> > > > To: devel@edk2.groups.io
> > > > Cc: Sean Brogan ; Wang, Jian J
> > > > ; Wu, Hao A ; Ni, Ray
> > > > ; Zeng, Star ; Gao, Liming
> > > > ; Michael Turner
> > > ;
> > > > Bret Barkelew 
> > > > Subject: [PATCH V2 4/4] MdeModulePkg/DxeMain: Implement
> common
> > > event
> > > > protocol
> > > >
> > > > From: Sean Brogan 
> > > >
> > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1400
> > > >
> > > > If an interrupt happens between CheckEvent and gIdleLoopEvent,
> > > > there would be a event pending during cpu sleep. So it is required
> > > > to check the gEventPending with the interrupt disabled.
> > > >
> > > > Implement a protocol gEdkiiCommonEventProtocolGuid to support all
> > TPL
> > > > event for PI drivers that use HW interrput. It has two interface,
> > > > one is to create event and the other one is to wait for event.
> > > >
> > > > Add 'volatile' specifier for gEfiCurrentTpl and gEventPending
> > > > because they may be changed out of the context (interrupt context).
> > > >
> > > > Cc: Jian J Wang 
> > > > Cc: Hao A Wu 
> > > > Cc: Ray Ni 
> > > > Cc: Star Zeng 
> > > > Cc: Liming gao 
> > > > Cc: Sean Brogan 
> > > > Cc: Michael Turner 
> > > > Cc: Bret Barkelew 
> > > > Signed-off-by: Zhichao Gao 
> > > > ---
> > > >  MdeModulePkg/Core/Dxe/DxeMain.h   |  64 ++-
> > > >  MdeModulePkg/Core/Dxe/DxeMain.inf |   2 +
> > > >  MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c   |  22 
> > > >  .../Core/Dxe/DxeMain/DxeProtocolNotify.c  |   1 +
> > > >  MdeModulePkg/Core/Dxe/Event/Event.c   | 102
> > -
> > > > -
> > > >  MdeModulePkg/Core/Dxe/Event/Event.h   |   2 +-
> > > >  MdeModulePkg/Include/Protocol/Cpu2.h  |   2 +-
> > > >  7 files changed, 181 insertions(+), 14 deletions(-)
> > > >
> > > > diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h
> > > > b/MdeModulePkg/Core/Dxe/DxeMain.h index
> > 6a64852730..38907bfe8d
> > > 100644
> > > > --- a/MdeModulePkg/Core/Dxe/DxeMain.h
> > > > +++ b/MdeModulePkg/Core/Dxe/DxeMain.h
> > > > @@ -38,6 +38,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > > > #include   #include 
> > > > #include 
> > > > +#include 
> > > >  #include 
> > > >  #include   #include
> > > >  @@ -47,6 +48,7 @@ SPDX-License-Identifier:
> > > > BSD-2-Clause-Patent  #include 
> > > > #include   #include
> > > > 
> > > > +#include 
> > > >  #include   #include
> > > >   #include
> > 
> > > @@
> > > > -274,10 +276,11 @@ extern EFI_METRONOME_ARCH_PROTOCOL
> > > *gMetronome;
> > > >  extern EFI_TIMER_ARCH_PROTOCOL  *gTimer;
> > > >  extern EFI_SECURITY_ARCH_PROTOCOL   *gSecurity;
> > > >  extern EFI_SECURITY2_ARCH_PROTOCOL  *gSecurity2;
> > > > +extern EDKII_CPU2_PROTOCOL  *gCpu2;
> > > >  extern EFI_BDS_ARCH_PROTOCOL*gBds;
> > > >  extern EFI_SMM_BASE2_PROTOCOL   *gSmmBase2;
> > > >
> > > > -extern EFI_TPL 

Re: [edk2-devel] [Patch] ShellPkg/AcpiView: Fix IA32 link error

2019-07-10 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

> -Original Message-
> From: Kinney, Michael D
> Sent: Wednesday, July 10, 2019 3:35 PM
> To: devel@edk2.groups.io
> Cc: Carsey, Jaben ; Ni, Ray ;
> Gao, Zhichao 
> Subject: [Patch] ShellPkg/AcpiView: Fix IA32 link error
> Importance: High
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1970
> 
> Update local variable in ParseAcpiSlot() to be UINT32
> instead of UINT64 to avoid 64-bit multiply operation
> in the SLIT_ELEMENT() macro.
> 
> Cc: Jaben Carsey 
> Cc: Ray Ni 
> Cc: Zhichao Gao 
> Signed-off-by: Michael D Kinney 
> ---
>  .../UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
> b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
> index 1f9dac66ee..af85c9aa1c 100644
> ---
> a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
> +++
> b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
> @@ -57,8 +57,8 @@ ParseAcpiSlit (
>)
>  {
>UINT32 Offset;
> -  UINT64 Count;
> -  UINT64 Index;
> +  UINT32 Count;
> +  UINT32 Index;
>UINT64 LocalityCount;
>UINT8* LocalityPtr;
>CHAR16 Buffer[80];  // Used for AsciiName param of ParseAcpi
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43530): https://edk2.groups.io/g/devel/message/43530
Mute This Topic: https://groups.io/mt/32421790/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch] ShellPkg/AcpiView: Fix IA32 link error

2019-07-10 Thread Michael D Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=1970

Update local variable in ParseAcpiSlot() to be UINT32
instead of UINT64 to avoid 64-bit multiply operation
in the SLIT_ELEMENT() macro.

Cc: Jaben Carsey 
Cc: Ray Ni 
Cc: Zhichao Gao 
Signed-off-by: Michael D Kinney 
---
 .../UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
index 1f9dac66ee..af85c9aa1c 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
@@ -57,8 +57,8 @@ ParseAcpiSlit (
   )
 {
   UINT32 Offset;
-  UINT64 Count;
-  UINT64 Index;
+  UINT32 Count;
+  UINT32 Index;
   UINT64 LocalityCount;
   UINT8* LocalityPtr;
   CHAR16 Buffer[80];  // Used for AsciiName param of ParseAcpi
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43529): https://edk2.groups.io/g/devel/message/43529
Mute This Topic: https://groups.io/mt/32421790/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] Simplify edksetup.sh

2019-07-10 Thread Rebecca Cran
o Use '$SCRIPTNAME' consistently instead of 'edksetup.sh'

o Use the bash environment variable $PWD instead of executing the pwd
  command.

o Add quotes around variables to ensure they're evaluated correctly.

o Simplify SetupPython3() and SetupPython() functions. On Linux,
  "whereis" matches python3, python3.7, as well as man pages, libs etc.
  While on macOS it only matches the specified name, and so misses
  python3.7. Improve this by looping over potential version numbers and
  seeing if such a binary exists and can be executed.

o Since when parsing options '*' matches anything not already matched,
  remove -?, -h and --help since they're redundant.

o When executing arithmetic commands, $ isn't needed before variables.

Signed-off-by: Rebecca Cran 
---
 edksetup.sh | 67 ++---
 1 file changed, 18 insertions(+), 49 deletions(-)

diff --git a/edksetup.sh b/edksetup.sh
index 12a3e26a67..a797ff03d2 100755
--- a/edksetup.sh
+++ b/edksetup.sh
@@ -49,11 +49,11 @@ function SetWorkspace()
 return 0
   fi
 
-  if [ ! ${BASH_SOURCE[0]} -ef ./edksetup.sh ] && [ -z "$PACKAGES_PATH" ]
+  if [ ! ${BASH_SOURCE[0]} -ef ./$SCRIPTNAME ] && [ -z "$PACKAGES_PATH" ]
   then
 echo Run this script from the base of your tree.  For example:
-echo "  cd /Path/To/Edk/Root"
-echo "  . edksetup.sh"
+echo "  cd /path/to/edk2/root"
+echo "  . $SCRIPTNAME"
 return 1
   fi
 
@@ -71,7 +71,7 @@ function SetWorkspace()
   #
   # Set $WORKSPACE
   #
-  export WORKSPACE=`pwd`
+  export WORKSPACE=$PWD
   return 0
 }
 
@@ -107,24 +107,10 @@ function SetupEnv()
 
 function SetupPython3()
 {
-  if [ $origin_version ];then
-origin_version=
-  fi
-  for python in $(whereis python3)
-  do
-python=$(echo $python | grep "[[:digit:]]$" || true)
-python_version=${python##*python}
-if [ -z "${python_version}" ] || (! command -v $python >/dev/null 
2>&1);then
-  continue
-fi
-if [ -z $origin_version ];then
-  origin_version=$python_version
-  export PYTHON_COMMAND=$python
-  continue
-fi
-  if [[ "$origin_version" < "$python_version" ]]; then
-  origin_version=$python_version
-  export PYTHON_COMMAND=$python
+  for python in $(seq -f "python3.%g" 15 -1 1) python3; do
+if command -v $python >/dev/null 2>&1; then
+  export PYTHON_COMMAND=$(which $python)
+  break
 fi
   done
   return 0
@@ -132,8 +118,8 @@ function SetupPython3()
 
 function SetupPython()
 {
-  if [ $PYTHON_COMMAND ] && [ -z $PYTHON3_ENABLE ];then
-if ( command -v $PYTHON_COMMAND >/dev/null 2>&1 );then
+  if [ -n "$PYTHON_COMMAND" ] && [ -z "$PYTHON3_ENABLE" ]; then
+if command -v $PYTHON_COMMAND >/dev/null 2>&1; then
   return 0
 else
   echo $PYTHON_COMMAND Cannot be used to build or execute the python tools.
@@ -141,32 +127,15 @@ function SetupPython()
 fi
   fi
 
-  if [ $PYTHON3_ENABLE ] && [ $PYTHON3_ENABLE == TRUE ]
-  then
+  if [ "$PYTHON3_ENABLE" == "TRUE" ]; then
 SetupPython3
   fi
 
-  if [ $PYTHON3_ENABLE ] && [ $PYTHON3_ENABLE != TRUE ]
-  then
-if [ $origin_version ];then
-  origin_version=
-fi
-for python in $(whereis python2)
-do
-  python=$(echo $python | grep "[[:digit:]]$" || true)
-  python_version=${python##*python}
-  if [ -z "${python_version}" ] || (! command -v $python >/dev/null 
2>&1);then
-continue
-  fi
-  if [ -z $origin_version ]
-  then
-origin_version=$python_version
-export PYTHON_COMMAND=$python
-continue
-  fi
-  if [[ "$origin_version" < "$python_version" ]]; then
-origin_version=$python_version
-export PYTHON_COMMAND=$python
+  if [ -n "$PYTHON3_ENABLE" ] && [ "$PYTHON3_ENABLE" != "TRUE" ]; then
+for python in $(seq -f "python2.%g" 10 -1 1) python2; do
+  if command -v $python >/dev/null 2>&1; then
+export PYTHON_COMMAND=$(which $python)
+break
   fi
 done
 return 0
@@ -194,12 +163,12 @@ do
   RECONFIG=TRUE
   shift
 ;;
--?|-h|--help|*)
+*)
   HelpMsg
   break
 ;;
   esac
-  I=$(($I - 1))
+  I=$((I - 1))
 done
 
 if [ $I -gt 0 ]
-- 
2.22.0


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43528): https://edk2.groups.io/g/devel/message/43528
Mute This Topic: https://groups.io/mt/32421563/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch v3] BaseTools: Fix GCC compiler failure in new added tools.

2019-07-10 Thread Leif Lindholm
On Wed, Jul 10, 2019 at 01:42:44PM +, Liming Gao wrote:
> > > -  strncat (LocalStr, "[attributes] \n", sizeof("[attributes] \n"));
> > > +  strncat (LocalStr, "[attributes] \n", STR_LEN_MAX_4K - strlen 
> > > (LocalStr) - 1);
> > 
> > This is a very inefficient, and difficult to read, way of doing this.
> > It also performs absolutely no error checking (making any future
> > debugging tedious at best).
> 
> This change is to fix gcc warning -Werror=sizeof-pointer-memaccess.
> strncat is the safe version API. So, it is used here.

Yes, but this code is continuously appending to a long string, and
then counting the length of that string. This could be done *very*
much more efficiently by keeping track of the current position we're
appending to and using strncpy. It would also improve readability.

As for the safe version - my point about error checking was not to do
with buffer overruns. It was to do with the fact that if the code ends
up filling the buffer, that will go undetected until something goes
wrong further along.

> > I have to be honest - looking at this code, I think the right thing to
> > do would be to revert the commit adding it and reworking the utility
> > completely (making sure it gets serious review) before merging it.
> > 
> > I am not surprised the compilers get upset.
> > 
> > This made me have a closer look at the patches adding FCE and FMMT,
> > and frankly, my opinion of them are similar. These aren't being
> > upstreamed - this is textbook "chuck over the wall".
> > 
> > Don't get me wrong - the code quality of FMMT is notably higher than
> > the code quality of FCE, which is notably higher than the code quality
> > of BfmLib. But even
> > 
> > BfmLib was added with the comment that it is used by FCE.
> > So why do FCE and FMMT both have separate copies of LibBfmGuidToStr?
> > Not just functions doing the same thing, but with the same name.
> > 
> > There are many other issues with these tools.
> 
> FCE & FMMT both operate the binary FV image. Their implementation
> may copy the same logic. I don't think this is a good way.
> I agree to do better design for code sharing and code quality improvement. 
> 
> I suggest to revert them, add current FCE & FMMT into edk2-staging,
> then refine them, and send the patch to add them back into edk2
> BaseTools.

This sounds good to me - thanks!

Best Regards,

Leif

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43527): https://edk2.groups.io/g/devel/message/43527
Mute This Topic: https://groups.io/mt/32403705/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch v3] BaseTools: Fix GCC compiler failure in new added tools.

2019-07-10 Thread Michael D Kinney
Liming,

I agree that edk2-staging is a good place to work on cleaning
these tools up.

Please revert the commit of these tools today so GCC builds
are not broken.

Thanks,

Mike

> -Original Message-
> From: Gao, Liming
> Sent: Wednesday, July 10, 2019 6:43 AM
> To: devel@edk2.groups.io; leif.lindh...@linaro.org
> Cc: Gao, Zhichao ; Feng, Bob C
> ; Andrew Fish ;
> Laszlo Ersek ; Kinney, Michael D
> 
> Subject: RE: [edk2-devel] [Patch v3] BaseTools: Fix GCC
> compiler failure in new added tools.
> 
> Lefi:
> 
> > -Original Message-
> > From: devel@edk2.groups.io
> [mailto:devel@edk2.groups.io] On Behalf Of
> > Leif Lindholm
> > Sent: Wednesday, July 10, 2019 2:26 AM
> > To: devel@edk2.groups.io; Gao, Liming
> 
> > Cc: Gao, Zhichao ; Feng, Bob C
> > ; Andrew Fish ;
> Laszlo Ersek
> > ; Kinney, Michael D
> 
> > Subject: Re: [edk2-devel] [Patch v3] BaseTools: Fix GCC
> compiler failure in new added tools.
> >
> > Hi Liming,
> >
> > On Tue, Jul 09, 2019 at 05:53:33PM +0800, Liming Gao
> wrote:
> > > From: gaozhic 
> > >
> > > GCC 7 or 8 reports some warnings in new added
> FCE/FMMT/BlmLib.
> >
> > Please list the specific warnings addressed.
> > (But also see my comments below - I think this utility
> needs ripping
> > out and rewriting.)
> >
> > > Signed-off-by: Liming Gao 
> > > Cc: Bob Feng 
> > > ---
> > > In V2:
> > >   Fix GCC8 compiler issue.
> > >
> > > In V3:
> > >   Fix snprintf wrong replacement.
> > >
> > >  BaseTools/Source/C/BfmLib/BfmLib.c |
> 117 +++--
> > >  BaseTools/Source/C/FCE/BinaryParse.c   |
> 2 +-
> > >  BaseTools/Source/C/FMMT/FirmwareModuleManagement.c |
> 2 +-
> > >  BaseTools/Source/C/FMMT/FmmtLib.c  |
> 117 +++--
> > >  4 files changed, 122 insertions(+), 116 deletions(-)
> > >
> > > diff --git a/BaseTools/Source/C/BfmLib/BfmLib.c
> > > b/BaseTools/Source/C/BfmLib/BfmLib.c
> > > index 9dedda3da2..8d0ec9038c 100644
> > > --- a/BaseTools/Source/C/BfmLib/BfmLib.c
> > > +++ b/BaseTools/Source/C/BfmLib/BfmLib.c
> > > @@ -9,6 +9,9 @@
> > >
> > >  #include "BinFileManager.h"
> > >
> > > +#define STR_LEN_MAX_4K 4096
> > > +#define STR_LEN_MAX_1K 1024
> > > +
> >
> > Coding style 3.3.3: "Code files should not contain
> #define and typedef
> > statements."
> >
> > Move these to BinFileManager.h?
> >
> > >  #define EFI_TEST_FFS_ATTRIBUTES_BIT(FvbAttributes,
> TestAttributes, Bit) \
> > >  ( \
> > >(BOOLEAN) ( \
> > > @@ -116,7 +119,7 @@ LibInitializeFvStruct (
> > >
> > >for (Index = 0; Index < MAX_NUMBER_OF_FILES_IN_FV;
> Index ++) {
> > >  memset (Fv->FfsAttuibutes[Index].FfsName, '\0',
> _MAX_PATH);
> > > -memset (Fv->FfsAttuibutes[Index].UiName, '\0',
> _MAX_PATH);
> > > +memset (Fv->FfsAttuibutes[Index].UiName, '\0',
> _MAX_PATH *
> > > + sizeof (CHAR16));
> > >
> > >  Fv->FfsAttuibutes[Index].IsLeaf   =
> TRUE;
> > >  Fv->FfsAttuibutes[Index].TotalSectionNum  =
> 0;
> > > @@ -2399,153 +2402,153 @@ LibFvHeaderAttributeToStr (
> > >
> > >LocalStr  = NULL;
> > >
> > > -  LocalStr = (CHAR8 *) malloc (1024 * 4);
> > > +  LocalStr = (CHAR8 *) malloc (STR_LEN_MAX_4K);
> > >
> > >if (LocalStr == NULL) {
> > >  printf ("Out of resource, memory allocation
> failed. \n");
> > >  return EFI_OUT_OF_RESOURCES;
> > >}
> > >
> > > -  memset (LocalStr, '\0', 1024 * 4);
> > > +  memset (LocalStr, '\0', STR_LEN_MAX_4K);
> > >
> > >if (Attr == 0 || InfFile  == NULL) {
> > >  free (LocalStr);
> > >  return EFI_INVALID_PARAMETER;
> > >}
> > >
> > > -  strncat (LocalStr, "[attributes] \n",
> sizeof("[attributes] \n"));
> > > +  strncat (LocalStr, "[attributes] \n",
> STR_LEN_MAX_4K - strlen
> > > + (LocalStr) - 1);
> >
> > This is a very inefficient, and difficult to read, way
> of doing this.
> > It also performs absolutely no error checking (making
> any future
> > debugging tedious at best).
> >
> This change is to fix gcc warning -Werror=sizeof-pointer-
> memaccess.
> strncat is the safe version API. So, it is used here.
> 
> > I have to be honest - looking at this code, I think the
> right thing to
> > do would be to revert the commit adding it and
> reworking the utility
> > completely (making sure it gets serious review) before
> merging it.
> >
> > I am not surprised the compilers get upset.
> >
> > This made me have a closer look at the patches adding
> FCE and FMMT,
> > and frankly, my opinion of them are similar. These
> aren't being
> > upstreamed - this is textbook "chuck over the wall".
> >
> > Don't get me wrong - the code quality of FMMT is
> notably higher than
> > the code quality of FCE, which is notably higher than
> the code quality
> > of BfmLib. But even
> >
> > BfmLib was added with the comment that it is used by
> FCE.
> > So why do FCE and FMMT both have separate copies of
> LibBfmGuidToStr?
> > Not just functions doing the same thing, but with the
> same name.
> >
> > There are many other issues with thes

Re: [edk2-devel] [PATCH v2 3/3] UefiCpuPkg/PiSmmCpu: Enable 5 level paging when CPU supports

2019-07-10 Thread Michael D Kinney
Hi Ray,

I noticed a Linux/GCC build issue with this patch when using GCC version:

gcc version 8.2.1 20181215 (Red Hat 8.2.1-6) (GCC)

edk2/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c: In function 'ReclaimPages':
edk2/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c:574:89: error: ?: using integer 
constants in boolean context, the expression will always evaluate to 'true' 
[-Werror=int-in-bool-context]
   for (Pml5Index = 0; Pml5Index < Enable5LevelPaging ? (EFI_PAGE_SIZE / sizeof 
(*Pml4)) : 1; Pml5Index++) {

I was able to get the build to pass if I added ().

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
index c31160735a..a3b62f7787 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
@@ -571,7 +571,7 @@ ReclaimPages (
   //
   // First, find the leaf entry has the smallest access record value
   //
-  for (Pml5Index = 0; Pml5Index < Enable5LevelPaging ? (EFI_PAGE_SIZE / sizeof 
(*Pml4)) : 1; Pml5Index++) {
+  for (Pml5Index = 0; Pml5Index < (Enable5LevelPaging ? (EFI_PAGE_SIZE / 
sizeof (*Pml4)) : 1); Pml5Index++) {^M
 if ((Pml5[Pml5Index] & IA32_PG_P) == 0 || (Pml5[Pml5Index] & IA32_PG_PMNT) 
!= 0) {
   //
   // If the PML5 entry is not present or is masked, skip it

Best regards,

Mike

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io]
> On Behalf Of Ni, Ray
> Sent: Tuesday, July 2, 2019 11:54 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric ; Laszlo Ersek
> 
> Subject: [edk2-devel] [PATCH v2 3/3] UefiCpuPkg/PiSmmCpu:
> Enable 5 level paging when CPU supports
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1946
> 
> The patch changes SMM environment to use 5 level paging
> when CPU
> supports it.
> 
> Signed-off-by: Ray Ni 
> Cc: Eric Dong 
> Regression-tested-by: Laszlo Ersek 
> ---
>  .../PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c   |  20 +-
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c| 272
> ++
>  UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c   | 485
> --
>  UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm   |  12 +
>  .../PiSmmCpuDxeSmm/X64/SmmProfileArch.c   |  72 ++-
>  5 files changed, 561 insertions(+), 300 deletions(-)
> 
> diff --git
> a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
> index 069be3aaa5..55090e9c3e 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
> @@ -125,18 +125,36 @@ GetPageTableEntry (
>UINTN Index2;
>UINTN Index3;
>UINTN Index4;
> +  UINTN Index5;
>UINT64*L1PageTable;
>UINT64*L2PageTable;
>UINT64*L3PageTable;
>UINT64*L4PageTable;
> +  UINT64*L5PageTable;
> +  IA32_CR4  Cr4;
> +  BOOLEAN   Enable5LevelPaging;
> 
> +  Index5 = ((UINTN)RShiftU64 (Address, 48)) &
> PAGING_PAE_INDEX_MASK;
>Index4 = ((UINTN)RShiftU64 (Address, 39)) &
> PAGING_PAE_INDEX_MASK;
>Index3 = ((UINTN)Address >> 30) &
> PAGING_PAE_INDEX_MASK;
>Index2 = ((UINTN)Address >> 21) &
> PAGING_PAE_INDEX_MASK;
>Index1 = ((UINTN)Address >> 12) &
> PAGING_PAE_INDEX_MASK;
> 
> +  Cr4.UintN = AsmReadCr4 ();
> +  Enable5LevelPaging = (BOOLEAN) (Cr4.Bits.LA57 == 1);
> +
>if (sizeof(UINTN) == sizeof(UINT64)) {
> -L4PageTable = (UINT64 *)GetPageTableBase ();
> +if (Enable5LevelPaging) {
> +  L5PageTable = (UINT64 *)GetPageTableBase ();
> +  if (L5PageTable[Index5] == 0) {
> +*PageAttribute = PageNone;
> +return NULL;
> +  }
> +
> +  L4PageTable = (UINT64
> *)(UINTN)(L5PageTable[Index5] & ~mAddressEncMask &
> PAGING_4K_ADDRESS_MASK_64);
> +} else {
> +  L4PageTable = (UINT64 *)GetPageTableBase ();
> +}
>  if (L4PageTable[Index4] == 0) {
>*PageAttribute = PageNone;
>return NULL;
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> index e2b6a2d9b2..c5131526f0 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
> @@ -534,43 +534,78 @@ InitPaging (
>VOID
>)
>  {
> +  UINT64Pml5Entry;
> +  UINT64Pml4Entry;
> +  UINT64*Pml5;
>UINT64*Pml4;
>UINT64*Pdpt;
>UINT64*Pd;
>UINT64*Pt;
>UINTN Address;
> +  UINTN Pml5Index;
>UINTN Pml4Index;
>UINTN PdptIndex;
>UINTN PdIndex;
>UINTN PtIndex;
>UINTN NumberOfPdptEntries;
>UINTN  

Re: [edk2-devel] [PATCH v2 2/3] MdePkg/BaseLib.h: Update IA32_CR4 structure for 5-level paging

2019-07-10 Thread Michael D Kinney
Laszlo,

I agree with your feedback.  Process must be followed.

I also agree that it may make sense to add some more maintainers
to the MdePkg, especially for some of the content in MdePkg that
is closely related to the UefiCpuPkg content.

I have reviewed this patch to the BaseLib.h.  The new LA57 bit
added to IA32_CR4 matches the documentation in the white paper
referenced in the series.

Reviewed-by: Michael D Kinney 

Thanks,

Mike


> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Wednesday, July 10, 2019 10:17 AM
> To: devel@edk2.groups.io; Dong, Eric
> ; Ni, Ray 
> Cc: Leif Lindholm ; Gao, Liming
> ; Kinney, Michael D
> 
> Subject: Re: [edk2-devel] [PATCH v2 2/3]
> MdePkg/BaseLib.h: Update IA32_CR4 structure for 5-level
> paging
> 
> Ray, Eric,
> 
> (+Liming, +Mike, +Leif)
> 
> On 07/09/19 03:04, Dong, Eric wrote:
> > Reviewed-by: Eric Dong 
> >
> >> -Original Message-
> >> From: Ni, Ray
> >> Sent: Wednesday, July 3, 2019 2:54 PM
> >> To: devel@edk2.groups.io
> >> Cc: Dong, Eric ; Laszlo Ersek
> >> 
> >> Subject: [PATCH v2 2/3] MdePkg/BaseLib.h: Update
> IA32_CR4 structure
> >> for 5-level paging
> >>
> >> 5-level paging is documented in white paper:
> >>
> https://software.intel.com/sites/default/files/managed/2b
> /80/5-
> >> level_paging_white_paper.pdf
> >>
> >> Commit f8113e25001e715390127f23e2197252cbd6d1a2
> >> changed Cpuid.h already.
> >>
> >> This patch updates IA32_CR4 structure to include LA57
> field.
> >>
> >> Signed-off-by: Ray Ni 
> >> Cc: Eric Dong 
> >> Regression-tested-by: Laszlo Ersek 
> >> ---
> >>  MdePkg/Include/Library/BaseLib.h | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/MdePkg/Include/Library/BaseLib.h
> >> b/MdePkg/Include/Library/BaseLib.h
> >> index ebd7dd274c..a22bfc9fad 100644
> >> --- a/MdePkg/Include/Library/BaseLib.h
> >> +++ b/MdePkg/Include/Library/BaseLib.h
> >> @@ -5324,7 +5324,8 @@ typedef union {
> >>  UINT32  OSXMMEXCPT:1;   ///< Operating System
> Support for
> >>  ///< Unmasked SIMD
> Floating Point
> >>  ///< Exceptions.
> >> -UINT32  Reserved_0:2;   ///< Reserved.
> >> +UINT32  Reserved_2:1;   ///< Reserved.
> >> +UINT32  LA57:1; ///< Linear Address
> 57bit.
> >>  UINT32  VMXE:1; ///< VMX Enable
> >>  UINT32  Reserved_1:18;  ///< Reserved.
> >>} Bits;
> 
> I'm sorry but you will have to revert this patch series
> immediately.
> None of the MdePkg maintainers have approved this patch -
> - commit 7c5010c7f88b.
> 
> In the first place, Mike and Liming were never CC'd on
> the patch, so they may not have noticed it, even.
> 
> The situation is very similar to the recent SM3 crypto
> series that I had to revert myself. An MdePkg patch was
> pushed without package owner review.
> 
> Can you guys please revert this series immediately,
> without me having to do it?
> 
> 
> If we think that MdePkg should have more "M" folks, in
> order to distribute the review load better, then we
> should address that problem first. Ignoring rules just
> because that's more convenient is not acceptable.
> 
> Thanks,
> Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43524): https://edk2.groups.io/g/devel/message/43524
Mute This Topic: https://groups.io/mt/32295048/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms Patch 00/14] Vlv2TbltDevicePkg: Remove Intel Framework dependencies

2019-07-10 Thread Michael D Kinney
Gary,

Thanks for the feedback.  I fixes these in the patch email review
I sent out today.

Mike

> -Original Message-
> From: Gary Lin [mailto:g...@suse.com]
> Sent: Wednesday, July 10, 2019 12:10 AM
> To: devel@edk2.groups.io; Kinney, Michael D
> 
> Cc: Qian, Yi ; Sun, Zailiang
> 
> Subject: Re: [edk2-devel] [edk2-platforms Patch 00/14]
> Vlv2TbltDevicePkg: Remove Intel Framework dependencies
> 
> On Wed, Jul 10, 2019 at 05:01:32AM +,  Michael D
> Kinney  wrote:
> > Hi Gary,
> >
> > I have added 2 more patches.  One to disable capsule
> generation for
> > IA32 builds.  There are several places the output
> directory is hard
> > coded for X64.  Will require converting the POST_BUILD
> scripts to
> > python to make this much better.
> >
> > The second patch is for the Readme.md.  Please review
> and verify the
> > instructions.
> I found some typos in the Readme.md:
> 
> 1. The path to the capsules:
> 
>   -apt-get install libc:i386
> 
> +`Build\Vlv2TbltDevicePkgIA32\RELEASE_VS2015x86\FV\Vlv.RO
> M`
>   +
>   +The X64 CapsuleApp and generated UEFI Capsules are in
> the directory
>   +
>   +`Build/Vlv2TbltDevicePkg/Capsules`
>   +
>   +# Linux Pre-requisites
> 
># Download and Build MinnowMax using Linux/GCC
> 
> Since it's still in the section of windows, so the path
> needs the fix:
> 
> Build/Vlv2TbltDevicePkg/Capsules =>
> Build\Vlv2TbltDevicePkg\Capsules
> 
> 2. The name of gcc script:
> 
>Once the environment is setup, the MinnowBoard MAX
> firmware and capsules can be
>rebuilt using the following commands.
> 
>   +* Build X64 Debug Image with report file
>   +
>   +```
>   +cd edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg
>   +Build_IFWI.bat /m /y MNW2 Debug
>   +```
> 
>   -* Build Debug Image
>   +* Build X64 Release Image with build log
> 
>```
>   -cd Vlv2TbltDevicePkg
>   -./Build_IFWI.sh MNW2 Debug
>   +cd edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg
>   +Build_IFWI.bat /m /l MNW2 Release
>```
> 
>   -* Build Release Image
>   +* Build IA32 Debug Image
> 
>```
>   -cd Vlv2TbltDevicePkg
>   -./Build_IFWI.sh MNW2 Release
>   +cd edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg
>   +Build_IFWI.bat /m /IA32 MNW2 Debug
>```
> 
> This is the section of Linux, so the build script is
> Build_IFWI.sh, not Build_IFWI.bat.
> 
> Gary Lin
> 
> >
> > Thanks,
> >
> > Mike
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io
> [mailto:devel@edk2.groups.io] On Behalf
> > > Of Gary Lin
> > > Sent: Tuesday, July 9, 2019 9:14 PM
> > > To: devel@edk2.groups.io; Kinney, Michael D
> > > 
> > > Cc: Qian, Yi ; Sun, Zailiang
> > > 
> > > Subject: Re: [edk2-devel] [edk2-platforms Patch
> 00/14]
> > > Vlv2TbltDevicePkg: Remove Intel Framework
> dependencies
> > >
> > > On Wed, Jul 10, 2019 at 03:38:01AM +,  Michael D
> Kinney  wrote:
> > > > Hi Gary,
> > > >
> > > > I have pushed 2 more patches to my branch.  One
> fixes
> > > the ASL issue
> > > > without removing the code.  The second is a clean
> up to
> > > all the DSC
> > > > files and build scripts to make everything more
> > > consistent and remove
> > > > more unused content.
> > > >
> > > > https://github.com/mdkinney/edk2-
> > > platforms/tree/Bug_xxx_Vlv2_Linux_And
> > > > _Smbios_Fixes_V2
> > > >
> > > > Please test this to make sure it still works.
> > > >
> > > It works great! I don't need to comment out the
> problematic line
> > > anymore.
> > >
> > > > I will work on the Readme and will review the
> series to
> > > prepare for
> > > > sending the patch email review tomorrow.
> > > >
> > > > Thanks for all your help and testing.
> > > Thanks for fixing the gcc build :)
> > >
> > > Gary Lin
> > >
> > > >
> > > > Mike
> > > >
> > > > > -Original Message-
> > > > > From: devel@edk2.groups.io
> > > [mailto:devel@edk2.groups.io] On Behalf
> > > > > Of Gary Lin
> > > > > Sent: Monday, July 8, 2019 11:04 PM
> > > > > To: devel@edk2.groups.io; Kinney, Michael D
> > > > > 
> > > > > Cc: Qian, Yi ; Sun, Zailiang
> > > > > 
> > > > > Subject: Re: [edk2-devel] [edk2-platforms Patch
> > > 00/14]
> > > > > Vlv2TbltDevicePkg: Remove Intel Framework
> > > dependencies
> > > > >
> > > > > On Tue, Jul 09, 2019 at 03:52:37AM +,
> Michael D
> > > Kinney  wrote:
> > > > > > Hi Gary,
> > > > > >
> > > > > Hi Mike,
> > > > >
> > > > > > I picked up the changes on your branch.  I re-
> > > enabled
> > > > > the BIOS ID
> > > > > > Feature and added support for IA32 GCC builds,
> so
> > > the
> > > > > builds available
> > > > > > from Windows and Linux are matched now.
> > > > > >
> > > > > > I have posted my updated branch here:
> > > > > >
> > > > > > https://github.com/mdkinney/edk2-
> > > > > platforms/tree/Bug_xxx_Vlv2_Linux_And
> > > > > > _Smbios_Fixes_V2
> > > > > >
> > > > > > I also verified that the SD Card support does
> work,
> > > so
> > > > > I am keeping
> > > > > > that change.
> > > > > >
> > > > > I tested the branch + my ASL workaround and
> booted
> > > into Linux
> > > > > succe

[edk2-devel] [edk2-platforms Patch 22/28] Vlv2TbltDevicePkg: Add GCC IA32 build support

2019-07-10 Thread Michael D Kinney
* Remove CpuIa32Lib that contains inline assembly
  that is not compatible with GCC builds.  Use BaseLib
  functions for CPUID and MSR access and the CPUID and
  MSR defintions from the UefiCpuPkg.
* Add PlatformPkgGccIa32.dsc
* Add /IA32 flag to Build_IFWI.sh
* Add /IA32 flag to bld_vlv.sh
* Remove unused references to gEfiPlatformCpuInfoGuid

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Gary Lin 
Signed-off-by: Michael D Kinney 
---
 .../AcpiPlatform/AcpiPlatform.c   |   1 -
 .../Intel/Vlv2TbltDevicePkg/Build_IFWI.sh |   4 +
 .../Include/Guid/PlatformCpuInfo.h|  16 +-
 .../Include/Library/CpuIA32.h | 345 --
 .../Library/CpuIA32Lib/CpuIA32Lib.inf |  41 ---
 .../Library/CpuIA32Lib/EfiCpuVersion.c|  70 
 .../Library/CpuIA32Lib/IA32/CpuIA32.S | 223 ---
 .../Library/CpuIA32Lib/IA32/CpuIA32.asm   | 206 ---
 .../Library/CpuIA32Lib/IA32/CpuIA32.c | 177 -
 .../Library/CpuIA32Lib/X64/Cpu.S  | 207 ---
 .../Library/CpuIA32Lib/X64/Cpu.asm| 222 ---
 .../MonoStatusCode/MonoStatusCode.inf |   1 -
 .../PlatformInitPei/MemoryCallback.c  |  11 +-
 .../PlatformInitPei/PlatformEarlyInit.h   |   4 +-
 .../PlatformInitPei/PlatformInitPei.inf   |   1 -
 .../PlatformPei/PlatformPei.inf   |   1 -
 ...formPkgIA32.dsc => PlatformPkgGccIA32.dsc} |  28 +-
 .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc   |   1 -
 .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc |   1 -
 .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc  |   1 -
 .../PlatformSetupDxe/PlatformSetupDxe.h   |   1 -
 .../PlatformSetupDxe/PlatformSetupDxe.inf |   2 +-
 .../PlatformSetupDxe/SetupInfoRecords.c   |  42 ++-
 .../Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c   |  12 +-
 .../Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf |   1 +
 .../SmBiosMiscDxe/MiscOemType0x90Function.c   |  37 +-
 .../SmBiosMiscDxe/MiscOemType0x94Function.c   |  10 +-
 .../MiscProcessorInformationFunction.c|   3 +-
 .../SmBiosMiscDxe/SmBiosMiscDxe.inf   |   1 -
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh   |   7 +-
 30 files changed, 97 insertions(+), 1580 deletions(-)
 delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Include/Library/CpuIA32.h
 delete mode 100644 
Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/CpuIA32Lib.inf
 delete mode 100644 
Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/EfiCpuVersion.c
 delete mode 100644 
Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/IA32/CpuIA32.S
 delete mode 100644 
Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/IA32/CpuIA32.asm
 delete mode 100644 
Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/IA32/CpuIA32.c
 delete mode 100644 
Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/X64/Cpu.S
 delete mode 100644 
Platform/Intel/Vlv2TbltDevicePkg/Library/CpuIA32Lib/X64/Cpu.asm
 copy Platform/Intel/Vlv2TbltDevicePkg/{PlatformPkgIA32.dsc => 
PlatformPkgGccIA32.dsc} (96%)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c 
b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
index 72edc1bc1e..479ffa61a0 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
@@ -36,7 +36,6 @@ Abstract:
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
index 422e90ca6c..349f0c7ba7 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
@@ -63,6 +63,10 @@ for (( i=1; i<=$#; ))
   Arch=X64
   Build_Flags="$Build_Flags /x64"
   shift
+elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/IA32" ]; then
+  Arch=IA32
+  Build_Flags="$Build_Flags /IA32"
+  shift
 elif [ "$1" == "/nG" ]; then
   Stitch_Flags="$Stitch_Flags /nG"
   shift
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformCpuInfo.h 
b/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformCpuInfo.h
index f1756662bd..eec167da3a 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformCpuInfo.h
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Include/Guid/PlatformCpuInfo.h
@@ -1,12 +1,9 @@
 /*++
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.
-   


+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.
+
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
-   


-
-
 Module Name:
 
   PlatformCpuInfo.h
@@ -21,7 +18,6 @@ Abstract:
 #define _PLATFORM_CPU_INFO_GUID_H_
 
 #include "CpuType.h"
-#include 
 
 #define EFI_PLATFORM_CPU_INFO_GUID \
   {\
@@ -95,6 +91,14 @@ typedef struct {
   UINT8   HwCoordinationFeedback;   // ECX [0]
 } EFI_CPU_

[edk2-devel] [edk2-platforms Patch 25/28] Vlv2DeviceRefCodePlg/AcpiTablesPCAT: Fix ASL error

2019-07-10 Thread Michael D Kinney
Remove use of a method to read a register from a BAR
and instead access the register directly.  Resolves the
following error from the latest iasl compiler.

  Or(ShiftLeft(Derefof(Index(CDCT, \_SB.PCI0.GFX0.MCHK.DCFE)), 21),PARM, PARM)

Error 6163 - Object is created temporarily in another method
 and cannot be accessed ^ (\_SB.PCI0.GFX0.MCHK.DCFE)

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Gary Lin 
Signed-off-by: Michael D Kinney 
---
 .../AcpiTablesPCAT/IgdOGBDA.ASL| 14 --
 .../AcpiTablesPCAT/IgdOpRn.ASL | 18 +-
 2 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL 
b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL
index 4482db6906..379fca7379 100644
--- a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL
+++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL
@@ -1,6 +1,6 @@
 /*++
 
-Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
+Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -125,7 +125,17 @@ Method (GBDA, 0, Serialized)
 
 // Report the graphics frequency based on DISPLAY_CLOCK_FREQUENCY_ENCODING 
[MMADR+0x20C8]
 
-Or(ShiftLeft(Derefof(Index(CDCT, \_SB.PCI0.GFX0.MCHK.DCFE)), 21),PARM, 
PARM)
+If (LNotEqual (MADR, 0x))
+  {
+OperationRegion(IGMM,SystemMemory,MADR,0x3000)
+Field(IGMM,AnyAcc, NoLock, Preserve)
+{
+  Offset(0X20C8),
+  ,4,
+  DCFE,4, // DISPLAY_CLOCK_FREQUENCY_ENCODING
+}
+Or(ShiftLeft(Derefof(Index(CDCT, DCFE)), 21),PARM, PARM)
+  }
 
 Store(1, GESF)  // Set the modified settings flag
 Return(SUCC)
diff --git a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL 
b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL
index 8575fbfe6c..386ad3e65e 100644
--- a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL
+++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL
@@ -1,6 +1,6 @@
 /*++
 
-Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
+Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -70,22 +70,6 @@ Field(IGDP, AnyAcc, NoLock, Preserve)
   ASLS,   32,// Reg 0xFC, Address of the IGD OpRegion
 }
 
-Method (MCHK, 0, Serialized)
-{
-
-  If (LNotEqual (MADR, 0x))
-  {
-OperationRegion(IGMM,SystemMemory,MADR,0x3000)
-Field(IGMM,AnyAcc, NoLock, Preserve)
-{
-  Offset(0X20C8),
-  ,4,
-  DCFE,4, // DISPLAY_CLOCK_FREQUENCY_ENCODING
-}
-  }
-}
-
-
 //  Define an OperationRegion to cover the IGD OpRegion layout.
 
 OperationRegion(IGDM, SystemMemory, ASLB, 0x2000)
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43521): https://edk2.groups.io/g/devel/message/43521
Mute This Topic: https://groups.io/mt/32419754/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 24/28] Vlv2TbltDevicePkg: Reorganize the libraries

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

* Simplify the logic of importing TpmMeasurementLib
* Import BaseCryptLib, OpensslLib, and IntrinsicLib unconditionally
  since FmpDxe needs them
* Import FileExplorerLib unconditionally since UiApp needs it
* Update the import of TPM/TCG libraries

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 .../Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc  | 45 +++--
 .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc   | 48 +++
 .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 45 +++--
 .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 47 +++---
 4 files changed, 66 insertions(+), 119 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc
index e4e86cbb07..eb7ae46505 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc
@@ -197,7 +197,6 @@ [LibraryClasses.common]
   TpmCommLib|SecurityPkg/Library/TpmCommLib/TpmCommLib.inf
   Tpm12CommandLib|SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf
-
 !endif
 
   
PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
@@ -215,8 +214,9 @@ [LibraryClasses.common]
   # CryptLib
   #
 !if $(TPM_ENABLED) == TRUE
-  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
-  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
+  
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
+!else
+  
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
 !endif
 
  BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf
@@ -224,34 +224,28 @@ [LibraryClasses.common]
   StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf
 
 !if $(SECURE_BOOT_ENABLE) == TRUE
-  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
-  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
   
PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
-  
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
   AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf
-  FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
 !else
-  
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
   
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
 !endif
+
+  FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
+
   VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
-!if $(NETWORK_ISCSI_ENABLE) == TRUE
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
-!endif
 !if $(NETWORK_TLS_ENABLE) == TRUE
   TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
 !endif
-  
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
+  Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
   
Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf
   
Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf
 
-
-  Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
   BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
 
 [LibraryClasses.IA32.SEC]
@@ -305,18 +299,13 @@ [LibraryClasses.IA32]
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
 
+  Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf
+!if $(TPM_ENABLED) == TRUE
   
TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf
-!if $(TPM_ENABLED) == TRUE
-  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
 !endif
 
   LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
   EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf
-
-!if $(SECURE_BOOT_ENABLE) == TRUE
-  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
-!endif
-
   
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf
 
 [LibraryClasses.IA32.DXE_DRIVER]
@@ -370,6 +359,10 @@ [LibraryClasses.IA32.DXE_SMM_DRIVER]
 !endif
   
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
 
+!if $(TPM_ENABLED) == TRUE
+  TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.inf
+!endif
+
 [L

[edk2-devel] [edk2-platforms Patch 28/28] Vlv2TbltDevicePkg: Update Readme.md for multiple repos

2019-07-10 Thread Michael D Kinney
Update Readme.md with instructions to clone content from
the edk2, edk2-platforms, and edk2-non-osi repositories
and build Vlv2TbltDevicePkg for Windows and Linux.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Gary Lin 
Signed-off-by: Michael D Kinney 
---
 Platform/Intel/Vlv2TbltDevicePkg/Readme.md | 145 ++---
 1 file changed, 69 insertions(+), 76 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Readme.md 
b/Platform/Intel/Vlv2TbltDevicePkg/Readme.md
index cbbb465b69..97180ef7af 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/Readme.md
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Readme.md
@@ -42,39 +42,27 @@ the MinnowBoard MAX firmware and generates UEFI Capsules 
that can be used to
 update the MinnowBoard MAX firmware and three sample devices.
 
 ```
-git clone --recurse-submodules https://github.com/tianocore/edk2.git
+git clone https://github.com/tianocore/edk2.git
+cd edk2
+git submodule update --init
+cd ..
+git clone https://github.com/tianocore/edk2-platforms.git
+git clone https://github.com/tianocore/edk2-non-osi.git
 
 powershell "& {[Net.ServicePointManager]::SecurityProtocol = 
[Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 
"https://indy.fulgan.com/SSL/openssl-1.0.2r-x64_86-win64.zip -OutFile 
openssl-1.0.2r-x64_86-win64.zip"}"
 powershell Expand-Archive openssl-1.0.2r-x64_86-win64.zip
 
-powershell "& {[Net.ServicePointManager]::SecurityProtocol = 
[Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 
"https://firmware.intel.com/sites/default/files/MinnowBoardMax-Development190216.zip
 -OutFile MinnowBoardMax-Development190216.zip"}"
-powershell Expand-Archive MinnowBoardMax-Development190216.zip
-sleep 1
-rename MinnowBoardMax-Development190216 Vlv2Binaries
-cd Vlv2Binaries
-powershell Expand-Archive Vlv2SocBinPkg.zip .
-sleep 1
-cd ..
-
 powershell "& {[Net.ServicePointManager]::SecurityProtocol = 
[Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 
"https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win64/nasm-2.13.03-win64.zip
 -OutFile nasm-2.13.03-win64.zip"}"
 powershell Expand-Archive nasm-2.13.03-win64.zip .
 
-mkdir Conf
-
 set WORKSPACE=%CD%
-set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
-set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike
-set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries
-path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_86-win64
+set 
PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Silicon\Intel;%WORKSPACE%\edk2-platforms\Platform\Intel;%WORKSPACE%\edk2-non-osi\Silicon\Intel
+path=%path%;%WORKSPACE%\openssl-1.0.2r-x64_86-win64
 set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
 
-cd %WORKSPACE%\edk2
+cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg
 
-call edkSetup.bat Rebuild
-
-cd Vlv2TbltDevicePkg
-
-Build_IFWI.bat /m /y MNW2 Debug
+Build_IFWI.bat /m MNW2 Debug
 ```
 
 Once all the code and tools are downloaded and installed, only the following
@@ -83,48 +71,50 @@ directory used to install the source and binaries.
 
 ```
 set WORKSPACE=%CD%
-set EDK_TOOLS_PATH=%WORKSPACE%\edk2\BaseTools
-set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\BinWrappers\WindowsLike
-set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\Vlv2Binaries
-path=%path%;%EDK_TOOLS_PATH%\Bin\Win32;%WORKSPACE%\openssl-1.0.2r-x64_86-win64
+set 
PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Silicon\Intel;%WORKSPACE%\edk2-platforms\Platform\Intel;%WORKSPACE%\edk2-non-osi\Silicon\Intel
+path=%path%;%WORKSPACE%\openssl-1.0.2r-x64_86-win64
 set NASM_PREFIX=%WORKSPACE%\nasm-2.13.03\
-
-cd %WORKSPACE%\edk2
-
-call edkSetup.bat Rebuild
 ```
 
 Once the environment is setup, the MinnowBoard MAX firmware and capsules can be
 rebuilt using the following commands.
 
-* Build Debug Image
+* Build X64 Debug Image with report file
 
 ```
-cd Vlv2TbltDevicePkg
+cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg
 Build_IFWI.bat /m /y MNW2 Debug
 ```
 
-* Build Release Image
+* Build X64 Release Image with build log
 
 ```
-cd Vlv2TbltDevicePkg
-Build_IFWI.bat /m /y MNW2 Release
+cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg
+Build_IFWI.bat /m /l MNW2 Release
 ```
 
-The generated firmware image is the newest `.bin` file in 
`edk2/Vlv2TbltDevicePkg/Stitch`.
-The file is in the form `MNW2MAX1.X64.0084.D01..bin`.
+* Build IA32 Debug Image
 
-The CapsuleApp and generated UEFI Capsules are in 
`Build/Vlv2TbltDevicePkg/Capsules`
+```
+cd edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg
+Build_IFWI.bat /m /IA32 MNW2 Debug
+```
+
+The generated firmware image is the build output directory below WORKSPACE.  
For
+exampple, the X64 Debug Image is at:
+
+`Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\FV\Vlv.ROM`
+
+And the IA32 Release image is at:
+
+`Build\Vlv2TbltDevicePkgIA32\RELEASE_VS2015x86\FV\Vlv.ROM`
+
+The X64 CapsuleApp and generated UEFI Capsules are in the directory
+
+`Build\Vlv2TbltDevicePkg\Capsules`
 
 # Linux Pre-requisites
 
-* The tool GenBiosId has a dependency on libc.so.6.  Make sure it is installed.
-  Here are a few example install

[edk2-devel] [edk2-platforms Patch 26/28] Vlv2TbltDevicePkg: Clean up all build scripts

2019-07-10 Thread Michael D Kinney
* Remove cln.sh
* Remove unused PlatformDefintions.h file
* Remove unused defines from DSC files
* Make Windows and Linux script more consistent
* Remove unused options from Windows/Linux scripts
* Remove unused defines from Windows/Linux scripts
* Do not modify Target.txt in Conf directory.  Instead,
  pass all build flags on the command line
* Generate build report in the build output directory
* Generate build logs in the build output directory
* Do not delete files from Conf directory
* Update clean operation to only clean one platform target
* Do not generate AutoPlatformCFG.txt file anymore

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Gary Lin 
Signed-off-by: Michael D Kinney 
---
 Platform/Intel/Vlv2TbltDevicePkg/.gitignore   |   5 -
 .../Intel/Vlv2TbltDevicePkg/Build_IFWI.bat|  75 ++---
 .../Intel/Vlv2TbltDevicePkg/Build_IFWI.sh |  57 +++
 .../Include/PlatformDefinitions.h |  43 -
 .../Vlv2TbltDevicePkg/PlatformPkgConfig.dsc   |   2 -
 .../Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc  |  55 +-
 .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc   |  53 +-
 .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc |  53 +-
 .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc  |  55 +-
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat  | 120 ++---
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh   | 159 --
 Platform/Intel/Vlv2TbltDevicePkg/cln.sh   |  62 ---
 12 files changed, 156 insertions(+), 583 deletions(-)
 delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/.gitignore
 delete mode 100644 
Platform/Intel/Vlv2TbltDevicePkg/Include/PlatformDefinitions.h
 delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/cln.sh

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/.gitignore 
b/Platform/Intel/Vlv2TbltDevicePkg/.gitignore
deleted file mode 100644
index c7698262ad..00
--- a/Platform/Intel/Vlv2TbltDevicePkg/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-AutoPlatformCFG.txt
-Stitch/Stitching.log
-Stitch/MNW*.bin
-Stitch/MNW*.rom
-Stitch/MNW*.rom.orig
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat 
b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat
index 44759c617f..f65aa61f4a 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat
@@ -9,15 +9,9 @@
 
 SetLocal EnableDelayedExpansion EnableExtensions
 
-@REM Go to work space directory.
-cd ..
-cd ..
-
 :: Assign initial values
 set exitCode=0
 set "Build_Flags= "
-set "Stitch_Flags= "
-set Arch=X64
 set PLATFORM_PACKAGE=Vlv2TbltDevicePkg
 
 set PLATFORM_PATH=%WORKSPACE%
@@ -42,11 +36,6 @@ if not exist %PLATFORM_PATH%\%PLATFORM_PACKAGE% (
 :OptLoop
 if /i "%~1"=="/?" goto Usage
 
-if /i "%~1"=="/q" (
-set Build_Flags=%Build_Flags% /q
-shift
-goto OptLoop
-)
 if /i "%~1"=="/l" (
 set Build_Flags=%Build_Flags% /l
 shift
@@ -67,53 +56,17 @@ if /i "%~1" == "/c" (
 shift
 goto OptLoop
 )
-if /i "%~1" == "/ECP" (
-set Build_Flags=%Build_Flags% /ecp
-shift
-goto OptLoop
-)
-
-if /i "%~1"=="/s" (
-set Build_Flags=%Build_Flags% /s
-shift
-goto OptLoop
-)
-
 if /i "%~1"=="/x64" (
-set Arch=X64
 set Build_Flags=%Build_Flags% /x64
 shift
 goto OptLoop
 )
-
 if /i "%~1"=="/IA32" (
-set Arch=IA32
 set Build_Flags=%Build_Flags% /IA32
 shift
 goto OptLoop
 )
 
-if /i "%~1"=="/nG" (
-set Stitch_Flags=%Stitch_Flags% /nG
-shift
-goto OptLoop
-)
-if /i "%~1"=="/nM" (
-set Stitch_Flags=%Stitch_Flags% /nM
-shift
-goto OptLoop
-)
-if /i "%~1"=="/nB" (
-set Stitch_Flags=%Stitch_Flags% /nB
-shift
-goto OptLoop
-)
-if /i "%~1"=="/yL" (
-set Stitch_Flags=%Stitch_Flags% /yL
-shift
-goto OptLoop
-)
-
 :: Require 2 input parameters
 if "%~2"=="" goto Usage
 
@@ -125,7 +78,7 @@ set Build_Target=%~2
 echo ==
 echo Build_IFWI:  Calling BIOS build Script...
 
-call %PLATFORM_PATH%\%PLATFORM_PACKAGE%\bld_vlv.bat %Build_Flags%  
%Platform_Type% %Build_Target%
+call %PLATFORM_PATH%\%PLATFORM_PACKAGE%\bld_vlv.bat %Build_Flags% 
%Platform_Type% %Build_Target%
 
 if %ERRORLEVEL% NEQ 0 (
 echo echo  -- Error Building BIOS  & echo.
@@ -139,23 +92,21 @@ goto Exit
 :Usage
 echo Script to build BIOS firmware and stitch the entire IFWI.
 echo.
-echo Usage: Build_IFWI.bat [options]  PlatformType  BuildTarget  [IFWI Suffix]
+echo Usage: Build_IFWI.bat [options]  PlatformType  BuildTarget
 echo.
-echo/c CleanAll before building
-echo/x64   Set Arch to X64  (default: X64)
-echo/IA32  Set Arch to IA32 (default: X64)
-echo/yLEnable SPI lock
-echo. 
-echoPlatform Types:   MNW2
-echoBuild Targets:Release, Debug
-echoIFWI Suffix:  Suffix to append to end of IFWI filename 
(default: MM_DD_)
+echo/cCleanAll
+echo/lGenerate build log file
+echo/yGenerate build report file
+echo/mEnable multi-processor bu

[edk2-devel] [edk2-platforms Patch 01/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Add "set -e" to exit on error

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
index 4a11a1cba9..7063b7470d 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
@@ -19,6 +19,8 @@ function Usage ( ) {
   exit 0
 }
 
+set -e
+
 ## Assign initial values
 exitCode=0
 Build_Flags=
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43495): https://edk2.groups.io/g/devel/message/43495
Mute This Topic: https://groups.io/mt/32419728/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 08/28] Vlv2TbltDevicePkg/bld_vlv.sh: Remove BiosId.env completely

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 25 +++--
 1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
index 0aa1edfb22..bceea99b2d 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -53,10 +53,6 @@ if [ -e $CORE_PATH/Conf/target.txt ]; then
   rm $CORE_PATH/Conf/target.txt
 fi
 
-if [ -e $CORE_PATH/Conf/BiosId.env ]; then
-  rm $CORE_PATH/Conf/BiosId.env
-fi
-
 if [ -e $CORE_PATH/Conf/tools_def.txt ]; then
   rm $CORE_PATH/Conf/tools_def.txt
 fi
@@ -119,18 +115,11 @@ if [ "$2" == "" ]; then
   Usage
 fi
 
-## Remove the values for Platform_Type and Build_Target from BiosIdX.env and 
stage in Conf
 if [ $Arch == "IA32" ]; then
-  cp $PLATFORM_PKG_PATH/BiosIdR.env Conf/BiosId.env
-  echo DEFINE X64_CONFIG = FALSE  >> $auto_config_inc
+  echo DEFINE X64_CONFIG = FALSE >> $auto_config_inc
 else
-  cp $PLATFORM_PKG_PATH/BiosIdx64R.env Conf/BiosId.env
-  echo DEFINE X64_CONFIG = TRUE   >> $auto_config_inc
+  echo DEFINE X64_CONFIG = TRUE  >> $auto_config_inc
 fi
-sed -i '/^BOARD_ID/d' Conf/BiosId.env
-sed -i '/^BUILD_TYPE/d' Conf/BiosId.env
-
-
 
 ## -- Build flags settings for each Platform --
 ##AlpineValley (ALPV):  SVP_PF_BUILD = TRUE,   ENBDT_PF_BUILD = FALSE,  
TABLET_PF_BUILD = FALSE,  BYTI_PF_BUILD = FALSE, IVI_PF_BUILD = FALSE
@@ -141,26 +130,18 @@ sed -i '/^BUILD_TYPE/d' Conf/BiosId.env
 ##FFD8 (BLAK):  SVP_PF_BUILD = FALSE,  ENBDT_PF_BUILD = FALSE,  
TABLET_PF_BUILD = TRUE,   BYTI_PF_BUILD = FALSE, IVI_PF_BUILD = FALSE
 echo "Setting  $1  platform configuration and BIOS ID..."
 if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "MNW2" ]; then
-  echo BOARD_ID = MNW2MAX >> Conf/BiosId.env
-  echo DEFINE ENBDT_PF_BUILD = TRUE  >> $auto_config_inc
+  echo DEFINE ENBDT_PF_BUILD = TRUE >> $auto_config_inc
 else
   echo "Error - Unsupported PlatformType: $1"
   Usage
 fi
 
-Platform_Type=$1
-
 if [ "$(echo $2 | tr 'a-z' 'A-Z')" == "RELEASE" ]; then
   export TARGET=RELEASE
-  BUILD_TYPE=R
-  echo BUILD_TYPE = R >> Conf/BiosId.env
 else
   export TARGET=DEBUG
-  BUILD_TYPE=D
-  echo BUILD_TYPE = D >> Conf/BiosId.env
 fi
 
-
 ##**
 ## Additional EDK Build Setup/Configuration
 ##**
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43513): https://edk2.groups.io/g/devel/message/43513
Mute This Topic: https://groups.io/mt/32419746/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 12/28] Vlv2TbltDevicePkg/AcpiPlatform: Remove a unused variable

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

TableVersion in AcpiPlatformEntryPoint() is not used anymore.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c 
b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
index 962baf561d..f3efc41e31 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
@@ -747,7 +747,6 @@ AcpiPlatformEntryPoint (
   UINT32FvStatus;
   UINTN Size;
   EFI_EVENT Event;
-  EFI_ACPI_TABLE_VERSIONTableVersion;
   UINTN VarSize;
   UINTN SysCfgSize;
   EFI_HANDLEHandle;
@@ -759,7 +758,6 @@ AcpiPlatformEntryPoint (
 
   mFirstNotify  = FALSE;
 
-  TableVersion  = EFI_ACPI_TABLE_VERSION_2_0;
   Instance  = 0;
   CurrentTable  = NULL;
   TableHandle   = 0;
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43500): https://edk2.groups.io/g/devel/message/43500
Mute This Topic: https://groups.io/mt/32419733/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 13/28] Vlv2TbltDevicePkg/AcpiPlatform: Fix the error from InstallAcpiTable

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

The firmware crashed when installing ACPI tables:

ASSERT_EFI_ERROR (Status = Invalid Parameter)
ASSERT [AcpiPlatform] 
edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c(1162):
 !EFI_ERROR (AcpiStatus)

The 'Size' from ReadSection() is not the size of the ACPI table so
InstallAcpiTable() returned EFI_INVALID_PARAMETER.

Use the 'Length' from the header to avoid the crash.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c 
b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
index f3efc41e31..72edc1bc1e 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
@@ -1152,7 +1152,7 @@ AcpiPlatformEntryPoint (
   AcpiStatus = AcpiTable->InstallAcpiTable (
   AcpiTable,
   CurrentTable,
-  Size,
+  CurrentTable->Length,
   &TableHandle
   );
   ASSERT_EFI_ERROR (AcpiStatus);
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43501): https://edk2.groups.io/g/devel/message/43501
Mute This Topic: https://groups.io/mt/32419734/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 06/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update the script to fit edk2-platforms

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

* Add "set -e" to exit immediately on error

* Update the paths to fit the directory changes

  WORKSPACE
+--edk2 (CORE)
|
+--edk2-platforms
|   |
|   +---Platform
|   ||
|   |+---Intel
|   | |
|   | +---Vlv2TbltDevicePkg (PLATFORM)
|   |
|   +---Silicon
||
|+---Intel
| |
| +---Vlv2DeviceRefCodePkg (SILICON)
|
+--edk2-non-osi
|
+---Silicon
 |
 +---Intel
  |
  +---Vlv2SocBinPkg (BINARY)

* Sync a part of bld_vlv.sh from the devel-MinnowBoardMax-UDK2017 branch
  to enable capsule building

* Export TARGET and TOOL_CHAIN_TAG so that the GenerateCapsule scripts
  can use those variables

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 57 -
 1 file changed, 33 insertions(+), 24 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
index 27772f47de..0aa1edfb22 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -7,7 +7,7 @@ function Usage() {
   echo 
"***"
   echo "Build BIOS rom for VLV platforms."
   echo
-  echo "Usage: bld_vlv.bat  PlatformType [Build Target]"
+  echo "Usage: bld_vlv.sh  PlatformType [Build Target]"
   echo
   echo
   echo "   Platform Types:  MNW2"
@@ -19,44 +19,52 @@ function Usage() {
   exit 0
 }
 
+set -e
 
+cd ..
 echo -e $(date)
 ##**
 ## Initial Setup
 ##**
-#WORKSPACE=$(pwd)
+export WORKSPACE=$(pwd)
 #build_threads=($NUMBER_OF_PROCESSORS)+1
 Build_Flags=
 exitCode=0
 Arch=X64
 SpiLock=0
 
+export CORE_PATH=$WORKSPACE/edk2
+export PLATFORM_PATH=$WORKSPACE/edk2-platforms/Platform/Intel/
+export SILICON_PATH=$WORKSPACE/edk2-platforms/Silicon/Intel/
+export BINARY_PATH=$WORKSPACE/edk2-non-osi/Silicon/Intel/
+export PACKAGES_PATH=$PLATFORM_PATH:$SILICON_PATH:$BINARY_PATH:$CORE_PATH
+cd ./edk2
+
 ## Clean up previous build files.
-if [ -e $(pwd)/EDK2.log ]; then
-  rm $(pwd)/EDK2.log
+if [ -e $CORE_PATH/EDK2.log ]; then
+  rm $CORE_PATH/EDK2.log
 fi
 
-if [ -e $(pwd)/Unitool.log ]; then
-  rm $(pwd)/Unitool.log
+if [ -e $CORE_PATH/Unitool.log ]; then
+  rm $CORE_PATH/Unitool.log
 fi
 
-if [ -e $(pwd)/Conf/target.txt ]; then
-  rm $(pwd)/Conf/target.txt
+if [ -e $CORE_PATH/Conf/target.txt ]; then
+  rm $CORE_PATH/Conf/target.txt
 fi
 
-if [ -e $(pwd)/Conf/BiosId.env ]; then
-  rm $(pwd)/Conf/BiosId.env
+if [ -e $CORE_PATH/Conf/BiosId.env ]; then
+  rm $CORE_PATH/Conf/BiosId.env
 fi
 
-if [ -e $(pwd)/Conf/tools_def.txt ]; then
-  rm $(pwd)/Conf/tools_def.txt
+if [ -e $CORE_PATH/Conf/tools_def.txt ]; then
+  rm $CORE_PATH/Conf/tools_def.txt
 fi
 
-if [ -e $(pwd)/Conf/build_rule.txt ]; then
-  rm $(pwd)/Conf/build_rule.txt
+if [ -e $CORE_PATH/Conf/build_rule.txt ]; then
+  rm $CORE_PATH/Conf/build_rule.txt
 fi
 
-
 ## Setup EDK environment. Edksetup puts new copies of target.txt, 
tools_def.txt, build_rule.txt in WorkSpace\Conf
 ## Also run edksetup as soon as possible to avoid it from changing environment 
variables we're overriding
 . edksetup.sh BaseTools
@@ -64,8 +72,9 @@ make -C BaseTools
 
 ## Define platform specific environment variables.
 PLATFORM_PACKAGE=Vlv2TbltDevicePkg
-config_file=$WORKSPACE/$PLATFORM_PACKAGE/PlatformPkgConfig.dsc
-auto_config_inc=$WORKSPACE/$PLATFORM_PACKAGE/AutoPlatformCFG.txt
+PLATFORM_PKG_PATH=$PLATFORM_PATH/$PLATFORM_PACKAGE
+config_file=$PLATFORM_PKG_PATH/PlatformPkgConfig.dsc
+auto_config_inc=$PLATFORM_PKG_PATH/AutoPlatformCFG.txt
 
 ## create new AutoPlatformCFG.txt file
 if [ -f "$auto_config_inc" ]; then
@@ -112,10 +121,10 @@ fi
 
 ## Remove the values for Platform_Type and Build_Target from BiosIdX.env and 
stage in Conf
 if [ $Arch == "IA32" ]; then
-  cp $PLATFORM_PACKAGE/BiosIdR.envConf/BiosId.env
+  cp $PLATFORM_PKG_PATH/BiosIdR.env Conf/BiosId.env
   echo DEFINE X64_CONFIG = FALSE  >> $auto_config_inc
 else
-  cp $PLATFORM_PACKAGE/BiosIdx64R.env  Conf/BiosId.env
+  cp $PLATFORM_PKG_PATH/BiosIdx64R.env Conf/BiosId.env
   echo DEFINE X64_CONFIG = TRUE   >> $auto_config_inc
 fi
 sed -i '/^BOARD_ID/d' Conf/BiosId.env
@@ -142,11 +151,11 @@ fi
 Platform_Type=$1
 
 if [ "$(echo $2 | tr 'a-z' 'A-Z')" == "RELEASE" ]; then
-  TARGET=RELEASE
+  export TARGET=RELEASE
   BUILD_TYPE=R
   echo BUILD_TYPE = R >> Conf/BiosId.env
 else
-  TARGET=DEBUG
+  export TARGET=DEBUG
   BUILD_TYPE=D
   echo BUILD_TYPE = D >> Conf/BiosId.env
 fi

[edk2-devel] [edk2-platforms Patch 27/28] Vlv2TbltDevicePkg: Only build capsules for X64

2019-07-10 Thread Michael D Kinney
Only build capsules for X64 builds.  More changes are
required to build IA32 capsules.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Gary Lin 
Signed-off-by: Michael D Kinney 
---
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat | 6 +-
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh  | 6 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat 
b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat
index c39b8ccd62..99c1068663 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat
@@ -277,7 +277,11 @@ if %ERRORLEVEL% NEQ 0 goto BldFail
 ::echo FD successfully updated with default Hii values.
 
 @REM build capsule here
-call build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
+if "%Arch%"=="X64" (
+  echo Invoking EDK2 build for capsules...
+  echo build -t %TOOL_CHAIN_TAG% -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
+  call build -t %TOOL_CHAIN_TAG% -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
+)
 
 goto Exit
 
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
index d32beb6a45..0d1ea60ac6 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -224,7 +224,11 @@ cp -f $BUILD_PATH/FV/VLV.fd $BUILD_PATH/FV/Vlv.ROM
 ##**
 ## Build Capsules
 ##**
-build -p $PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
+if [ $Arch == "X64" ]; then
+  echo "Invoking EDK2 build for capsules..."
+  echo build -t $TOOL_CHAIN_TAG -p $PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
+  build -t $TOOL_CHAIN_TAG -p $PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
+fi
 
 echo
 echo  The EDKII BIOS build has successfully completed. 

-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43516): https://edk2.groups.io/g/devel/message/43516
Mute This Topic: https://groups.io/mt/32419749/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 19/28] Vlv2DeviceRefCodePkg: Remove redundant gEfiSpiProtocolGuid

2019-07-10 Thread Michael D Kinney
Remove redundant declaration of gEfiSpiProtocolGuid

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Gary Lin 
Signed-off-by: Michael D Kinney 
---
 Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec 
b/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
index 1af1ed757c..97af1d2f41 100644
--- a/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
+++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
@@ -39,7 +39,6 @@ [Protocols]
   gEfiSpiProtocolGuid   = { 0x1156efc6, 0xea32, 0x4396, {0xb5, 
0xd5, 0x26, 0x93, 0x2e, 0x83, 0xc3, 0x13}}
   gMemInfoProtocolGuid  = { 0x6f20f7c8, 0xe5ef, 0x4f21, {0x8d, 
0x19, 0xed, 0xc5, 0xf0, 0xc4, 0x96, 0xae}}
   gEfiSdHostIoProtocolGuid  = { 0xb63f8ec7, 0xa9c9, 0x4472, {0xa4, 
0xc0, 0x4d, 0x8b, 0xf3, 0x65, 0xcc, 0x51}}
-  gEfiSpiProtocolGuid   = { 0x1156efc6, 0xea32, 0x4396, {0xb5, 
0xd5, 0x26, 0x93, 0x2e, 0x83, 0xc3, 0x13}}
   gEfiSmmSpiProtocolGuid= { 0xD9072C35, 0xEB8F, 0x43AD, {0xA2, 
0x20, 0x34, 0xD4, 0x0E, 0x2A, 0x82, 0x85}}
   gEfiSmmIchnDispatchProtocolGuid   = { 0xc50b323e, 0x9075, 0x4f2a, { 
0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc}}
   gEfiSmmIchnDispatchExProtocolGuid = { 0x3920405B, 0xC897, 0x44DA, {0x88, 
0xF3, 0x4C, 0x49, 0x8A, 0x6F, 0xF7, 0x36}}
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43514): https://edk2.groups.io/g/devel/message/43514
Mute This Topic: https://groups.io/mt/32419747/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 20/28] Vlv2TbltDevicePkg: Remove redundant gEfiSpiProtocolGuid

2019-07-10 Thread Michael D Kinney
Remove redundant declaration of gEfiSpiProtocolGuid.
This protocol is defined in Vlv2DeviceRefCodePkg.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Gary Lin 
Signed-off-by: Michael D Kinney 
---
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
index abe9d7e3a0..970d2db42a 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
@@ -187,7 +187,6 @@ [Protocols]
 #  gEfiSpiBusProtocolGuid =  { 0x137b3044, 0xf6d7, 0x473e, { 0xa6, 0x25, 0x9f, 
0xb9, 0x25, 0x5, 0xc1, 0x80 } }
 
 #  gLpssDummyProtocolGuid = { 0xaf4cc162, 0xd41c, 0x455a, { 0xab, 0x45, 0x6d, 
0xbc, 0xc1, 0xcd, 0x32, 0xf3 } }
-  gEfiSpiProtocolGuid   = { 0x1156efc6, 0xea32, 0x4396, { 0xb5, 
0xd5, 0x26, 0x93, 0x2e, 0x83, 0xc3, 0x13 }}
   gEfiGpioOperationProtocolGuid = { 0x38DDFE8F, 0x8991, 0x44AA, { 0x98, 
0x89, 0x83, 0xF4, 0x91, 0x84, 0x65, 0xB0 }}
   gEfiEsrtOperationProtocolGuid = { 0x4549AB47, 0x6E60, 0x4293, { 0xB9, 
0x1D, 0x31, 0xB6, 0x10, 0xAD, 0x80, 0x56 }}
 
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43515): https://edk2.groups.io/g/devel/message/43515
Mute This Topic: https://groups.io/mt/32419748/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 21/28] Vlv2TbltDevicePkg: Re-enable BIOS ID feature

2019-07-10 Thread Michael D Kinney
Add back BIOSID feature using GenBiosId.py script and
BiosIdLib from the BoardModulePkg.  Remove the VLV2
specific BiosIdLib implementation.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Gary Lin 
Signed-off-by: Michael D Kinney 
---
 .../Include/Library/BiosIdLib.h   | 86 
 .../Library/BiosIdLib/BiosIdLib.c | 98 ---
 .../Library/BiosIdLib/BiosIdLib.inf   | 33 ---
 .../PlatformDxe/PlatformDxe.inf   |  5 +-
 .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf   |  7 ++
 .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf  |  7 ++
 .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc   |  2 +-
 .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc |  2 +-
 .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc  |  2 +-
 .../PlatformSetupDxe/PlatformSetupDxe.inf |  3 +-
 .../SmBiosMiscDxe/MiscBiosVendorFunction.c| 49 +-
 .../SmBiosMiscDxe/SmBiosMiscDxe.inf   |  8 +-
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat  | 27 +
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh   | 46 +
 14 files changed, 100 insertions(+), 275 deletions(-)
 delete mode 100644 Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h
 delete mode 100644 
Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c
 delete mode 100644 
Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h 
b/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h
deleted file mode 100644
index bd08c9a80f..00
--- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*++
-
-  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.
-
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-Module Name:
-
-  BiosIdLib.h
-
-Abstract:
-
-  BIOS ID library definitions.
-
-  This library provides functions to get BIOS ID, VERSION, DATE and TIME
-
---*/
-
-#ifndef _BIOS_ID_LIB_H_
-#define _BIOS_ID_LIB_H_
-
-//
-// BIOS ID string format:
-//
-// 
$(BOARD_ID)$(BOARD_REV).$(OEM_ID).$(VERSION_MAJOR).$(BUILD_TYPE)$(VERSION_MINOR).YYMMDDHHMM
-//
-// Example: "TRFTCRB1.86C.0008.D03.0506081529"
-//
-#pragma pack(1)
-
-typedef struct {
-  CHAR16  BoardId[7];   // "TRFTCRB"
-  CHAR16  BoardRev; // "1"
-  CHAR16  Dot1; // "."
-  CHAR16  OemId[3]; // "86C"
-  CHAR16  Dot2; // "."
-  CHAR16  VersionMajor[4];  // "0008"
-  CHAR16  Dot3; // "."
-  CHAR16  BuildType;// "D"
-  CHAR16  VersionMinor[2];  // "03"
-  CHAR16  Dot4; // "."
-  CHAR16  TimeStamp[10];// "YYMMDDHHMM"
-  CHAR16  NullTerminator;   // 0x
-} BIOS_ID_STRING;
-
-#define MEM_IFWIVER_START   0x7E
-#define MEM_IFWIVER_LENGTH  0x1000
-
-typedef struct _MANIFEST_OEM_DATA{
-  UINT32 Signature;
-  unsigned char  FillNull[0x39];
-  UINT32 IFWIVersionLen;
-  unsigned char  IFWIVersion[32];
-}MANIFEST_OEM_DATA;
-
-//
-// A signature precedes the BIOS ID string in the FV to enable search by 
external tools.
-//
-typedef struct {
-  UINT8   Signature[8]; // "$IBIOSI$"
-  BIOS_ID_STRING  BiosIdString; // "TRFTCRB1.86C.0008.D03.0506081529"
-} BIOS_ID_IMAGE;
-
-#pragma pack()
-
-/**
-  This function returns the Version & Release Date and Time by getting and 
converting
-  BIOS ID.
-
-  @param[in] BiosVersion The Bios Version out of the conversion.
-  @param[in] BiosReleaseDate The Bios Release Date out of the conversion.
-  @param[in] BiosReleaseTime The Bios Release Time out of the conversion.
-
-  @retval EFI_SUCCESSBIOS Version & Release Date and Time have 
been got successfully.
-  @retval EFI_NOT_FOUND  BiosId image is not found, and no parameter 
will be modified.
-  @retval EFI_INVALID_PARAMETER  All the parameters are NULL.
-
-**/
-EFI_STATUS
-GetBiosVersionDateTime (
-  OUT CHAR16*BiosVersion, OPTIONAL
-  OUT CHAR16*BiosReleaseDate, OPTIONAL
-  OUT CHAR16*BiosReleaseTime OPTIONAL
-  );
-
-#endif
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c 
b/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c
deleted file mode 100644
index f6ab37313c..00
--- a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*++
-
-Copyright (c) 2011  - 2019, Intel Corporation. All rights reserved
-
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-Module Name:
-
-  BiosIdLib.c
-
-Abstract:
-
-  Boot service DXE BIOS ID library implementation.
-
-  These functions in this file can be called during DXE and cannot be called 
during runtime
-  or in SMM which should use a RT or SMM library.
-
---*/
-
-#include 
-#include 
-
-#include 
-
-/**
-  This function returns the Version & Release Date and Time by getting and 
converting
-  BIOS ID.
-
-  @param BiosVersion  The Bios V

[edk2-devel] [edk2-platforms Patch 17/28] Vlvt2TbltDevicePkg: Fix NULL pointer access in SmbiosMiscDxe

2019-07-10 Thread Michael D Kinney
Handle case where no Simple Network Protocols are found.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Gary Lin 
Signed-off-by: Michael D Kinney 
---
 .../MiscBaseBoardManufacturerFunction.c| 14 +-
 .../SmBiosMiscDxe/MiscSystemManufacturerFunction.c | 14 +-
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c
 
b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c
index 4e02486853..8eddc5c2a6 100644
--- 
a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c
+++ 
b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c
@@ -130,11 +130,15 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer)
   //
   //Get the MAC string
   //
-  Status = NetLibGetMacString (
- *Handles,
- NULL,
- &MacStr
- );
+  if (Handles == NULL) {
+Status = EFI_NOT_FOUND;
+  } else {
+Status = NetLibGetMacString (
+   *Handles,
+   NULL,
+   &MacStr
+   );
+  }
   if (EFI_ERROR (Status)) {
 MacStr = L"";
   }
diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
 
b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
index da660cb3a8..b18dbd6ae2 100644
--- 
a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
+++ 
b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
@@ -212,11 +212,15 @@ AddSmbiosManuCallback (
   //
   //Get the MAC string
   //
-  Status = NetLibGetMacString (
- *Handles,
- NULL,
- &MacStr
- );
+  if (Handles == NULL) {
+Status = EFI_NOT_FOUND;
+  } else {
+Status = NetLibGetMacString (
+   *Handles,
+   NULL,
+   &MacStr
+   );
+  }
   if (EFI_ERROR (Status)) {
 MacStr = L"";
   }
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43508): https://edk2.groups.io/g/devel/message/43508
Mute This Topic: https://groups.io/mt/32419741/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 14/28] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix the indentation

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Fix the indentation of MiscSystemManufacturerFunction.c to improve the
readability.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 .../MiscSystemManufacturerFunction.c  | 51 +--
 1 file changed, 24 insertions(+), 27 deletions(-)

diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
 
b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
index f537e0db76..da660cb3a8 100644
--- 
a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
+++ 
b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
@@ -52,14 +52,14 @@ AddSmbiosManuCallback (
   UINTN PdNameStrLen;
   UINTN SerialNumStrLen;
   UINTN SkuNumberStrLen;
-  UINTNFamilyNameStrLen;
+  UINTN FamilyNameStrLen;
   EFI_STATUSStatus;
   EFI_STRINGManufacturer;
   EFI_STRINGProductName;
   EFI_STRINGVersion;
   EFI_STRINGSerialNumber;
   EFI_STRINGSkuNumber;
-  EFI_STRING   FamilyName;
+  EFI_STRINGFamilyName;
   STRING_REFTokenToGet;
   EFI_SMBIOS_HANDLE SmbiosHandle;
   SMBIOS_TABLE_TYPE1*SmbiosRecord;
@@ -323,40 +323,37 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemManufacturer)
 {
   EFI_STATUSStatus;
   static BOOLEANCallbackIsInstalledManu = FALSE;
-  VOID   *AddSmbiosManuCallbackNotifyReg;
-  EFI_EVENT  AddSmbiosManuCallbackEvent;
+  VOID  *AddSmbiosManuCallbackNotifyReg;
+  EFI_EVENT AddSmbiosManuCallbackEvent;
 
 
   if (CallbackIsInstalledManu == FALSE) {
 CallbackIsInstalledManu = TRUE;// Prevent more than 1 callback.
 DEBUG ((EFI_D_INFO, "Create Smbios Manu callback.\n"));
 
-  //
-  // gEfiDxeSmmReadyToLockProtocolGuid is ready
-  //
-  Status = gBS->CreateEvent (
-  EVT_NOTIFY_SIGNAL,
-  TPL_CALLBACK,
-  (EFI_EVENT_NOTIFY)AddSmbiosManuCallback,
-  RecordData,
-  &AddSmbiosManuCallbackEvent
-  );
+//
+// gEfiDxeSmmReadyToLockProtocolGuid is ready
+//
+Status = gBS->CreateEvent (
+EVT_NOTIFY_SIGNAL,
+TPL_CALLBACK,
+(EFI_EVENT_NOTIFY)AddSmbiosManuCallback,
+RecordData,
+&AddSmbiosManuCallbackEvent
+);
 
-  ASSERT_EFI_ERROR (Status);
-  if (EFI_ERROR (Status)) {
+ASSERT_EFI_ERROR (Status);
+if (EFI_ERROR (Status)) {
+  return Status;
+}
+
+Status = gBS->RegisterProtocolNotify (
+&gEfiDxeSmmReadyToLockProtocolGuid,
+AddSmbiosManuCallbackEvent,
+&AddSmbiosManuCallbackNotifyReg
+);
 return Status;
-
-  }
-
-  Status = gBS->RegisterProtocolNotify (
-  &gEfiDxeSmmReadyToLockProtocolGuid,
-  AddSmbiosManuCallbackEvent,
-  &AddSmbiosManuCallbackNotifyReg
-  );
-
-  return Status;
   }
 
   return EFI_SUCCESS;
-
 }
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43502): https://edk2.groups.io/g/devel/message/43502
Mute This Topic: https://groups.io/mt/32419735/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 11/28] Vlv2TbltDevicePkg/GenerateCapsule: Fix the bash scripts

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Adjust the paths to fit the current directory structure

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 .../Capsule/GenerateCapsule/GenCapsuleAll.sh  | 37 +++
 .../GenerateCapsule/GenCapsuleMinnowMax.sh| 24 +---
 .../GenCapsuleMinnowMaxRelease.sh | 19 +-
 3 files changed, 39 insertions(+), 41 deletions(-)
 mode change 100644 => 100755 
Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh

diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
 
b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
old mode 100644
new mode 100755
index 040024553a..7b77b50c3f
--- 
a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
+++ 
b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
@@ -9,20 +9,25 @@
 
 cd $(dirname $0)
 
-rm -R $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules
-mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules
-mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment
-mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
-mkdir $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert
-cp $WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi 
$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment/CapsuleApp.efi
-cp $WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.efi 
$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/SampleDevelopment/CapsuleAppRelease.efi
-cp $WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi 
$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert/CapsuleApp.efi
-cp $WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.efi 
$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert/CapsuleAppRelease.efi
-cp $WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/X64/CapsuleApp.efi 
$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert/CapsuleApp.efi
-cp $WORKSPACE/Build/Vlv2TbltDevicePkg/RELEASE_GCC49/X64/CapsuleApp.efi 
$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/TestCert/CapsuleAppRelease.efi
+EFI_DIR=$WORKSPACE/Build/Vlv2TbltDevicePkg/${TARGET}_${TOOL_CHAIN_TAG}/X64/
+CAP_DIR=$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules
+SCRIPT_DIR=$WORKSPACE/edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule
 
-. GenCapsuleMinnowMax.sh
-. GenCapsuleMinnowMaxRelease.sh
-. GenCapsuleSampleColor.sh Blue  149DA854-7D19-4FAA-A91E-862EA1324BE6
-. GenCapsuleSampleColor.sh Green 79179BFD-704D-4C90-9E02-0AB8D968C18A
-. GenCapsuleSampleColor.sh Red   72E2945A-00DA-448E-9AA7-075AD840F9D4
+rm -rf $CAP_DIR
+mkdir -p $CAP_DIR/SampleDevelopment
+mkdir -p $CAP_DIR/NewCert
+mkdir -p $CAP_DIR/TestCert
+if [ "$TARGET" == "DEBUG" ]; then
+cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/SampleDevelopment/CapsuleApp.efi
+cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/NewCert/CapsuleApp.efi
+cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/TestCert/CapsuleApp.efi
+. $SCRIPT_DIR/GenCapsuleMinnowMax.sh
+else
+cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/SampleDevelopment/CapsuleAppRelease.efi
+cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/NewCert/CapsuleAppRelease.efi
+cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/TestCert/CapsuleAppRelease.efi
+. $SCRIPT_DIR/GenCapsuleMinnowMaxRelease.sh
+fi
+. $SCRIPT_DIR/GenCapsuleSampleColor.sh Blue  
149DA854-7D19-4FAA-A91E-862EA1324BE6
+. $SCRIPT_DIR/GenCapsuleSampleColor.sh Green 
79179BFD-704D-4C90-9E02-0AB8D968C18A
+. $SCRIPT_DIR/GenCapsuleSampleColor.sh Red   
72E2945A-00DA-448E-9AA7-075AD840F9D4
diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
 
b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
index 4fb963c93c..114c4a3477 100644
--- 
a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
+++ 
b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
@@ -13,7 +13,10 @@ FMP_CAPSULE_VERSION=0x000C
 FMP_CAPSULE_STRING=0.0.0.12
 FMP_CAPSULE_NAME="Intel MinnowMax DEBUG UEFI $FMP_CAPSULE_STRING"
 FMP_CAPSULE_LSV=0x
-FMP_CAPSULE_PAYLOAD=$WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_GCC49/FV/Vlv.ROM
+FMP_CAPSULE_PAYLOAD=$WORKSPACE/Build/Vlv2TbltDevicePkg/DEBUG_${TOOL_CHAIN_TAG}/FV/Vlv.ROM
+FMP_CAPSULE_DIR=$WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/
+
+PKCS7SIGN_DIR=$WORKSPACE/edk2/BaseTools/Source/Python/Pkcs7Sign/
 
 if [ ! -e "$FMP_CAPSULE_PAYLOAD" ] ; then
   return
@@ -34,12 +37,8 @@ if [ -e NewCert.pem ]; then
 --signer-private-cert=NewCert.pem \
 --other-public-cert=NewSub.pub.pem \
 --trusted-public-cert=NewRoot.pub.pem \
--o $FMP_CAPSULE_FILE \
+-o $FMP_CAPSULE_DIR/NewCert/$FMP_CAPSULE_FILE \
 $FMP_CAPSULE_PAYLOAD
-
-  cp $FMP_CAPSULE_FILE $WORKSPACE/Build/Vlv2TbltDevicePkg/Capsules/NewCert
-
-  rm $FMP_CAPSULE_FILE
 fi
 
 #
@@ -53,13 +52,8 @@ GenerateCapsule \
   --lsv $FMP_CAPSULE_LSV \
   --capf

[edk2-devel] [edk2-platforms Patch 04/28] Vlv2TbltDevicePkg/bld_vlv.sh: Update the gcc version detection

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Borrow the logic from OvmfPkg/build.sh

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
index bca112db2b..d312063428 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -170,12 +170,19 @@ sed -i '/^MAX_CONCURRENT_THREAD_NUMBER/d' Conf/target.txt
 
 gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
 case $gcc_version in
-4.9.*|4.1[0-9].*|5.*.*|6.*.*)
-  TARGET_TOOLS=GCC49
-  ;;
-*)
-  TARGET_TOOLS=GCC48
-  ;;
+  [1-3].*|4.[0-7].*)
+echo MNW2 requires GCC4.8 or later
+exit 1
+;;
+  4.8.*)
+TARGET_TOOLS=GCC48
+;;
+  4.9.*|6.[0-2].*)
+TARGET_TOOLS=GCC49
+;;
+  *)
+TARGET_TOOLS=GCC5
+;;
 esac
 
 ACTIVE_PLATFORM=$PLATFORM_PACKAGE/PlatformPkgGcc"$Arch".dsc
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43498): https://edk2.groups.io/g/devel/message/43498
Mute This Topic: https://groups.io/mt/32419731/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 15/28] Vlv2TbltDevicePkg: Import SD/MMC drivers

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Import the SD card/MMC drivers from MdeModulePkg

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf   | 7 +++
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf| 7 +++
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 7 +++
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 7 +++
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 7 +++
 5 files changed, 35 insertions(+)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
index 0661c778c1..c538fe4a06 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -529,6 +529,13 @@ [FV.FVMAIN]
 INF  MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
 !endif
 
+#
+# eMMC/SD Card
+#
+INF MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
+INF MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
+INF MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf
+
 #
 # IDE/SCSI/AHCI
 #
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index 06bdebb10b..bd9d415939 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -478,6 +478,13 @@ [FV.FVMAIN]
 INF  MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
 !endif
 
+#
+# eMMC/SD Card
+#
+INF MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
+INF MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
+INF MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf
+
 #
 # IDE/SCSI/AHCI
 #
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index b558caa61f..6317bc1342 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -1143,6 +1143,13 @@ [Components.X64]
   }
 !endif
 
+#
+# eMMC/SD Card
+#
+  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
+  MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
+  MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf
+
 #
 # IDE/SCSI/AHCI
 #
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 99ada0ef0a..8f69bb47dd 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -1127,6 +1127,13 @@ [Components.IA32]
   }
 !endif
 
+#
+# eMMC/SD Card
+#
+  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
+  MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
+  MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf
+
 #
 # IDE/SCSI/AHCI
 #
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 87404d2d82..d146321750 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -1142,6 +1142,13 @@ [Components.X64]
   }
 !endif
 
+#
+# eMMC/SD Card
+#
+  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
+  MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
+  MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf
+
 #
 # IDE/SCSI/AHCI
 #
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43504): https://edk2.groups.io/g/devel/message/43504
Mute This Topic: https://groups.io/mt/32419737/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 02/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Change the root directory path

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Also make Build_IFWI.sh executable

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
old mode 100644
new mode 100755
index 7063b7470d..2a22309f5f
--- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
@@ -86,12 +86,12 @@ else
 fi
 
 ## Go to root directory
-cd ..
+cd ../../..
 
 ## Build BIOS
 echo "=="
 echo "Build_IFWI:  Calling BIOS build Script..."
-./$PLATFORM_PACKAGE/bld_vlv.sh $Build_Flags $Platform_Type $Build_Target
+./Platform/Intel/$PLATFORM_PACKAGE/bld_vlv.sh $Build_Flags $Platform_Type 
$Build_Target
 
 echo
 echo Finished Building BIOS.
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43496): https://edk2.groups.io/g/devel/message/43496
Mute This Topic: https://groups.io/mt/32419729/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 07/28] Vlv2TbltDevicePkg: Add the missing headers to inf files

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Some headers files are not listed in the inf files.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 .../Library/FlashDeviceLib/FlashDeviceLib.inf | 2 +-
 .../Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf | 8 +---
 .../Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf   | 1 +
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.inf 
b/Platform/Intel/Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
index 4ef48cc12b..4f5678594a 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
@@ -26,7 +26,7 @@ [Defines]
 
 [Sources]
   FlashDeviceLib.c
-
+  SpiChipDefinitions.h
 
 [Packages]
   MdePkg/MdePkg.dec
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf 
b/Platform/Intel/Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf
index 9d4823d488..d2ca8f5b88 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf
@@ -4,10 +4,12 @@
 # ICH SMM Library that layers on top of the I/O Library to directly
 #  access SMM power management registers.
 # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
-#  


+#  

+
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 
-#  


+#  

+
 #
 #
 #
@@ -30,7 +32,7 @@ [Defines]
 
 [Sources]
   PchSmmLib.c
-
+  CommonHeader.h
 
 [Packages]
   MdePkg/MdePkg.dec
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf 
b/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf
index d429310ac4..c5e3cf4d55 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf
+++ b/Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf
@@ -29,6 +29,7 @@ [sources.common]
   PlatformStatusCode.c
   PlatformStatusCode.h
   PeiPostCode.c
+  EfiStatusCode.h
 
 [Packages]
   MdePkg/MdePkg.dec
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43511): https://edk2.groups.io/g/devel/message/43511
Mute This Topic: https://groups.io/mt/32419744/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 10/28] Vlv2TbltDevicePkg/bld_vlv.sh: Create Vlv.ROM

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

The scripts for PlatformCapsuleGcc.dsc need Vlv.ROM.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
index 7fd5f44264..c68e59398a 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -199,6 +199,8 @@ echo Skip "Running fce..."
 ##**
 ## Build Capsules
 ##**
+cp -f $WORKSPACE/Build/Vlv2TbltDevicePkg/${TARGET}_${TOOL_CHAIN_TAG}/FV/VLV.fd 
\
+  $WORKSPACE/Build/Vlv2TbltDevicePkg/${TARGET}_${TOOL_CHAIN_TAG}/FV/Vlv.ROM
 build -p $PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
 
 echo
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43510): https://edk2.groups.io/g/devel/message/43510
Mute This Topic: https://groups.io/mt/32419743/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 23/28] Vlv2TbltDevicePkg: Import TlsLib for HTTPS Boot

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

When setting NETWORK_TLS_ENABLE to TRUE, we need TlsLib.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc | 3 +++
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc  | 3 +++
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc| 3 +++
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 3 +++
 4 files changed, 12 insertions(+)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc
index 7993ee5758..e4e86cbb07 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc
@@ -242,6 +242,9 @@ [LibraryClasses.common]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
+!endif
+!if $(NETWORK_TLS_ENABLE) == TRUE
+  TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
 !endif
   
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
   
Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index ee0d055d64..bc986eae78 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -244,6 +244,9 @@ [LibraryClasses.common]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
+!endif
+!if $(NETWORK_TLS_ENABLE) == TRUE
+  TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
 !endif
   
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
   
Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 62ca4f67cc..f2f02e5f76 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -242,6 +242,9 @@ [LibraryClasses.common]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
+!endif
+!if $(NETWORK_TLS_ENABLE) == TRUE
+  TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
 !endif
   
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
   
Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 282ff3c2e2..4184c946a6 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -244,6 +244,9 @@ [LibraryClasses.common]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
+!endif
+!if $(NETWORK_TLS_ENABLE) == TRUE
+  TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
 !endif
   
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
   
Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43509): https://edk2.groups.io/g/devel/message/43509
Mute This Topic: https://groups.io/mt/32419742/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 00/28] Vlv2TbltDevicePkg: Fix Linux build issues

2019-07-10 Thread Michael D Kinney
* Update Readme.md for multiple repos
* Clean up all build scripts and make Linux and Windows support consistent
* Add IA32 GCC build support and only build capsules for X64
* Clean up library mappings, add TlsLib for HTTPS Boot, and add SD/MMC drivers.
* Re-enable BIOS ID feature using new GenBiosId.py tool
* Remove redundant declarations from DEC file and remove unused content
* Add missing header files in [Sources] sections of INF files.
* Vlv2DeviceRefCodePlg/AcpiTablesPCAT: Fix ASL build error using newer iasl.
* Vlvt2TbltDevicePkg: Fix NULL pointer access in SmbiosMiscDxe
* Vlv2TbltDevicePkg/AcpiPlatform: Fix the error from InstallAcpiTable and 
  remove unused local variable.

Cc: Zailiang Sun 
Cc: Yi Qian 
Signed-off-by: Michael D Kinney 
Signed-off-by: Gary Lin 

Gary Lin (18):
  Vlv2TbltDevicePkg/Build_IFWI.sh: Add "set -e" to exit on error
  Vlv2TbltDevicePkg/Build_IFWI.sh: Change the root directory path
  Vlv2TbltDevicePkg/bld_vlv.sh: Fix the log name
  Vlv2TbltDevicePkg/bld_vlv.sh: Update the gcc version detection
  Vlv2TbltDevicePkg/bld_vlv.sh: Remove ECP completely
  Vlv2TbltDevicePkg/bld_vlv.sh: Update the script to fit edk2-platforms
  Vlv2TbltDevicePkg: Add the missing headers to inf files
  Vlv2TbltDevicePkg/bld_vlv.sh: Remove BiosId.env completely
  Vlv2TbltDevicePkg/bld_vlv.sh: Correct the path to
PlatformCapsuleGcc.dsc
  Vlv2TbltDevicePkg/bld_vlv.sh: Create Vlv.ROM
  Vlv2TbltDevicePkg/GenerateCapsule: Fix the bash scripts
  Vlv2TbltDevicePkg/AcpiPlatform: Remove a unused variable
  Vlv2TbltDevicePkg/AcpiPlatform: Fix the error from InstallAcpiTable
  Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix the indentation
  Vlv2TbltDevicePkg: Import SD/MMC drivers
  Vlv2TbltDevicePkg/Build_IFWI.sh: Check the WORKSPACE env variable
  Vlv2TbltDevicePkg: Import TlsLib for HTTPS Boot
  Vlv2TbltDevicePkg: Reorganize the libraries

Michael D Kinney (10):
  Vlv2TbltDevicePkg: Update Linux build scripts
  Vlvt2TbltDevicePkg: Fix NULL pointer access in SmbiosMiscDxe
  Vlv2DeviceRefCodePkg: Remove redundant gEfiSpiProtocolGuid
  Vlv2TbltDevicePkg: Remove redundant gEfiSpiProtocolGuid
  Vlv2TbltDevicePkg: Re-enable BIOS ID feature
  Vlv2TbltDevicePkg: Add GCC IA32 build support
  Vlv2DeviceRefCodePlg/AcpiTablesPCAT: Fix ASL error
  Vlv2TbltDevicePkg: Clean up all build scripts
  Vlv2TbltDevicePkg: Only build capsules for X64
  Vlv2TbltDevicePkg: Update Readme.md for multiple repos

 Platform/Intel/Vlv2TbltDevicePkg/.gitignore   |   5 -
 .../AcpiPlatform/AcpiPlatform.c   |   5 +-
 .../Intel/Vlv2TbltDevicePkg/Build_IFWI.bat|  75 +---
 .../Intel/Vlv2TbltDevicePkg/Build_IFWI.sh |  76 ++--
 .../Capsule/GenerateCapsule/GenCapsuleAll.sh  |  37 +-
 .../GenerateCapsule/GenCapsuleMinnowMax.sh|  24 +-
 .../GenCapsuleMinnowMaxRelease.sh |  19 +-
 .../Include/Guid/PlatformCpuInfo.h|  16 +-
 .../Include/Library/BiosIdLib.h   |  86 -
 .../Include/Library/CpuIA32.h | 345 --
 .../Include/PlatformDefinitions.h |  43 ---
 .../Library/BiosIdLib/BiosIdLib.c |  98 -
 .../Library/BiosIdLib/BiosIdLib.inf   |  33 --
 .../Library/CpuIA32Lib/CpuIA32Lib.inf |  41 ---
 .../Library/CpuIA32Lib/EfiCpuVersion.c|  70 
 .../Library/CpuIA32Lib/IA32/CpuIA32.S | 223 ---
 .../Library/CpuIA32Lib/IA32/CpuIA32.asm   | 206 ---
 .../Library/CpuIA32Lib/IA32/CpuIA32.c | 177 -
 .../Library/CpuIA32Lib/X64/Cpu.S  | 207 ---
 .../Library/CpuIA32Lib/X64/Cpu.asm| 222 ---
 .../Library/FlashDeviceLib/FlashDeviceLib.inf |   2 +-
 .../Library/PchSmmLib/PchSmmLib.inf   |   8 +-
 .../MonoStatusCode/MonoStatusCode.inf |   2 +-
 .../PlatformDxe/PlatformDxe.inf   |   5 +-
 .../PlatformInitPei/MemoryCallback.c  |  11 +-
 .../PlatformInitPei/PlatformEarlyInit.h   |   4 +-
 .../PlatformInitPei/PlatformInitPei.inf   |   1 -
 .../PlatformPei/PlatformPei.inf   |   1 -
 .../Intel/Vlv2TbltDevicePkg/PlatformPkg.dec   |   1 -
 .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf   |  14 +
 .../Vlv2TbltDevicePkg/PlatformPkgConfig.dsc   |   2 -
 .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf  |  14 +
 ...formPkgIA32.dsc => PlatformPkgGccIA32.dsc} | 122 ++-
 .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc   | 112 ++
 .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 109 ++
 .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 113 ++
 .../PlatformSetupDxe/PlatformSetupDxe.h   |   1 -
 .../PlatformSetupDxe/PlatformSetupDxe.inf |   5 +-
 .../PlatformSetupDxe/SetupInfoRecords.c   |  42 ++-
 .../Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.c   |  12 +-
 .../Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf |   1 +
 Platform/Intel/Vlv2TbltDevicePkg/Readme.md| 145 
 .../MiscBaseBoardManufacturerFunction.c   |  14 +-
 .../SmBiosMiscDxe/MiscBiosVendorFunction.c|  49 +--
 .../SmBiosMiscDxe/MiscOem

[edk2-devel] [edk2-platforms Patch 09/28] Vlv2TbltDevicePkg/bld_vlv.sh: Correct the path to PlatformCapsuleGcc.dsc

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

For the gcc build, we should use PlatformCapsuleGcc.dsc instead of
PlatformCapsule.dsc.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
index bceea99b2d..7fd5f44264 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -199,7 +199,7 @@ echo Skip "Running fce..."
 ##**
 ## Build Capsules
 ##**
-build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
+build -p $PLATFORM_PKG_PATH/PlatformCapsuleGcc.dsc
 
 echo
 echo  The EDKII BIOS build has successfully completed. 

-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43506): https://edk2.groups.io/g/devel/message/43506
Mute This Topic: https://groups.io/mt/32419739/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 03/28] Vlv2TbltDevicePkg/bld_vlv.sh: Fix the log name

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
old mode 100644
new mode 100755
index 1eefa5de73..bca112db2b
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -89,7 +89,7 @@ for (( i=1; i<=$#; ))
   Build_Flags="$Build_Flags --quiet"
   shift
 elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/L" ]; then
-  Build_Flags="$Build_Flags -j EKD2.log"
+  Build_Flags="$Build_Flags -j EDK2.log"
   shift
 elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/C" ]; then
   echo Removing previous build files ...
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43497): https://edk2.groups.io/g/devel/message/43497
Mute This Topic: https://groups.io/mt/32419730/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 16/28] Vlv2TbltDevicePkg: Update Linux build scripts

2019-07-10 Thread Michael D Kinney
* Do not change WORKSPACE env var.
  Assume it is set before running script.
* Access Conf dir relative to WORKSPACE
* Run Build_IFWI.sh from the Vlv2Tbl2DevicePkg dir
* run bld_vlv.sh from same dir as Build_IFWI.sh

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Gary Lin 
Signed-off-by: Michael D Kinney 
---
 .../Intel/Vlv2TbltDevicePkg/Build_IFWI.sh |  5 +-
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh   | 49 ++-
 2 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
index 2a22309f5f..f8954cc9cd 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
@@ -85,13 +85,10 @@ else
   IFWI_Suffix="/S $3"
 fi
 
-## Go to root directory
-cd ../../..
-
 ## Build BIOS
 echo "=="
 echo "Build_IFWI:  Calling BIOS build Script..."
-./Platform/Intel/$PLATFORM_PACKAGE/bld_vlv.sh $Build_Flags $Platform_Type 
$Build_Target
+. bld_vlv.sh $Build_Flags $Platform_Type $Build_Target
 
 echo
 echo Finished Building BIOS.
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
index c68e59398a..aac8534677 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -26,7 +26,6 @@ echo -e $(date)
 ##**
 ## Initial Setup
 ##**
-export WORKSPACE=$(pwd)
 #build_threads=($NUMBER_OF_PROCESSORS)+1
 Build_Flags=
 exitCode=0
@@ -38,31 +37,31 @@ export 
PLATFORM_PATH=$WORKSPACE/edk2-platforms/Platform/Intel/
 export SILICON_PATH=$WORKSPACE/edk2-platforms/Silicon/Intel/
 export BINARY_PATH=$WORKSPACE/edk2-non-osi/Silicon/Intel/
 export PACKAGES_PATH=$PLATFORM_PATH:$SILICON_PATH:$BINARY_PATH:$CORE_PATH
-cd ./edk2
 
 ## Clean up previous build files.
-if [ -e $CORE_PATH/EDK2.log ]; then
-  rm $CORE_PATH/EDK2.log
+if [ -e $WORKSPACE/EDK2.log ]; then
+  rm $WORKSPACE/EDK2.log
 fi
 
-if [ -e $CORE_PATH/Unitool.log ]; then
-  rm $CORE_PATH/Unitool.log
+if [ -e $WORKSPACE/Unitool.log ]; then
+  rm $WORKSPACE/Unitool.log
 fi
 
-if [ -e $CORE_PATH/Conf/target.txt ]; then
-  rm $CORE_PATH/Conf/target.txt
+if [ -e $WORKSPACE/Conf/target.txt ]; then
+  rm $WORKSPACE/Conf/target.txt
 fi
 
-if [ -e $CORE_PATH/Conf/tools_def.txt ]; then
-  rm $CORE_PATH/Conf/tools_def.txt
+if [ -e $WORKSPACE/Conf/tools_def.txt ]; then
+  rm $WORKSPACE/Conf/tools_def.txt
 fi
 
-if [ -e $CORE_PATH/Conf/build_rule.txt ]; then
-  rm $CORE_PATH/Conf/build_rule.txt
+if [ -e $WORKSPACE/Conf/build_rule.txt ]; then
+  rm $WORKSPACE/Conf/build_rule.txt
 fi
 
 ## Setup EDK environment. Edksetup puts new copies of target.txt, 
tools_def.txt, build_rule.txt in WorkSpace\Conf
 ## Also run edksetup as soon as possible to avoid it from changing environment 
variables we're overriding
+cd $CORE_PATH
 . edksetup.sh BaseTools
 make -C BaseTools
 
@@ -72,6 +71,8 @@ PLATFORM_PKG_PATH=$PLATFORM_PATH/$PLATFORM_PACKAGE
 config_file=$PLATFORM_PKG_PATH/PlatformPkgConfig.dsc
 auto_config_inc=$PLATFORM_PKG_PATH/AutoPlatformCFG.txt
 
+cd $PLATFORM_PKG_PATH
+
 ## create new AutoPlatformCFG.txt file
 if [ -f "$auto_config_inc" ]; then
   rm $auto_config_inc
@@ -149,11 +150,11 @@ echo "Ensuring correct build directory is present for 
GenBiosId..."
 
 echo Modifying Conf files for this build...
 ## Remove lines with these tags from target.txt
-sed -i '/^ACTIVE_PLATFORM/d' Conf/target.txt
-sed -i '/^TARGET /d' Conf/target.txt
-sed -i '/^TARGET_ARCH/d' Conf/target.txt
-sed -i '/^TOOL_CHAIN_TAG/d' Conf/target.txt
-sed -i '/^MAX_CONCURRENT_THREAD_NUMBER/d' Conf/target.txt
+sed -i '/^ACTIVE_PLATFORM/d' $WORKSPACE/Conf/target.txt
+sed -i '/^TARGET /d' $WORKSPACE/Conf/target.txt
+sed -i '/^TARGET_ARCH/d' $WORKSPACE/Conf/target.txt
+sed -i '/^TOOL_CHAIN_TAG/d' $WORKSPACE/Conf/target.txt
+sed -i '/^MAX_CONCURRENT_THREAD_NUMBER/d' $WORKSPACE/Conf/target.txt
 
 gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
 case $gcc_version in
@@ -174,15 +175,15 @@ esac
 
 ACTIVE_PLATFORM=$PLATFORM_PKG_PATH/PlatformPkgGcc"$Arch".dsc
 export TOOL_CHAIN_TAG=$TARGET_TOOLS
-MAX_CONCURRENT_THREAD_NUMBER=1
-echo ACTIVE_PLATFORM = $ACTIVE_PLATFORM   >> 
Conf/target.txt
-echo TARGET  = $TARGET>> 
Conf/target.txt
-echo TOOL_CHAIN_TAG  = $TOOL_CHAIN_TAG>> 
Conf/target.txt
-echo MAX_CONCURRENT_THREAD_NUMBER = $MAX_CONCURRENT_THREAD_NUMBER >> 
Conf/target.txt
+MAX_CONCURRENT_THREAD_NUMBER=8
+echo ACTIVE_PLATFORM = $ACTIVE_PLATFORM   >> 
$WORKSPACE/Conf/target.txt
+echo TARGET  = $TARGET>> 
$WORKSPACE/Conf/target.txt
+echo TOOL_CHAIN_TAG  = $TOOL_CHAIN_TAG>> 
$WORKSPACE/Conf/targe

[edk2-devel] [edk2-platforms Patch 05/28] Vlv2TbltDevicePkg/bld_vlv.sh: Remove ECP completely

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
index d312063428..27772f47de 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh
@@ -67,9 +67,6 @@ PLATFORM_PACKAGE=Vlv2TbltDevicePkg
 config_file=$WORKSPACE/$PLATFORM_PACKAGE/PlatformPkgConfig.dsc
 auto_config_inc=$WORKSPACE/$PLATFORM_PACKAGE/AutoPlatformCFG.txt
 
-## default ECP (override with /ECP flag)
-EDK_SOURCE=$WORKSPACE/EdkCompatibilityPkg
-
 ## create new AutoPlatformCFG.txt file
 if [ -f "$auto_config_inc" ]; then
   rm $auto_config_inc
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43499): https://edk2.groups.io/g/devel/message/43499
Mute This Topic: https://groups.io/mt/32419732/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms Patch 18/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Check the WORKSPACE env variable

2019-07-10 Thread Michael D Kinney
From: Gary Lin 

Check WORKSPACE before running the script and notify the user to export
the variable if the variable doesn't exist

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh 
b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
index f8954cc9cd..422e90ca6c 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
@@ -6,7 +6,7 @@ function Usage ( ) {
   echo
   echo "Script to build BIOS firmware and stitch the entire IFWI."
   echo
-  echo "Usage: Build_IFWI.bat [options]  PlatformType  BuildTarget  "
+  echo "Usage: Build_IFWI.sh [options]  PlatformType  BuildTarget  "
   echo
   echo 
   echo "   /yL [option]  :   Enable SPI lock"
@@ -28,6 +28,18 @@ Stitch_Flags=
 Arch=X64
 PLATFORM_PACKAGE=Vlv2TbltDevicePkg
 
+## Check whether WORKSPACE is set or not
+if [[ -z "$WORKSPACE" ]]; then
+  echo "Please export WORKSPACE before running Build_IFWI.sh"
+  echo "See the details in Readme.md"
+  exit 1
+fi
+
+## Create $WORKSPACE/Conf if necessary
+if [ ! -d $WORKSPACE/Conf ]; then
+  mkdir $WORKSPACE/Conf
+fi
+
 ## Parse Optional arguments
 if [ "$1" == "/?" ]; then
   Usage
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43512): https://edk2.groups.io/g/devel/message/43512
Mute This Topic: https://groups.io/mt/32419745/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [ PATCH v2 1/2] Readme.md: add submodule policy and clone commands

2019-07-10 Thread Leif Lindholm
On Wed, Jul 10, 2019 at 05:28:27PM +, Kinney, Michael D wrote:
> 
> 
> > -Original Message-
> > From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> > Sent: Wednesday, July 10, 2019 10:18 AM
> > To: Kinney, Michael D 
> > Cc: Wang, Jian J ;
> > devel@edk2.groups.io; Gao, Liming 
> > Subject: Re: [ PATCH v2 1/2] Readme.md: add submodule
> > policy and clone commands
> > 
> > On Wed, Jul 10, 2019 at 05:08:32PM +, Kinney, Michael
> > D wrote:
> > > Leif,
> > >
> > > I think the following command has to be run from the
> > git dir that the
> > > edk2 repo was cloned into.
> > >
> > > $ git submodule update --init
> > >
> > > So I think the correct instructions would be:
> > >
> > > $ git clone https://github.com/tianocore/edk2.git
> > > $ cd edk2
> > > $ git submodule update --init
> > 
> > I only said I reviewed it, not that the review was
> > correct ;)
> > 
> > Yeah, good catch. I just mentally filtered out the clone
> > bit.
> > 
> > > $ cd ..
> > 
> > Why would you want to leave?
> 
> Because the commands the follow are more clone commands for
> edk2-platforms and edk2-non-osi.  Could move the submodule
> init action for the edk2 repo after all the clone operations.

OK then :)

/
Leif

> 
> > 
> > /
> > Leif
> > 
> > > Mike
> > >
> > > > -Original Message-
> > > > From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> > > > Sent: Wednesday, July 10, 2019 7:27 AM
> > > > To: Wang, Jian J 
> > > > Cc: devel@edk2.groups.io; Kinney, Michael D
> > > > ; Gao, Liming
> > 
> > > > Subject: Re: [ PATCH v2 1/2] Readme.md: add submodule
> > policy and
> > > > clone commands
> > > >
> > > > On Wed, Jul 10, 2019 at 02:09:54PM +0800, Jian J Wang
> > > > wrote:
> > > > > > v2: update wording per Leif's and others'
> > comments
> > > >
> > > > Please drop the above line - version comments can go
> > below the ---
> > > > line, so they don't get included in the commit
> > message.
> > > >
> > > > With that:
> > > > Reviewed-by: Leif Lindholm 
> > > >
> > > > (although Liming had some further feedback)
> > > >
> > > > > REF:
> > > > https://bugzilla.tianocore.org/show_bug.cgi?id=1910
> > > > >
> > > > > A section 'Submodules' is added to clarify the
> > > > submodule policy in
> > > > > edk2 repo. Git commands are also added to show the
> > > > correct way to
> > > > > clone submodule repos, in which '--recursive' is
> > > > removed because it's
> > > > > not needed but recommended in other document.
> > > > >
> > > > > Related commits:
> > > > > Openssl-1.1.1b upgrade:
> > > > acfb90911840c38a0beb9bcfe0065668244d2b4d
> > > > > berkeley-softfloat-3:
> > > > 3cc57695df5a6e8c65fb46b993836c315cabf49d
> > > > >
> > > > > Cc: Leif Lindholm 
> > > > > Cc: Michael D Kinney 
> > > > > Cc: Liming Gao 
> > > > > Signed-off-by: Jian J Wang 
> > > > > ---
> > > > >  Readme.md | 28 
> > > > >  1 file changed, 28 insertions(+)
> > > > >
> > > > > diff --git a/Readme.md b/Readme.md index
> > e564c6c09b..c475468655
> > > > > 100644
> > > > > --- a/Readme.md
> > > > > +++ b/Readme.md
> > > > > @@ -143,3 +143,31 @@ Signed-off-by: Contributor
> > Name
> > > > 
> > > > >the change.  Each line should be less than ~70
> > > > characters.
> > > > >  * `Signed-off-by` is the contributor's signature
> > > > identifying them
> > > > >by their real/legal name and their email
> > address.
> > > > > +
> > > > > +# Submodules
> > > > > +
> > > > > +As a general policy, submodule chain should be
> > avoided
> > > > in EDK II repo
> > > > > +as possible as we can. Currently EDK II  contains
> > two
> > > > submodules
> > > > > +
> > > > > +- CryptoPkg/Library/OpensslLib/openssl
> > > > > +- ArmPkg/Library/ArmSoftFloatLib/berkeley-
> > softfloat-3
> > > > > +
> > > > > +The latter one is actually required by previous
> > one.
> > > > It's inevitable
> > > > > +in openssl-1.1.1 (since stable201905) for floating
> > > > point parameter
> > > > > +conversion, but should be dropped once there's no
> > such
> > > > need in future
> > > > > +release of openssl.
> > > > > +
> > > > > +To get a full, buildable EDK II repository, use
> > > > following two steps
> > > > > +of git command
> > > > > +
> > > > > +```
> > > > > +$ git clone https://github.com/tianocore/edk2.git
> > > > > +$ git submodule update --init> > +```
> > > > > +
> > > > > +Note: When cloning submodule repos, '--recursive'
> > > > option is not
> > > > > +recommended. EDK II itself will not use any
> > > > code/feature from
> > > > > +submodules in above submodules. So using '--
> > recursive'
> > > > adds a
> > > > > +dependency on being able to reach servers we do
> > not
> > > > actually want any
> > > > > +code from, as well as needlessly downloading code
> > we
> > > > will not use.
> > > > > --
> > > > > 2.17.1.windows.2
> > > > >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43493): https://edk2.groups.io/g/devel/message/43493
Mute This Topic: https://gro

Re: [edk2-devel] [ PATCH v2 1/2] Readme.md: add submodule policy and clone commands

2019-07-10 Thread Michael D Kinney



> -Original Message-
> From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> Sent: Wednesday, July 10, 2019 10:18 AM
> To: Kinney, Michael D 
> Cc: Wang, Jian J ;
> devel@edk2.groups.io; Gao, Liming 
> Subject: Re: [ PATCH v2 1/2] Readme.md: add submodule
> policy and clone commands
> 
> On Wed, Jul 10, 2019 at 05:08:32PM +, Kinney, Michael
> D wrote:
> > Leif,
> >
> > I think the following command has to be run from the
> git dir that the
> > edk2 repo was cloned into.
> >
> > $ git submodule update --init
> >
> > So I think the correct instructions would be:
> >
> > $ git clone https://github.com/tianocore/edk2.git
> > $ cd edk2
> > $ git submodule update --init
> 
> I only said I reviewed it, not that the review was
> correct ;)
> 
> Yeah, good catch. I just mentally filtered out the clone
> bit.
> 
> > $ cd ..
> 
> Why would you want to leave?

Because the commands the follow are more clone commands for
edk2-platforms and edk2-non-osi.  Could move the submodule
init action for the edk2 repo after all the clone operations.

> 
> /
> Leif
> 
> > Mike
> >
> > > -Original Message-
> > > From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> > > Sent: Wednesday, July 10, 2019 7:27 AM
> > > To: Wang, Jian J 
> > > Cc: devel@edk2.groups.io; Kinney, Michael D
> > > ; Gao, Liming
> 
> > > Subject: Re: [ PATCH v2 1/2] Readme.md: add submodule
> policy and
> > > clone commands
> > >
> > > On Wed, Jul 10, 2019 at 02:09:54PM +0800, Jian J Wang
> > > wrote:
> > > > > v2: update wording per Leif's and others'
> comments
> > >
> > > Please drop the above line - version comments can go
> below the ---
> > > line, so they don't get included in the commit
> message.
> > >
> > > With that:
> > > Reviewed-by: Leif Lindholm 
> > >
> > > (although Liming had some further feedback)
> > >
> > > > REF:
> > > https://bugzilla.tianocore.org/show_bug.cgi?id=1910
> > > >
> > > > A section 'Submodules' is added to clarify the
> > > submodule policy in
> > > > edk2 repo. Git commands are also added to show the
> > > correct way to
> > > > clone submodule repos, in which '--recursive' is
> > > removed because it's
> > > > not needed but recommended in other document.
> > > >
> > > > Related commits:
> > > > Openssl-1.1.1b upgrade:
> > > acfb90911840c38a0beb9bcfe0065668244d2b4d
> > > > berkeley-softfloat-3:
> > > 3cc57695df5a6e8c65fb46b993836c315cabf49d
> > > >
> > > > Cc: Leif Lindholm 
> > > > Cc: Michael D Kinney 
> > > > Cc: Liming Gao 
> > > > Signed-off-by: Jian J Wang 
> > > > ---
> > > >  Readme.md | 28 
> > > >  1 file changed, 28 insertions(+)
> > > >
> > > > diff --git a/Readme.md b/Readme.md index
> e564c6c09b..c475468655
> > > > 100644
> > > > --- a/Readme.md
> > > > +++ b/Readme.md
> > > > @@ -143,3 +143,31 @@ Signed-off-by: Contributor
> Name
> > > 
> > > >the change.  Each line should be less than ~70
> > > characters.
> > > >  * `Signed-off-by` is the contributor's signature
> > > identifying them
> > > >by their real/legal name and their email
> address.
> > > > +
> > > > +# Submodules
> > > > +
> > > > +As a general policy, submodule chain should be
> avoided
> > > in EDK II repo
> > > > +as possible as we can. Currently EDK II  contains
> two
> > > submodules
> > > > +
> > > > +- CryptoPkg/Library/OpensslLib/openssl
> > > > +- ArmPkg/Library/ArmSoftFloatLib/berkeley-
> softfloat-3
> > > > +
> > > > +The latter one is actually required by previous
> one.
> > > It's inevitable
> > > > +in openssl-1.1.1 (since stable201905) for floating
> > > point parameter
> > > > +conversion, but should be dropped once there's no
> such
> > > need in future
> > > > +release of openssl.
> > > > +
> > > > +To get a full, buildable EDK II repository, use
> > > following two steps
> > > > +of git command
> > > > +
> > > > +```
> > > > +$ git clone https://github.com/tianocore/edk2.git
> > > > +$ git submodule update --init> > +```
> > > > +
> > > > +Note: When cloning submodule repos, '--recursive'
> > > option is not
> > > > +recommended. EDK II itself will not use any
> > > code/feature from
> > > > +submodules in above submodules. So using '--
> recursive'
> > > adds a
> > > > +dependency on being able to reach servers we do
> not
> > > actually want any
> > > > +code from, as well as needlessly downloading code
> we
> > > will not use.
> > > > --
> > > > 2.17.1.windows.2
> > > >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43492): https://edk2.groups.io/g/devel/message/43492
Mute This Topic: https://groups.io/mt/32413655/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [ PATCH v2 1/2] Readme.md: add submodule policy and clone commands

2019-07-10 Thread Leif Lindholm
On Wed, Jul 10, 2019 at 05:08:32PM +, Kinney, Michael D wrote:
> Leif,
> 
> I think the following command has to be run from the git
> dir that the edk2 repo was cloned into.
>   
> $ git submodule update --init
> 
> So I think the correct instructions would be:
> 
> $ git clone https://github.com/tianocore/edk2.git
> $ cd edk2
> $ git submodule update --init

I only said I reviewed it, not that the review was correct ;)

Yeah, good catch. I just mentally filtered out the clone bit.

> $ cd ..

Why would you want to leave? 

/
Leif

> Mike
> 
> > -Original Message-
> > From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> > Sent: Wednesday, July 10, 2019 7:27 AM
> > To: Wang, Jian J 
> > Cc: devel@edk2.groups.io; Kinney, Michael D
> > ; Gao, Liming
> > 
> > Subject: Re: [ PATCH v2 1/2] Readme.md: add submodule
> > policy and clone commands
> > 
> > On Wed, Jul 10, 2019 at 02:09:54PM +0800, Jian J Wang
> > wrote:
> > > > v2: update wording per Leif's and others' comments
> > 
> > Please drop the above line - version comments can go
> > below the --- line, so they don't get included in the
> > commit message.
> > 
> > With that:
> > Reviewed-by: Leif Lindholm 
> > 
> > (although Liming had some further feedback)
> > 
> > > REF:
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1910
> > >
> > > A section 'Submodules' is added to clarify the
> > submodule policy in
> > > edk2 repo. Git commands are also added to show the
> > correct way to
> > > clone submodule repos, in which '--recursive' is
> > removed because it's
> > > not needed but recommended in other document.
> > >
> > > Related commits:
> > > Openssl-1.1.1b upgrade:
> > acfb90911840c38a0beb9bcfe0065668244d2b4d
> > > berkeley-softfloat-3:
> > 3cc57695df5a6e8c65fb46b993836c315cabf49d
> > >
> > > Cc: Leif Lindholm 
> > > Cc: Michael D Kinney 
> > > Cc: Liming Gao 
> > > Signed-off-by: Jian J Wang 
> > > ---
> > >  Readme.md | 28 
> > >  1 file changed, 28 insertions(+)
> > >
> > > diff --git a/Readme.md b/Readme.md
> > > index e564c6c09b..c475468655 100644
> > > --- a/Readme.md
> > > +++ b/Readme.md
> > > @@ -143,3 +143,31 @@ Signed-off-by: Contributor Name
> > 
> > >the change.  Each line should be less than ~70
> > characters.
> > >  * `Signed-off-by` is the contributor's signature
> > identifying them
> > >by their real/legal name and their email address.
> > > +
> > > +# Submodules
> > > +
> > > +As a general policy, submodule chain should be avoided
> > in EDK II repo
> > > +as possible as we can. Currently EDK II  contains two
> > submodules
> > > +
> > > +- CryptoPkg/Library/OpensslLib/openssl
> > > +- ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3
> > > +
> > > +The latter one is actually required by previous one.
> > It's inevitable
> > > +in openssl-1.1.1 (since stable201905) for floating
> > point parameter
> > > +conversion, but should be dropped once there's no such
> > need in future
> > > +release of openssl.
> > > +
> > > +To get a full, buildable EDK II repository, use
> > following two steps
> > > +of git command
> > > +
> > > +```
> > > +$ git clone https://github.com/tianocore/edk2.git
> > > +$ git submodule update --init> > +```
> > > +
> > > +Note: When cloning submodule repos, '--recursive'
> > option is not
> > > +recommended. EDK II itself will not use any
> > code/feature from
> > > +submodules in above submodules. So using '--recursive'
> > adds a
> > > +dependency on being able to reach servers we do not
> > actually want any
> > > +code from, as well as needlessly downloading code we
> > will not use.
> > > --
> > > 2.17.1.windows.2
> > >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43491): https://edk2.groups.io/g/devel/message/43491
Mute This Topic: https://groups.io/mt/32413655/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v2 2/3] MdePkg/BaseLib.h: Update IA32_CR4 structure for 5-level paging

2019-07-10 Thread Laszlo Ersek
Ray, Eric,

(+Liming, +Mike, +Leif)

On 07/09/19 03:04, Dong, Eric wrote:
> Reviewed-by: Eric Dong 
> 
>> -Original Message-
>> From: Ni, Ray
>> Sent: Wednesday, July 3, 2019 2:54 PM
>> To: devel@edk2.groups.io
>> Cc: Dong, Eric ; Laszlo Ersek 
>> Subject: [PATCH v2 2/3] MdePkg/BaseLib.h: Update IA32_CR4 structure for
>> 5-level paging
>>
>> 5-level paging is documented in white paper:
>> https://software.intel.com/sites/default/files/managed/2b/80/5-
>> level_paging_white_paper.pdf
>>
>> Commit f8113e25001e715390127f23e2197252cbd6d1a2
>> changed Cpuid.h already.
>>
>> This patch updates IA32_CR4 structure to include LA57 field.
>>
>> Signed-off-by: Ray Ni 
>> Cc: Eric Dong 
>> Regression-tested-by: Laszlo Ersek 
>> ---
>>  MdePkg/Include/Library/BaseLib.h | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/MdePkg/Include/Library/BaseLib.h
>> b/MdePkg/Include/Library/BaseLib.h
>> index ebd7dd274c..a22bfc9fad 100644
>> --- a/MdePkg/Include/Library/BaseLib.h
>> +++ b/MdePkg/Include/Library/BaseLib.h
>> @@ -5324,7 +5324,8 @@ typedef union {
>>  UINT32  OSXMMEXCPT:1;   ///< Operating System Support for
>>  ///< Unmasked SIMD Floating Point
>>  ///< Exceptions.
>> -UINT32  Reserved_0:2;   ///< Reserved.
>> +UINT32  Reserved_2:1;   ///< Reserved.
>> +UINT32  LA57:1; ///< Linear Address 57bit.
>>  UINT32  VMXE:1; ///< VMX Enable
>>  UINT32  Reserved_1:18;  ///< Reserved.
>>} Bits;

I'm sorry but you will have to revert this patch series immediately.
None of the MdePkg maintainers have approved this patch -- commit
7c5010c7f88b.

In the first place, Mike and Liming were never CC'd on the patch, so
they may not have noticed it, even.

The situation is very similar to the recent SM3 crypto series that I had
to revert myself. An MdePkg patch was pushed without package owner review.

Can you guys please revert this series immediately, without me having to
do it?


If we think that MdePkg should have more "M" folks, in order to
distribute the review load better, then we should address that problem
first. Ignoring rules just because that's more convenient is not acceptable.

Thanks,
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43490): https://edk2.groups.io/g/devel/message/43490
Mute This Topic: https://groups.io/mt/32295048/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] PL031: Actually disable interrupts

2019-07-10 Thread Leif Lindholm
On Wed, Jul 10, 2019 at 04:53:11PM +0200, Alexander Graf via Groups.Io wrote:
> The PL031 interrupt mask register (IMSC) is not very clearly documented
> in the PL031 specification. However, bit 0 (RTCIMSC) indicates whether
> interrupts are enabled, not disabled.

3.3.5. Interrupt Mask Set or Clear register, RTCIMSC
... Writing 1 sets the mask. ...

3.6. Interrupts
... This interrupt is enabled or disabled by changing the mask bit in
RTCIMSC. To enable the interrupt, set bit[0] HIGH. ...

*boggle*

> So before this commit, we were actually *enabling* interrupts for the RTC.
> 
> This patch changes the logic to instead disable interrupts when they
> are not disabled already.

Thanks for finding/fixing this.

> Signed-off-by: Alexander Graf 

Reviewed-by: Leif Lindholm 

I took the liberty to change the subject line to
"ArmPlatformPkg: Actually disable PL031 interrupts"
(We tend to start with the top-level directory.)

Pushed as 8df52631e53c.

/
Leif

> ---
>  .../Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git 
> a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c 
> b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
> index b630a5cfbf..75c95985d4 100644
> --- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
> +++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
> @@ -80,8 +80,8 @@ InitializePL031 (
>}
>  
>// Ensure interrupts are masked. We do not want RTC interrupts in UEFI
> -  if ((MmioRead32 (mPL031RtcBase + 
> PL031_RTC_IMSC_IRQ_MASK_SET_CLEAR_REGISTER) & PL031_SET_IRQ_MASK) != 
> PL031_SET_IRQ_MASK) {
> -MmioOr32 (mPL031RtcBase + PL031_RTC_IMSC_IRQ_MASK_SET_CLEAR_REGISTER, 
> PL031_SET_IRQ_MASK);
> +  if ((MmioRead32 (mPL031RtcBase + 
> PL031_RTC_IMSC_IRQ_MASK_SET_CLEAR_REGISTER) & PL031_SET_IRQ_MASK) != 0) {
> +MmioWrite32 (mPL031RtcBase + PL031_RTC_IMSC_IRQ_MASK_SET_CLEAR_REGISTER, 
> 0);
>}
>  
>// Clear any existing interrupts
> -- 
> 2.17.1
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43489): https://edk2.groups.io/g/devel/message/43489
Mute This Topic: https://groups.io/mt/32416951/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [ PATCH v2 1/2] Readme.md: add submodule policy and clone commands

2019-07-10 Thread Michael D Kinney
Leif,

I think the following command has to be run from the git
dir that the edk2 repo was cloned into.

$ git submodule update --init

So I think the correct instructions would be:

$ git clone https://github.com/tianocore/edk2.git
$ cd edk2
$ git submodule update --init
$ cd ..

Mike

> -Original Message-
> From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> Sent: Wednesday, July 10, 2019 7:27 AM
> To: Wang, Jian J 
> Cc: devel@edk2.groups.io; Kinney, Michael D
> ; Gao, Liming
> 
> Subject: Re: [ PATCH v2 1/2] Readme.md: add submodule
> policy and clone commands
> 
> On Wed, Jul 10, 2019 at 02:09:54PM +0800, Jian J Wang
> wrote:
> > > v2: update wording per Leif's and others' comments
> 
> Please drop the above line - version comments can go
> below the --- line, so they don't get included in the
> commit message.
> 
> With that:
> Reviewed-by: Leif Lindholm 
> 
> (although Liming had some further feedback)
> 
> > REF:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1910
> >
> > A section 'Submodules' is added to clarify the
> submodule policy in
> > edk2 repo. Git commands are also added to show the
> correct way to
> > clone submodule repos, in which '--recursive' is
> removed because it's
> > not needed but recommended in other document.
> >
> > Related commits:
> > Openssl-1.1.1b upgrade:
> acfb90911840c38a0beb9bcfe0065668244d2b4d
> > berkeley-softfloat-3:
> 3cc57695df5a6e8c65fb46b993836c315cabf49d
> >
> > Cc: Leif Lindholm 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Signed-off-by: Jian J Wang 
> > ---
> >  Readme.md | 28 
> >  1 file changed, 28 insertions(+)
> >
> > diff --git a/Readme.md b/Readme.md
> > index e564c6c09b..c475468655 100644
> > --- a/Readme.md
> > +++ b/Readme.md
> > @@ -143,3 +143,31 @@ Signed-off-by: Contributor Name
> 
> >the change.  Each line should be less than ~70
> characters.
> >  * `Signed-off-by` is the contributor's signature
> identifying them
> >by their real/legal name and their email address.
> > +
> > +# Submodules
> > +
> > +As a general policy, submodule chain should be avoided
> in EDK II repo
> > +as possible as we can. Currently EDK II  contains two
> submodules
> > +
> > +- CryptoPkg/Library/OpensslLib/openssl
> > +- ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3
> > +
> > +The latter one is actually required by previous one.
> It's inevitable
> > +in openssl-1.1.1 (since stable201905) for floating
> point parameter
> > +conversion, but should be dropped once there's no such
> need in future
> > +release of openssl.
> > +
> > +To get a full, buildable EDK II repository, use
> following two steps
> > +of git command
> > +
> > +```
> > +$ git clone https://github.com/tianocore/edk2.git
> > +$ git submodule update --init> > +```
> > +
> > +Note: When cloning submodule repos, '--recursive'
> option is not
> > +recommended. EDK II itself will not use any
> code/feature from
> > +submodules in above submodules. So using '--recursive'
> adds a
> > +dependency on being able to reach servers we do not
> actually want any
> > +code from, as well as needlessly downloading code we
> will not use.
> > --
> > 2.17.1.windows.2
> >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43488): https://edk2.groups.io/g/devel/message/43488
Mute This Topic: https://groups.io/mt/32413655/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] SecurityPkg: Don't Verify the enrolled PK in setup mode

2019-07-10 Thread Laszlo Ersek
Hi,

On 07/10/19 10:50, Wang, Jian J wrote:
> Hi Derek,
> 
> Please file a Bugzilla for this issue. With it addressed,
> 
> Reviewed-by: Jian J Wang 
> jian.j.w...@intel.com

I saw this patch as soon as it was posted, and I've been hoping for a
deeper discussion on the list. (I didn't ask my questions immediately
because I felt they might have been somewhat naive.) So I guess I have
to ask them now :)


(1) What is the exact failure (or spec non-conformance) scenario?

Is it the problem that, currently, even if SetupMode is 1, CustomMode
also needs to be set, for enrolling a self-signed PK?

(Looking at the patch itself, it looks like the subcondition that is
*not* the CustomMode check is relaxed; so that seems to support my
question.)


(2) Can we please confirm that the code will continue to enforce
self-signedness?

I checked the spec, and I'm a bit worried about the spec language
proper. Page 246 in UEFI-2.8 says,

  3. If the variable SetupMode==1, and the variable is a secure boot
 policy variable, then the firmware implementation shall consider
 the checks in the following steps 4 and 5 to have passed, and
 proceed with updating the variable value as outlined below.

  4. Verify the signature by:
 — extracting the EFI_VARIABLE_AUTHENTICATION_2 descriptor from the
   Data buffer;
 — using the descriptor contents and other parameters to (a)
   construct the input to the digest algorithm; (b) computing the
   digest; and (c) comparing the digest with the result of applying
   the signer’s public key to the signature.

In other words, step#4 seems to stand for verifying self-signedness, and
step#3 appears to require that *not even* self-signedness be enforced,
when in SetupMode.

Honestly, I think that step#4 should never be skipped. In other words,
self-signedness should be unconditional.

A certificate is basically a signed statement that a particular public
key belongs to a particular entity (such as "FooBar"). If *not even*
FooBar signs that statement, then the statement has *zero* credibility.
So why should we accept it for any purpose at all?

Speaking in terms of "PK" (UEFI Platform Key), specifically: what good
would a platform vendor be that failed to sign its own PK?

So, I'd like to understand:

(2a) whether skipping step#4 in SetupMode is a bug in the spec --
because, I think it is;

(2b) whether the edk2 code would continue enforcing self-signedness on
X509 certificates, if the proposed patch were applied.

Thanks!
Laszlo

> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Zhang, 
> Chao B
> Sent: Tuesday, July 09, 2019 11:39 PM
> To: devel@edk2.groups.io; derek.l...@hpe.com
> Subject: Re: [edk2-devel] [PATCH] SecurityPkg: Don't Verify the enrolled PK 
> in setup mode
> 
> Hi Derek:
>The patch is good to me.
>Reviewed-by : Chao Zhang 
> mailto:chao.b.zh...@intel.com>>
> 
> From: devel@edk2.groups.io 
> [mailto:devel@edk2.groups.io] On Behalf Of 
> derek.l...@hpe.com
> Sent: Tuesday, July 2, 2019 1:25 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH] SecurityPkg: Don't Verify the enrolled PK in 
> setup mode
> 
> Patch is attached from group.io.
> Since ECR785, which is added UEFI 2.3.1 errata A, enrolling a PK in setup 
> mode doesn't need to verify the PK.
> Below is the sentence about it in UEFI spec
> ```
> 3. If the firmware is in setup mode and the variable is one of:
> - The global PK variable;
> - The global KEK variable;
> - The "db" variable with GUID EFI_IMAGE_SECURITY_DATABASE_GUID; or
> - The "dbx" variable with GUID EFI_IMAGE_SECURITY_DATABASE_GUID,
> then the firmware implementation shall consider the checks in the following 
> steps 4 and 5 to
> have passed, and proceed with updating the variable value as outlined below.
> ```
> The step 4 is to verify the signature and the step 5 is to verify the cert.
> 
> After this change, when system is in Setup mode, setting a PK does not 
> require authenticated variable descriptor.
> 
> Signed-off-by: Derek Lin mailto:derek.l...@hpe.com>>
> Signed-off-by: cinnamon shia 
> mailto:cinnamon.s...@hpe.com>>
> 
> 
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43487): https://edk2.groups.io/g/devel/message/43487
Mute This Topic: https://groups.io/mt/32283314/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch v5 0/2] Enable new MM MP protocol

2019-07-10 Thread Laszlo Ersek
On 07/10/19 09:56, Dong, Eric wrote:
> V5:
> 1. Some small enhancement.
> 
> V4 changes:
> 1. Use link list to save the used tokens.
> 
> V3 changes:
> 1. Fix Token clean up too early caused CheckProcedure return error.
> 
> V1 changes:
> RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=1937
> 
> PI spec added a new protocol named MM MP protocol. This protocol allows for
> better remote queuing of execution of procedures on an AP.
> This extends the existing procedures to allow:
> 1. A function to be called in blocking and non-blocking manner explicitly 
> 2. Allow broadcasts.
> 3. Allow execution of a procedure when a processor powers up.
> 
> This patch serial enable this new protocol.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 

Thanks -- given Ray's approval, I plan to regression test this version
later this week.

Cheers
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43486): https://edk2.groups.io/g/devel/message/43486
Mute This Topic: https://groups.io/mt/32414080/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] UefiCpuPkg RegisterCpuFeaturesLib: Fix an ASSERTION issue

2019-07-10 Thread Laszlo Ersek
On 07/10/19 13:42, Star Zeng wrote:
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1968
> 
> We met assertion like below, it happens when there is only
> one processor.
> 
> ASSERT_EFI_ERROR (Status = Not started)
> ASSERT [CpuFeaturesDxe] X:\XXX\XXX\RegisterCpuFeaturesLib\
>   DxeRegisterCpuFeaturesLib.c(149): !EFI_ERROR (Status)
> 
> The code should not call StartupAllAPs when there is only one processor.
> 
> Cc: Laszlo Ersek 
> Cc: Eric Dong 
> Cc: Ray Ni 
> Cc: Chandana Kumar 
> Cc: Kevin Li 
> Signed-off-by: Star Zeng 
> ---
>  .../CpuFeaturesInitialize.c   | 10 +++--
>  .../DxeRegisterCpuFeaturesLib.c   | 43 +++
>  .../PeiRegisterCpuFeaturesLib.c   | 11 +++--
>  3 files changed, 37 insertions(+), 27 deletions(-)

I'll skip this patch.

Thanks!
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43485): https://edk2.groups.io/g/devel/message/43485
Mute This Topic: https://groups.io/mt/32415229/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] Maintainers.txt: Remove maintainer info for IntelFsp[Wrapper]Pkg

2019-07-10 Thread Laszlo Ersek
On 07/10/19 10:05, Ray Ni wrote:
> Signed-off-by: Ray Ni 
> Cc: Andrew Fish 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> ---
>  Maintainers.txt | 12 
>  1 file changed, 12 deletions(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 788b46202c..eb41dba7b1 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -130,18 +130,6 @@ M: Chasel Chiu 
>  R: Nate DeSimone 
>  R: Star Zeng 
>  
> -IntelFspPkg
> -W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFspPkg
> -M: Chasel Chiu 
> -R: Nate DeSimone 
> -R: Star Zeng 
> -
> -IntelFspWrapperPkg
> -W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFspWrapperPkg
> -M: Chasel Chiu 
> -R: Nate DeSimone 
> -R: Star Zeng 
> -
>  MdeModulePkg
>  W: https://github.com/tianocore/tianocore.github.io/wiki/MdeModulePkg
>  M: Jian J Wang 
> 

The patch itself looks OK to me, but I dislike empty commit message
bodies. Please say at least something like the following:

"We removed IntelFspPkg and IntelFspWrapperPkg for
; now remove the
dangling maintainer/reviewer assignments too".

With that update (no need to repost):

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43484): https://edk2.groups.io/g/devel/message/43484
Mute This Topic: https://groups.io/mt/32414115/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] PL031: Actually disable interrupts

2019-07-10 Thread Alexander Graf via Groups.Io
The PL031 interrupt mask register (IMSC) is not very clearly documented
in the PL031 specification. However, bit 0 (RTCIMSC) indicates whether
interrupts are enabled, not disabled.

So before this commit, we were actually *enabling* interrupts for the RTC.

This patch changes the logic to instead disable interrupts when they
are not disabled already.

Signed-off-by: Alexander Graf 
---
 .../Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c 
b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
index b630a5cfbf..75c95985d4 100644
--- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
+++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
@@ -80,8 +80,8 @@ InitializePL031 (
   }
 
   // Ensure interrupts are masked. We do not want RTC interrupts in UEFI
-  if ((MmioRead32 (mPL031RtcBase + PL031_RTC_IMSC_IRQ_MASK_SET_CLEAR_REGISTER) 
& PL031_SET_IRQ_MASK) != PL031_SET_IRQ_MASK) {
-MmioOr32 (mPL031RtcBase + PL031_RTC_IMSC_IRQ_MASK_SET_CLEAR_REGISTER, 
PL031_SET_IRQ_MASK);
+  if ((MmioRead32 (mPL031RtcBase + PL031_RTC_IMSC_IRQ_MASK_SET_CLEAR_REGISTER) 
& PL031_SET_IRQ_MASK) != 0) {
+MmioWrite32 (mPL031RtcBase + PL031_RTC_IMSC_IRQ_MASK_SET_CLEAR_REGISTER, 
0);
   }
 
   // Clear any existing interrupts
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43483): https://edk2.groups.io/g/devel/message/43483
Mute This Topic: https://groups.io/mt/32416951/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [ PATCH v2 1/2] Readme.md: add submodule policy and clone commands

2019-07-10 Thread Leif Lindholm
On Wed, Jul 10, 2019 at 02:09:54PM +0800, Jian J Wang wrote:
> > v2: update wording per Leif's and others' comments

Please drop the above line - version comments can go below the ---
line, so they don't get included in the commit message.

With that:
Reviewed-by: Leif Lindholm 

(although Liming had some further feedback)

> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1910
> 
> A section 'Submodules' is added to clarify the submodule policy
> in edk2 repo. Git commands are also added to show the correct
> way to clone submodule repos, in which '--recursive' is removed
> because it's not needed but recommended in other document.
> 
> Related commits:
> Openssl-1.1.1b upgrade: acfb90911840c38a0beb9bcfe0065668244d2b4d
> berkeley-softfloat-3:   3cc57695df5a6e8c65fb46b993836c315cabf49d
> 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Signed-off-by: Jian J Wang 
> ---
>  Readme.md | 28 
>  1 file changed, 28 insertions(+)
> 
> diff --git a/Readme.md b/Readme.md
> index e564c6c09b..c475468655 100644
> --- a/Readme.md
> +++ b/Readme.md
> @@ -143,3 +143,31 @@ Signed-off-by: Contributor Name 
>the change.  Each line should be less than ~70 characters.
>  * `Signed-off-by` is the contributor's signature identifying them
>by their real/legal name and their email address.
> +
> +# Submodules
> +
> +As a general policy, submodule chain should be avoided in EDK II repo
> +as possible as we can. Currently EDK II  contains two submodules
> +
> +- CryptoPkg/Library/OpensslLib/openssl
> +- ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3
> +
> +The latter one is actually required by previous one. It's inevitable
> +in openssl-1.1.1 (since stable201905) for floating point parameter
> +conversion, but should be dropped once there's no such need in future
> +release of openssl.
> +
> +To get a full, buildable EDK II repository, use following two steps
> +of git command
> +
> +```
> +$ git clone https://github.com/tianocore/edk2.git
> +$ git submodule update --init
> +```
> +
> +Note: When cloning submodule repos, '--recursive' option is not
> +recommended. EDK II itself will not use any code/feature from
> +submodules in above submodules. So using '--recursive' adds a
> +dependency on being able to reach servers we do not actually want
> +any code from, as well as needlessly downloading code we will not
> +use.
> -- 
> 2.17.1.windows.2
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43482): https://edk2.groups.io/g/devel/message/43482
Mute This Topic: https://groups.io/mt/32413655/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v3 00/35] Specific platform to run OVMF in Xen PVH and HVM guests

2019-07-10 Thread Laszlo Ersek
On 07/04/19 16:41, Anthony PERARD wrote:
> Patch series available in this git branch:
> https://xenbits.xen.org/git-http/people/aperard/ovmf.git 
> br.platform-xen-pvh-v3
> 
> Hi,
> 
> I've started to create a Xen specific platform, in OvmfPkg/XenOvmf.dsc
> with the goal to make it work on both Xen HVM and Xen PVH.
> 
> The first few patches only create the platform and duplicate some code from
> OvmfPkg and the later patches makes OVMF boot in a Xen PVH guest and can boot
> a Linux guest.
> 
> After this patch series, I'd like to wait a bit before removing Xen support
> from the OvmfPkg*.dsc, to allow time to switch to the new Xen only platform,
> maybe 1 year.
> 
> To build and boot:
> 
> To build, simply run OvmfPkg/build.sh -p OvmfPkg/OvmfXen.dsc
> Then use OVMF.fd as a kernel of a pvh guest config file (with xl/libxl).
> 
> Patch series available in this git branch:
> https://xenbits.xen.org/git-http/people/aperard/ovmf.git 
> br.platform-xen-pvh-v3

I believe I've completed the v3 review.

Thanks,
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43481): https://edk2.groups.io/g/devel/message/43481
Mute This Topic: https://groups.io/mt/32308564/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



  1   2   >