Date   

Re: [PATCH v3 1/3] [edk2-platforms] Silicon/Intel/FitGen: Support multiple Startup ACM Type 2 entries in FitGen tool

Bob Feng
 

This patch series was pushed.

Thanks,
Bob

-----Original Message-----
From: Lin, Jason1 <jason1.lin@...>
Sent: Friday, July 1, 2022 11:10 PM
To: devel@edk2.groups.io
Cc: Lin, Jason1 <jason1.lin@...>; Feng, Bob C <bob.c.feng@...>; Gao, Liming <gaoliming@...>; Chen, Christine <yuwei.chen@...>; Oram, Isaac W <isaac.w.oram@...>; Chaganty, Rangasai V <rangasai.v.chaganty@...>; Chiang, Dakota <dakota.chiang@...>
Subject: [PATCH v3 1/3] [edk2-platforms] Silicon/Intel/FitGen: Support multiple Startup ACM Type 2 entries in FitGen tool

From: Jason1 Lin <jason1.lin@...>

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

Within current FitGen tool there had limitation only allow one S-ACM to generate the Type 2 entry.
This code change is used to support multiple type 2 entries up to 0x20.

Signed-off-by: Jason1 Lin <jason1.lin@...>
Cc: Bob Feng <bob.c.feng@...>
Cc: Liming Gao <gaoliming@...>
Cc: Yuwei Chen <yuwei.chen@...>
Cc: Isaac W Oram <isaac.w.oram@...>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@...>
Cc: Dakota Chiang <dakota.chiang@...>
---
Silicon/Intel/Tools/FitGen/FitGen.c | 89 +++++++++++--------- Silicon/Intel/Tools/FitGen/FitGen.h | 4 +-
2 files changed, 50 insertions(+), 43 deletions(-)

