Date   

Re: [PATCH] UefiPayloadPkg: Make Boot Manager Key configurable

Sheng Lean Tan
 

Merged:

https://github.com/tianocore/edk2/pull/2596


Re: [PATCH 43/43] UefiPayloadPkg: Make Boot Manager Key configurable

Sheng Lean Tan
 

Merged:

https://github.com/tianocore/edk2/pull/2596


Re: [PATCH 2/2] UefiPayloadPkg: Fix case of protocol

Sheng Lean Tan
 

Merged:

https://github.com/tianocore/edk2/pull/2591


Re: [PATCH 43/43] UefiPayloadPkg: Provide option to use Boot Splash

Sheng Lean Tan
 

Done in another mail:

https://edk2.groups.io/g/devel/topic/89281295#86816


Re: [PATCH 2/2] UefiPayloadPkg: Fix case of protocol

Sheng Lean Tan
 

Merged.

https://github.com/tianocore/edk2/pull/2591


Re: [PATCH 32/32] UefiPayloadPkg: Add build option for Above 4G Memory

Sheng Lean Tan
 

Merged.

https://github.com/tianocore/edk2/pull/2590


Re: [PATCH] UefiPayloadPkg: Make Boot Timeout configurable

Sheng Lean Tan
 

Merged.

https://github.com/tianocore/edk2/commit/55637a2894babca97945eeca1da0d431f74f8627


Re: [PATCH] UefiPayloadPkg: Make Boot Timeout configurable

Sheng Lean Tan
 

[to keep record]

This is merged:

https://github.com/tianocore/edk2/commit/55637a2894babca97945eeca1da0d431f74f8627


Re: [GSoC 2022] Introducing myself & seeking for project ideas

Pedro Falcato
 

Hi Théo,

Welcome! Pleasure to meet you!
As a former GSoC student myself, I advise you to look for something you fancy instead of just looking for something that fits your skill set. It's way better to find something you like (even if you're not 100% familiar with it) instead of looking for something that perfectly fits your existing skill set; remember, you're also here to learn :)
Most tasks in https://github.com/tianocore/tianocore.github.io/wiki/Tasks are up-to-date. In fact, I'm fairly sure the one you linked wasn't finished last year (it's not in the GSoC archive and I don't see any patches that were merged).
Of course, the tasks are just examples and you can diverge from those if you'd like.

For a brief overview of the project:

- https://github.com/tianocore/edk2 is the main EDK2 repo that contains lots of support code (that's used throughout most/all platforms) and OVMF (edk2-on-virtual machines, like QEMU; good for testing your changes). Most of the development is done here. The build tools also reside here. You can look at the various packages inside edk2 to see if there's anything you like.
- https://github.com/tianocore/edk2-platforms is the repo where platform specific code resides. As an example, https://github.com/tianocore/edk2-platforms/tree/master/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G was contributed by a GSoC student last year. edk2-platforms also has advanced, less commonly used features like my Ext4Pkg, which I maintain since last year's GSoC.
- https://github.com/tianocore/edk2-libc contains a C standard library that edk2 has in order to run standard C programs. It also has various ports of programs like Python to UEFI.
Of course, you also have more repos like edk2-test, edk2-staging, etc :)

So yeah, take a look and see if there's anything you like :) Of course, if you could tell us more about yourself and your interests inside embedded programming, it would be easier to help out.

Best regards,
Pedro


On Thu, Mar 31, 2022 at 4:06 AM Théo Jehl <theojehl76@...> wrote:
Hello,
I’m Théo, a French 1st year master’s student, specialized in embedded
systems engineering. I’m interested in joining EDK II development as
part of the Google Summer of Code program.

I’ve learnt operating system structures in uni, I know how to write
C/C++ and I started learning x86 ASM.
 I also worked with uni on a disk driver and virtual memory mapping.

