Re: [edk2-devel] [PATCH] IntelFsp2WrapperPkg: Make GetFspm(s)UpdDataAddress reusable

2022-02-06 Thread Chiu, Chasel


Thanks for sending this patch, Ted!
Our direction is to always use PcdFspmUpdDataAddress64 and 
PcdFspsUpdDataAddress64 from platform side no matter building with IA32 or X64.
This will help retirement of old PcdFspmUpdDataAddress and 
PcdFspsUpdDataAddress in the future.

Please help to check and let us know if any concern.

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Kuo, Ted
> Sent: Friday, February 4, 2022 5:39 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH] IntelFsp2WrapperPkg: Make
> GetFspm(s)UpdDataAddress reusable
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3821
> Moved GetFspmUpdDataAddress and GetFspsUpdDataAddress to
> FspWrapperApiLib so that they can be consumed by other drivers.
> 
> Signed-off-by: Ted Kuo 
> ---
>  .../FspmWrapperPeim/FspmWrapperPeim.c  | 18 ---
>  .../FspmWrapperPeim/FspmWrapperPeim.inf|  2 --
>  .../FspsWrapperPeim/FspsWrapperPeim.c  | 18 ---
>  .../FspsWrapperPeim/FspsWrapperPeim.inf|  2 --
>  .../Include/Library/FspWrapperApiLib.h | 22 +
>  .../BaseFspWrapperApiLib/BaseFspWrapperApiLib.inf  |  5 +++
>  .../BaseFspWrapperApiLib/FspWrapperApiLib.c| 36
> ++
>  7 files changed, 63 insertions(+), 40 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> index b0c6b2f8a6..d119f0b710 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> @@ -38,24 +38,6 @@
> 
>  extern EFI_GUID  gFspHobGuid;
> 
> -/**
> -  Get the FSP M UPD Data address
> -
> -  @return FSP-M UPD Data Address
> -**/
> -
> -UINTN
> -GetFspmUpdDataAddress (
> -  VOID
> -  )
> -{
> -  if (PcdGet64 (PcdFspmUpdDataAddress64) != 0) {
> -return (UINTN) PcdGet64 (PcdFspmUpdDataAddress64);
> -  } else {
> -return (UINTN) PcdGet32 (PcdFspmUpdDataAddress);
> -  }
> -}
> -
>  /**
>Call FspMemoryInit API.
> 
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> index 5d0e021401..95317fb70d 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> @@ -56,11 +56,9 @@
> 
>  [Pcd]
>gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress   ## CONSUMES
> -  gIntelFsp2WrapperTokenSpaceGuid.PcdFspmUpdDataAddress##
> CONSUMES
>gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection  ## CONSUMES
>gIntelFsp2WrapperTokenSpaceGuid.PcdFsptBaseAddress   ## CONSUMES
>gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig  ##
> CONSUMES
> -  gIntelFsp2WrapperTokenSpaceGuid.PcdFspmUpdDataAddress64  ##
> CONSUMES
> 
>  [Sources]
>FspmWrapperPeim.c
> diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> index fadadd40e6..d34de97c1b 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> @@ -181,24 +181,6 @@ FspSiliconInitDoneGetFspHobList (
>}
>  }
> 
> -/**
> -  Get the FSP S UPD Data address
> -
> -  @return FSP-S UPD Data Address
> -**/
> -
> -UINTN
> -GetFspsUpdDataAddress (
> -  VOID
> -  )
> -{
> -  if (PcdGet64 (PcdFspsUpdDataAddress64) != 0) {
> -return (UINTN) PcdGet64 (PcdFspsUpdDataAddress64);
> -  } else {
> -return (UINTN) PcdGet32 (PcdFspsUpdDataAddress);
> -  }
> -}
> -
>  /**
>This function is for FSP dispatch mode to perform post FSP-S process.
> 
> diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> index da0049a654..50d33d0e0e 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> @@ -65,10 +65,8 @@
> 
>  [Pcd]
>gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress   ## CONSUMES
> -  gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress## CONSUMES
>gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection  ## CONSUMES
>gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig  ##
> CONSUMES
> -  gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress64  ##
> CONSUMES
> 
>  [Guids]
>gFspHobGuid   ## CONSUMES ## HOB
> diff --git a/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiLib.h
> b/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiLib.h
> index d38582d3e5..4ae42ff180 100644
> --- a/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiLib.h
> +++ b/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiLib.h
> @@ -11,6 +11,28 @@
> 
>  #include 
> 
> +/**
> +  Get the FSP M UPD Data address
> +
> +  @return FSP-M UPD Data Address
> +**/
> +UINTN
> +EFIAPI
> +GetFspmUpdDataAddress (
> +  VOID
> +  );
> +
> +/**
> +  Get the FSP S

回复: [edk2-devel] [PATCH] MdeModulePkg/Frontpage: Get SMBIOS Data from table directly

2022-02-06 Thread gaoliming
Sean:
 Seemly, your case doesn't install SMBIOS protocol. Can you give the detail 
information about this usage that provides SMBIOS table without SMBIOS protocol?

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Michael
> Brown
> 发送时间: 2022年2月2日 22:18
> 收件人: Sean Rhodes ; devel@edk2.groups.io
> 主题: Re: [edk2-devel] [PATCH] MdeModulePkg/Frontpage: Get SMBIOS Data
> from table directly
> 
> On 02/02/2022 09:02, Sean Rhodes wrote:
> > Not quite sure how to implement that, are there any existing use cases
> > that I can look at?
> 
>  From the way that your patch uses SMBIOS data, I'm assuming that your
> use case involves a pre-existing SMBIOS table structure that is
> constructed by something (e.g. coreboot) before UEFI starts up, and that
> you want to extract information from this table.
> 
> If this assumption is correct, then the use case looks similar to the
> way that OvmfPkg handles a pre-existing SMBIOS table constructed by the
> hypervisor: the binary table is minimally parsed and all structures are
> handed over to UEFI via EFI_SMBIOS_PROTOCOL.Add().  This means that all
> structures from the pre-existing SMBIOS table are available to any UEFI
> SMBIOS consumers.
> 
> See, for example OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c.
> 
> HTH,
> 
> Michael
> 
> 
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86402): https://edk2.groups.io/g/devel/message/86402
Mute This Topic: https://groups.io/mt/88963238/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




回复: [edk2-devel] [PATCH 43/43] MdeModulePkg/BmBoot: skip secondary eMMC entries

2022-02-06 Thread gaoliming
Is this the generic logic for all eMMC device? If yes, can you point the
statement in public spec for eMMC entries?

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Sean Rhodes
> 发送时间: 2022年2月1日 5:01
> 收件人: devel@edk2.groups.io
> 抄送: Sean Rhodes ; Matt DeVillier
> 
> 主题: [edk2-devel] [PATCH 43/43] MdeModulePkg/BmBoot: skip secondary
> eMMC entries
> 
> Internal eMMC devices often show multiple entries, so skip
> any after the initial entry.
> 
> Signed-off-by: Matt DeVillier 
> Signed-off-by: Sean Rhodes 
> ---
>  MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 12 
>  1 file changed, 12 insertions(+)
> 
> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> index 962892d38f..e21ac2c510 100644
> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> @@ -2175,12 +2175,14 @@ BmEnumerateBootOptions (
>EFI_BLOCK_IO_PROTOCOL *BlkIo;
> 
>UINTN Removable;
> 
>UINTN Index;
> 
> +  UINTN EmmcCount;
> 
>CHAR16*Description;
> 
> 
> 
>ASSERT (BootOptionCount != NULL);
> 
> 
> 
>*BootOptionCount = 0;
> 
>BootOptions  = NULL;
> 
> +  EmmcCount= 0;
> 
> 
> 
>//
> 
>// Parse removable block io followed by fixed block io
> 
> @@ -2219,6 +2221,16 @@ BmEnumerateBootOptions (
>}
> 
> 
> 
>Description = BmGetBootDescription (Handles[Index]);
> 
> +  //
> 
> +  // Skip secondary entries for internal eMMC devices
> 
> +  //
> 
> +  if (StrCmp(Description, L"eMMC Device") == 0) {
> 
> +EmmcCount++;
> 
> +if (EmmcCount > 1) {
> 
> +  continue;
> 
> +}
> 
> +  }
> 
> +
> 
>BootOptions = ReallocatePool (
> 
>sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) *
> (*BootOptionCount),
> 
>sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) *
> (*BootOptionCount + 1),
> 
> --
> 2.32.0
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#86264): https://edk2.groups.io/g/devel/message/86264
> Mute This Topic: https://groups.io/mt/88818205/4905953
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaolim...@byosoft.com.cn]
> -=-=-=-=-=-=
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86401): https://edk2.groups.io/g/devel/message/86401
Mute This Topic: https://groups.io/mt/88963038/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




回复: [edk2-devel] [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference

2022-02-06 Thread gaoliming
PR https://github.com/tianocore/edk2/pull/2495 is created for this patch. 

 

Thanks

Liming

发件人: devel@edk2.groups.io  代表 Rebecca Cran
发送时间: 2022年2月1日 7:33
收件人: Sami Mujawar ; Christopher Jones 
; devel@edk2.groups.io
抄送: ray...@intel.com; zhichao@intel.com; nd 
主题: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName 
dereference

 

It looks like this hasn't been committed yet - I still get a crash when running 
acpiview on my Overdrive 1000 system, and see the original code is still on the 
latest master.

Could someone commit it please?

 

-- 
Rebecca Cran

 

On 12/14/21 09:08, Sami Mujawar wrote:

Hi Chris,

 

Thanks for fixing this issue.

 

Reviewed-by: Sami Mujawar   

 

Regards,

 

Sami Mujawar

 

From: Chris Jones   

Date: Tuesday, 14 December 2021 at 12:38
To: devel@edk2.groups.io    
 
Cc: ray...@intel.com     
, zhichao@intel.com    
 , rebe...@nuviainc.com 
    
, Sami Mujawar   
, nd   
Subject: [PATCH v1 1/1] ShellPkg: Fix incorrect PPTT FlagName dereference

Bugzilla: 3770 (https://bugzilla.tianocore.org/show_bug.cgi?id=3770)

The PPTT parser in AcpiView incorrectly dereferences a pointer to
FlagName when trying to log an error with the PPTT cache flags, which
can lead to random crashes and other errors.

Also fix some spacing in the error message to ensure the message is
printed cleanly.

Signed-off-by: Chris Jones   

---
 ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c | 6 
+++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
index 
8d52bb5e4811298ddc45cdaef41150f6ee7819af..53777644580e779adab4e8047ea279e1c0de14a3
 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
@@ -40,9 +40,9 @@ LogCacheFlagError (
   IncrementErrorCount ();
   Print (
 L"\nERROR: On Arm based systems, all cache properties must be"
-L"provided in the cache type structure."
-L"Missing '%s' flag.",
-*FlagName
+L" provided in the cache type structure."
+L" Missing '%s' flag.",
+FlagName
 );
 }
 
-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86400): https://edk2.groups.io/g/devel/message/86400
Mute This Topic: https://groups.io/mt/88962976/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-