diff --git a/Silicon/Intel/Tools/FitGen/FitGen.c b/Silicon/Intel/Tools/FitGen/FitGen.c
index 4de72ea422..eac8fa8715 100644
--- a/Silicon/Intel/Tools/FitGen/FitGen.c
+++ b/Silicon/Intel/Tools/FitGen/FitGen.c
@@ -2,7 +2,7 @@
This utility is part of build process for IA32/X64 FD. It generates FIT table. -Copyright (c) 2010-2021, Intel Corporation. All rights reserved.<BR>+Copyright (c) 2010-2022, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/@@ -204,6 +204,7 @@ typedef struct {
#define MAX_BIOS_MODULE_ENTRY 0x20 #define MAX_MICROCODE_ENTRY 0x20+#define MAX_STARTUP_ACM_ENTRY 0x20 #define MAX_OPTIONAL_ENTRY 0x20 #define MAX_PORT_ENTRY 0x20 @@ -255,11 +256,12 @@ typedef struct {
UINT32 FitEntryNumber; UINT32 BiosModuleNumber; UINT32 MicrocodeNumber;+ UINT32 StartupAcmNumber; UINT32 OptionalModuleNumber; UINT32 PortModuleNumber; UINT32 GlobalVersion; UINT32 FitHeaderVersion;- FIT_TABLE_CONTEXT_ENTRY StartupAcm;+ FIT_TABLE_CONTEXT_ENTRY StartupAcm[MAX_STARTUP_ACM_ENTRY]; UINT32 StartupAcmVersion; FIT_TABLE_CONTEXT_ENTRY DiagnstAcm; UINT32 DiagnstAcmVersion;@@ -1149,14 +1151,15 @@ Returns:
Error (NULL, 0, 0, "-I Parameter incorrect, Header Type unsupported!", NULL); return 0; case FIT_TABLE_TYPE_STARTUP_ACM:- if (gFitTableContext.StartupAcm.Type != 0) {- Error (NULL, 0, 0, "-I Parameter incorrect, Duplicated StartupAcm!", NULL);+ if (gFitTableContext.StartupAcmNumber >= MAX_STARTUP_ACM_ENTRY) {+ Error (NULL, 0, 0, "-I Parameter incorrect, too many StartupAcm!", NULL); return 0; }- gFitTableContext.StartupAcm.Type = FIT_TABLE_TYPE_STARTUP_ACM;- gFitTableContext.StartupAcm.Address = (UINT32)BiosInfoStruct[BiosInfoIndex].Address;- gFitTableContext.StartupAcm.Size = (UINT32)BiosInfoStruct[BiosInfoIndex].Size;- gFitTableContext.StartupAcmVersion = BiosInfoStruct[BiosInfoIndex].Version;+ gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Type = FIT_TABLE_TYPE_STARTUP_ACM;+ gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Address = (UINT32)BiosInfoStruct[BiosInfoIndex].Address;+ gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Size = (UINT32)BiosInfoStruct[BiosInfoIndex].Size;+ gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Version = BiosInfoStruct[BiosInfoIndex].Version;+ gFitTableContext.StartupAcmNumber ++; gFitTableContext.FitEntryNumber ++; break; case FIT_TABLE_TYPE_DIAGNST_ACM:@@ -1351,16 +1354,15 @@ Returns:
// // 1. StartupAcm //- do {+ while (TRUE) { if ((Index + 1 >= argc) || ((strcmp (argv[Index], "-S") != 0) && (strcmp (argv[Index], "-s") != 0)) ) {- if (BiosInfoExist && (gFitTableContext.StartupAcm.Type == FIT_TABLE_TYPE_STARTUP_ACM)) {- break;+ if (gFitTableContext.StartupAcmNumber == 0) {+ printf ("-S not found. WARNING!\n"); } // Error (NULL, 0, 0, "-S Parameter incorrect, expect -S!", NULL); // return 0;- printf ("-S not found. WARNING!\n"); break; } if (IsGuidData (argv[Index + 1], &Guid)) {@@ -1381,14 +1383,13 @@ Returns:
FileSize = xtoi (argv[Index + 2]); Index += 3; }- if (gFitTableContext.StartupAcm.Type != 0) {- Error (NULL, 0, 0, "-S Parameter incorrect, Duplicated StartupAcm!", NULL);+ if (gFitTableContext.StartupAcmNumber >= MAX_STARTUP_ACM_ENTRY) {+ Error (NULL, 0, 0, "-S Parameter incorrect, too many StartupAcm!", NULL); return 0; }- gFitTableContext.StartupAcm.Type = FIT_TABLE_TYPE_STARTUP_ACM;- gFitTableContext.StartupAcm.Address = (UINT32) (UINTN) FileBuffer;- gFitTableContext.StartupAcm.Size = FileSize;- gFitTableContext.FitEntryNumber ++;+ gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Type = FIT_TABLE_TYPE_STARTUP_ACM;+ gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Address = (UINT32) (UINTN) FileBuffer;+ gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Size = FileSize; // // 1.1 StartupAcm version@@ -1407,7 +1408,10 @@ Returns:
gFitTableContext.StartupAcmVersion = xtoi (argv[Index + 1]); Index += 2; }- } while (FALSE);++ gFitTableContext.StartupAcmNumber ++;+ gFitTableContext.FitEntryNumber ++;+ } // // 1.5. DiagnosticsAcm@@ -1890,7 +1894,9 @@ Returns:
// // Final: Check StartupAcm in BiosModule. //- CheckOverlap (gFitTableContext.StartupAcm.Address, gFitTableContext.StartupAcm.Size);+ for (Index = 0; Index < (INTN)gFitTableContext.StartupAcmNumber; Index++) {+ CheckOverlap (gFitTableContext.StartupAcm[Index].Address, gFitTableContext.StartupAcm[Index].Size);+ } FitEntryNumber = gFitTableContext.FitEntryNumber; for (Index = 0; Index < (INTN)gFitTableContext.OptionalModuleNumber; Index++) { if ((gFitTableContext.OptionalModule[Index].Type == FIT_TABLE_TYPE_BIOS_POLICY) ||@@ -2178,8 +2184,8 @@ Returns:
} printf ("Total FIT Entry number: 0x%x\n", gFitTableContext.FitEntryNumber); printf ("FitHeader version: 0x%04x\n", gFitTableContext.FitHeaderVersion);- if (gFitTableContext.StartupAcm.Address != 0) {- printf ("StartupAcm - (0x%08x, 0x%08x, 0x%04x)\n", gFitTableContext.StartupAcm.Address, gFitTableContext.StartupAcm.Size, gFitTableContext.StartupAcmVersion);+ for (Index = 0; Index < gFitTableContext.StartupAcmNumber; Index++) {+ printf ("StartupAcm[%d] - (0x%08x, 0x%08x, 0x%04x)\n", Index, gFitTableContext.StartupAcm[Index].Address, gFitTableContext.StartupAcm[Index].Size, gFitTableContext.StartupAcmVersion); } if (gFitTableContext.DiagnstAcm.Address != 0) { printf ("DiagnosticAcm - (0x%08x, 0x%08x, 0x%04x)\n", gFitTableContext.DiagnstAcm.Address, gFitTableContext.DiagnstAcm.Size, gFitTableContext.DiagnstAcmVersion);@@ -2809,8 +2815,8 @@ Returns:
// // 4. StartupAcm //- if (gFitTableContext.StartupAcm.Address != 0) {- FitEntry[FitIndex].Address = gFitTableContext.StartupAcm.Address;+ for (Index = 0; Index < gFitTableContext.StartupAcmNumber; Index++) {+ FitEntry[FitIndex].Address = gFitTableContext.StartupAcm[Index].Address; *(UINT32 *)&FitEntry[FitIndex].Size[0] = 0; //gFitTableContext.StartupAcm.Size / 16; FitEntry[FitIndex].Version = (UINT16)gFitTableContext.StartupAcmVersion; FitEntry[FitIndex].Type = FIT_TABLE_TYPE_STARTUP_ACM;@@ -3110,7 +3116,7 @@ GetFitEntryInfo (
Routine Description: - Fill the FIT table information to Fvrecovery+ Get the FIT table information from Fvrecovery Arguments: @@ -3164,8 +3170,8 @@ Returns:
gFitTableContext.MicrocodeNumber ++; break; case FIT_TABLE_TYPE_STARTUP_ACM:- gFitTableContext.StartupAcm.Address = (UINT32)FitEntry[FitIndex].Address;- gFitTableContext.StartupAcmVersion = FitEntry[FitIndex].Version;+ gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Address = (UINT32)FitEntry[FitIndex].Address;+ gFitTableContext.StartupAcmVersion = FitEntry[FitIndex].Version; break; case FIT_TABLE_TYPE_BIOS_MODULE: gFitTableContext.BiosModule[gFitTableContext.BiosModuleNumber].Address = (UINT32)FitEntry[FitIndex].Address;@@ -3232,6 +3238,7 @@ Returns:
UINT32 FdFileSize; UINT8 *AcmBuffer;+ INTN Index; UINT32 FixedFitLocation; FileBufferRaw = NULL;@@ -3323,22 +3330,23 @@ Returns:
// // Get ACM buffer //- if (gFitTableContext.StartupAcm.Address != 0) {- AcmBuffer = FLASH_TO_MEMORY(gFitTableContext.StartupAcm.Address, FdFileBuffer, FdFileSize);- if ((AcmBuffer < FdFileBuffer) || (AcmBuffer + gFitTableContext.StartupAcm.Size > FdFileBuffer + FdFileSize)) {- printf ("ACM out of range - can not validate it\n");- AcmBuffer = NULL;- }+ for (Index = 0; Index < (INTN)gFitTableContext.StartupAcmNumber; Index ++) {+ if (gFitTableContext.StartupAcm[Index].Address != 0) {+ AcmBuffer = FLASH_TO_MEMORY(gFitTableContext.StartupAcm[Index].Address, FdFileBuffer, FdFileSize);+ if ((AcmBuffer < FdFileBuffer) || (AcmBuffer + gFitTableContext.StartupAcm[Index].Size > FdFileBuffer + FdFileSize)) {+ printf ("ACM out of range - can not validate it\n");+ AcmBuffer = NULL;+ } - if (AcmBuffer != NULL) {- if (CheckAcm ((ACM_FORMAT *)AcmBuffer, gFitTableContext.StartupAcm.Size)) {- DumpAcm ((ACM_FORMAT *)AcmBuffer);- } else {- Status = STATUS_ERROR;- goto exitFunc;+ if (AcmBuffer != NULL) {+ if (CheckAcm ((ACM_FORMAT *)AcmBuffer, gFitTableContext.StartupAcm[Index].Size)) {+ DumpAcm ((ACM_FORMAT *)AcmBuffer);+ } else {+ Status = STATUS_ERROR;+ goto exitFunc;+ } } }- } //@@ -3576,4 +3584,3 @@ Returns:
return u; }-diff --git a/Silicon/Intel/Tools/FitGen/FitGen.h b/Silicon/Intel/Tools/FitGen/FitGen.h
index 5add6a8870..b7de0a6b2d 100644
--- a/Silicon/Intel/Tools/FitGen/FitGen.h
+++ b/Silicon/Intel/Tools/FitGen/FitGen.h
@@ -1,7 +1,7 @@
/**@file Definitions for the FitGen utility. -Copyright (c) 2010-2020, Intel Corporation. All rights reserved.<BR>+Copyright (c) 2010-2022, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/@@ -31,7 +31,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
// Utility version information // #define UTILITY_MAJOR_VERSION 0-#define UTILITY_MINOR_VERSION 64+#define UTILITY_MINOR_VERSION 65 #define UTILITY_DATE __DATE__ //--
2.37.0.windows.1


Re: [PATCH] UefiPayloadPkg: Set console rows and columns to 100

Sheng Lean Tan
 

Reviewed-by: Lean Sheng Tan<sheng.tan@...>


Re: [PATCH] UefiPayloadPkg: Hook up PCIE_BASE build option

Sheng Lean Tan
 

Reviewed-by: Lean Sheng Tan<sheng.tan@...>


Re: [PATCH 1/3] UefiPayloadPkg: Allow full screen setup mode

Sheng Lean Tan
 

Reviewed-by: Lean Sheng Tan<sheng.tan@...>


Re: How to get FrontPage to fill screen

Sean Rhodes
 

Hi Liming

Thanks - I managed to get it working with two patches:

Sean


On Tue, 5 Jul 2022 at 01:56, gaoliming via groups.io <gaoliming=byosoft.com.cn@groups.io> wrote:

Please try below setting.

 

  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn | 128

  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow | 40

  gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution | 1024

  gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution | 768

 

Thanks

Liming

发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Sean Rhodes
发送时间: 202275 2:44
收件人: Gerd Hoffmann <kraxel@...>
抄送: devel@edk2.groups.io
主题: Re: [edk2-devel] How to get FrontPage to fill screen

 

Hi Gerd

 

Thank you very much :)

 

 

On Mon, 4 Jul 2022 at 10:40, Gerd Hoffmann <kraxel@...> wrote:

On Mon, Jul 04, 2022 at 10:03:40AM +0100, Sean Rhodes wrote:
> Hi
>
> Would anyone have any suggestions on getting the Front Page to fill the
> screen? As far as I can see, configuring the below PCDs should allow it to
> fill the screen - which is being correctly detected as 1920x1080.

Depends on whenever the system has a serial console or not ...

ConSplitterDxe uses the intersection of all outputs as final list of
supported text modes.

> However, it ends up in a rather strange shape:
> [image: UiApp.jpg]

80x50?

take care,
  Gerd


[PATCH v2] UefiPayloadPkg: Add macro to support selective driver in UPL

Lu, James
 

From: James Lu <james.lu@...>

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

Add macros to decide modules built into UPL.elf.

Macro list:
- GENERIC_MEMORY_TEST_ENABLE: GenericMemoryTestDxe
- MEMORY_TEST: NullMemoryTestDxe or GenericMemoryDxe
- ATA_ENABLE: SataControllerDxe, AtaBusDxe, AtaAtapiPassThruDxe
- SD_ENABLE: SdMmcPciDxe, EmmcDxe, SdDxe
- PS2_MOUSE_ENABLE: Ps2MouseDxe

Cc: Guo Dong <guo.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Gua Guo <gua.guo@...>
Signed-off-by: James Lu <james.lu@...>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 21 ++++++++++++++++++++
UefiPayloadPkg/UefiPayloadPkg.fdf | 14 ++++++++++++-
2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload=
Pkg.dsc
index cfcf38578d..25443139a6 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -36,7 +36,16 @@
DEFINE PLATFORM_BOOT_TIMEOUT =3D 3=0D
DEFINE ABOVE_4G_MEMORY =3D TRUE=0D
DEFINE BOOT_MANAGER_ESCAPE =3D FALSE=0D
+ DEFINE ATA_ENABLE =3D TRUE=0D
+ DEFINE SD_ENABLE =3D TRUE=0D
+ DEFINE PS2_MOUSE_ENABLE =3D TRUE=0D
DEFINE SD_MMC_TIMEOUT =3D 1000000=0D
+=0D
+ #=0D
+ # NULL: NullMemoryTestDxe=0D
+ # GENERIC: GenericMemoryTestDxe=0D
+ #=0D
+ DEFINE MEMORY_TEST =3D NULL=0D
#=0D
# SBL: UEFI payload for Slim Bootloader=0D
# COREBOOT: UEFI payload for coreboot=0D
@@ -596,7 +605,11 @@
MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRun=
timeDxe.inf=0D
UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf=0D
MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf=0D
+!if $(MEMORY_TEST) =3D=3D "GENERIC"=0D
+ MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTest=
Dxe.inf=0D
+!elseif $(MEMORY_TEST) =3D=3D "NULL"=0D
MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.in=
f=0D
+!endif=0D
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf=0D
MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf=0D
MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf=0D
@@ -631,9 +644,11 @@
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf=0D
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf=0D
FatPkg/EnhancedFatDxe/Fat.inf=0D
+!if $(ATA_ENABLE) =3D=3D TRUE=0D
MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf=0D
MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf=0D
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf=0D
+!endif=0D
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf=0D
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf=0D
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf=0D
@@ -644,9 +659,11 @@
#=0D
# SD/eMMC Support=0D
#=0D
+!if $(SD_ENABLE) =3D=3D TRUE=0D
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf=0D
MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf=0D
MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf=0D
+!endif=0D
=0D
#=0D
# Usb Support=0D
@@ -671,7 +688,9 @@
!if $(PS2_KEYBOARD_ENABLE) =3D=3D TRUE=0D
MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf=0D
!endif=0D
+!if $(PS2_MOUSE_ENABLE) =3D=3D TRUE=0D
MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf=0D
+!endif=0D
=0D
#=0D
# Console Support=0D
@@ -742,12 +761,14 @@
# This should be FALSE for compiling the dynamic command.=0D
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D
}=0D
+!if $(PERFORMANCE_MEASUREMENT_ENABLE) =3D=3D TRUE=0D
ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf {=0D
<PcdsFixedAtBuild>=0D
## This flag is used to control initialization of the shell library=
=0D
# This should be FALSE for compiling the dynamic command.=0D
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D
}=0D
+!endif=0D
ShellPkg/Application/Shell/Shell.inf {=0D
<PcdsFixedAtBuild>=0D
## This flag is used to control initialization of the shell library=
=0D
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload=
Pkg.fdf
index c7b04978ad..92afc13b9c 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -149,7 +149,11 @@ INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRea=
lTimeClockRuntimeDxe.inf
=0D
INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf=0D
INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf=0D
-INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.=
inf=0D
+!if $(MEMORY_TEST) =3D=3D "GENERIC"=0D
+INF MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryT=
estDxe.inf=0D
+!elseif $(MEMORY_TEST) =3D=3D "NULL"=0D
+INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe=
.inf=0D
+!endif=0D
INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf=0D
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf=0D
INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf=0D
@@ -176,7 +180,9 @@ INF OvmfPkg/SioBusDxe/SioBusDxe.inf
!if $(PS2_KEYBOARD_ENABLE) =3D=3D TRUE=0D
INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf=0D
!endif=0D
+!if $(PS2_MOUSE_ENABLE) =3D=3D TRUE=0D
INF MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf=0D
+!endif=0D
=0D
#=0D
# Console Support=0D
@@ -195,9 +201,11 @@ INF UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutputDxe=
.inf
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf=0D
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf=0D
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf=
=0D
+!if $(ATA_ENABLE) =3D=3D TRUE=0D
INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf=0D
INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf=0D
INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf=0D
+!endif=0D
INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf=0D
INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf=0D
INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf=0D
@@ -209,9 +217,11 @@ INF FatPkg/EnhancedFatDxe/Fat.inf
#=0D
# SD/eMMC Support=0D
#=0D
+!if $(SD_ENABLE) =3D=3D TRUE=0D
INF MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf=0D
INF MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf=0D
INF MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf=0D
+!endif=0D
=0D
#=0D
# Usb Support=0D
@@ -241,7 +251,9 @@ INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable=
Dxe.inf
#=0D
!if $(SHELL_TYPE) =3D=3D BUILD_SHELL=0D
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf=0D
+!if $(PERFORMANCE_MEASUREMENT_ENABLE) =3D=3D TRUE=0D
INF ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf=0D
+!endif=0D
INF ShellPkg/Application/Shell/Shell.inf=0D
!endif=0D
=0D
--=20
2.26.2.windows.1


Re: [PATCH] UefiPayloadPkg: Add macro to support selective driver in UPL

Lu, James
 

Replied as below

 

 

Thanks,

James

 

-----Original Message-----
From: Ni, Ray <ray.ni@...>
Sent: Monday, July 4, 2022 11:34 AM
To: Lu, James <james.lu@...>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@...>; Guo, Gua <gua.guo@...>
Subject: RE: [PATCH] UefiPayloadPkg: Add macro to support selective driver in UPL

 

>

> +!if $(GENERIC_MEMORY_TEST_ENABLE) == TRUE

>

> +

> MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/Generic

> MemoryTestDxe.inf

>

> +!endif

>

> +!if $(NULL_MEMORY_TEST_ENABLE) == TRUE

>

>

> MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryT

> estDxe.inf

>

> +!endif

 

1. Is there a configuration that both GENERIC and NULL memory test is FALSE?

If no, can we add a macro like "MEMORY_TEST" and its value could be "GENERIC" or "NULL"?

[James]

Will resolve in patch v2

 

 

> +!if $(ATA_ENABLE) == TRUE

>

>    MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf

>

>    MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf

>

>    MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf

 

2. AtaAtapiPassThru also produces "gEfiExtScsiPassThruProtocolGuid" which is used by ScsiBusDxe.

So, maybe we need to always include AtaAtapiPassThru driver.

[James]

This is to align client case that AtaAtapiPassThru.inf will not be included while ATA_ENABLE == FALSE

And ScsiBusDxe is taken care the flow while gEfiExtScsiPassThruProtocolGuid not existing

 

>

>    #

>

>    # Usb Support

>

> @@ -671,7 +685,9 @@

>  !if $(PS2_KEYBOARD_ENABLE) == TRUE

>

>    MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf

>

>  !endif

>

> +!if $(PS2_MOUSE_ENABLE) == TRUE

>

>    MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf

>

> +!endif

>

>

>

>    #

>

>    # Console Support

>

> @@ -742,12 +758,14 @@

>        #  This should be FALSE for compiling the dynamic command.

>

>        gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE

>

>    }

>

> +!if $(PERFORMANCE_MEASUREMENT_ENABLE) == TRUE

 

3. Thanks for catching that.


[PATCH] SecurityPkg: Add TPM NVIndex Extend support.

Qi Zhang
 

Signed-off-by: Qi Zhang <qi1.zhang@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Rahul Kumar <rahul1.kumar@...>
Cc: Qi Zhang <qi1.zhang@...>
---
SecurityPkg/Include/Library/Tpm2CommandLib.h | 21 +++
.../HashLibBaseCryptoRouterDxe.c | 77 +++++++++--
.../Library/Tpm2CommandLib/Tpm2NVStorage.c | 120 ++++++++++++++++++
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 26 +++-
4 files changed, 229 insertions(+), 15 deletions(-)

diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h b/SecurityPkg/Inc=
lude/Library/Tpm2CommandLib.h
index a2fb97f18d..f2ff3a5c0c 100644
--- a/SecurityPkg/Include/Library/Tpm2CommandLib.h
+++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h
@@ -467,6 +467,27 @@ Tpm2NvGlobalWriteLock (
IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL=0D
);=0D
=0D
+/**=0D
+ This command extends a value to an area in NV memory that was previously=
defined by TPM2_NV_DefineSpace().=0D
+=0D
+ @param[in] AuthHandle the handle indicating the source of the a=
uthorization value.=0D
+ @param[in] NvIndex The NV Index of the area to extend.=0D
+ @param[in] AuthSession Auth Session context=0D
+ @param[in] InData The data to extend.=0D
+=0D
+ @retval EFI_SUCCESS Operation completed successfully.=0D
+ @retval EFI_DEVICE_ERROR The command was unsuccessful.=0D
+ @retval EFI_NOT_FOUND The command was returned successfully, bu=
t NvIndex is not found.=0D
+**/=0D
+EFI_STATUS=0D
+EFIAPI=0D
+Tpm2NvExtend (=0D
+ IN TPMI_RH_NV_AUTH AuthHandle,=0D
+ IN TPMI_RH_NV_INDEX NvIndex,=0D
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,=0D
+ IN TPM2B_MAX_BUFFER *InData=0D
+ );=0D
+=0D
/**=0D
This command is used to cause an update to the indicated PCR.=0D
The digests parameter contains one or more tagged digest value identifie=
d by an algorithm ID.=0D
diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoR=
outerDxe.c b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoR=
outerDxe.c
index ee8fe6e06e..264f500dc6 100644
--- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDx=
e.c
+++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDx=
e.c
@@ -16,6 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/MemoryAllocationLib.h>=0D
#include <Library/PcdLib.h>=0D
#include <Library/HashLib.h>=0D
+#include <Protocol/Tcg2Protocol.h>=0D
=0D
#include "HashLibBaseCryptoRouterCommon.h"=0D
=0D
@@ -128,6 +129,40 @@ HashUpdate (
return EFI_SUCCESS;=0D
}=0D
=0D
+EFI_STATUS=0D
+EFIAPI=0D
+Tpm2ExtendNvIndex (=0D
+ TPMI_RH_NV_INDEX NvIndex,=0D
+ UINT16 DataSize,=0D
+ BYTE *Data=0D
+ )=0D
+{=0D
+ EFI_STATUS Status;=0D
+ TPMI_RH_NV_AUTH AuthHandle;=0D
+ TPM2B_MAX_BUFFER NvExtendData;=0D
+=0D
+ AuthHandle =3D TPM_RH_PLATFORM;=0D
+ ZeroMem (&NvExtendData, sizeof (NvExtendData));=0D
+ CopyMem (NvExtendData.buffer, Data, DataSize);=0D
+ NvExtendData.size =3D DataSize;=0D
+ Status =3D Tpm2NvExtend (=0D
+ AuthHandle,=0D
+ NvIndex,=0D
+ NULL,=0D
+ &NvExtendData=0D
+ );=0D
+ if (EFI_ERROR (Status)) {=0D
+ DEBUG ((=0D
+ DEBUG_ERROR,=0D
+ "Extend TPM NV index failed, Index: 0x%x Status: %d\n",=0D
+ NvIndex,=0D
+ Status=0D
+ ));=0D
+ }=0D
+=0D
+ return Status;=0D
+}=0D
+=0D
/**=0D
Hash sequence complete and extend to PCR.=0D
=0D
@@ -149,11 +184,16 @@ HashCompleteAndExtend (
OUT TPML_DIGEST_VALUES *DigestList=0D
)=0D
{=0D
- TPML_DIGEST_VALUES Digest;=0D
- HASH_HANDLE *HashCtx;=0D
- UINTN Index;=0D
- EFI_STATUS Status;=0D
- UINT32 HashMask;=0D
+ TPML_DIGEST_VALUES Digest;=0D
+ HASH_HANDLE *HashCtx;=0D
+ UINTN Index;=0D
+ EFI_STATUS Status;=0D
+ UINT32 HashMask;=0D
+ TPML_DIGEST_VALUES TcgPcrEvent2Digest;=0D
+ EFI_TCG2_EVENT_ALGORITHM_BITMAP TpmHashAlgorithmBitmap;=0D
+ UINT32 ActivePcrBanks;=0D
+ UINT32 *BufferPtr;=0D
+ UINT32 DigestListBinSize;=0D
=0D
if (mHashInterfaceCount =3D=3D 0) {=0D
return EFI_UNSUPPORTED;=0D
@@ -175,10 +215,29 @@ HashCompleteAndExtend (
=0D
FreePool (HashCtx);=0D
=0D
- Status =3D Tpm2PcrExtend (=0D
- PcrIndex,=0D
- DigestList=0D
- );=0D
+ if (PcrIndex <=3D MAX_PCR_INDEX) {=0D
+ Status =3D Tpm2PcrExtend (=0D
+ PcrIndex,=0D
+ DigestList=0D
+ );=0D
+ } else {=0D
+ Status =3D Tpm2GetCapabilitySupportedAndActivePcrs (&TpmHashAlgorithmB=
itmap, &ActivePcrBanks);=0D
+ ASSERT_EFI_ERROR (Status);=0D
+ ActivePcrBanks =3D ActivePcrBanks & mSupportedHashMaskCurrent;=0D
+ ZeroMem (&TcgPcrEvent2Digest, sizeof (TcgPcrEvent2Digest));=0D
+ BufferPtr =3D CopyDigestListToBuffer (&TcgPcrEvent2Digest, Dig=
estList, ActivePcrBanks);=0D
+ DigestListBinSize =3D (UINT32)((UINT8 *)BufferPtr - (UINT8 *)&TcgPcrEv=
ent2Digest);=0D
+=0D
+ //=0D
+ // Extend to TPM NvIndex=0D
+ //=0D
+ Status =3D Tpm2ExtendNvIndex (=0D
+ PcrIndex,=0D
+ (UINT16)DigestListBinSize,=0D
+ (BYTE *)&TcgPcrEvent2Digest=0D
+ );=0D
+ }=0D
+=0D
return Status;=0D
}=0D
=0D
diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c b/SecurityP=
kg/Library/Tpm2CommandLib/Tpm2NVStorage.c
index 5077ace7c2..6f8badad3f 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
@@ -148,6 +148,22 @@ typedef struct {
TPMS_AUTH_RESPONSE AuthSession;=0D
} TPM2_NV_GLOBALWRITELOCK_RESPONSE;=0D
=0D
+typedef struct {=0D
+ TPM2_COMMAND_HEADER Header;=0D
+ TPMI_RH_NV_AUTH AuthHandle;=0D
+ TPMI_RH_NV_INDEX NvIndex;=0D
+ UINT32 AuthSessionSize;=0D
+ TPMS_AUTH_COMMAND AuthSession;=0D
+ TPM2B_MAX_BUFFER Data;=0D
+ UINT16 Offset;=0D
+} TPM2_NV_EXTEND_COMMAND;=0D
+=0D
+typedef struct {=0D
+ TPM2_RESPONSE_HEADER Header;=0D
+ UINT32 AuthSessionSize;=0D
+ TPMS_AUTH_RESPONSE AuthSession;=0D
+} TPM2_NV_EXTEND_RESPONSE;=0D
+=0D
#pragma pack()=0D
=0D
/**=0D
@@ -1052,3 +1068,107 @@ Done:
ZeroMem (&RecvBuffer, sizeof (RecvBuffer));=0D
return Status;=0D
}=0D
+=0D
+/**=0D
+ This command extends a value to an area in NV memory that was previously=
defined by TPM2_NV_DefineSpace().=0D
+=0D
+ @param[in] AuthHandle the handle indicating the source of the a=
uthorization value.=0D
+ @param[in] NvIndex The NV Index of the area to extend.=0D
+ @param[in] AuthSession Auth Session context=0D
+ @param[in] InData The data to extend.=0D
+=0D
+ @retval EFI_SUCCESS Operation completed successfully.=0D
+ @retval EFI_DEVICE_ERROR The command was unsuccessful.=0D
+ @retval EFI_NOT_FOUND The command was returned successfully, bu=
t NvIndex is not found.=0D
+**/=0D
+EFI_STATUS=0D
+EFIAPI=0D
+Tpm2NvExtend (=0D
+ IN TPMI_RH_NV_AUTH AuthHandle,=0D
+ IN TPMI_RH_NV_INDEX NvIndex,=0D
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,=0D
+ IN TPM2B_MAX_BUFFER *InData=0D
+ )=0D
+{=0D
+ EFI_STATUS Status;=0D
+ TPM2_NV_EXTEND_COMMAND SendBuffer;=0D
+ TPM2_NV_EXTEND_RESPONSE RecvBuffer;=0D
+ UINT32 SendBufferSize;=0D
+ UINT32 RecvBufferSize;=0D
+ UINT8 *Buffer;=0D
+ UINT32 SessionInfoSize;=0D
+ TPM_RC ResponseCode;=0D
+=0D
+ //=0D
+ // Construct command=0D
+ //=0D
+ SendBuffer.Header.tag =3D SwapBytes16 (TPM_ST_SESSIONS);=0D
+ SendBuffer.Header.commandCode =3D SwapBytes32 (TPM_CC_NV_Extend);=0D
+=0D
+ SendBuffer.AuthHandle =3D SwapBytes32 (AuthHandle);=0D
+ SendBuffer.NvIndex =3D SwapBytes32 (NvIndex);=0D
+=0D
+ //=0D
+ // Add in Auth session=0D
+ //=0D
+ Buffer =3D (UINT8 *)&SendBuffer.AuthSession;=0D
+=0D
+ // sessionInfoSize=0D
+ SessionInfoSize =3D CopyAuthSessionCommand (AuthSession, Buff=
er);=0D
+ Buffer +=3D SessionInfoSize;=0D
+ SendBuffer.AuthSessionSize =3D SwapBytes32 (SessionInfoSize);=0D
+=0D
+ WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (InData->size));=0D
+ Buffer +=3D sizeof (UINT16);=0D
+ CopyMem (Buffer, InData->buffer, InData->size);=0D
+ Buffer +=3D InData->size;=0D
+=0D
+ SendBufferSize =3D (UINT32)(Buffer - (UINT8 *)&SendBuffer);=
=0D
+ SendBuffer.Header.paramSize =3D SwapBytes32 (SendBufferSize);=0D
+=0D
+ //=0D
+ // send Tpm command=0D
+ //=0D
+ RecvBufferSize =3D sizeof (RecvBuffer);=0D
+ Status =3D Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuff=
er, &RecvBufferSize, (UINT8 *)&RecvBuffer);=0D
+ if (EFI_ERROR (Status)) {=0D
+ goto Done;=0D
+ }=0D
+=0D
+ if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) {=0D
+ DEBUG ((DEBUG_ERROR, "Tpm2NvExtend - RecvBufferSize Error - %x\n", Rec=
vBufferSize));=0D
+ Status =3D EFI_DEVICE_ERROR;=0D
+ goto Done;=0D
+ }=0D
+=0D
+ ResponseCode =3D SwapBytes32 (RecvBuffer.Header.responseCode);=0D
+ if (ResponseCode !=3D TPM_RC_SUCCESS) {=0D
+ DEBUG ((DEBUG_ERROR, "Tpm2NvExtend - responseCode - %x\n", ResponseCod=
e));=0D
+ }=0D
+=0D
+ switch (ResponseCode) {=0D
+ case TPM_RC_SUCCESS:=0D
+ // return data=0D
+ break;=0D
+ case TPM_RC_ATTRIBUTES:=0D
+ Status =3D EFI_UNSUPPORTED;=0D
+ break;=0D
+ case TPM_RC_NV_AUTHORIZATION:=0D
+ Status =3D EFI_SECURITY_VIOLATION;=0D
+ break;=0D
+ case TPM_RC_NV_LOCKED:=0D
+ Status =3D EFI_ACCESS_DENIED;=0D
+ break;=0D
+ default:=0D
+ Status =3D EFI_DEVICE_ERROR;=0D
+ break;=0D
+ }=0D
+=0D
+Done:=0D
+ //=0D
+ // Clear AuthSession Content=0D
+ //=0D
+ ZeroMem (&SendBuffer, sizeof (SendBuffer));=0D
+ ZeroMem (&RecvBuffer, sizeof (RecvBuffer));=0D
+ return Status;=0D
+}=0D
diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tc=
g2Dxe.c
index f6ea8b2bbf..dfb7f28251 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -1230,12 +1230,26 @@ TcgDxeHashLogExtendEvent (
//=0D
// Do not do TPM extend for EV_NO_ACTION=0D
//=0D
- Status =3D EFI_SUCCESS;=0D
- InitNoActionEvent (&NoActionEvent, NewEventHdr->EventSize);=0D
- if ((Flags & EFI_TCG2_EXTEND_ONLY) =3D=3D 0) {=0D
- Status =3D TcgDxeLogHashEvent (&(NoActionEvent.Digests), NewEventHdr=
, NewEventData);=0D
+ if (NewEventHdr->PCRIndex <=3D MAX_PCR_INDEX) {=0D
+ Status =3D EFI_SUCCESS;=0D
+ InitNoActionEvent (&NoActionEvent, NewEventHdr->EventSize);=0D
+ if ((Flags & EFI_TCG2_EXTEND_ONLY) =3D=3D 0) {=0D
+ Status =3D TcgDxeLogHashEvent (&(NoActionEvent.Digests), NewEventH=
dr, NewEventData);=0D
+ }=0D
+ } else {=0D
+ //=0D
+ // Extend to NvIndex=0D
+ //=0D
+ Status =3D HashAndExtend (=0D
+ NewEventHdr->PCRIndex,=0D
+ HashData,=0D
+ (UINTN)HashDataLen,=0D
+ &DigestList=0D
+ );=0D
+ if (!EFI_ERROR (Status)) {=0D
+ Status =3D TcgDxeLogHashEvent (&DigestList, NewEventHdr, NewEventD=
ata);=0D
+ }=0D
}=0D
-=0D
return Status;=0D
}=0D
=0D
@@ -1317,7 +1331,7 @@ Tcg2HashLogExtendEvent (
return EFI_INVALID_PARAMETER;=0D
}=0D
=0D
- if (Event->Header.PCRIndex > MAX_PCR_INDEX) {=0D
+ if ((Event->Header.EventType !=3D EV_NO_ACTION) && (Event->Header.PCRInd=
ex > MAX_PCR_INDEX)) {=0D
return EFI_INVALID_PARAMETER;=0D
}=0D
=0D
--=20
2.31.1.windows.1


Event: TianoCore Bug Triage - APAC / NAMO - 07/05/2022 #cal-reminder

Group Notification <noreply@...>
 

Reminder: TianoCore Bug Triage - APAC / NAMO

When:
07/05/2022
6:30pm to 7:30pm
(UTC-07:00) America/Los Angeles

Where:
https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d

Organizer: Liming Gao gaoliming@...

View Event

Description:

TianoCore Bug Triage - APAC / NAMO

Hosted by Liming Gao

 

________________________________________________________________________________

Microsoft Teams meeting

Join on your computer or mobile app

Click here to join the meeting

Join with a video conferencing device

teams@...

Video Conference ID: 116 062 094 0

Alternate VTC dialing instructions

Or call in (audio only)

+1 916-245-6934,,77463821#   United States, Sacramento

Phone Conference ID: 774 638 21#

Find a local number | Reset PIN

Learn More | Meeting options


Re: 回复: [PATCH] MdePkg/BasePrintLib: Add %z specifier

Pedro Falcato
 

Fixed in v2.

On Tue, Jul 5, 2022 at 2:01 AM gaoliming via groups.io <gaoliming=byosoft.com.cn@groups.io> wrote:
Pedro:
  Please also add %z description in Edk2\MdePkg\Include\Library\PrintLib.h.

  And, please also submit one BZ for this change. This is a new feature.

Thanks
Liming

> -----邮件原件-----
> 发件人: Pedro Falcato <pedro.falcato@...>
> 发送时间: 2022年7月5日 8:04
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney <michael.d.kinney@...>; Liming Gao
> <gaoliming@...>; Zhiguang Liu <zhiguang.liu@...>
> 主题: [PATCH] MdePkg/BasePrintLib: Add %z specifier
>
> %z is used in standard C99 as the printf specifier for size_t types.
> Add support for it so we can portably print UINTN.
>
> Cc: Michael D Kinney <michael.d.kinney@...>
> Cc: Liming Gao <gaoliming@...>
> Cc: Zhiguang Liu <zhiguang.liu@...>
> Signed-off-by: Pedro Falcato <pedro.falcato@...>
> ---
>  MdePkg/Library/BasePrintLib/PrintLibInternal.c | 9 +++++++++
>  MdePkg/Library/BasePrintLib/PrintLibInternal.h | 1 +
>  2 files changed, 10 insertions(+)
>
> diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c
> b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
> index 42b598a432..1cd99b2213 100644
> --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c
> +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
> @@ -720,6 +720,9 @@ BasePrintLibSPrintMarker (
>              case 'l':
>                Flags |= LONG_TYPE;
>                break;
> +            case 'z':
> +              Flags |= SIZET_TYPE;
> +              break;
>              case '*':
>                if ((Flags & PRECISION) == 0) {
>                  Flags |= PAD_TO_WIDTH;
> @@ -833,6 +836,12 @@ BasePrintLibSPrintMarker (
>                } else {
>                  Value = BASE_ARG (BaseListMarker, int);
>                }
> +            } else if ((Flags & SIZET_TYPE) != 0) {
> +              if (BaseListMarker == NULL) {
> +                Value = VA_ARG (VaListMarker, UINTN);
> +              } else {
> +                Value = BASE_ARG (BaseListMarker, UINTN);
> +              }
>              } else {
>                if (BaseListMarker == NULL) {
>                  Value = VA_ARG (VaListMarker, INT64);
> diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.h
> b/MdePkg/Library/BasePrintLib/PrintLibInternal.h
> index 34d591c6fc..9193e6192b 100644
> --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.h
> +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.h
> @@ -29,6 +29,7 @@
>  #define ARGUMENT_REVERSED    BIT12
>  #define COUNT_ONLY_NO_PRINT  BIT13
>  #define UNSIGNED_TYPE        BIT14
> +#define SIZET_TYPE           BIT15
>
>  //
>  // Record date and time information
> --
> 2.37.0










--
Pedro Falcato


[PATCH v2] MdePkg/BasePrintLib: Add %z specifier

Pedro Falcato
 

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

%z is used in standard C99 as the printf specifier for size_t types.
Add support for it so we can portably print UINTN.

Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Signed-off-by: Pedro Falcato <pedro.falcato@...>
---
MdePkg/Include/Library/PrintLib.h | 13 ++++++++-----
MdePkg/Library/BasePrintLib/PrintLibInternal.c | 9 +++++++++
MdePkg/Library/BasePrintLib/PrintLibInternal.h | 1 +
3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/MdePkg/Include/Library/PrintLib.h b/MdePkg/Include/Library/PrintLib.h
index 8d523cac52..0d67f62d3f 100644
--- a/MdePkg/Include/Library/PrintLib.h
+++ b/MdePkg/Include/Library/PrintLib.h
@@ -42,6 +42,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
- L, l
- The number being printed is size UINT64. Only valid for types X, x, and d.
If this flag is not specified, then the number being printed is size int.
+ - z
+ - The number being printed is of size UINTN. Only valid for types X, x and d.
+ If this flag is not specified, then the number being printed is size int.
- NOTE: All invalid flags are ignored.

[width]:
@@ -73,18 +76,18 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
using this type too by making sure bits 8..15 of the argument are set to 0.
- x
- The argument is an unsigned hexadecimal number. The characters used are 0..9 and
- A..F. If the flag 'L' is not specified, then the argument is assumed
+ A..F. If the flags 'L', 'z' are not specified, then the argument is assumed
to be size int. This does not follow ANSI C.
- X
- The argument is an unsigned hexadecimal number and the number is padded with
- zeros. This is equivalent to a format string of "0x". If the flag
- 'L' is not specified, then the argument is assumed to be size int.
+ zeros. This is equivalent to a format string of "0x". If the flags
+ 'L', 'z' are not specified, then the argument is assumed to be size int.
This does not follow ANSI C.
- d
- - The argument is a signed decimal number. If the flag 'L' is not specified,
+ - The argument is a signed decimal number. If the flags 'L', 'z' are not specified,
then the argument is assumed to be size int.
- u
- - The argument is a unsigned decimal number. If the flag 'L' is not specified,
+ - The argument is a unsigned decimal number. If the flags 'L'. 'z' are not specified,
then the argument is assumed to be size int.
- p
- The argument is a pointer that is a (VOID *), and it is printed as an
diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
index 42b598a432..1cd99b2213 100644
--- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c
+++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
@@ -720,6 +720,9 @@ BasePrintLibSPrintMarker (
case 'l':
Flags |= LONG_TYPE;
break;
+ case 'z':
+ Flags |= SIZET_TYPE;
+ break;
case '*':
if ((Flags & PRECISION) == 0) {
Flags |= PAD_TO_WIDTH;
@@ -833,6 +836,12 @@ BasePrintLibSPrintMarker (
} else {
Value = BASE_ARG (BaseListMarker, int);
}
+ } else if ((Flags & SIZET_TYPE) != 0) {
+ if (BaseListMarker == NULL) {
+ Value = VA_ARG (VaListMarker, UINTN);
+ } else {
+ Value = BASE_ARG (BaseListMarker, UINTN);
+ }
} else {
if (BaseListMarker == NULL) {
Value = VA_ARG (VaListMarker, INT64);
diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.h b/MdePkg/Library/BasePrintLib/PrintLibInternal.h
index 34d591c6fc..9193e6192b 100644
--- a/MdePkg/Library/BasePrintLib/PrintLibInternal.h
+++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.h
@@ -29,6 +29,7 @@
#define ARGUMENT_REVERSED BIT12
#define COUNT_ONLY_NO_PRINT BIT13
#define UNSIGNED_TYPE BIT14
+#define SIZET_TYPE BIT15

//
// Record date and time information
--
2.37.0


回复: [PATCH] MdePkg/BasePrintLib: Add %z specifier

gaoliming
 

Pedro:
Please also add %z description in Edk2\MdePkg\Include\Library\PrintLib.h.

And, please also submit one BZ for this change. This is a new feature.

Thanks
Liming

-----邮件原件-----
发件人: Pedro Falcato <pedro.falcato@...>
发送时间: 2022年7月5日 8:04
收件人: devel@edk2.groups.io
抄送: Michael D Kinney <michael.d.kinney@...>; Liming Gao
<gaoliming@...>; Zhiguang Liu <zhiguang.liu@...>
主题: [PATCH] MdePkg/BasePrintLib: Add %z specifier

%z is used in standard C99 as the printf specifier for size_t types.
Add support for it so we can portably print UINTN.

Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Signed-off-by: Pedro Falcato <pedro.falcato@...>
---
MdePkg/Library/BasePrintLib/PrintLibInternal.c | 9 +++++++++
MdePkg/Library/BasePrintLib/PrintLibInternal.h | 1 +
2 files changed, 10 insertions(+)

diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c
b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
index 42b598a432..1cd99b2213 100644
--- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c
+++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
@@ -720,6 +720,9 @@ BasePrintLibSPrintMarker (
case 'l':
Flags |= LONG_TYPE;
break;
+ case 'z':
+ Flags |= SIZET_TYPE;
+ break;
case '*':
if ((Flags & PRECISION) == 0) {
Flags |= PAD_TO_WIDTH;
@@ -833,6 +836,12 @@ BasePrintLibSPrintMarker (
} else {
Value = BASE_ARG (BaseListMarker, int);
}
+ } else if ((Flags & SIZET_TYPE) != 0) {
+ if (BaseListMarker == NULL) {
+ Value = VA_ARG (VaListMarker, UINTN);
+ } else {
+ Value = BASE_ARG (BaseListMarker, UINTN);
+ }
} else {
if (BaseListMarker == NULL) {
Value = VA_ARG (VaListMarker, INT64);
diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.h
b/MdePkg/Library/BasePrintLib/PrintLibInternal.h
index 34d591c6fc..9193e6192b 100644
--- a/MdePkg/Library/BasePrintLib/PrintLibInternal.h
+++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.h
@@ -29,6 +29,7 @@
#define ARGUMENT_REVERSED BIT12
#define COUNT_ONLY_NO_PRINT BIT13
#define UNSIGNED_TYPE BIT14
+#define SIZET_TYPE BIT15

//
// Record date and time information
--
2.37.0


回复: [edk2-devel] How to get FrontPage to fill screen

gaoliming
 

Please try below setting.

 

  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn | 128

  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow | 40

  gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution | 1024

  gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution | 768

 

Thanks

Liming

发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Sean Rhodes
发送时间: 202275 2:44
收件人: Gerd Hoffmann <kraxel@...>
抄送: devel@edk2.groups.io
主题: Re: [edk2-devel] How to get FrontPage to fill screen

 

Hi Gerd

 

Thank you very much :)

 

 

On Mon, 4 Jul 2022 at 10:40, Gerd Hoffmann <kraxel@...> wrote:

On Mon, Jul 04, 2022 at 10:03:40AM +0100, Sean Rhodes wrote:
> Hi
>
> Would anyone have any suggestions on getting the Front Page to fill the
> screen? As far as I can see, configuring the below PCDs should allow it to
> fill the screen - which is being correctly detected as 1920x1080.

Depends on whenever the system has a serial console or not ...

ConSplitterDxe uses the intersection of all outputs as final list of
supported text modes.

> However, it ends up in a rather strange shape:
> [image: UiApp.jpg]

80x50?

take care,
  Gerd


回复: [PATCH] MdeModulePkg/Variable: SCT run AuthVar_conf is failed

gaoliming
 

Jun:
I agree this change. You can add my reviewed-by.

Thanks
Liming

-----邮件原件-----
发件人: xueshengfeng <xueshengfeng@...>
发送时间: 2022年7月4日 18:00
收件人: devel@edk2.groups.io
抄送: gaoliming@...; edhaya.chandran@...;
samer.el-haj-mahmoud@...; sunny.wang@...; Lijun10x
<junx1.li@...>
主题: [PATCH] MdeModulePkg/Variable: SCT run AuthVar_conf is failed

From: Lijun10x <junx1.li@...>

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

Attr are
EFI_VARIABLE_NON_VOLATILE|VARIABLE_AUTHENTICATED_WRITE_ACCESS
,
will return EFI_INVALID_PARAMETER.
Added one case, only when one attribute is EFI_VARIABLE_NON_VOLATILE
will EFI_INVALID_PARAMETER be returned.
If attr are
EFI_VARIABLE_NON_VOLATILE|VARIABLE_AUTHENTICATED_WRITE_ACCESS
will return EFI_UNSUPPORTED.
In the UEFI2.7 spec, there is a description as below:
EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should
not be
used. Platforms should return EFI_UNSUPPORTED if a caller to
SetVariable() specifies this attribute.

Signed-off-by: JunX1 Li <junx1.li@...>
Reviewed-by: Liming Gao <gaoliming@...>
Reviewed-by: G Edhaya Chandran <edhaya.chandran@...>
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@...>
Reviewed-by: Sunny Wang <sunny.wang@...>
---
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 6c1a3440ac..14c176887a 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -2676,7 +2676,11 @@ VariableServiceSetVariable (
//
// Only EFI_VARIABLE_NON_VOLATILE attribute is invalid
//
- return EFI_INVALID_PARAMETER;
+ if ((Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0)
{
+ return EFI_UNSUPPORTED;
+ } else {
+ return EFI_INVALID_PARAMETER;
+ }
} else if ((Attributes & VARIABLE_ATTRIBUTE_AT_AW) != 0) {
if (!mVariableModuleGlobal->VariableGlobal.AuthSupport) {
//
--
2.26.2.windows.1


[PATCH] MdePkg/BasePrintLib: Add %z specifier

Pedro Falcato
 

%z is used in standard C99 as the printf specifier for size_t types.
Add support for it so we can portably print UINTN.

Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Signed-off-by: Pedro Falcato <pedro.falcato@...>
---
MdePkg/Library/BasePrintLib/PrintLibInternal.c | 9 +++++++++
MdePkg/Library/BasePrintLib/PrintLibInternal.h | 1 +
2 files changed, 10 insertions(+)

diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
index 42b598a432..1cd99b2213 100644
--- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c
+++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
@@ -720,6 +720,9 @@ BasePrintLibSPrintMarker (
case 'l':
Flags |= LONG_TYPE;
break;
+ case 'z':
+ Flags |= SIZET_TYPE;
+ break;
case '*':
if ((Flags & PRECISION) == 0) {
Flags |= PAD_TO_WIDTH;
@@ -833,6 +836,12 @@ BasePrintLibSPrintMarker (
} else {
Value = BASE_ARG (BaseListMarker, int);
}
+ } else if ((Flags & SIZET_TYPE) != 0) {
+ if (BaseListMarker == NULL) {
+ Value = VA_ARG (VaListMarker, UINTN);
+ } else {
+ Value = BASE_ARG (BaseListMarker, UINTN);
+ }
} else {
if (BaseListMarker == NULL) {
Value = VA_ARG (VaListMarker, INT64);
diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.h b/MdePkg/Library/BasePrintLib/PrintLibInternal.h
index 34d591c6fc..9193e6192b 100644
--- a/MdePkg/Library/BasePrintLib/PrintLibInternal.h
+++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.h
@@ -29,6 +29,7 @@
#define ARGUMENT_REVERSED BIT12
#define COUNT_ONLY_NO_PRINT BIT13
#define UNSIGNED_TYPE BIT14
+#define SIZET_TYPE BIT15

//
// Record date and time information
--
2.37.0


Re: [PATCH v1 1/1] UefiCpuPkg: Coding style bug fix

Paweł Poławski
 

Hi Ray,

Thank you for the suggestion.
I will update the patchset and send version 2 soon.

Best regards,
Pawel


On Fri, Jun 24, 2022 at 11:22 AM Ni, Ray <ray.ni@...> wrote:
How about PlatformInformationRecord2? It also matches to the parameter used in PPI header file.

> -----Original Message-----
> From: Paweł Poławski <ppolawsk@...>
> Sent: Friday, June 24, 2022 6:58 AM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@...>; Ni, Ray <ray.ni@...>; Kumar, Rahul1 <rahul1.kumar@...>
> Subject: [PATCH v1 1/1] UefiCpuPkg: Coding style bug fix
>
> Local variable name overlaped with function name.
> Variable name has been updated to remove name duplication.
>
> Cc: Eric Dong <eric.dong@...>
> Cc: Ray Ni <ray.ni@...>
> Cc: Rahul Kumar <rahul1.kumar@...>
>
> Signed-off-by: Paweł Poławski <ppolawsk@...>
> ---
>  UefiCpuPkg/CpuMpPei/CpuBist.c | 40 ++++++++++----------
>  1 file changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/UefiCpuPkg/CpuMpPei/CpuBist.c b/UefiCpuPkg/CpuMpPei/CpuBist.c
> index 7dc93cd784d4..179063e0d105 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuBist.c
> +++ b/UefiCpuPkg/CpuMpPei/CpuBist.c
> @@ -91,7 +91,7 @@ GetBistInfoFromPpi (
>  {
>
>    EFI_STATUS                            Status;
>
>    EFI_SEC_PLATFORM_INFORMATION2_PPI     *SecPlatformInformation2Ppi;
>
> -  EFI_SEC_PLATFORM_INFORMATION_RECORD2  *SecPlatformInformation2;
>
> +  EFI_SEC_PLATFORM_INFORMATION_RECORD2  *SecPlatformInformation2Rec2;
>
>    UINT64                                InformationSize;
>
>
>
>    Status = PeiServicesLocatePpi (
>
> @@ -108,17 +108,17 @@ GetBistInfoFromPpi (
>      //
>
>      // Get the size of the sec platform information2(BSP/APs' BIST data)
>
>      //
>
> -    InformationSize         = 0;
>
> -    SecPlatformInformation2 = NULL;
>
> -    Status                  = SecPlatformInformation2Ppi->PlatformInformation2 (
>
> -                                                            PeiServices,
>
> -                                                            &InformationSize,
>
> -                                                            SecPlatformInformation2
>
> -                                                            );
>
> +    InformationSize             = 0;
>
> +    SecPlatformInformation2Rec2 = NULL;
>
> +    Status                      = SecPlatformInformation2Ppi->PlatformInformation2 (
>
> +                                                                PeiServices,
>
> +                                                                &InformationSize,
>
> +                                                                SecPlatformInformation2Rec2
>
> +                                                                );
>
>      if (Status == EFI_BUFFER_TOO_SMALL) {
>
>        Status = PeiServicesAllocatePool (
>
>                   (UINTN)InformationSize,
>
> -                 (VOID **)&SecPlatformInformation2
>
> +                 (VOID **)&SecPlatformInformation2Rec2
>
>                   );
>
>        if (Status == EFI_SUCCESS) {
>
>          //
>
> @@ -127,10 +127,10 @@ GetBistInfoFromPpi (
>          Status = SecPlatformInformation2Ppi->PlatformInformation2 (
>
>                                                 PeiServices,
>
>                                                 &InformationSize,
>
> -                                               SecPlatformInformation2
>
> +                                               SecPlatformInformation2Rec2
>
>                                                 );
>
>          if (Status == EFI_SUCCESS) {
>
> -          *BistInformationData = SecPlatformInformation2;
>
> +          *BistInformationData = SecPlatformInformation2Rec2;
>
>            if (BistInformationSize != NULL) {
>
>              *BistInformationSize = InformationSize;
>
>            }
>
> @@ -160,7 +160,7 @@ CollectBistDataFromPpi (
>  {
>
>    EFI_STATUS                            Status;
>
>    EFI_PEI_PPI_DESCRIPTOR                *SecInformationDescriptor;
>
> -  EFI_SEC_PLATFORM_INFORMATION_RECORD2  *SecPlatformInformation2;
>
> +  EFI_SEC_PLATFORM_INFORMATION_RECORD2  *SecPlatformInformation2Rec2;
>
>    EFI_SEC_PLATFORM_INFORMATION_RECORD   *SecPlatformInformation;
>
>    UINTN                                 NumberOfData;
>
>    EFI_SEC_PLATFORM_INFORMATION_CPU      *CpuInstance;
>
> @@ -186,10 +186,10 @@ CollectBistDataFromPpi (
>    ASSERT_EFI_ERROR (Status);
>
>    PlatformInformationRecord2->NumberOfCpus = (UINT32)NumberOfProcessors;
>
>
>
> -  SecPlatformInformation2 = NULL;
>
> -  SecPlatformInformation  = NULL;
>
> -  NumberOfData            = 0;
>
> -  CpuInstance             = NULL;
>
> +  SecPlatformInformation2Rec2 = NULL;
>
> +  SecPlatformInformation      = NULL;
>
> +  NumberOfData                = 0;
>
> +  CpuInstance                 = NULL;
>
>    //
>
>    // Get BIST information from Sec Platform Information2 Ppi firstly
>
>    //
>
> @@ -197,15 +197,15 @@ CollectBistDataFromPpi (
>               PeiServices,
>
>               &gEfiSecPlatformInformation2PpiGuid,
>
>               &SecInformationDescriptor,
>
> -             (VOID *)&SecPlatformInformation2,
>
> +             (VOID *)&SecPlatformInformation2Rec2,
>
>               NULL
>
>               );
>
>    if (Status == EFI_SUCCESS) {
>
>      //
>
>      // Sec Platform Information2 PPI includes BSP/APs' BIST information
>
>      //
>
> -    NumberOfData = SecPlatformInformation2->NumberOfCpus;
>
> -    CpuInstance  = SecPlatformInformation2->CpuInstance;
>
> +    NumberOfData = SecPlatformInformation2Rec2->NumberOfCpus;
>
> +    CpuInstance  = SecPlatformInformation2Rec2->CpuInstance;
>
>    } else {
>
>      //
>
>      // Otherwise, get BIST information from Sec Platform Information Ppi
>
> @@ -274,7 +274,7 @@ CollectBistDataFromPpi (
>      (UINTN)BistInformationSize
>
>      );
>
>
>
> -  if (SecPlatformInformation2 != NULL) {
>
> +  if (SecPlatformInformation2Rec2 != NULL) {
>
>      if (NumberOfData < NumberOfProcessors) {
>
>        //
>
>        // Reinstall SecPlatformInformation2 PPI to include new BIST information
>
> --
> 2.34.3



--

Paweł Poławski

Red Hat Virtualization

ppolawsk@...   



Now: Tools, CI, Code base construction meeting series - 07/04/2022 #cal-notice

Group Notification <noreply@...>
 

Tools, CI, Code base construction meeting series

When:
07/04/2022
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

Where:
https://github.com/tianocore/edk2/discussions/2614

View Event

Description:

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, CI, tools, and other related topics. If you are interested, have ideas/opinions please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft Teams.

MS Teams Link in following discussion: * https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

MS Teams Browser Clients * https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


Re: [edk2-platforms][PATCH 0/2] Platform/Sgi: Update serial port usage

Thomas Abraham
 

On 04/07/2022 17:59, Rohit Mathew wrote:
Patch 433b5b1b0f7f ("Platform/Sgi: Route logs to different sets of
consoles") setup the routing of console messages to a different set
of UART ports. Following up with this change, this patch series updates
the ACPI tables to route the console messages to the console UART and
adds a device entry for the debug UART.
Link to github branch for the patches in this series -
https://github.com/rohit-arm/edk2-platforms/tree/serial_port_acpi
Rohit Mathew (2):
Platform/Sgi: Update ACPI tables to use console UART
Platform/Sgi: Add serial debug controller to SSDT
.../SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 3 +++
.../SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 3 +++
.../SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 3 +++
.../ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 3 +++
.../SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf | 3 +++
.../ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf | 3 +++
.../ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf | 3 +++
.../ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 3 +++
Platform/ARM/SgiPkg/AcpiTables/Spcr.aslc | 2 +-
Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl | 17 ++++++++++++++++-
10 files changed, 41 insertions(+), 2 deletions(-)
For this series -
Reviewed-by: Thomas Abraham <thomas.abraham@...>
Tested-by: Thomas Abraham <thomas.abraham@...>

Thanks.


[PATCH] UefiPayloadPkg: Hook up PCIE_BASE build option

Sean Rhodes
 

Hook up PCIE_BASE to PcdPciExpressBaseAddress

Cc: Guo Dong <guo.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Maurice Ma <maurice.ma@...>
Cc: Benjamin You <benjamin.you@...>
Signed-off-by: Sean Rhodes <sean@...>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload=
Pkg.dsc
index cfcf38578d..d8afb28d13 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -33,6 +33,8 @@
DEFINE UNIVERSAL_PAYLOAD =3D FALSE=0D
DEFINE SECURITY_STUB_ENABLE =3D TRUE=0D
DEFINE SMM_SUPPORT =3D FALSE=0D
+ DEFINE PCIE_BASE_ADDRESS =3D 0=0D
+ DEFINE PCIE_BASE_LENGTH =3D 0=0D
DEFINE PLATFORM_BOOT_TIMEOUT =3D 3=0D
DEFINE ABOVE_4G_MEMORY =3D TRUE=0D
DEFINE BOOT_MANAGER_ESCAPE =3D FALSE=0D
@@ -506,8 +508,8 @@
=0D
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|31=0D
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100=0D
- gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0=0D
- gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0=0D
+ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|$(PCIE_BASE_ADDRESS)=0D
+ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|$(PCIE_BASE_LENGTH)=0D
gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0=0D
gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE=0D
gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|0=0D
--=20
2.34.1


[PATCH 1/3] UefiPayloadPkg: Allow full screen setup mode

Sean Rhodes
 

Set PCDs ConOutRow, ConOutColumn, SetupConOutRow and SetupConOutColumn
to 0 to allow front page to full the screen.

Cc: Guo Dong <guo.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Maurice Ma <maurice.ma@...>
Cc: Benjamin You <benjamin.you@...>
Signed-off-by: Sean Rhodes <sean@...>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload=
Pkg.dsc
index cfcf38578d..0923f9f1fa 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -504,8 +504,10 @@
## The PCD is used to specify the video vertical resolution of text setu=
p.=0D
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|0=0D
=0D
- gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|31=0D
- gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100=0D
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0=0D
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0=0D
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow|0=0D
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutColumn|0=0D
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0=0D
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0=0D
gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0=0D
--=20
2.34.1

5761 - 5780 of 96735