Currently I have little to no experience in firmware/UEFI as I’m only
starting in this field.
I wanted to ask if any important project ideas were available that
would fit my skills. I have checked the task list provided and I feel
like it’s outdated, like the audio output project [1] which was
completed a year ago.

Thanks in advance.
Théo

[1] https://github.com/tianocore/tianocore.github.io/wiki/Tasks#Audio_Output_device_support







--
Pedro Falcato


Now: TianoCore edk2-test Bug Triage Meeting - 03/31/2022 #cal-notice

devel@edk2.groups.io Calendar <noreply@...>
 

TianoCore edk2-test Bug Triage Meeting

When:
03/31/2022
10:00pm to 11:00pm
(UTC+08:00) Asia/Shanghai

Where:
https://armltd.zoom.us/j/93809865843?pwd=dU1hSzk4NHM2RGhaRDRyWWZxUzY5dz09&from=addon

Organizer: Edhaya Chandran Edhaya.Chandran@...

View Event

Description:


Event: TianoCore edk2-test Bug Triage Meeting - 03/31/2022 #cal-reminder

devel@edk2.groups.io Calendar <noreply@...>
 

Reminder: TianoCore edk2-test Bug Triage Meeting

When:
03/31/2022
10:00pm to 11:00pm
(UTC+08:00) Asia/Shanghai

Where:
https://armltd.zoom.us/j/93809865843?pwd=dU1hSzk4NHM2RGhaRDRyWWZxUzY5dz09&from=addon

Organizer: Edhaya Chandran Edhaya.Chandran@...

View Event

Description:


[Patch V4 2/2] UefiPayloadPkg: Consume the new added DebugPrintErrorLevelLib instance

Yuanhao Xie
 

Change the DebugPrintErrorLevelLib instance in UefiPayloadPkg.dsc to
allow bootloader to config DebugPrintErrorLevel.

Cc: Guo Dong <guo.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Maurice Ma <maurice.ma@...>
Cc: Benjamin You <benjamin.you@...>
Cc: Sean Rhodes <sean@...>

Signed-off-by: Yuanhao Xie <yuanhao.xie@...>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 14a8d157a2..49563e3d87 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -239,7 +239,7 @@
#
# Misc
#
- DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+ DebugPrintErrorLevelLib|UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.inf
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
!if $(SOURCE_DEBUG_ENABLE) == TRUE
PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
--
2.30.0.windows.1


[Patch V4 1/2] UefiPayloadPkg: Add a new DebugPrintErrorLevelLib instance

Yuanhao Xie
 

It consumes the HOB defined in
UefiPayloadPkg/Include/Guid/DebugPrintErrorLevel.h, and allow bootloader
to config DebugPrintErrorLevel.

Cc: Guo Dong <guo.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Maurice Ma <maurice.ma@...>
Cc: Benjamin You <benjamin.you@...>
Cc: Sean Rhodes <sean@...>

