[edk2-devel] [PATCH 2/3] UefiCpuPkg/PiSmmCpu: Refine CR2 save/restore logic

2019-07-26 Thread Ni, Ray
Because IsStaticPageTableEnabled() is added for both IA32 and x64
build, the CR2 save/restore logic can be refined:
1. Remove arch specific SaveCr2() /  RestoreCr2() implementation;
2. Conditionally save and restore CR2 in SmiRendezvous().

Signed-off-by: Ray Ni 
Cc: Eric Dong 
Cc: Laszlo Ersek 
Cc: Vanguput Narendra K 
---
 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c   | 25 ---
 UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c  |  8 --
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 22 
 UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c| 29 --
 4 files changed, 6 insertions(+), 78 deletions(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
index 2a9af4b77d..cae23d6d1d 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
@@ -327,28 +327,3 @@ SetPageTableAttributes (
   return ;
 }
 
-/**
-  This function returns with no action for 32 bit.
-
-  @param[out]  *Cr2  Pointer to variable to hold CR2 register value.
-**/
-VOID
-SaveCr2 (
-  OUT UINTN  *Cr2
-  )
-{
-  return ;
-}
-
-/**
-  This function returns with no action for 32 bit.
-
-  @param[in]  Cr2  Value to write into CR2 register.
-**/
-VOID
-RestoreCr2 (
-  IN UINTN  Cr2
-  )
-{
-  return ;
-}
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
index ef16997547..5d0124b368 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
@@ -1575,7 +1575,9 @@ SmiRendezvous (
   // when using on-demand paging for above 4G memory.
   //
   Cr2 = 0;
-  SaveCr2 ();
+  if (!IsStaticPageTableEnabled ()) {
+Cr2 = AsmReadCr2 ();
+  }
 
   //
   // Call the user register Startup function first.
@@ -1725,7 +1727,9 @@ Exit:
   //
   // Restore Cr2
   //
-  RestoreCr2 (Cr2);
+  if (!IsStaticPageTableEnabled ()) {
+AsmWriteCr2 (Cr2);
+  }
 }
 
 /**
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h 
b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
index 14b7676c16..5a97733def 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
@@ -1282,28 +1282,6 @@ IsStaticPageTableEnabled (
   )
 ;
 
-/**
-  This function reads CR2 register when on-demand paging is enabled
-  for 64 bit and no action for 32 bit.
-
-  @param[out]  *Cr2  Pointer to variable to hold CR2 register value.
-**/
-VOID
-SaveCr2 (
-  OUT UINTN  *Cr2
-  );
-
-/**
-  This function writes into CR2 register when on-demand paging is enabled
-  for 64 bit and no action for 32 bit.
-
-  @param[in]  Cr2  Value to write into CR2 register.
-**/
-VOID
-RestoreCr2 (
-  IN UINTN  Cr2
-  );
-
 /**
   Schedule a procedure to run on the specified CPU.
 
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
index 18e3f9e08d..8259b01a95 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
@@ -1209,32 +1209,3 @@ SetPageTableAttributes (
   return ;
 }
 
-/**
-  This function reads CR2 register when on-demand paging is enabled.
-
-  @param[out]  *Cr2  Pointer to variable to hold CR2 register value.
-**/
-VOID
-SaveCr2 (
-  OUT UINTN  *Cr2
-  )
-{
-  if (!mCpuSmmStaticPageTable) {
-*Cr2 = AsmReadCr2 ();
-  }
-}
-
-/**
-  This function restores CR2 register when on-demand paging is enabled.
-
-  @param[in]  Cr2  Value to write into CR2 register.
-**/
-VOID
-RestoreCr2 (
-  IN UINTN  Cr2
-  )
-{
-  if (!mCpuSmmStaticPageTable) {
-AsmWriteCr2 (Cr2);
-  }
-}
-- 
2.21.0.windows.1


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

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



[edk2-devel] [PATCH 0/3] Allow SMM access-out when static paging is OFF

2019-07-26 Thread Ni, Ray
The patch set refines the original CR2 save/restore logic by adding
a new internal function IsStaticPageTableEnabled() because now
there are two use cases that need to conditionally do something
based on whether static page table is enabled.
Based on the refine, the patch changes the policy to allow SMM access
out when static paging is OFF.

Ray Ni (3):
  UefiCpuPkg/PiSmmCpu: Add Internal function IsStaticPageTableEnabled
  UefiCpuPkg/PiSmmCpu: Refine CR2 save/restore logic
  UefiCpuPkg/PiSmmCpu: Allow SMM access-out when static paging is OFF

 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c   | 41 
 UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c  |  8 +++-
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 21 +++---
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 27 +
 UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c| 45 --
 5 files changed, 63 insertions(+), 79 deletions(-)

-- 
2.21.0.windows.1


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

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



[edk2-devel] [PATCH 3/3] UefiCpuPkg/PiSmmCpu: Allow SMM access-out when static paging is OFF

2019-07-26 Thread Ni, Ray
Commit c60d36b4d1ee1f69b7cca897d3621dfa951895c2
* UefiCpuPkg/SmmCpu: Block access-out only when static paging is used

updated page fault handler to treat SMM access-out as allowed
address when static paging is not used.

But that commit is not complete because the page table is still
updated in SetUefiMemMapAttributes() for non-SMRAM memory. When SMM
code accesses non-SMRAM memory, page fault is still generated.

This patch skips to update page table for non-SMRAM memory and
page table itself.

Signed-off-by: Ray Ni 
Cc: Eric Dong 
Cc: Jiewen Yao 
Cc: Jian J Wang 
---
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
index 69a04dfb23..d7d94c8b6d 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
@@ -1121,6 +1121,9 @@ FindSmramInfo (
   *SmrrBase = (UINT32)CurrentSmramRange->CpuStart;
   *SmrrSize = (UINT32)CurrentSmramRange->PhysicalSize;
 
+  //
+  // Extend *SmrrBase/*SmrrSize to include adjacent SMRAM ranges
+  //
   do {
 Found = FALSE;
 for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {
@@ -1432,14 +1435,20 @@ PerformRemainingTasks (
 SetMemMapAttributes ();
 
 //
-// For outside SMRAM, we only map SMM communication buffer or MMIO.
+// Protect memory outside SMRAM when SMM Static Page Table is enabled.
 //
-SetUefiMemMapAttributes ();
+if (IsStaticPageTableEnabled ()) {
 
-//
-// Set page table itself to be read-only
-//
-SetPageTableAttributes ();
+  //
+  // For outside SMRAM, we only map SMM communication buffer or MMIO.
+  //
+  SetUefiMemMapAttributes ();
+
+  //
+  // Set page table itself to be read-only
+  //
+  SetPageTableAttributes ();
+}
 
 //
 // Configure SMM Code Access Check feature if available.
-- 
2.21.0.windows.1


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

View/Reply Online (#44470): https://edk2.groups.io/g/devel/message/44470
Mute This Topic: https://groups.io/mt/32616003/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 0/6] Support 5-level paging in DXE long mode

2019-07-26 Thread Michael D Kinney
Ray,

The .h files represent information from specifications and
components that include the include files do so because
their source code depends on definitions associated with 
those specifications.  It does not represent what CPUs
are present in the platform.  It may represent what
CPUs the module/lib supports.

Mike

> -Original Message-
> From: Ni, Ray
> Sent: Thursday, July 25, 2019 4:42 PM
> To: Kinney, Michael D 
> Cc: devel@edk2.groups.io
> Subject: Re: [edk2-devel] [PATCH V2 0/6] Support 5-
> level paging in DXE long mode
> 
> Having the vendor name for cpu may cause confusion to
> customers.
> AMD customer may found even their code is running in
> AMD processors Intel/Cpuid.h is still included.
> It may also be possible that Intel platform code has to
> include AMD/Cpuid.h.
> 
> The CPU is different from other hardwares. It is ok
> that two PCIE cards from different vendors exist in the
> same platform. But not Ok for CPU.
> Not sure if I am over concerned.
> 
> Sent from my iPhone
> 
> > On Jul 25, 2019, at 11:55 PM, Kinney, Michael D
>  wrote:
> >
> > Ray,
> >
> > I prefer to add a Vendor to the path based on the
> vendor who published
> > the specification.
> > Adding the vendor to the path will allow include
> files to be added in
> > the future with clear names.
> >
> > The UefiCpuPkg is an example of a poor choice for the
> original Cpuid.h
> > file.  It should have been in a vendor specific
> directory from the
> > beginning.  The AMD one is correct in that package.
> >
> > I would also like to consider moving more of The ARM
> and AARCH64
> > content into MdePkg to help with package
> dependencies.
> >
> > If we really want only a single directory, then
> another option is to
> > add the vendor name to the include filename.
> >
> > Mike
> >
> >> -Original Message-
> >> From: Ni, Ray
> >> Sent: Wednesday, July 24, 2019 10:40 PM
> >> To: Kinney, Michael D ;
> >> devel@edk2.groups.io
> >> Subject: RE: [edk2-devel] [PATCH V2 0/6] Support 5-
> level paging in
> >> DXE long mode
> >>
> >> Mike,
> >> All the CPUID definitions also applies to AMD
> processors.
> >> There are two Cpuid.h in UefiCpuPkg today.
> >> 1. UefiCpuPkg/Include/Register/Cpuid.h
> >> 2. UefiCpuPkg/Include/Register/Amd/Cpuid.h
> >>
> >> The second one contains additional structures needed
> by AMD
> >> processor.
> >> But first one also applies to AMD processor.
> >>
> >> Can we just put Cpuid.h under
> MdePkg/Include/Register/ because they
> >> are common to both Intel and AMD?
> >>
> >> Thanks,
> >> Ray
> >>
> >>> -Original Message-
> >>> From: Kinney, Michael D
> >>> Sent: Thursday, July 25, 2019 8:52 AM
> >>> To: Ni, Ray ;
> devel@edk2.groups.io;
> >> Kinney, Michael
> >>> D 
> >>> Subject: RE: [edk2-devel] [PATCH V2 0/6] Support 5-
> >> level paging in DXE
> >>> long mode
> >>>
> >>> Ray,
> >>>
> >>> I think the use of Include/Register is good for
> this
> >> type of content.
> >>> But we may need a Vendor directory.
> >>>
> >>> The general form would be:
> >>>
> >>>  Include/Register//.h
> >>>
> >>> Since the definitions being discussed here are from
> >> an Intel public
> >>> document, perhaps the path should be:
> >>>
> >>>  Include/Register/Intel/Cpuid.h
> >>>
> >>> Thanks,
> >>>
> >>> Mike
> >>>
>  -Original Message-
>  From: Ni, Ray
>  Sent: Wednesday, July 24, 2019 5:46 PM
>  To: Kinney, Michael D
> ;
>  devel@edk2.groups.io
>  Subject: RE: [edk2-devel] [PATCH V2 0/6] Support
> 5-
> >> level paging in
>  DXE long mode
> 
>  Mike,
>  Are you suggesting that
>  1. Copy Cpuid.h in
> MdePkg/Include/IndustryStandard/
> >> 2.
>  Change UefiCpuPkg/Include/Register/Cpuid.h to just
> >> include
>  
> 
>  It looks like a potential issue that there are two
> >> "Cpuid.h" public
>  header file in different folders.
>  But given the include pattern used:
>  "" VS
> >> "", the risk
>  people may include wrong file or compilers don't
> >> know which file to
>  use is zero.
> 
>  Is that what you think?
> 
>  Thanks,
>  Ray
> 
> > -Original Message-
> > From: Kinney, Michael D
> > Sent: Thursday, July 25, 2019 1:23 AM
> > To: devel@edk2.groups.io; Ni, Ray
> >> ;
>  Kinney, Michael
> > D 
> > Subject: RE: [edk2-devel] [PATCH V2 0/6] Support
> >> 5-
>  level paging in DXE
> > long mode
> >
> > Hi Ray,
> >
> > Given that there may be register definitions for
>  other CPUs or devices
> > added to MdePkg in the future, should an extra
>  directory level be
> > added?  Doing that would break source
> >> compatibility
>  for existing
> > components that use #include 
> >> from
>  UefiCpuPkg.  We
> > could keep Cpuid.h in UefiCpuPkg, and it could be
> >> a
>  #include of the
> > new Cpuid.h file in the MdePkg in the extended
> >> path.
> >
> > Also, should CpuId.h be included from BaseLib.h
> 

Re: [edk2-devel] [edk2-non-osi] [PATCH 6/6] Cleanup maintainers, contributions, and licenses

2019-07-26 Thread Leif Lindholm
On Thu, Jul 25, 2019 at 10:35:48AM -0700, Nate DeSimone wrote:
> - Merged Maintainers.txt from devel-MinPlatform branch with
>   Maintainers.txt in master branch and updated to match the maintainers
>   in the equivalent edk2-platforms Maintainers.txt
> 
> - Removed the old Contributions.txt files
> 
> - Updated the Kaby Lake microcode to the new Intel microcode license
>   which Intel switched to in 2018

Looks good to me.
Reviewed-by: Leif Lindholm 

> Cc: Andrew Fish 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Cc: Michael Kubacki 
> Cc: Ankit Sinha 
> Cc: Chasel Chiu 
> Cc: Jiewen Yao 
> Cc: Sai Chaganty 
> Cc: Gillispie, Thad 
> Cc: Bu, Daocheng 
> Cc: Oram, Isaac W 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Signed-off-by: Nate DeSimone 
> ---
>  Contributions.txt | 163 -
>  Maintainers.txt   |  20 ++
>  .../KabylakeSiliconBinPkg/Contributions.txt   | 218 --
>  .../Intel/KabylakeSiliconBinPkg/License.txt   |   6 +-
>  .../Microcode/IntelMicrocodeLicense.txt   |  37 +++
>  5 files changed, 60 insertions(+), 384 deletions(-)
>  delete mode 100644 Contributions.txt
>  delete mode 100644 Silicon/Intel/KabylakeSiliconBinPkg/Contributions.txt
>  create mode 100644 
> Silicon/Intel/KabylakeSiliconBinPkg/Microcode/IntelMicrocodeLicense.txt
> 
> diff --git a/Contributions.txt b/Contributions.txt
> deleted file mode 100644
> index 8cee4e2..000
> --- a/Contributions.txt
> +++ /dev/null
> @@ -1,163 +0,0 @@
> -==
> -= Code Contributions =
> -==
> -
> -To make a contribution to a TianoCore project, follow these steps.
> -1. Create a change description in the format specified below to
> -   use in the source control commit log.
> -2. Your commit message must include your "Signed-off-by" signature,
> -   and "Contributed-under" message.
> -3. Your "Contributed-under" message explicitly states that the
> -   contribution is made under the terms of the specified
> -   contribution agreement.  Your "Contributed-under" message
> -   must include the name of contribution agreement and version.
> -   For example: Contributed-under: TianoCore Contribution Agreement 1.0
> -   The "TianoCore Contribution Agreement" is included below in
> -   this document.
> -4. Submit your code to the TianoCore project using the process
> -   that the project documents on its web page.  If the process is
> -   not documented, then submit the code on development email list
> -   for the project.
> -5. Contributions must have an explicit license, and the license must be
> -   compatible with the contribution agreement. The license must be
> -   available as a License.txt file alongside, or above in the directory
> -   tree of, the contributed files.
> -
> -
> -= TianoCore Contribution Agreement 1.1 =
> -
> -
> -INTEL CORPORATION ("INTEL") MAKES AVAILABLE SOFTWARE, DOCUMENTATION 
> ("DOCUMENTATION"),
> -INFORMATION AND/OR OTHER MATERIALS FOR USE IN THE TIANOCORE OPEN SOURCE
> -PROJECT (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE
> -TERMS AND CONDITIONS OF THIS AGREEMENT BETWEEN YOU AND INTEL AND/OR THE
> -TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR
> -REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE
> -CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS
> -OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
> -BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS
> -AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
> -AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT
> -USE THE CONTENT.
> -
> -Unless otherwise indicated, all Content (except Documentation) made 
> available on the TianoCore
> -site is provided to you under the terms and conditions of the BSD
> -License ("BSD"). A copy of the BSD License is available at
> -http://opensource.org/licenses/bsd-license.php
> -or when applicable, in the associated License.txt file.
> -
> -Unless otherwise indicated, all Documentation made available on the
> -TianoCore site is provided to you under the terms and conditions of the
> -FreeBSD Documentation License ("FreeBSD"). A copy of the BSD License is
> -available at https://www.freebsd.org/copyright/freebsd-doc-license.html or,
> -when applicable, in the associated License.txt file.
> -
> -Certain other content may be made available under other licenses as
> -indicated in or with such Content(for example, in a License.txt file).
> -
> -You accept and agree to the following terms and conditions for Your
> -present and future Contributions submitted to TianoCore site. Except
> -for the license granted to Intel hereunder, You reserve all right,
> -title, and interest in and to Your Contributions.
> -
> -== SECTION 1: Definitions ==
> -* "You" or "Contributor" shall mean the 

Re: [edk2-devel] [PATCH v3 33/35] OvmfPkg: Introduce XenIoPvhDxe to initialize Grant Tables

2019-07-26 Thread Laszlo Ersek
On 07/26/19 18:06, Anthony PERARD wrote:
> On Wed, Jul 10, 2019 at 04:05:02PM +0200, Laszlo Ersek wrote:
>> On 07/04/19 16:42, Anthony PERARD wrote:

>>> +  if (State == NULL) {
>>> +Status = EFI_OUT_OF_RESOURCES;
>>> +goto Error;
>>> +  }
>>> +
>>> +  Allocation = AllocateReservedPages (XEN_GRANT_FRAMES);
>>
>> (5) So, again, please evaluate if this could simply be AllocatePages().
> 
> I would prefer to let know the operating system that those pages are
> potentially used, unless I'm sure OVMF has let know Xen that those
> pages don't contain the grant table anymore.
> 
> I'll probably try to make some changes in OVMF to allow to give back
> those pages, but for now I think keeping those pages as reserved will
> be good enough.

Fair enough!

Thanks,
Laszlo

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

View/Reply Online (#44464): https://edk2.groups.io/g/devel/message/44464
Mute This Topic: https://groups.io/mt/32308734/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 0/6] Acpiview table parsers code style enhancements and refactoring

2019-07-26 Thread Krzysztof Koch
Hi,

Is there any way I can help get this patch merged? I have a couple of small 
patch sets ready to submit but they are pending on this series. 

These small sets of patches are a result of me breaking down the "[PATCH v1 
00/11] Add security checks in the Acpiview table parsers" series into smaller 
functional units as requested in the review comments.

Kind regards,

Krzysztof

-Original Message-
From: Sami Mujawar  
Sent: Tuesday, July 23, 2019 10:57
To: Krzysztof Koch ; devel@edk2.groups.io
Cc: jaben.car...@intel.com; ray...@intel.com; zhichao@intel.com; nd 

Subject: RE: [edk2-devel] [PATCH v2 0/6] Acpiview table parsers code style 
enhancements and refactoring

Reviewed-by: Sami Mujawar 

-Original Message-
From: Krzysztof Koch  
Sent: 22 July 2019 09:25 AM
To: devel@edk2.groups.io; Krzysztof Koch 
Cc: jaben.car...@intel.com; ray...@intel.com; zhichao@intel.com; Sami 
Mujawar ; nd 
Subject: RE: [edk2-devel] [PATCH v2 0/6] Acpiview table parsers code style 
enhancements and refactoring

Hi Everyone,

Just to let you know, only "ShellPkg: acpiview: Allow passing buffer length to 
DumpGasStruct()" is changed compared to v1. I had a wrong understanding of how 
to post revised patches to the upstream community.

Kind regards,

Krzysztof

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Krzysztof Koch 
via Groups.Io
Sent: Monday, July 22, 2019 8:50
To: devel@edk2.groups.io
Cc: jaben.car...@intel.com; ray...@intel.com; zhichao@intel.com; Sami 
Mujawar ; Matteo Carlini ; nd 

Subject: [edk2-devel] [PATCH v2 0/6] Acpiview table parsers code style 
enhancements and refactoring

This set of patches consists of a number of changes which make the code 
structure consistent across the existing ACPI table parsers. These are all 
refactoring changes which do not modify the existing functionality of the 
acpiview UEFI shell tool.

Changes can be seen at: 
https://github.com/KrzysztofKoch1/edk2/tree/612_acpiview_code_style_enhance_v2

Krzysztof Koch (6):
  ShellPkg: acpiview: Allow passing buffer length to DumpGasStruct()
  ShellPkg: acpiview: XSDT: Remove redundant ParseAcpi() call
  ShellPkg: acpiview: RSDP: Make code consistent with other parsers
  ShellPkg: acpiview: SRAT: Minor code style enhancements
  ShellPkg: acpiview: MADT: Split structure length validation
  ShellPkg: acpiview: IORT: Refactor PMCG node mapping count validation

 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c  | 26 
+---
 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h  |  8 
+++--
 ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c |  2 +- 
 ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c | 32 
++--  
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 30 
+-  
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c | 11 
+--  ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c 
|  3 +-  ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c 
| 18 +++
 8 files changed, 82 insertions(+), 48 deletions(-)

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'






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

View/Reply Online (#44463): https://edk2.groups.io/g/devel/message/44463
Mute This Topic: https://groups.io/mt/32556317/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 33/35] OvmfPkg: Introduce XenIoPvhDxe to initialize Grant Tables

2019-07-26 Thread Anthony PERARD
On Wed, Jul 10, 2019 at 04:05:02PM +0200, Laszlo Ersek wrote:
> On 07/04/19 16:42, Anthony PERARD wrote:
> > +
> > +STATIC
> > +VOID
> > +EFIAPI
> > +XenIoPvhDxeNotifyExitBoot (
> > +  IN EFI_EVENT  Event,
> > +  IN VOID   *Context
> > +  )
> > +{
> > +  XEN_IO_PVH_STATE *State;
> > +  EFI_STATUS Status;
> > +
> > +  State = Context;
> > +
> > +  gBS->CloseEvent(>ExitBootEvent);
> > +  Status = XenIoMmioUninstall(State->XenIoHandle);
> > +  if (Status == EFI_SUCCESS) {
> > +//
> > +// Only free the reserved space for grant table if no driver is using 
> > it.
> > +//
> > +FreePages (State->Allocation, XEN_GRANT_FRAMES);
> > +  }
> > +  FreePool (State);
> > +}
> 
> In my v2 review at
> 
> http://mid.mail-archive.com/2c386393-b886-a7e7-e8b9-c5e339c94727@redhat.com
> 
> I asked, in point (6), whether we needed the memory allocation to be
> "reserved". I guess this change (in v3) is supposed to address that.
> (And, indeed, version 3 of this patch correctly addresses all other
> points from my v2 review.)
> 
> However: an ExitBootServices notification function *must not* perform
> actions that could change the UEFI memory map. Thus, you can not release
> memory there -- you can't call CloseEvent(),
> UninstallMultipleProtocolInterfaces(), FreePool(), FreePages(), and so on.
> 
> In my earlier review, I wrote,
> 
> > [...] then we could allocate EfiBootServicesData type memory here --
> > and perhaps add an ExitBootServices() callback to disconnect from Xen
> > [...]
> 
> By "disconnect", I meant actions that do *not* include memory allocation
> / release, but only make the hypervisor *forget* its guest RAM
> references that it currently holds.
> 
> ExitBootServices() handlers (notification functions) are different from
> normal "teardown" functions. A "teardown" function generally mirrors a
> "construct" function, where you remove all references, and release all
> memory allocations, in precise reverse order of construction.
> 
> ExitBootServices() handlers perform a *subsequence* of that (usually
> preserving the same relative order between the steps): you only erase
> external references to RAM -- that is, RAM references that are held by
> external entities, such as PCI devices (in-flight DMA), the hypervisor,
> and so on. The referred-to RAM, originally allocated as "boot services
> data", will be released later, whole-sale, by the OS.
> 
> In that sense, ExitBootServices() callbacks implement a kind of
> ownership transfer. You no longer own the UEFI memory map, you just have
> to kick out such external references into it that the OS would not know
> about.
> 
> To summarize:
> 
> - If this memory *needs* to be reserved past ExitBootServices(), then
> stick with AllocateReservedPages(). Otherwise, use AllocatePages(); then
> the pages will be freed automatically by the OS, soon after it is started.
> 
> - In the latter case, if necessary, you can make the hypervisor forget
> about the area, as part of ExitBootServices(), in a notification
> function. But that can only happen without allocating or releasing
> memory in the notification function.
> 
> 
> ... I guess you could make a XENMEM_remove_from_physmap hypercall, for
> example. But, it's *entirely* possible that said hypercall doesn't
> belong in *this* driver. After all, this is not the driver that calls
> XENMEM_add_to_physmap either!
> 
> ... In fact, I think XenBusDxe has a bug. Right now, you have the
> following call chain, when the OS calls ExitBootServices():
> 
> NotifyExitBoot()
>   gBS->DisconnectController()
> XenBusDxeDriverBindingStop()
>   XenGrantTableDeinit()
> XenHypercallMemoryOp (XENMEM_remove_from_physmap)
> 
> Unfortunately, this call tree releases memory left and right, and so it
> is not valid on the stack of gBS->ExitBootServices().
> 
> Instead, NotifyExitBoot() should collect just the subsequence of
> XenBusDxeDriverBindingStop() -- interpreting that function as a flatened
> sequence of operations -- that removes external references to RAM.
> Making hypercalls (using parameters constructed on the stack) is fine.
> Using dynamically *pre*allocated memory (for constructing hypercall
> arguments) is also fine. Dynamically allocating or releasing memory *on
> the spot* is not fine.
> 
> (2) So, for now, I'd recommend simply removing
> XenIoPvhDxeNotifyExitBoot(), in this patch.

Ok, I'll remove it.

> You might want to fix XenBusDxe's NotifyExitBoot(), separately.

I'll put that on my TODO list.

> > +return EFI_UNSUPPORTED;
> > +  }
> > +
> > +  State = AllocatePool (sizeof (*State));
> 
> (4) What do we gain by allocating "State" dynamically? IMO, it could be
> a local variable (= "automatic storage duration").

Without the exit boot notification, State isn't needed anymore, so I'll
remove it.

> > +  if (State == NULL) {
> > +Status = EFI_OUT_OF_RESOURCES;
> > +goto Error;
> > +  }
> > +
> > +  Allocation = AllocateReservedPages (XEN_GRANT_FRAMES);
> 
> (5) So, again, please 

[edk2-devel] [edk2-platforms] [PATCH] ClevoOpenBoardPkg: Add display support

2019-07-26 Thread Agyeman, Prince
Added vbt and configured gpio to enable

N1xxxW display.

Cc: Liming Gao 
Cc: Ankit Sinha 
Cc: Nate DeSimone 
Cc: Michael Kubacki 
Cc: Chasel Chiu 

Signed-off-by: Prince Agyeman 
---
 .../N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c   | 2 +-
 Platform/Intel/ClevoOpenBoardPkg/N1xxWU/OpenBoardPkg.fdf| 2 +-
 Platform/Intel/ClevoOpenBoardPkg/N1xxWU/build_config.cfg| 2 +-
 Platform/Intel/build_bios.py| 1 +
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c
 
b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c
index 08a20673f0..d055fda8c3 100644
--- 
a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c
+++ 
b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardInitLib/N1xxWUGpioTable.c
@@ -100,7 +100,7 @@ GPIO_INIT_CONFIG mGpioTableN1xxWU[] =
   {GPIO_SKL_LP_GPP_D5,  {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone,  
GpioOutDefault, GpioIntDis, GpioHostDeepReset,  GpioTermNone}},//ISH_I2C0_SDA
   {GPIO_SKL_LP_GPP_D6,  {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone,  
GpioOutDefault, GpioIntDis, GpioHostDeepReset,  GpioTermNone}},//ISH_I2C0_SCL
   {GPIO_SKL_LP_GPP_D7,  {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone,  
GpioOutDefault, GpioIntDis, GpioHostDeepReset,  GpioTermNone}},//ISH_I2C1_SDA
-  {GPIO_SKL_LP_GPP_D8,  {GpioPadModeNative1, GpioHostOwnGpio, GpioDirNone,  
GpioOutDefault, GpioIntDis, GpioHostDeepReset,  GpioTermNone}},//ISH_I2C1_SCL
+  {GPIO_SKL_LP_GPP_D8,  {GpioPadModeGpio,GpioHostOwnGpio, GpioDirOut,   
GpioOutHigh,GpioIntDis, GpioHostDeepReset,  
GpioTermNone}},//ISH_I2C1_SCL/SB_BLON
   {GPIO_SKL_LP_GPP_D9,  {GpioPadModeGpio,GpioHostOwnGpio, GpioDirIn,
GpioOutDefault, GpioIntLevel | GpioIntDis, GpioHostDeepReset,  
GpioTermNone}},//HOME_BTN
   {GPIO_SKL_LP_GPP_D10, {GpioPadModeGpio,GpioHostOwnGpio, GpioDirIn,
GpioOutDefault, GpioIntLevel | GpioIntDis, GpioHostDeepReset,  
GpioTermNone}},//SCREEN_LOCK_PCH
   {GPIO_SKL_LP_GPP_D11, {GpioPadModeGpio,GpioHostOwnGpio, GpioDirIn,
GpioOutDefault, GpioIntLevel | GpioIntDis, GpioHostDeepReset,  
GpioTermNone}},//VOL_UP_PCH
diff --git a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/OpenBoardPkg.fdf 
b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/OpenBoardPkg.fdf
index da498ad379..9ebc81e933 100644
--- a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/OpenBoardPkg.fdf
+++ b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/OpenBoardPkg.fdf
@@ -267,7 +267,7 @@ INF 
$(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMem.in
 
 !if gSiPkgTokenSpaceGuid.PcdPeiDisplayEnable == TRUE
 FILE FREEFORM = 4ad46122-ffeb-4a52-bfb0-518cfca02db0 {
-  SECTION RAW = $(PLATFORM_FSP_BIN_PACKAGE)/SampleCode/Vbt/Vbt.bin
+  SECTION RAW = N1xxWU/Gop/Vbt.bin
   SECTION UI  = "Vbt"
 }
 FILE FREEFORM = 7BB28B99-61BB-11D5-9A5D-0090273FC14D {
diff --git a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/build_config.cfg 
b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/build_config.cfg
index a423c8b497..3edc2b14e8 100644
--- a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/build_config.cfg
+++ b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/build_config.cfg
@@ -7,7 +7,7 @@
 
 
 [CONFIG]
-WORKSPACE_PLATFORM_BIN = WORKSPACE_PLATFORM_BIN
+WORKSPACE_PLATFORM_BIN = edk2-non-osi/Platform/Intel/ClevoOpenBoardBinPkg
 EDK_SETUP_OPTION =
 openssl_path =
 PLATFORM_BOARD_PACKAGE = ClevoOpenBoardPkg
diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py
index c01b953d16..beba4acebe 100644
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -120,6 +120,7 @@ def pre_build(build_config, build_type="DEBUG", 
silent=False, toolchain=None):
 config["PACKAGES_PATH"] += os.pathsep + \
 os.path.join(config["WORKSPACE"], "edk2")
 config["PACKAGES_PATH"] += os.pathsep + os.path.join(config["WORKSPACE"])
+config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_PLATFORM_BIN"]
 config["EDK_TOOLS_PATH"] = os.path.join(config["WORKSPACE"],
 config["EDK_TOOLS_PATH"])
 config["BASE_TOOLS_PATH"] = config["EDK_TOOLS_PATH"]
-- 
2.19.1.windows.1


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

View/Reply Online (#44461): https://edk2.groups.io/g/devel/message/44461
Mute This Topic: https://groups.io/mt/32610246/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 6/6] UefiCpuPkg/RegisterCpuFeaturesLib: Start all processors simultaneously.

2019-07-26 Thread Laszlo Ersek
On 07/24/19 09:07, Dong, Eric wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1973
> 
> For semaphore type register, it required all processors to do the
> task at the same time.
> Current logic begins BSP's task after all APs have finished their tasks.
> This will caused set semaphore task hang if semaphore has package
> level type.
> This patch use new EDKII_PEI_MP_SERVICES2_PPI to start all processors at
> the same time to fix the potential hang issue.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Cc: Chandana Kumar 
> Cc: Star Zeng 
> Signed-off-by: Eric Dong 
> ---
>  .../CpuFeaturesInitialize.c   |  2 +-
>  .../DxeRegisterCpuFeaturesLib.c   |  6 +-
>  .../PeiRegisterCpuFeaturesLib.c   | 66 ++-
>  .../PeiRegisterCpuFeaturesLib.inf |  1 +
>  .../RegisterCpuFeatures.h |  2 +-
>  5 files changed, 54 insertions(+), 23 deletions(-)

My testing did not cover this patch.

Thanks
Laszlo

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

View/Reply Online (#44460): https://edk2.groups.io/g/devel/message/44460
Mute This Topic: https://groups.io/mt/32581679/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 5/6] UefiCpuPkg/CpuMpPei: Produce EDKII_PEI_MP_SERVICES2_PPI.

2019-07-26 Thread Laszlo Ersek
On 07/24/19 09:07, Dong, Eric wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1973
> 
> Produce new EDKII_PEI_MP_SERVICES2_PPI service.
> 
> It includes all APIs existed in EFI_PEI_MP_SERVICES_PPI
> and add new API EDKII_PEI_MP_SERVICES_STARTUP_ALL_CPUS.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Cc: Chandana Kumar 
> Cc: Star Zeng 
> Signed-off-by: Eric Dong 
> ---
>  UefiCpuPkg/CpuMpPei/CpuMpPei.c   |  21 +-
>  UefiCpuPkg/CpuMpPei/CpuMpPei.h   |   3 +-
>  UefiCpuPkg/CpuMpPei/CpuMpPei.inf |   2 +
>  UefiCpuPkg/CpuMpPei/Mp2Pei.c | 417 +++
>  4 files changed, 436 insertions(+), 7 deletions(-)
>  create mode 100644 UefiCpuPkg/CpuMpPei/Mp2Pei.c

Regression-tested-by: Laszlo Ersek 


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

View/Reply Online (#44459): https://edk2.groups.io/g/devel/message/44459
Mute This Topic: https://groups.io/mt/32581678/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 4/6] UefiCpuPkg: Add new EDKII_PEI_MP_SERVICES2_PPI

2019-07-26 Thread Laszlo Ersek
On 07/24/19 09:07, Dong, Eric wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1973
> 
> Add definition for new EDKII_PEI_MP_SERVICES2_PPI.
> 
> It includes all APIs existed in EFI_PEI_MP_SERVICES_PPI
> and add new API EDKII_PEI_MP_SERVICES_STARTUP_ALL_CPUS.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Cc: Chandana Kumar 
> Cc: Star Zeng 
> Signed-off-by: Eric Dong 
> ---
>  UefiCpuPkg/Include/Ppi/MpServices2.h | 279 +++
>  UefiCpuPkg/UefiCpuPkg.dec|   3 +
>  2 files changed, 282 insertions(+)
>  create mode 100644 UefiCpuPkg/Include/Ppi/MpServices2.h

Regression-tested-by: Laszlo Ersek 


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

View/Reply Online (#44458): https://edk2.groups.io/g/devel/message/44458
Mute This Topic: https://groups.io/mt/32581677/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 2/6] UefiCpuPkg/MpInitLib: Add MpInitLibStartupAllCPUs API.

2019-07-26 Thread Laszlo Ersek
On 07/24/19 09:07, Dong, Eric wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1973
> 
> Add new MpInitLibStartupAllCPUs API uses to start all processors
> at the same time.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Cc: Chandana Kumar 
> Cc: Star Zeng 
> Signed-off-by: Eric Dong 
> Reviewed-by: Ray Ni 
> ---
>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c |  5 +-
>  UefiCpuPkg/Library/MpInitLib/MpLib.c| 61 +++--
>  UefiCpuPkg/Library/MpInitLib/MpLib.h|  6 ++-
>  UefiCpuPkg/Library/MpInitLib/PeiMpLib.c |  5 +-
>  4 files changed, 67 insertions(+), 10 deletions(-)

Regression-tested-by: Laszlo Ersek 


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

View/Reply Online (#44456): https://edk2.groups.io/g/devel/message/44456
Mute This Topic: https://groups.io/mt/32581676/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 3/6] UefiCpuPkg/MpInitLibUp: Add MpInitLibStartupAllCPUs API.

2019-07-26 Thread Laszlo Ersek
On 07/24/19 09:07, Dong, Eric wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1973
> 
> Add new MpInitLibStartupAllCPUs API uses to start all processors
> at the same time.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Cc: Chandana Kumar 
> Cc: Star Zeng 
> Signed-off-by: Eric Dong 
> ---
>  UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 35 
>  1 file changed, 35 insertions(+)

My testing did not cover this patch.

Thanks
Laszlo

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

View/Reply Online (#44457): https://edk2.groups.io/g/devel/message/44457
Mute This Topic: https://groups.io/mt/32581674/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 1/6] UefiCpuPkg/Include/MpInitLib.h: Add MpInitLibStartupAllCPUs API.

2019-07-26 Thread Laszlo Ersek
On 07/24/19 09:07, Dong, Eric wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1973
> 
> Add new MpInitLibStartupAllCPUs API uses to start all processors
> at the same time.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Cc: Chandana Kumar 
> Cc: Star Zeng 
> Signed-off-by: Eric Dong 
> Reviewed-by: Ray Ni 
> ---
>  UefiCpuPkg/Include/Library/MpInitLib.h | 36 +-
>  1 file changed, 35 insertions(+), 1 deletion(-)

Regression-tested-by: Laszlo Ersek 


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

View/Reply Online (#44455): https://edk2.groups.io/g/devel/message/44455
Mute This Topic: https://groups.io/mt/32581675/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 0/6] Support 5-level paging in DXE long mode

2019-07-26 Thread Laszlo Ersek
On 07/24/19 12:00, Ni, Ray wrote:
> v2:
>Refined the patch according to reviewers' all comments except:
>   0A0h cannot be changed to A0h or build fails.
>A big change in this patch is Cpuid.h is moved from UefiCpuPkg to MdePkg.
>The move is based on real requirement when certain modules that cannot
>depend on UefiCpuPkg but needs to reference structures defined in SDM.
> 
> Ray Ni (6):
>   UefiCpuPkg/MpInitLib: Enable 5-level paging for AP when BSP's enabled
>   UefiCpuPkg/CpuDxe: Remove unnecessary macros
>   UefiCpuPkg/CpuDxe: Support parsing 5-level page table
>   MdeModulePkg/DxeIpl: Introduce PCD PcdUse5LevelPageTable
>   MdePkg/Cpuid.h: Move Cpuid.h from UefiCpuPkg to MdePkg
>   MdeModulePkg/DxeIpl: Create 5-level page table for long mode
> 
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf   |   1 +
>  .../Core/DxeIplPeim/X64/VirtualMemory.c   | 229 --
>  MdeModulePkg/MdeModulePkg.dec |   7 +
>  MdeModulePkg/MdeModulePkg.uni |   8 +
>  .../Include/Register/Cpuid.h  |   0
>  UefiCpuPkg/CpuDxe/CpuPageTable.c  |  59 +++--
>  UefiCpuPkg/CpuDxe/CpuPageTable.h  |   3 +-
>  UefiCpuPkg/Library/MpInitLib/MpLib.c  |  13 +
>  UefiCpuPkg/Library/MpInitLib/MpLib.h  |   6 +-
>  UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc|   3 +-
>  UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm |  14 +-
>  11 files changed, 243 insertions(+), 100 deletions(-)
>  rename {UefiCpuPkg => MdePkg}/Include/Register/Cpuid.h (100%)
> 

I'd like to regression-test this series once the reviews around it have
converged. My current understanding is that a v3 is needed, so I plan to
wait for v3. If that turns out not to be the case, please ping me
separately.

Thank you
Laszlo

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

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



[edk2-devel] [PATCH] MdePkg: Add PI 1.5 SmramMemoryReserve HOB file

2019-07-26 Thread Marc W Chen
This is a special GUID extension Hob to describe SMRAM memory regions

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Ray Ni 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2020
Signed-off-by: Marc W Chen 
---
 MdePkg/Include/Guid/SmramMemoryReserve.h | 45 
 MdePkg/MdePkg.dec|  3 +++
 2 files changed, 48 insertions(+)
 create mode 100644 MdePkg/Include/Guid/SmramMemoryReserve.h

diff --git a/MdePkg/Include/Guid/SmramMemoryReserve.h 
b/MdePkg/Include/Guid/SmramMemoryReserve.h
new file mode 100644
index 00..9bb4925711
--- /dev/null
+++ b/MdePkg/Include/Guid/SmramMemoryReserve.h
@@ -0,0 +1,45 @@
+/** @file
+  This is a special GUID extension Hob to describe SMRAM memory regions.
+
+  This file defines:
+  * the GUID used to identify the GUID HOB for reserving SMRAM regions.
+  * the data structure of SMRAM descriptor to describe SMRAM candidate regions
+  * values of state of SMRAM candidate regions
+  * the GUID specific data structure of HOB for reserving SMRAM regions.
+
+  Copyright (c) 2019, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+  @par Revision Reference:
+  GUIDs defined in PI SPEC version 1.5.
+
+**/
+
+#ifndef _EFI_SMRAM_MEMORY_RESERVE_H_
+#define _EFI_SMRAM_MEMORY_RESERVE_H_
+
+#define EFI_SMRAM_MEMORY_RESERVE_GUID \
+  { \
+0x6dadf1d1, 0xd4cc, 0x4910, {0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 
0x3d } \
+  }
+
+/**
+* The GUID extension hob is to describe SMRAM memory regions supported by the 
platform.
+**/
+typedef struct {
+  ///
+  /// Designates the number of possible regions in the system
+  /// that can be usable for SMRAM.
+  ///
+  UINT32NumberOfSmmReservedRegions;
+  ///
+  /// Used throughout this protocol to describe the candidate
+  /// regions for SMRAM that are supported by this platform.
+  ///
+  EFI_SMRAM_DESCRIPTOR  Descriptor[1];
+} EFI_SMRAM_HOB_DESCRIPTOR_BLOCK;
+
+extern EFI_GUID gEfiSmramMemoryReserveGuid;
+
+#endif
+
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index b382efd578..5cc12886fa 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -749,6 +749,9 @@
   ## Include/Guid/GraphicsInfoHob.h
   gEfiGraphicsDeviceInfoHobGuid = { 0xe5cb2ac9, 0xd35d, 0x4430, { 0x93, 
0x6e, 0x1d, 0xe3, 0x32, 0x47, 0x8d, 0xe7 }}
 
+  ## Include/Guid/SmramMemoryReserve.h
+  gEfiSmramMemoryReserveGuid = { 0x6dadf1d1, 0xd4cc, 0x4910, { 0xbb, 0x6e, 
0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d }}
+
   #
   # GUID defined in PI1.6
   #
-- 
2.16.2.windows.1


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

View/Reply Online (#44453): https://edk2.groups.io/g/devel/message/44453
Mute This Topic: https://groups.io/mt/32607689/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/PiSmmCpu: Allow SMM access-out when static paging is OFF

2019-07-26 Thread Laszlo Ersek
On 07/26/19 11:58, Laszlo Ersek wrote:
> Ray,
> 
> On 07/18/19 08:58, Ni, Ray wrote:
>> Commit c60d36b4d1ee1f69b7cca897d3621dfa951895c2
>> * UefiCpuPkg/SmmCpu: Block access-out only when static paging is used
>>
>> updated page fault handler to treat SMM access-out as allowed
>> address when static paging is not used.
>>
>> But that commit is not complete because the page table is still
>> updated in SetUefiMemMapAttributes() for non-SMRAM memory. When SMM
>> code accesses non-SMRAM memory, page fault is still generated.
>>
>> This patch skips to update page table for non-SMRAM memory and
>> page table itself.
>>
>> Signed-off-by: Ray Ni 
>> Cc: Eric Dong 
>> Cc: Jiewen Yao 
>> Cc: Jian J Wang 
>> ---
>>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 21 +++--
>>  1 file changed, 15 insertions(+), 6 deletions(-)
>>
>> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c 
>> b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
>> index 2f7d777ee7..f75e75f55c 100644
>> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
>> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
>> @@ -1103,6 +1103,9 @@ FindSmramInfo (
>>*SmrrBase = (UINT32)CurrentSmramRange->CpuStart;
>>*SmrrSize = (UINT32)CurrentSmramRange->PhysicalSize;
>>
>> +  //
>> +  // Extend *SmrrBase/*SmrrSize to include adjacent SMRAM ranges
>> +  //
>>do {
>>  Found = FALSE;
>>  for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {
>> @@ -1414,14 +1417,20 @@ PerformRemainingTasks (
>>  SetMemMapAttributes ();
>>
>>  //
>> -// For outside SMRAM, we only map SMM communication buffer or MMIO.
>> +// Do not protect memory outside SMRAM when SMM static page table is 
>> not enabled.
>>  //
>> -SetUefiMemMapAttributes ();
>> +if (mCpuSmmStaticPageTable) {
>>
>> -//
>> -// Set page table itself to be read-only
>> -//
>> -SetPageTableAttributes ();
>> +  //
>> +  // For outside SMRAM, we only map SMM communication buffer or MMIO.
>> +  //
>> +  SetUefiMemMapAttributes ();
>> +
>> +  //
>> +  // Set page table itself to be read-only
>> +  //
>> +  SetPageTableAttributes ();
>> +}
>>
>>  //
>>  // Configure SMM Code Access Check feature if available.
>>
> 
> Commit 30f6148546c7 causes a build failure, when building for IA32:
> 
>> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c: In function 
>> 'PerformRemainingTasks':
>> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c:1440:9: error: 
>> 'mCpuSmmStaticPageTable' undeclared (first use in this function)
>>  if (mCpuSmmStaticPageTable) {
> 
> "mCpuSmmStaticPageTable" is an X64-only variable. It is defined in
> "X64/PageTbl.c", which is not linked into the IA32 binary. We must not
> reference the variable in such code that is linked into both IA32 and
> X64 builds, such as "PiSmmCpuDxeSmm.c".
> 
> We have encountered the same challenge at least once in the past:
> 
> - https://bugzilla.tianocore.org/show_bug.cgi?id=1593
> - commit 37f9fea5b88d ("UefiCpuPkg\CpuSmm: Save & restore CR2 on-demand
>   paging in SMM", 2019-04-04)
> 
> The right approach is to declare a new function in "PiSmmCpuDxeSmm.h",
> and to provide two definitions for the function, one in
> "Ia32/PageTbl.c", and another in "X64/PageTbl.c". The IA32
> implementation should return a constant value. The X64 implementation
> should return "mCpuSmmStaticPageTable". (In the example named above, the
> functions were SaveCr2() and RestoreCr2().)
> 
> --*--
> 
> I'm going to revert commit 30f6148546c7 immediately, because it breaks
> the build, and because catching this issue in advance would have been
> trivial, if you had attempted to build for IA32. (To be sure, the
> reviewers on this patch are not responsible; reviewers are welcome, but
> not required, to catch such errors that the compiler/linker is supposed
> to catch.) With this build breakage, I wouldn't be able to test Eric's
> series
> 
>   [edk2-devel] [Patch v3 0/6] UefiCpuPkg: Enable Edkii Mp Services2 Ppi
> 
> and I'd like to proceed with that.

The revert has commit hash d47b85a621ad.

Thanks
Laszlo

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

View/Reply Online (#44452): https://edk2.groups.io/g/devel/message/44452
Mute This Topic: https://groups.io/mt/32512605/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/PiSmmCpu: Allow SMM access-out when static paging is OFF

2019-07-26 Thread Laszlo Ersek
Ray,

On 07/18/19 08:58, Ni, Ray wrote:
> Commit c60d36b4d1ee1f69b7cca897d3621dfa951895c2
> * UefiCpuPkg/SmmCpu: Block access-out only when static paging is used
>
> updated page fault handler to treat SMM access-out as allowed
> address when static paging is not used.
>
> But that commit is not complete because the page table is still
> updated in SetUefiMemMapAttributes() for non-SMRAM memory. When SMM
> code accesses non-SMRAM memory, page fault is still generated.
>
> This patch skips to update page table for non-SMRAM memory and
> page table itself.
>
> Signed-off-by: Ray Ni 
> Cc: Eric Dong 
> Cc: Jiewen Yao 
> Cc: Jian J Wang 
> ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 21 +++--
>  1 file changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c 
> b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
> index 2f7d777ee7..f75e75f55c 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
> @@ -1103,6 +1103,9 @@ FindSmramInfo (
>*SmrrBase = (UINT32)CurrentSmramRange->CpuStart;
>*SmrrSize = (UINT32)CurrentSmramRange->PhysicalSize;
>
> +  //
> +  // Extend *SmrrBase/*SmrrSize to include adjacent SMRAM ranges
> +  //
>do {
>  Found = FALSE;
>  for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {
> @@ -1414,14 +1417,20 @@ PerformRemainingTasks (
>  SetMemMapAttributes ();
>
>  //
> -// For outside SMRAM, we only map SMM communication buffer or MMIO.
> +// Do not protect memory outside SMRAM when SMM static page table is not 
> enabled.
>  //
> -SetUefiMemMapAttributes ();
> +if (mCpuSmmStaticPageTable) {
>
> -//
> -// Set page table itself to be read-only
> -//
> -SetPageTableAttributes ();
> +  //
> +  // For outside SMRAM, we only map SMM communication buffer or MMIO.
> +  //
> +  SetUefiMemMapAttributes ();
> +
> +  //
> +  // Set page table itself to be read-only
> +  //
> +  SetPageTableAttributes ();
> +}
>
>  //
>  // Configure SMM Code Access Check feature if available.
>

Commit 30f6148546c7 causes a build failure, when building for IA32:

> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c: In function 
> 'PerformRemainingTasks':
> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c:1440:9: error: 
> 'mCpuSmmStaticPageTable' undeclared (first use in this function)
>  if (mCpuSmmStaticPageTable) {

"mCpuSmmStaticPageTable" is an X64-only variable. It is defined in
"X64/PageTbl.c", which is not linked into the IA32 binary. We must not
reference the variable in such code that is linked into both IA32 and
X64 builds, such as "PiSmmCpuDxeSmm.c".

We have encountered the same challenge at least once in the past:

- https://bugzilla.tianocore.org/show_bug.cgi?id=1593
- commit 37f9fea5b88d ("UefiCpuPkg\CpuSmm: Save & restore CR2 on-demand
  paging in SMM", 2019-04-04)

The right approach is to declare a new function in "PiSmmCpuDxeSmm.h",
and to provide two definitions for the function, one in
"Ia32/PageTbl.c", and another in "X64/PageTbl.c". The IA32
implementation should return a constant value. The X64 implementation
should return "mCpuSmmStaticPageTable". (In the example named above, the
functions were SaveCr2() and RestoreCr2().)

--*--

I'm going to revert commit 30f6148546c7 immediately, because it breaks
the build, and because catching this issue in advance would have been
trivial, if you had attempted to build for IA32. (To be sure, the
reviewers on this patch are not responsible; reviewers are welcome, but
not required, to catch such errors that the compiler/linker is supposed
to catch.) With this build breakage, I wouldn't be able to test Eric's
series

  [edk2-devel] [Patch v3 0/6] UefiCpuPkg: Enable Edkii Mp Services2 Ppi

and I'd like to proceed with that.

Thanks
Laszlo

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

View/Reply Online (#44451): https://edk2.groups.io/g/devel/message/44451
Mute This Topic: https://groups.io/mt/32512605/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/3] Add destructor to CloseEvent

2019-07-26 Thread Liming Gao
Thanks for your fix. The patch set is good. 

Reviewed-by: Liming Gao 

>-Original Message-
>From: Xu, Wei6
>Sent: Friday, July 26, 2019 11:11 AM
>To: devel@edk2.groups.io
>Cc: Kinney, Michael D ; Gao, Liming
>
>Subject: [edk2-devel][Patch 0/3] Add destructor to CloseEvent
>
>REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2012
>
>This patch set adds missing destructor for following libraries:
>MdePkg\Library\UefiDebugLibStdErr
>MdePkg\Library\UefiDebugLibConOut
>MdePkg\Library\UefiDebugLibDebugPortProtocol
>
>When driver is unloaded, the ExitBootSerivesEvent must be closed at
>the same time. Otherwise exception will occur when ExitBootServices.
>
>Cc: Michael D Kinney 
>Cc: Liming Gao 
>
>Wei6 Xu (3):
>  MdePkg/UefiDebugLibConOut: Add destructor to CloseEvent
>  MdePkg/UefiDebugLibDebugPortProtocol: Add destructor to CloseEvent
>  MdePkg/UefiDebugLibStdErr: Add destructor to CloseEvent
>
> .../UefiDebugLibConOut/DebugLibConstructor.c   | 23
>++
> .../UefiDebugLibConOut/UefiDebugLibConOut.inf  |  1 +
> .../DebugLibConstructor.c  | 23 ++
> .../UefiDebugLibDebugPortProtocol.inf  |  1 +
> .../UefiDebugLibStdErr/DebugLibConstructor.c   | 23
>++
> .../UefiDebugLibStdErr/UefiDebugLibStdErr.inf  |  1 +
> 6 files changed, 72 insertions(+)
>
>--
>2.16.2.windows.1


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

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



FW: [edk2-devel] [PATCH V2] ShellPkg/Pci.c: Update supported link speed to PCI4.0

2019-07-26 Thread Gao, Zhichao
Ping. Please help to review it.

Thanks,
Zhichao

-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Gao, 
Zhichao
Sent: Monday, July 22, 2019 2:58 PM
To: devel@edk2.groups.io
Cc: Carsey, Jaben ; Ni, Ray ; Oleksiy 

Subject: [edk2-devel] [PATCH V2] ShellPkg/Pci.c: Update supported link speed to 
PCI4.0

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

Refer PCI express base specification Reversion 4.0, Version 1.0, Table 7-32, 
Supported Link Speeds Vector bit 3 indicate the speed 16 GT/s. Add it to shell 
command 'pci ...'.

Change the MaxLinkSpeed other values' result from 'Unknown'
to 'Reserved'.

Cc: Jaben Carsey 
Cc: Ray Ni 
Cc: Oleksiy 
Signed-off-by: Zhichao Gao 
---

V2:
Update the copyright.

And remind that this patch isn't update the code to match PCI 5.0. I didn't 
find edk repo update the related code to PCI 5.0. Please let me know if there 
is a requirement to update this code to PCI 5.0.

 ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
index ba9caa7743..b58ce3c2f0 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
@@ -1,7 +1,7 @@
 /** @file
   Main file for Pci shell Debug1 function.
 
-  Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2005 - 2019, Intel Corporation. All rights 
+ reserved.
   (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP
   SPDX-License-Identifier: BSD-2-Clause-Patent @@ -4515,8 +4515,11 @@ 
ExplainPcieLinkCap (
 case 3:
   MaxLinkSpeed = L"8.0 GT/s";
   break;
+case 4:
+  MaxLinkSpeed = L"16.0 GT/s";
+  break;
 default:
-  MaxLinkSpeed = L"Unknown";
+  MaxLinkSpeed = L"Reserved";
   break;
   }
   ShellPrintEx (-1, -1,
@@ -4672,6 +4675,9 @@ ExplainPcieLinkStatus (
 case 3:
   CurLinkSpeed = L"8.0 GT/s";
   break;
+case 4:
+  CurLinkSpeed = L"16.0 GT/s";
+  break;
 default:
   CurLinkSpeed = L"Reserved";
   break;
--
2.21.0.windows.1





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

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



FW: [edk2-devel] [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib: Make array big enough

2019-07-26 Thread Gao, Zhichao
Ping. Please help to review it.

Thanks,
Zhichao

-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Gao, 
Zhichao
Sent: Monday, July 22, 2019 2:58 PM
To: devel@edk2.groups.io
Cc: Carsey, Jaben ; Ni, Ray ; Oleksiy 

Subject: [edk2-devel] [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib: Make 
array big enough

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

The two CHAR16 array ChildCountStr and DeviceCountStr is defined to hold the 
decimal string data of UINTN. The max of UINTN is 18446744073709551615 and it 
contain 20 characters.
So make their size to 21 CHAR16s to hold the string data with a null-terminate.
UnicodeValueToStringS regard the value input as INT64, and
21 CHARs is enough to hold the lowest value with minus '-'.
Although the value shouldn't be such big.

Cc: Jaben Carsey 
Cc: Ray Ni 
Cc: Oleksiy 
Signed-off-by: Zhichao Gao 
---

V2:
Update the copyright.

 ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c 
b/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c
index 794b737bd1..27cd278cf0 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c
@@ -2,7 +2,7 @@
   Main file for Drivers shell Driver1 function.
 
   (C) Copyright 2012-2015 Hewlett-Packard Development Company, L.P.
-  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2019, Intel Corporation. All rights 
+ reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -263,8 +263,8 @@ ShellCommandRunDrivers (
   EFI_HANDLE  *HandleWalker;
   UINTN   ChildCount;
   UINTN   DeviceCount;
-  CHAR16  ChildCountStr[3];
-  CHAR16  DeviceCountStr[3];
+  CHAR16  ChildCountStr[21];
+  CHAR16  DeviceCountStr[21];
   CHAR16  *Temp2;
   CONST CHAR16*FullDriverName;
   CHAR16  *TruncatedDriverName;
--
2.21.0.windows.1





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

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



FW: [edk2-devel] [PATCH V2] ShellPkg/UefiHandleParsingLib: Fix incorrect reallocate pool

2019-07-26 Thread Gao, Zhichao
Ping. Please help to review it.

Thanks,
Zhichao

-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Gao, 
Zhichao
Sent: Monday, July 22, 2019 2:58 PM
To: devel@edk2.groups.io
Cc: Carsey, Jaben ; Ni, Ray ; Andrew 
Fish 
Subject: [edk2-devel] [PATCH V2] ShellPkg/UefiHandleParsingLib: Fix incorrect 
reallocate pool

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

For function InsertNewGuidNameMapping, it rellocate the mGuidList with new size
"mGuidListCount+1 * sizeof(GUID_INFO_BLOCK)". That isn't its purpose and would 
cause a overflow operation in "mGuidList[mGuidListCount - 1].xxx = xxx". Its 
purpose is to increase 1 block size of mGuidList. Change it to "(mGuidListCount 
+ 1) * sizeof (GUID_INFO_BLOCK)".

Adjust the coding style of this function.

Cc: Jaben Carsey 
Cc: Ray Ni 
Cc: Andrew Fish 
Signed-off-by: Zhichao Gao 
---

V2:
Update the copyright.

 .../UefiHandleParsingLib/UefiHandleParsingLib.c| 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c 
b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index f179c41092..43c19b9a91 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -1,7 +1,7 @@
 /** @file
   Provides interface to advanced shell functionality for parsing both handle 
and protocol database.
 
-  Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2019, Intel Corporation. All rights 
+ reserved.
   (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
   (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
   SPDX-License-Identifier: BSD-2-Clause-Patent @@ -2462,17 +2462,21 @@ 
InsertNewGuidNameMapping(
   IN CONST DUMP_PROTOCOL_INFO DumpFunc OPTIONAL
   )
 {
-  ASSERT(Guid   != NULL);
-  ASSERT(NameID != 0);
+  ASSERT (Guid   != NULL);
+  ASSERT (NameID != 0);
 
-  mGuidList = ReallocatePool(mGuidListCount * sizeof(GUID_INFO_BLOCK), 
mGuidListCount+1 * sizeof(GUID_INFO_BLOCK), mGuidList);
+  mGuidList = ReallocatePool (
+mGuidListCount * sizeof (GUID_INFO_BLOCK),
+(mGuidListCount + 1) * sizeof (GUID_INFO_BLOCK),
+mGuidList
+);
   if (mGuidList == NULL) {
 mGuidListCount = 0;
 return (EFI_OUT_OF_RESOURCES);
   }
   mGuidListCount++;
 
-  mGuidList[mGuidListCount - 1].GuidId   = AllocateCopyPool(sizeof(EFI_GUID), 
Guid);
+  mGuidList[mGuidListCount - 1].GuidId   = AllocateCopyPool (sizeof 
(EFI_GUID), Guid);
   mGuidList[mGuidListCount - 1].StringId = NameID;
   mGuidList[mGuidListCount - 1].DumpInfo = DumpFunc;
 
--
2.21.0.windows.1





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

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



Re: [edk2-devel] [PATCH edk2-platforms 2/4] Vlv2TbltDevicePkg: Add the missing BootManagerMenuApp

2019-07-26 Thread Gary Lin
On Fri, Jul 26, 2019 at 07:06:39AM +,  Gary Lin  wrote:
> BootManagerMenuApp wasn't imported so the Boot Device Menu never showed
> correctly.
> 
I should add more details for the fix below.

> Also fix the description of UiApp.
In the "Rule.Common.UEFI_APPLICATION.UI" section, it intends to change
the description of UiApp to "Enter Setup" to make the boot option
self-explaining in the Boot Menu. But this didn't happen since the rule
wasn't assigned to UiApp correctly, so the Boot Menu only showed "UiApp"
which is not understandable to users. This patch adds "RuleOverride = UI"
to UiApp.inf to change the description.


I'll add the above paragraph in case there is a v2 for this series.

Gary Lin

> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Michael D Kinney 
> Signed-off-by: Gary Lin 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf | 3 ++-
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 +
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 1 +
>  3 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf 
> b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
> index 48058b663a..55a309444f 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
> @@ -417,7 +417,8 @@ INF UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf
>  INF MdeModulePkg/Universal/Metronome/Metronome.inf
>  INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
>  INF MdeModulePkg/Logo/LogoDxe.inf
> -INF MdeModulePkg/Application/UiApp/UiApp.inf
> +INF RuleOverride = UI MdeModulePkg/Application/UiApp/UiApp.inf
> +INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
>  INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
>  INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
>  INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
> b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> index 30b47d8f32..463b952e65 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> @@ -924,6 +924,7 @@
>NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
>
> NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
>}
> +  MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
>
>MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
>MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
> b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> index 57316d487b..ee18b45c97 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> @@ -939,6 +939,7 @@
>NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
>
> NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
>}
> +  MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
>
>MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
>MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
> -- 
> 2.22.0
> 
> 
> 
> 
> 

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

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



[edk2-devel] [PATCH edk2-platforms 1/4] Vlv2TbltDevicePkg: Adjust the device priority

2019-07-26 Thread Gary Lin
In BootOptionPriority(), the higher number implies the lower boot
priority. This commit lowers the priority of network booting and raises
the priority of the local devices. Besides, SD and EMMC are also added
to BootOptionPriority() since Minnowboard comes with a SD card slot.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 
Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
 | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
 
b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
index 84aa097d58..a73d54a97d 100644
--- 
a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
+++ 
b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
@@ -499,11 +499,10 @@ BootOptionType (
   Returns the priority number.

   OptionType EFI

   

-  PXE 2

-  DVD 4

-  USB 6

-  NVME7

-  HDD 8

+  HDD 2

+  USB 4

+  SATA/NVME/SD6

+  PXE/HTTP8

   EFI Shell   9

   Others  100

 

@@ -518,21 +517,22 @@ BootOptionPriority (
 // EFI boot options

 //

 switch (BootOptionType (BootOption->FilePath)) {

-case MSG_MAC_ADDR_DP:

-case MSG_VLAN_DP:

-case MSG_IPv4_DP:

-case MSG_IPv6_DP:

-  return 2;

+case MSG_USB_DP:

+  return 4;

 

 case MSG_SATA_DP:

 case MSG_ATAPI_DP:

 case MSG_UFS_DP:

 case MSG_NVME_NAMESPACE_DP:

-  return 4;

-

-case MSG_USB_DP:

+case MSG_SD_DP:

+case MSG_EMMC_DP:

   return 6;

 

+case MSG_MAC_ADDR_DP:

+case MSG_VLAN_DP:

+case MSG_IPv4_DP:

+case MSG_IPv6_DP:

+  return 8;

 }

 if (StrCmp (BootOption->Description, INTERNAL_UEFI_SHELL_NAME) == 0) {

   if (PcdGetBool (PcdBootToShellOnly)) {

@@ -541,7 +541,7 @@ BootOptionPriority (
   return 9;

 }

 if (StrCmp (BootOption->Description, UEFI_HARD_DRIVE_NAME) == 0) {

-  return 8;

+  return 2;

 }

 return 100;

 }

-- 
2.22.0


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

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



[edk2-devel] [PATCH edk2-platforms 4/4] Vlv2TbltDevicePkg: Clean up the unused variables and function

2019-07-26 Thread Gary Lin
In PlatformBootOption.c:

* mContinueBoot and mBootMenuBoot were assigned as "!EnterSetup" before
  being used. However, EnterSetup is always "FALSE", so it's meaningless
  to keep those variables.

* mPxeBoot is defined but never used.

* DetectKeypressCallback() is never used. So we can remove it altogether
  with mHotKeypressed and HotKeyEvent.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 
Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
 | 57 
 1 file changed, 11 insertions(+), 46 deletions(-)

diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
 
b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
index a73d54a97d..539127e93f 100644
--- 
a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
+++ 
b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
@@ -10,12 +10,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 

 #include 

 

-BOOLEANmContinueBoot  = FALSE;

-BOOLEANmBootMenuBoot  = FALSE;

-BOOLEANmPxeBoot   = FALSE;

-BOOLEANmHotKeypressed = FALSE;

-EFI_EVENT  HotKeyEvent= NULL;

-

 UINTN  mBootMenuOptionNumber;

 

 EFI_DEVICE_PATH_PROTOCOL *

@@ -396,21 +390,6 @@ RegisterBootOptionHotkey (
   }

 }

 

-EFI_STATUS

-EFIAPI

-DetectKeypressCallback (

-  IN EFI_KEY_DATA *KeyData

-)

-{

-  mHotKeypressed = TRUE;

-

-  if (HotKeyEvent != NULL) {

-gBS->SignalEvent(HotKeyEvent);

-  }

-

-  return EFI_SUCCESS;

-}

-

 /**

   This function is called after all the boot options are enumerated and 
ordered properly.

 **/

@@ -419,46 +398,32 @@ RegisterStaticHotkey (
   VOID

   )

 {

-

   EFI_INPUT_KEY Enter;

-  EFI_KEY_DATA  F2;

-  EFI_KEY_DATA  F7;

-  BOOLEAN   EnterSetup;

+  EFI_INPUT_KEY F2;

+  EFI_INPUT_KEY F7;

   EFI_STATUSStatus;

   EFI_BOOT_MANAGER_LOAD_OPTION  BootOption;

 

-  EnterSetup = FALSE;

-

   //

   // [Enter]

   //

-  mContinueBoot = !EnterSetup;

-  if (mContinueBoot) {

-Enter.ScanCode= SCAN_NULL;

-Enter.UnicodeChar = CHAR_CARRIAGE_RETURN;

-EfiBootManagerRegisterContinueKeyOption (0, , NULL);

-  }

-

+  Enter.ScanCode= SCAN_NULL;

+  Enter.UnicodeChar = CHAR_CARRIAGE_RETURN;

+  EfiBootManagerRegisterContinueKeyOption (0, , NULL);

 

   //

   // [F2]/[F7]

   //

-  F2.Key.ScanCode= SCAN_F2;

-  F2.Key.UnicodeChar = CHAR_NULL;

-  F2.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID;

-  F2.KeyState.KeyToggleState = 0;

+  F2.ScanCode= SCAN_F2;

+  F2.UnicodeChar = CHAR_NULL;

   Status = EfiBootManagerGetBootManagerMenu ();

   ASSERT_EFI_ERROR (Status);

-  RegisterBootOptionHotkey ((UINT16) BootOption.OptionNumber, , TRUE);

+  RegisterBootOptionHotkey ((UINT16) BootOption.OptionNumber, , TRUE);

   EfiBootManagerFreeLoadOption ();

 

-  F7.Key.ScanCode= SCAN_F7;

-  F7.Key.UnicodeChar = CHAR_NULL;

-  F7.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID;

-  F7.KeyState.KeyToggleState = 0;

-  mBootMenuBoot  = !EnterSetup;

-  RegisterBootOptionHotkey ((UINT16) mBootMenuOptionNumber, , 
mBootMenuBoot);

-

+  F7.ScanCode= SCAN_F7;

+  F7.UnicodeChar = CHAR_NULL;

+  RegisterBootOptionHotkey ((UINT16) mBootMenuOptionNumber, , TRUE);

 }

 

 UINT8

-- 
2.22.0


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

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



[edk2-devel] [PATCH edk2-platforms 3/4] Vlv2TbltDevicePkg: Only sort boot options when necessary

2019-07-26 Thread Gary Lin
* PlatformBootManagerAfterConsole() always sorted the boot options at
  the end, and this would invalidate the BootOrder created by the user.
  Besides, the current implementation would sort the boot options twice,
  and this is not efficient. We should just sort the boot options once
  at the end of the function only for the very first boot.

* Update the string in IsNeedSortBootOption() to match the descriptions
  of BootManagerMenuApp.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 
Signed-off-by: Gary Lin 
---
 
Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/BdsPlatform.c
 | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/BdsPlatform.c
 
b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/BdsPlatform.c
index 7fbbf281c6..a5423013a5 100644
--- 
a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/BdsPlatform.c
+++ 
b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/BdsPlatform.c
@@ -1299,7 +1299,7 @@ IsNeedSortBootOption (
   //

   if ((BootOptionCount > 1) &&

   (((StrnCmp (BootOptions->Description, L"Enter Setup", StrLen (L"Enter 
Setup"))) == 0) ||

-   ((StrnCmp (BootOptions->Description, L"BootManagerMenuApp", StrLen 
(L"BootManagerMenuApp"))) == 0))) {

+   ((StrnCmp (BootOptions->Description, L"Boot Device List", StrLen 
(L"Boot Device List"))) == 0))) {

 return TRUE;

   }

 

@@ -1374,9 +1374,6 @@ PlatformBootManagerAfterConsole (
 //

 EfiBootManagerRefreshAllBootOption ();

 

-if (IsNeedSortBootOption()) {

-  EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, 
CompareBootOption);

-}

 //

 // PXE boot option may appear after boot option enumeration

 //

@@ -1400,7 +1397,9 @@ PlatformBootManagerAfterConsole (
   Print (L"Press F7 for BootMenu!\n");

 

   EfiBootManagerRefreshAllBootOption ();

-  EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, CompareBootOption);

+  if (IsNeedSortBootOption()) {

+EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, 
CompareBootOption);

+  }

 }

 

 /**

-- 
2.22.0


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

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



[edk2-devel] [PATCH edk2-platforms 2/4] Vlv2TbltDevicePkg: Add the missing BootManagerMenuApp

2019-07-26 Thread Gary Lin
BootManagerMenuApp wasn't imported so the Boot Device Menu never showed
correctly.

Also fix the description of UiApp.

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

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
index 48058b663a..55a309444f 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -417,7 +417,8 @@ INF UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf
 INF MdeModulePkg/Universal/Metronome/Metronome.inf

 INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf

 INF MdeModulePkg/Logo/LogoDxe.inf

-INF MdeModulePkg/Application/UiApp/UiApp.inf

+INF RuleOverride = UI MdeModulePkg/Application/UiApp/UiApp.inf

+INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf

 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf

 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf

 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 30b47d8f32..463b952e65 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -924,6 +924,7 @@
   NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf

   
NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf

   }

+  MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf

 

   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf

   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 57316d487b..ee18b45c97 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -939,6 +939,7 @@
   NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf

   
NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf

   }

+  MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf

 

   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf

   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf

-- 
2.22.0


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

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



[edk2-devel] [PATCH edk2-platforms 0/4] Fix the boot order and the boot menu

2019-07-26 Thread Gary Lin
After switching to MdeModulePkg BdsDxe, the boot option created by OS
was always put at the end of BootOrder after reboot. Besides, the PXE
boot options were always the first boot options.

This series fixes the priority of boot options and stops sorting the
boot options after the first boot. The missing BootManagerMenuApp is
also added back.

The last patch cleans up PlatformBootOption.c to remove the unused
variables and function.

The patches are also available in my github branch:
https://github.com/lcp/edk2-platforms/tree/fix-minnowboard-bds

Gary Lin (4):
  Vlv2TbltDevicePkg: Adjust the device priority
  Vlv2TbltDevicePkg: Add the missing BootManagerMenuApp
  Vlv2TbltDevicePkg: Only sort boot options when necessary
  Vlv2TbltDevicePkg: Clean up the unused variables and function

 
Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/BdsPlatform.c
|  9 +--
 
Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/PlatformBootOption.c
 | 85 ++--
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf   
 |  3 +-
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   
 |  1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
 |  1 +
 5 files changed, 33 insertions(+), 66 deletions(-)

-- 
2.22.0


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

View/Reply Online (#1): https://edk2.groups.io/g/devel/message/1
Mute This Topic: https://groups.io/mt/32606855/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] BaseTools:Updata the output encoding of the Popen function

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

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Fan,
>ZhijuX
>Sent: Thursday, July 25, 2019 11:03 AM
>To: devel@edk2.groups.io
>Cc: Feng, Bob C ; Gao, Liming
>; Fan, ZhijuX 
>Subject: [edk2-devel] [PATCH V2] BaseTools:Updata the output encoding of
>the Popen function
>
>From: Bob Feng 
>
>BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2015
>
>Not all output works in utf-8, so change the encoding to
>the default
>
>This patch is going to fix that issue.
>
>Cc: Bob Feng 
>Cc: Liming Gao 
>Signed-off-by: Zhiju.Fan 
>---
> BaseTools/Source/Python/Common/Misc.py  | 2 +-
> BaseTools/Source/Python/Common/VpdInfoFile.py   | 2 +-
> BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py  | 2 +-
> .../Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py| 6
>+++---
> BaseTools/Source/Python/Workspace/DscBuildData.py   | 2 +-
> 5 files changed, 7 insertions(+), 7 deletions(-)
>
>diff --git a/BaseTools/Source/Python/Common/Misc.py
>b/BaseTools/Source/Python/Common/Misc.py
>index 9a63463913..36bd2fe364 100644
>--- a/BaseTools/Source/Python/Common/Misc.py
>+++ b/BaseTools/Source/Python/Common/Misc.py
>@@ -1092,7 +1092,7 @@ def ParseFieldValue (Value):
> p.stderr.close()
> if err:
> raise BadExpression("DevicePath: %s" % str(err))
>-out = out.decode(encoding='utf-8', errors='ignore')
>+out = out.decode()
> Size = len(out.split())
> out = ','.join(out.split())
> return '{' + out + '}', Size
>diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py
>b/BaseTools/Source/Python/Common/VpdInfoFile.py
>index bc69a9010d..4249b9f899 100644
>--- a/BaseTools/Source/Python/Common/VpdInfoFile.py
>+++ b/BaseTools/Source/Python/Common/VpdInfoFile.py
>@@ -243,7 +243,7 @@ def CallExtenalBPDGTool(ToolPath, VpdFileName):
> except Exception as X:
> EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE,
>ExtraData=str(X))
> (out, error) = PopenObject.communicate()
>-print(out.decode(encoding='utf-8', errors='ignore'))
>+print(out.decode())
> while PopenObject.returncode is None :
> PopenObject.wait()
>
>diff --git a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py
>b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py
>index 5630df55df..5d4c3a8599 100644
>--- a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py
>+++ b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py
>@@ -116,7 +116,7 @@ if __name__ == '__main__':
>   if Process.returncode != 0:
> print('ERROR: Open SSL command not available.  Please verify PATH or set
>OPENSSL_PATH')
> sys.exit(Process.returncode)
>-  print(Version[0].decode(encoding='utf-8', errors='ignore'))
>+  print(Version[0].decode())
>
>   #
>   # Read input file into a buffer and save input filename
>diff --git
>a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKey
>s.py
>b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKey
>s.py
>index f9aed2bf86..6c9b8c464e 100644
>---
>a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKey
>s.py
>+++
>b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKey
>s.py
>@@ -78,7 +78,7 @@ if __name__ == '__main__':
>   if Process.returncode != 0:
> print('ERROR: Open SSL command not available.  Please verify PATH or set
>OPENSSL_PATH')
> sys.exit(Process.returncode)
>-  print(Version[0].decode(encoding='utf-8', errors='ignore'))
>+  print(Version[0].decode())
>
>   args.PemFileName = []
>
>@@ -119,7 +119,7 @@ if __name__ == '__main__':
> # Extract public key from private key into STDOUT
> #
> Process = subprocess.Popen('%s rsa -in %s -modulus -noout' %
>(OpenSslCommand, Item), stdout=subprocess.PIPE, stderr=subprocess.PIPE,
>shell=True)
>-PublicKeyHexString = Process.communicate()[0].decode(encoding='utf-8',
>errors='ignore').split(b'=')[1].strip()
>+PublicKeyHexString =
>Process.communicate()[0].decode().split(b'=')[1].strip()
> if Process.returncode != 0:
>   print('ERROR: Unable to extract public key from private key')
>   sys.exit(Process.returncode)
>@@ -132,7 +132,7 @@ if __name__ == '__main__':
> #
> Process = subprocess.Popen('%s dgst -sha256 -binary' %
>(OpenSslCommand), stdin=subprocess.PIPE, stdout=subprocess.PIPE,
>stderr=subprocess.PIPE, shell=True)
> Process.stdin.write (PublicKey)
>-PublicKeyHash = PublicKeyHash +
>Process.communicate()[0].decode(encoding='utf-8', errors='ignore')
>+PublicKeyHash = PublicKeyHash + Process.communicate()[0].decode()
> if Process.returncode != 0:
>   print('ERROR: Unable to extract SHA 256 hash of public key')
>   sys.exit(Process.returncode)
>diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py
>b/BaseTools/Source/Python/Workspace/DscBuildData.py
>index 985f877525..620e48fa7f 100644
>--- 

Re: [edk2-devel] [PATCH V2] BaseTools: replace the chinese quotation mark with unicode "

2019-07-26 Thread Liming Gao


>-Original Message-
>From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com]
>Sent: Thursday, July 25, 2019 7:12 PM
>To: devel@edk2.groups.io; Fan, ZhijuX 
>Cc: Sean Brogan ; Feng, Bob C ;
>Gao, Liming 
>Subject: Re: [edk2-devel] [PATCH V2] BaseTools: replace the chinese
>quotation mark with unicode "
>
>On 7/25/19 5:00 AM, Fan, ZhijuX wrote:
>> From: Sean Brogan 
>>
>> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2013
>>
>> chinese quotation mark are used in the file
>> This patch is going to fix that issue.
>>
>> Cc: Bob Feng 
>> Cc: Liming Gao 
>> Signed-off-by: Zhiju.Fan 
>> ---
>>  BaseTools/Source/Python/Pkcs7Sign/Readme.md | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/BaseTools/Source/Python/Pkcs7Sign/Readme.md
>b/BaseTools/Source/Python/Pkcs7Sign/Readme.md
>> index 5315b7fca4..a7b9caf52c 100644
>> --- a/BaseTools/Source/Python/Pkcs7Sign/Readme.md
>> +++ b/BaseTools/Source/Python/Pkcs7Sign/Readme.md
>> @@ -10,7 +10,7 @@ NOTE: Below steps are required for Windows. Linux
>may already have the OPENSSL e
>>  set OPENSSL_HOME=c:\home\openssl\openssl-[version]
>>  set OPENSSL_CONF=%OPENSSL_HOME%\apps\openssl.cnf
>>
>> -When a user uses OpenSSL (req or ca command) to generate the
>certificates, OpenSSL will use the openssl.cnf file as the configuration data
>(can use “-config path/to/openssl.cnf” to describe the specific config file).
>> +When a user uses OpenSSL (req or ca command) to generate the
>certificates, OpenSSL will use the openssl.cnf file as the configuration data
>(can use "-config path/to/openssl.cnf" to describe the specific config file).
>>
>>  The user need check the openssl.cnf file, to find your CA path setting, e.g.
>check if the path exists in [ CA_default ] section.
>>
>
>I wonder, we could add a BaseTool script as pre-commit hook to check
>this kind of easy typos...
>
>Reviewed-by: Philippe Mathieu-Daude 

Reviewed-by: Liming Gao 

Thanks
Liming

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

View/Reply Online (#44439): https://edk2.groups.io/g/devel/message/44439
Mute This Topic: https://groups.io/mt/32594579/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] BaseTools:Add extra debugging message

2019-07-26 Thread Liming Gao

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Philippe Mathieu-Daudé
>Sent: Thursday, July 25, 2019 7:04 PM
>To: devel@edk2.groups.io; Fan, ZhijuX 
>Cc: Max Knutsen ; Feng, Bob C
>; Gao, Liming 
>Subject: Re: [edk2-devel] [PATCH V2] BaseTools:Add extra debugging
>message
>
>Nit in subject, "BaseTools:Add extra debugging message"

Title can remove extra .

>
>On 7/25/19 5:02 AM, Fan, ZhijuX wrote:
>> From: Max Knutsen 
>>
>> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2014
>>
>> Add extra debugging to improve error identification.
>> Error while processing file if the file is read incorrectly
>>
>> This patch is going to fix that issue.
>>
>> Cc: Bob Feng 
>> Cc: Liming Gao 
>> Signed-off-by: Zhiju.Fan 
>> ---
>>  BaseTools/Source/Python/AutoGen/StrGather.py | 16 ++--
>>  BaseTools/Source/Python/Trim/Trim.py |  4 +++-
>>  2 files changed, 13 insertions(+), 7 deletions(-)
>>
>> diff --git a/BaseTools/Source/Python/AutoGen/StrGather.py
>b/BaseTools/Source/Python/AutoGen/StrGather.py
>> index 2e4671a433..eed30388be 100644
>> --- a/BaseTools/Source/Python/AutoGen/StrGather.py
>> +++ b/BaseTools/Source/Python/AutoGen/StrGather.py
>> @@ -526,12 +526,16 @@ def SearchString(UniObjectClass, FileList,
>IsCompatibleMode):
>>  return UniObjectClass
>>
>>  for File in FileList:
>> -if os.path.isfile(File):
>> -Lines = open(File, 'r')
>> -for Line in Lines:
>> -for StrName in STRING_TOKEN.findall(Line):
>> -EdkLogger.debug(EdkLogger.DEBUG_5, "Found string 
>> identifier: "
>+ StrName)
>> -UniObjectClass.SetStringReferenced(StrName)
>> +try:
>> +if os.path.isfile(File):
>> +Lines = open(File, 'r')
>> +for Line in Lines:
>> +for StrName in STRING_TOKEN.findall(Line):
>> +EdkLogger.debug(EdkLogger.DEBUG_5, "Found string 
>> identifier:
>" + StrName)
>> +UniObjectClass.SetStringReferenced(StrName)
>> +except:
>> +EdkLogger.error("UnicodeStringGather", AUTOGEN_ERROR,
>"SearchString: Error while processing file", File=File, RaiseError=False)
>> +raise
>>
>>  UniObjectClass.ReToken()
>>
>> diff --git a/BaseTools/Source/Python/Trim/Trim.py
>b/BaseTools/Source/Python/Trim/Trim.py
>> index 43119bd7ff..8767b67f7e 100644
>> --- a/BaseTools/Source/Python/Trim/Trim.py
>> +++ b/BaseTools/Source/Python/Trim/Trim.py
>> @@ -73,8 +73,10 @@ def TrimPreprocessedFile(Source, Target, ConvertHex,
>TrimLong):
>>  try:
>>  with open(Source, "r") as File:
>>  Lines = File.readlines()
>> -except:
>> +except IOError:
>>  EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)
>> +expect:
>> +EdkLogger.error("Trim", AUTOGEN_ERROR, "TrimPreprocessedFile:
>Error while processing file", File=Source)
>>
>>  PreprocessedFile = ""
>>  InjectedFile = ""
>>
>
>Reviewed-by: Philippe Mathieu-Daude 
>
Reviewed-by: Liming Gao 

>


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

View/Reply Online (#44438): https://edk2.groups.io/g/devel/message/44438
Mute This Topic: https://groups.io/mt/32594584/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] BaseTools:Added arch output to build report

2019-07-26 Thread Liming Gao


>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Philippe Mathieu-Daudé
>Sent: Thursday, July 25, 2019 7:02 PM
>To: devel@edk2.groups.io; Fan, ZhijuX 
>Cc: Matthew Carlson ; Feng, Bob C
>; Gao, Liming 
>Subject: Re: [edk2-devel] [PATCH V2] BaseTools:Added arch output to build
>report
>
>Hi Fan,
>
>On 7/25/19 5:04 AM, Fan, ZhijuX wrote:
>> From: Matthew Carlson 
>>
>> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2016
>>
>> Added arch output to build report so it's easy to tell
>> which arch is being generated. Useful when multiple versions
>> of a single module is being emitted for multiple archs.
>>
>> This patch is going to Added arch output
>
>Your patch seems fine, but I don't understand what you mean in the
>previous sentence, can you clarify please?
>

Like MdeModulePkg.dsc, it will build the same driver for the different ARCHs. 

Thanks
Liming
>>
>> Cc: Bob Feng 
>> Cc: Liming Gao 
>> Signed-off-by: Zhiju.Fan 
>> ---
>>  BaseTools/Source/Python/build/BuildReport.py | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/BaseTools/Source/Python/build/BuildReport.py
>b/BaseTools/Source/Python/build/BuildReport.py
>> index a3eb3b2383..b4189240e1 100644
>> --- a/BaseTools/Source/Python/build/BuildReport.py
>> +++ b/BaseTools/Source/Python/build/BuildReport.py
>> @@ -558,6 +558,7 @@ class ModuleReport(object):
>>  def __init__(self, M, ReportType):
>>  self.ModuleName = M.Module.BaseName
>>  self.ModuleInfPath = M.MetaFile.File
>> +self.ModuleArch = M.Arch
>>  self.FileGuid = M.Guid
>>  self.Size = 0
>>  self.BuildTimeStamp = None
>> @@ -668,6 +669,7 @@ class ModuleReport(object):
>>
>>  FileWrite(File, "Module Summary")
>>  FileWrite(File, "Module Name:  %s" % self.ModuleName)
>> +FileWrite(File, "Module Arch:  %s" % self.ModuleArch)
>>  FileWrite(File, "Module INF Path:  %s" % self.ModuleInfPath)
>>  FileWrite(File, "File GUID:%s" % self.FileGuid)
>>  if self.Size:
>>
>
>


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

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



Re: [edk2-devel] [PATCH] Build Spec:Add Module Arch to BuildRebuild Module Section

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

>-Original Message-
>From: Fan, ZhijuX
>Sent: Friday, July 26, 2019 10:30 AM
>To: devel@edk2.groups.io
>Cc: Gao, Liming ; Feng, Bob C 
>Subject: [PATCH] Build Spec:Add Module Arch to BuildRebuild Module Section
>
>BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2022
>
>Added arch output to build report so it's easy to tell
>which arch is being generated. Code change
>https://bugzilla.tianocore.org/show_bug.cgi?id=2016
>will be done.The spec change is also required.
>
>Cc: Bob Feng 
>Cc: Liming Gao 
>Signed-off-by: Zhiju.Fan 
>---
> 13_build_reports/138_module_section.md | 9 ++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/13_build_reports/138_module_section.md
>b/13_build_reports/138_module_section.md
>index d457c24..6f7edc5 100644
>--- a/13_build_reports/138_module_section.md
>+++ b/13_build_reports/138_module_section.md
>@@ -38,11 +38,12 @@ sections are listed according to their DSC position.
>
> ### 13.8.1 Module Section Summary
>
>-This sub-section lists the module basic information: Module name, INF file
>-path, File GUID, Size, hash value, module build time stamp, module build
>time
>-and driver type.
>+This sub-section lists the module basic information: Module name, Module
>Arch,
>+INF file path, File GUID, Size, hash value, module build time stamp, module
>+build time and driver type.
>
> * Module Name : %`BASE_NAME` in INF `[Defines]` section%
>+* Module Arch : %Architecture of current module%
> * Module INF Path : %Path of Module INF file%
> * File GUID : %`FILE_GUID` in INF `[Defines]` section%
> * Size : %Module EFI image size%
>@@ -70,6 +71,7 @@ Volume 3 of the PI Specification (Table 3 Defined File
>Types).
> >==
><
> Module Summary
> Module Name:SmbiosDxe
>+Module Arch:X64
> Module INF Path:MdeModule\Universal\SmbiosDxe\SmbiosDxe.inf
> File GUID:  F9D88642-0737-49BC-81B5-6889CD57D9EA
> Size:   0x7000 (28.00K)
>@@ -88,6 +90,7 @@ Driver Type:0x7 (DRIVER)
> >==
><
> Module Summary
> Module Name:EbcDxe
>+Module Arch:X64
> Module INF Path:MdeModule\Universal\EbcDxe\EbcDxe.inf
> File GUID:  13AC6DD0-73D0-11D4-B06B-00AA00BD6DE7
> Size:   0x9000 (36.00K)
>--
>2.14.1.windows.1


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

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