Signed-off-by: Yuanhao Xie <yuanhao.xie@...>
---
UefiPayloadPkg/Include/Guid/DebugPrintErrorLevel.h | 31 +++++++++++++++++++++++++++++++
UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.inf | 39 +++++++++++++++++++++++++++++++++++++++
UefiPayloadPkg/UefiPayloadPkg.dec | 2 +-
4 files changed, 148 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/Include/Guid/DebugPrintErrorLevel.h b/UefiPayloadPkg/Include/Guid/DebugPrintErrorLevel.h
new file mode 100644
index 0000000000..e28158ab51
--- /dev/null
+++ b/UefiPayloadPkg/Include/Guid/DebugPrintErrorLevel.h
@@ -0,0 +1,31 @@
+/** @file
+ Define the structure for Debug Print Error Level Guid Hob.
+
+Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_H_
+#define UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_H_
+
+#include <Uefi.h>
+#include <UniversalPayload/UniversalPayload.h>
+
+#pragma pack (1)
+//
+// ErrorLevel: The error level of the debug message.
+// Bits for ErrorLevel is declared in
+// edk2\MdePkg\Include\Library\DebugLib.h
+//
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ UINT32 ErrorLevel;
+} UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL;
+
+#pragma pack()
+
+#define UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_REVISION 1
+
+extern GUID gEdkiiDebugPrintErrorLevelGuid;
+#endif
diff --git a/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c
new file mode 100644
index 0000000000..80b3f9fbff
--- /dev/null
+++ b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c
@@ -0,0 +1,77 @@
+/** @file
+ Debug Print Error Level library instance that retrieves
+ the DebugPrintErrorLevel from bootloader.
+
+ Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Base.h>
+#include <Uefi.h>
+#include <PiDxe.h>
+#include <Library/PcdLib.h>
+#include <Library/HobLib.h>
+#include <Guid/DebugPrintErrorLevel.h>
+#include <Library/DebugPrintErrorLevelLib.h>
+#include <UniversalPayload/UniversalPayload.h>
+
+STATIC UINT32 gDebugPrintErrorLevel;
+STATIC BOOLEAN gDebugPrintErrorLevelInitialized = FALSE;
+/**
+ Returns the debug print error level mask for the current module.
+
+ @return Debug print error level mask for the current module.
+
+**/
+UINT32
+EFIAPI
+GetDebugPrintErrorLevel (
+ VOID
+ )
+{
+ VOID *GuidHob;
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader;
+ UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL *DebugPrintErrorLevel;
+
+ if (!gDebugPrintErrorLevelInitialized) {
+ gDebugPrintErrorLevelInitialized = TRUE;
+ gDebugPrintErrorLevel = PcdGet32(PcdDebugPrintErrorLevel);
+ GuidHob = GetFirstGuidHob (&gEdkiiDebugPrintErrorLevelGuid);
+ if (GuidHob != NULL) {
+ GenericHeader = (UNIVERSAL_PAYLOAD_GENERIC_HEADER *)GET_GUID_HOB_DATA (GuidHob);
+ if ((sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) < GET_GUID_HOB_DATA_SIZE (GuidHob))
+ && (GenericHeader->Length <= GET_GUID_HOB_DATA_SIZE (GuidHob))) {
+ if (GenericHeader->Revision == UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_REVISION) {
+ DebugPrintErrorLevel = (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL *)GET_GUID_HOB_DATA (GuidHob);
+ if (DebugPrintErrorLevel->Header.Length > UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD (UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL, ErrorLevel)) {
+ gDebugPrintErrorLevel = DebugPrintErrorLevel->ErrorLevel;
+ }
+ }
+ }
+ }
+ }
+ return gDebugPrintErrorLevel;
+}
+
+/**
+ Sets the global debug print error level mask fpr the entire platform.
+
+ @param ErrorLevel Global debug print error level.
+
+ @retval TRUE The debug print error level mask was sucessfully set.
+ @retval FALSE The debug print error level mask could not be set.
+
+**/
+BOOLEAN
+EFIAPI
+SetDebugPrintErrorLevel (
+ UINT32 ErrorLevel
+ )
+{
+ //
+ // This library uinstance does not support setting the global debug print error
+ // level mask.
+ //
+ return FALSE;
+}
diff --git a/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.inf b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.inf
new file mode 100644
index 0000000000..0845b5a2f4
--- /dev/null
+++ b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.inf
@@ -0,0 +1,39 @@
+## @file
+# Debug Print Error Level library instance that retrieves
+# the DebugPrintErrorLevel from bootloader.
+#
+# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = DebugPrintErrorLevelLibHob
+ FILE_GUID = c3fead6d-bd4c-4131-bd5f-4bbceecc0fef
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = DebugPrintErrorLevelLib
+
+#
+# VALID_ARCHITECTURES = IA32 X64 EBC
+#
+
+[Sources]
+ DebugPrintErrorLevelLibHob.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ UefiPayloadPkg/UefiPayloadPkg.dec
+
+[LibraryClasses]
+ PcdLib
+ HobLib
+
+[Pcd]
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel
+
+[Guids]
+ gEdkiiDebugPrintErrorLevelGuid
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayloadPkg.dec
index 4051172caf..5c1aeb8235 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dec
+++ b/UefiPayloadPkg/UefiPayloadPkg.dec
@@ -31,7 +31,7 @@

##include/Guid/BootManagerMenu.h
gEdkiiBootManagerMenuFileGuid = { 0xdf939333, 0x42fc, 0x4b2a, { 0xa5, 0x9e, 0xbb, 0xae, 0x82, 0x81, 0xfe, 0xef }}
-
+ gEdkiiDebugPrintErrorLevelGuid = { 0xad82f436, 0x75c5, 0x4aa9, { 0x92, 0x93, 0xc5, 0x55, 0x0a, 0x7f, 0xf9, 0x71 }}
gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}
gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
gLoaderMemoryMapInfoGuid = { 0xa1ff7424, 0x7a1a, 0x478e, { 0xa9, 0xe4, 0x92, 0xf3, 0x57, 0xd1, 0x28, 0x32 } }
--
2.30.0.windows.1


Re: [PATCH 2/2] OvmfPkg/ResetVector: Exclude SEV launch secrets page from pre-validation

Gerd Hoffmann
 

Hi,

Check if that page is defined; if it is, skip it in the metadata
list.
In such case, VMM should fill the page with the hashes content, or
explicitly update it as a zero page (if kernel hashes are not used).
Is it an option to just skip the page unconditionally?

I think in the OvmfPkgX64 build the page is not used, so it probably
doesn't matter whenever it is included or not, and it would make
things
a bit less confusing ...
// The below address range was part of the SEV OVMF metadata, and range
// should be pre-validated by the Hypervisor.
{
FixedPcdGet32 (PcdOvmfSecPageTablesBase),
FixedPcdGet32 (PcdOvmfPeiMemFvBase),
},
As the comment says, it assumes the entire range
from PcdOvmfSecPageTablesBase (= 0x800000)
to PcdOvmfPeiMemFvBase (= 0x820000)
is pre-validated by the Hypervisor.

How will it know to actually validate that page at 0x80F000 ?
Probably it doesn't unless we split the entry into two, so we are
effectively trading making the reset vector more complicated vs.
making this list more complicated.

I guess it's not worth the trouble then.

Acked-by: Gerd Hoffmann <kraxel@...>
for or the original patch (and thanks for investigating).

take care,
Gerd


Re: [PATCH] Fix Setup numeric default value incorrect issue

Chen Lin Z
 

Hi All,

Any comments about patch ?

Thanks,
Lin

-----Original Message-----
From: Chen, Lin Z <lin.z.chen@...>
Sent: Monday, March 28, 2022 9:27 PM
To: Wang, Jian J <jian.j.wang@...>; Gao, Liming <gaoliming@...>; Bi, Dandan <dandan.bi@...>; Dong, Eric <eric.dong@...>; devel@edk2.groups.io
Cc: Li, Zhuangzhi <zhuangzhi.li@...>; Zhang, Di <di.zhang@...>; Chen, Lin Z <lin.z.chen@...>
Subject: [PATCH] Fix Setup numeric default value incorrect issue

When default/manufacturing flag get removed from numeric varid, it can't get default value from StructurePcd in 'UpdateDefaultSettingInFormPackage'
function since there is no EFI_IFR_DEFAULT_OP opcode in IFR file. Add a chance to get numeric default value from StructurePcd in the case that numeric minimum value will be used as default value.

Signed-off-by: Chen Lin Z <lin.z.chen@...>
Signed-off-by: Dandan Bi <dandan.bi@...>
---
.../Universal/HiiDatabaseDxe/ConfigRouting.c | 14 +++++++++++
.../Universal/HiiDatabaseDxe/HiiDatabase.h | 23 +++++++++++++++++++
2 files changed, 37 insertions(+)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index 2f792d2965..8bfa0f4bf1 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -2171,6 +2171,7 @@ ParseIfrData (
UINTN PackageOffset; EFI_IFR_VARSTORE *IfrVarStore; EFI_IFR_VARSTORE_EFI *IfrEfiVarStore;+ EFI_IFR_VARSTORE_EFI *IfrEfiVarStoreTmp; EFI_IFR_OP_HEADER *IfrOpHdr; EFI_IFR_ONE_OF *IfrOneOf; EFI_IFR_REF4 *IfrRef;@@ -2187,6 +2188,7 @@ ParseIfrData (
IFR_BLOCK_DATA *BlockData; CHAR16 *VarStoreName; UINTN NameSize;+ UINTN NvDefaultStoreSize; UINT16 VarWidth; UINT16 VarDefaultId; BOOLEAN FirstOneOfOption;@@ -2303,6 +2305,14 @@ ParseIfrData (
} AsciiStrToUnicodeStrS ((CHAR8 *)IfrEfiVarStore->Name, VarStoreName, NameSize);+ IfrEfiVarStoreTmp = AllocatePool (IfrEfiVarStore->Header.Length + AsciiStrSize ((CHAR8 *)IfrEfiVarStore->Name));+ if (IfrEfiVarStoreTmp == NULL) {+ Status = EFI_OUT_OF_RESOURCES;+ goto Done;+ }++ CopyMem (IfrEfiVarStoreTmp, IfrEfiVarStore, IfrEfiVarStore->Header.Length);+ AsciiStrToUnicodeStrS ((CHAR8 *)IfrEfiVarStore->Name, (CHAR16 *)&(IfrEfiVarStoreTmp->Name[0]), AsciiStrSize ((CHAR8 *)IfrEfiVarStore->Name) * sizeof (CHAR16)); if (IsThisVarstore (&IfrEfiVarStore->Guid, VarStoreName, ConfigHdr)) { //@@ -2502,9 +2512,13 @@ ParseIfrData (
// // Set default value base on the DefaultId list get from IFR data. //+ NvDefaultStoreSize = PcdGetSize (PcdNvStoreDefaultValueBuffer); for (LinkData = DefaultIdArray->Entry.ForwardLink; LinkData != &DefaultIdArray->Entry; LinkData = LinkData->ForwardLink) { DefaultDataPtr = BASE_CR (LinkData, IFR_DEFAULT_DATA, Entry); DefaultData.DefaultId = DefaultDataPtr->DefaultId;+ if (NvDefaultStoreSize > sizeof (PCD_NV_STORE_DEFAULT_BUFFER_HEADER)) {+ FindQuestionDefaultSetting (DefaultData.DefaultId, IfrEfiVarStoreTmp, &(IfrOneOf->Question), &DefaultData.Value, VarWidth, QuestionReferBitField);+ } InsertDefaultValue (BlockData, &DefaultData); } }diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
index c4ca6ad6ee..421c293cfc 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
@@ -2308,6 +2308,29 @@ HiiGetConfigRespInfo (
IN CONST EFI_HII_DATABASE_PROTOCOL *This ); +/**+ Find question default value from PcdNvStoreDefaultValueBuffer++ @param DefaultId Default store ID+ @param EfiVarStore Point to EFI VarStore header+ @param IfrQuestionHdr Point to Question header+ @param ValueBuffer Point to Buffer includes the found default setting+ @param Width Width of the default value+ @param BitFieldQuestion Whether the Question is stored in Bit field.++ @retval EFI_SUCCESS Question default value is found.+ @retval EFI_NOT_FOUND Question default value is not found.+**/+EFI_STATUS+FindQuestionDefaultSetting (+ IN UINT16 DefaultId,+ IN EFI_IFR_VARSTORE_EFI *EfiVarStore,+ IN EFI_IFR_QUESTION_HEADER *IfrQuestionHdr,+ OUT VOID *ValueBuffer,+ IN UINTN Width,+ IN BOOLEAN BitFieldQuestion+ );+ // // Global variables //--
2.25.1


Re: [PATCH 2/2] OvmfPkg: Fix PciHostBridgeLibScan

Ard Biesheuvel
 

On Wed, 30 Mar 2022 at 20:29, Sean Rhodes <sean@...> wrote:

From: Patrick Rudolph <patrick.rudolph@...>

Don't assume a 64bit register always holds an address greater than 4GB.
Check the value in the register and decide which Aperature it should be
assigned to.

The same code caused an issue on real hardware. It's unclear if this is an
issue here as well, as it's intended to run on emulated hardware only.
Do you have a link to such a supported issue? Or could you elaborate?
Does it have to do with running out of 64-bit BAR space for resource
that could be located in a 32-bit region as well?


Cc: Ard Biesheuvel <ardb+tianocore@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jordan Justen <jordan.l.justen@...>
Cc: Gerd Hoffmann <kraxel@...>
Signed-off-by: Patrick Rudolph <patrick.rudolph@...>
---
.../PciHostBridgeLibScan/ScanForRootBridges.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/OvmfPkg/Library/PciHostBridgeLibScan/ScanForRootBridges.c b/OvmfPkg/Library/PciHostBridgeLibScan/ScanForRootBridges.c
index 5fb02a89b9..1ff96be57f 100644
--- a/OvmfPkg/Library/PciHostBridgeLibScan/ScanForRootBridges.c
+++ b/OvmfPkg/Library/PciHostBridgeLibScan/ScanForRootBridges.c
@@ -331,14 +331,18 @@ ScanForRootBridges (
Base = ((UINT32)Pci.Bridge.PrefetchableMemoryBase & 0xfff0) << 16;
Limit = (((UINT32)Pci.Bridge.PrefetchableMemoryLimit & 0xfff0)
<< 16) | 0xfffff;
- MemAperture = &Mem;
if (Value == BIT0) {
- Base |= LShiftU64 (Pci.Bridge.PrefetchableBaseUpper32, 32);
- Limit |= LShiftU64 (Pci.Bridge.PrefetchableLimitUpper32, 32);
- MemAperture = &MemAbove4G;
+ Base |= LShiftU64 (Pci.Bridge.PrefetchableBaseUpper32, 32);
+ Limit |= LShiftU64 (Pci.Bridge.PrefetchableLimitUpper32, 32);
}

if (Base < Limit) {
+ if (Base < BASE_4GB) {
+ MemAperture = &Mem;
+ } else {
+ MemAperture = &MemAbove4G;
+ }
+
if (MemAperture->Base > Base) {
MemAperture->Base = Base;
}
--
2.32.0



------------
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88266): https://edk2.groups.io/g/devel/message/88266
Mute This Topic: https://groups.io/mt/90138165/5717338
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [ardb+tianocore@...]
------------


Re: [PATCH 3/3] UefiPayloadPkg: Add --quiet argument to Universal Payload build script

Ni, Ray
 

Reviewed-by: Ray Ni <ray.ni@...>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sean Rhodes
Sent: Wednesday, March 30, 2022 4:32 AM
To: devel@edk2.groups.io
Cc: Rhodes, Sean <sean@...>
Subject: [edk2-devel] [PATCH 3/3] UefiPayloadPkg: Add --quiet argument to Universal Payload build script

Signed-off-by: Sean Rhodes <sean@...>
---
UefiPayloadPkg/UniversalPayloadBuild.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/UniversalPayloadBuild.py
index 1b99eeff34..61423e5908 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -54,6 +54,7 @@ def BuildUniversalPayload(Args, MacroList):
BuildTarget = Args.Target

ToolChain = Args.ToolChain

BuildArch = "X64" if Args.Arch == 'X64' else "IA32 -a X64"

+ Quiet = "-q" if Args.Quiet else " "

ElfToolChain = 'CLANGDWARF'



EntryModuleInf = os.path.normpath("UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf")

@@ -82,13 +83,13 @@ def BuildUniversalPayload(Args, MacroList):
#

# Building DXE core and DXE drivers as DXEFV.

#

- BuildPayload = f"build -p {DscPath} -b {BuildTarget} -a X64 -t {ToolChain} -y {PayloadReportPath}"

+ BuildPayload = f"build -p {DscPath} -b {BuildTarget} -a X64 -t {ToolChain} -y {PayloadReportPath} {Quiet}"

BuildPayload += Defines

RunCommand(BuildPayload)

#

# Building Universal Payload entry.

#

- BuildModule = f"build -p {DscPath} -b {BuildTarget} -a {BuildArch} -m {EntryModuleInf} -t {ElfToolChain} -y {ModuleReportPath}"

+ BuildModule = f"build -p {DscPath} -b {BuildTarget} -a {BuildArch} -m {EntryModuleInf} -t {ElfToolChain} -y {ModuleReportPath} {Quiet}"

BuildModule += Defines

RunCommand(BuildModule)



@@ -120,6 +121,7 @@ def main():
parser.add_argument('-a', '--Arch', choices=['IA32', 'X64'], help='Specify the ARCH for payload entry module. Default build X64 image.', default ='X64')

parser.add_argument("-D", "--Macro", action="append", default=["UNIVERSAL_PAYLOAD=TRUE"])

parser.add_argument('-i', '--ImageId', type=str, help='Specify payload ID (16 bytes maximal).', default ='UEFI')

+ parser.add_argument('-q', "--Quiet", help="Less verbose output", action='store_true')

MacroList = {}

args = parser.parse_args()

if args.Macro is not None:

--
2.32.0



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88205): https://edk2.groups.io/g/devel/message/88205
Mute This Topic: https://groups.io/mt/90117696/1712937
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [ray.ni@...]
-=-=-=-=-=-=


Re: [PATCH 2/3] UefiPayloadPkg: Fix build on IA32

Ni, Ray
 

Reviewed-by: Ray Ni <ray.ni@...>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sean Rhodes
Sent: Wednesday, March 30, 2022 4:32 AM
To: devel@edk2.groups.io
Cc: Rhodes, Sean <sean@...>
Subject: [edk2-devel] [PATCH 2/3] UefiPayloadPkg: Fix build on IA32

Signed-off-by: Sean Rhodes <sean@...>
---
UefiPayloadPkg/UniversalPayloadBuild.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/UniversalPayloadBuild.py
index ac965766c7..1b99eeff34 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -60,7 +60,7 @@ def BuildUniversalPayload(Args, MacroList):
DscPath = os.path.normpath("UefiPayloadPkg/UefiPayloadPkg.dsc")

BuildDir = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/UefiPayloadPkgX64"))

FvOutputDir = os.path.join(BuildDir, f"{BuildTarget}_{ToolChain}", os.path.normpath("FV/DXEFV.Fv"))

- EntryOutputDir = os.path.join(BuildDir, f"{BuildTarget}_{ElfToolChain}", os.path.normpath("X64/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry/DEBUG/UniversalPayloadEntry.dll"))

+ EntryOutputDir = os.path.join(BuildDir, f"{BuildTarget}_{ElfToolChain}", f"{Args.Arch}", os.path.normpath("UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry/DEBUG/UniversalPayloadEntry.dll"))

PayloadReportPath = os.path.join(BuildDir, "UefiUniversalPayload.txt")

ModuleReportPath = os.path.join(BuildDir, "UefiUniversalPayloadEntry.txt")

UpldInfoFile = os.path.join(BuildDir, "UniversalPayloadInfo.bin")

--
2.32.0



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88204): https://edk2.groups.io/g/devel/message/88204
Mute This Topic: https://groups.io/mt/90117695/1712937
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [ray.ni@...]
-=-=-=-=-=-=


Re: [Patch V3 1/2] UefiPayloadPkg: Add a new DebugPrintErrorLevelLib instance

Ni, Ray
 

+} UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL;
+
+#pragma pack()
+
+#define UNIVERSAL_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_REVISION 1

Please change above macro to UEFI_PAYLOAD_DEBUG_PRINT_ERROR_LEVEL_REVISION.


回复: [edk2-devel] [PATCH v2 1/1] Basetools: fix gcc workaround

gaoliming
 

Christine:
Can you try the option -Wno-unknown-warning to see whether it disables the
warning about an unrecognized command line option?

Thanks
Liming
-----邮件原件-----
发件人: Chen, Christine <yuwei.chen@...>
发送时间: 2022年3月31日 10:47
收件人: devel@edk2.groups.io; Chen, Christine <yuwei.chen@...>;
Gerd Hoffmann <kraxel@...>; Kinney, Michael D
<michael.d.kinney@...>; Sean Brogan <sean.brogan@...>;
Gao, Liming <gaoliming@...>; Shi, Steven
<steven.shi@...>; Feng, Bob C <bob.c.feng@...>
抄送: Rebecca Cran <rebecca@...>; Pawel Polawski
<ppolawsk@...>; Oliver Steffen <osteffen@...>
主题: RE: [edk2-devel] [PATCH v2 1/1] Basetools: fix gcc workaround

Since the gcc12 has the incompatible change from GCC5.4, I'd also suggest
we
could create a new TOOL CHAIN for gcc12.
The error reports I collected show in gcc5.4 ,
"-Wno-error=stringop-overflow"
is an unrecognized command line option which is available in gcc12.

Thanks,
Christine (Yuwei)
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yuwei
Chen
Sent: Thursday, March 31, 2022 8:51 AM
To: Gerd Hoffmann <kraxel@...>; devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@...>; Rebecca Cran
<rebecca@...>; Pawel Polawski <ppolawsk@...>; Oliver
Steffen <osteffen@...>; Gao, Liming <gaoliming@...>
Subject: Re: [edk2-devel] [PATCH v2 1/1] Basetools: fix gcc workaround

Hi Hoffmann,

I received some reports that some platforms are using gcc5.4. With this
patch,
these platform builds are still broken.
Would you like to revert the original commits?

Thanks,
Christine (Yuwei)

-----Original Message-----
From: Gerd Hoffmann <kraxel@...>
Sent: Tuesday, March 29, 2022 4:38 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@...>; Rebecca Cran
<rebecca@...>; Pawel Polawski <ppolawsk@...>; Oliver
Steffen <osteffen@...>; Chen, Christine
<yuwei.chen@...>;
Gao, Liming <gaoliming@...>; Gerd Hoffmann
<kraxel@...>
Subject: [PATCH v2 1/1] Basetools: fix gcc workaround

Apply the workaround only in case the compiler is gcc.
Fixes builds with clang.

Fixes: 22130dcd98b4 ("Basetools: turn off gcc12 warning")
Reported-by: Rebecca Cran <rebecca@...>
Signed-off-by: Gerd Hoffmann <kraxel@...>
---
BaseTools/Source/C/DevicePath/GNUmakefile | 2 ++
1 file changed, 2 insertions(+)

diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile
b/BaseTools/Source/C/DevicePath/GNUmakefile
index b05d2bddfa68..6323e7355cc8 100644
--- a/BaseTools/Source/C/DevicePath/GNUmakefile
+++ b/BaseTools/Source/C/DevicePath/GNUmakefile
@@ -13,8 +13,10 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o
DevicePathFromText.o DevicePathUtili

include $(MAKEROOT)/Makefiles/app.makefile

+ifneq ($(CXX), llvm)
# gcc 12 trips over device path handling BUILD_CFLAGS += -Wno-
error=stringop-overflow
+endif

LIBS = -lCommon
ifeq ($(CYGWIN), CYGWIN)
--
2.35.1



4281 - 4300 of 92493