summaryrefslogtreecommitdiff
path: root/UefiPayloadPkg
AgeCommit message (Collapse)AuthorFilesLines
2022-12-06UefiPayloadPkg: Support multiple firmware volumeMarsX Lin1-1/+15
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4164 To support multiple FVs provided by UPL Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: MarsX Lin <marsx.lin@intel.com>
2022-11-28UefiPayloadPkg: The UPL info section is not aligned at 4-byte boundaryVictorX Hsu1-2/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4153 1.Upgrade spec revision to 0.9 2.Align .upld_info with 4-byte boundary by spec Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: VictorX Hsu <victorx.hsu@intel.com>
2022-11-14OvmfPkg/UefiCpuPkg/UefiPayloadPkg: Rename VmgExitLib to CcExitLibMin M Xu1-1/+1
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4123 VmgExitLib once was designed to provide interfaces to support #VC handler and issue VMGEXIT instruction. After TDVF (enable TDX feature in OVMF) is introduced, this library is updated to support #VE as well. Now the name of VmgExitLib cannot reflect what the lib does. This patch renames VmgExitLib to CcExitLib (Cc means Confidential Computing). This is a simple renaming and there is no logic changes. After renaming all the VmgExitLib related codes are updated with CcExitLib. These changes are in OvmfPkg/UefiCpuPkg/UefiPayloadPkg. Cc: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
2022-11-04UefiPayloadPkg: Boot mode in PHIT HOB will not be updatedVictorX Hsu1-1/+3
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4136 System will depend on Boot Mode value to do different behavior Update during Capsule Update process. So UPL need to support update boot mode. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: VictorX Hsu <victorx.hsu@intel.com>
2022-10-13UefiPayloadPkg: Remove deprecate Crypto ServiceGua Guo1-2/+0
REF : https://bugzilla.tianocore.org/show_bug.cgi?id=4096 TDES and ARC4 services are deprecated so set it as disable. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2022-09-28UefiPayloadPkg: Provide a wrapper for UniversalPayloadBuild.pyVictorX Hsu1-0/+17
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4071 Provide a wrapper to wrap UniversalPayloadBuild.py Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Signed-off-by: VictorX Hsu <victorx.hsu@intel.com>
2022-09-16UefiPayloadPkg/PayloadLoaderPeim: remove GCC build warningJames Lu1-17/+12
Fix the gcc build warning: variable PldInfo set but not used [-Wunused-but-set-variable] Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Gang Chen <gang.c.chen@intel.com>
2022-09-07UefiPayloadPkg: Allow DxeMain.inf to consume the new SerialPortLibKavya1-0/+6
Let DxeMain.inf consume new SerialPortLib to support multiple channel debug message on early DXE if the macro MULTIPLE_DEBUG_PORT_SUPPORT is TRUE. Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: Kavya <k.kavyax.sravanthi@intel.com>
2022-09-07UefiPayloadPkg: Implement a new SerialPortLib instanceKavya2-0/+854
Add new Serial port library instance that consumes the HOB defined in MdeModulePkg/Include/UniversalPayload/SerialPortInfo.h to support multiple UART's. Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: Kavya <k.kavyax.sravanthi@intel.com>
2022-09-05UefiPayloadPkg: To replace the libraries for the capsule driver.KasimX Liu1-1/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4030 For the system support the Capsule function in UPL, we replace the libraries for the Capsule driver. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: KasimX Liu <kasimx.liu@intel.com>
2022-08-23UefiPayloadPkg: Fix Coverity report defectJames Lu3-5/+5
https://bugzilla.tianocore.org/show_bug.cgi?id=4018 Coverity report FORWARD_NULL and OVERFLOW_BEFORE_WIDEN potential defect in UefiPayloadPkg. Signed-off-by: Gregx Yeh <gregx.yeh@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: James Lu <james.lu@intel.com>
2022-08-23UefiPayloadPkg: Add macro to control NvmExpressDxeKavya2-0/+5
Add NVME_ENABLE macro to control NvmExpressDxe driver. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: Kavya <k.kavyax.sravanthi@intel.com>
2022-08-23UefiPayloadPkg: Return PciRootBridges instead of NULLKavya1-2/+2
Return PciRootBridges instead of NULL and set PcdPciDisableBusEnumeration to FALSE when root bridge count is zero. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: Kavya <k.kavyax.sravanthi@intel.com>
2022-08-15UefiPayloadPkg: Remove clearing CR0.WP when protecting pagetableDun Tan1-6/+1
Remove clearing CR0.WP when marking the memory used for page table as read-only in the page table itself created by UefiPayloadEntry. This page table address is written to Cr3 after these protection steps. Till this, the memory used for page table is always RW. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-08-03UefiPayloadPkg: Load Boot Logo into ACPI tableSean Rhodes2-0/+14
If the boot logo is enabled, this will allow edk2 to pass the logo to the OS via ACPI. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2022-08-03UefiPayloadPkg: Add a Macro to enable Boot LogoSean Rhodes4-0/+20
Add a macro called BOOTSPLASH_IMAGE, which when enabled, will display a logo at boot time. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2022-08-03UefiPayloadPkg/PlatformBootManagerLib: Correct spacing in boot promptSean Rhodes1-1/+1
Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2022-07-27UefiPayloadPkg: Add support for logging to CBMEM consoleBenjamin Doron4-6/+327
Writes TianoCore debug logs into the CBMEM console ringbuffer, from where the user can retrieve them with the `cbmem` userspace utility. The intention is to aid in debugging non-fatal issues even in release builds, or simply make TianoCore's logs available to those interested. Consequently, MDEPKG_NDEBUG must be masked. As an in-memory debug logging library, ASSERTs must be non-fatal to be seen, so they neither dead-loop nor create a breakpoint. It is assumed that ASSERT() neither enforces fatal conditions nor security integrity, as release builds do not call DebugAssert() from the ASSERT macro. More detailed debug logs are produced with the DEBUG_CODE macro, but this guards other debug-related code throughout the codebase. To avoid changing behaviour on release builds, this is only set for debug builds. Tested on QEMU, dumping the appropriate memory region in the UEFI shell shows the TianoCore log. An improved revision of the debug library used in several coreboot-related EDK2 forks, including MrChromebox's. Previous revisions also tested on an Acer Aspire VN7-572G laptop. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
2022-07-27UefiPayloadPkg: Fix RelaAddress type always mismatch in if conditionJames Lu1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3984 Under function RolocateElfDynamic() in Elf32Lib.c if (RelaAddress == MAX_UINT64) is always FALSE while RelaAddress is UINT32 Fix is to modify if condition check to "if (RelaAddress == MAX_UINT32)" Cc: Ray Ni <ray.ni@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: James Lu <james.lu@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
2022-07-25UefiPayloadPkg: Add macro to support selection of CryptoDxe driverPaytonX Hsieh2-0/+12
REF : https://bugzilla.tianocore.org/show_bug.cgi?id=4006 Add CRYPTO_PROTOCOL_SUPPORT to decide CryptoDxe built into UPL.efi If CRYPTO_PROTOCOL_SUPPORT is true, BIOS will use crypto protocol instead of building OpensslLib into drivers. Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: PaytonX Hsieh <paytonx.hsieh@intel.com>
2022-07-18UefiPayloadPkg: Add macro to support selective driver in UPLJames Lu2-1/+34
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3967 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 - SD_ENABLE: SdMmcPciDxe, EmmcDxe, SdDxe - PS2_MOUSE_ENABLE: Ps2MouseDxe Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: James Lu <james.lu@intel.com> Reviewed-by: Ray Ni <Ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
2022-07-16UefiPayloadPkg/PlatformBootManagerLib: Evenly space boot promptSean Rhodes1-4/+4
Add 4 spaces before the boot prompt "F2 or Down..." so that the spacing is equadistant from the top, which is spaced with a `\n`, and the left. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Guo Dong <guo.dong@intel.com>
2022-07-11UefiPayloadPkg: Add CryptoDxe driver to UefiPayloadPaytonX Hsieh2-2/+35
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3979 Add CryptoDxe into UPL. Drviers can locate protocol instead of building openssl lib into drivers. This can reduce the binary size that UPL required. Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: PaytonX Hsieh <paytonx.hsieh@intel.com>
2022-06-30UefiPayloadPkg: Align Attribute value with UPL specGua Guo1-0/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3963 Based on UPL spec 2.12.2. Universal Payload Information Section, it defines item "Attribute" on UPLD_INFO_HEADER for Debug build should be "1", and Release build should be "0". Currently, The value of item "Attribute" is always "0" Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: James Lu <james.lu@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2022-06-24UefiPayloadPkg: Backward support with python 3.6KasimX Liu1-8/+25
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3960 Currently, UniversalPayloadBuild.py don't have support python3.6, we use python3.6 will encounter f"" failure use the change to fix it to support python3.6/3.7/3.8. Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: KasimX Liu <kasimx.liu@intel.com>
2022-06-21UefiPayloadPkg: UniversalPayloadBuild.py to support --pcd featureGua Guo1-0/+8
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3955 Currently, UPL freezed all PCD and only known UPL hob can hook DXE Drivers behavior, add optional feature on UniversalPayloadBuild.py to have another way to hook PCD value. Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: : Ray Ni <ray.ni@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2022-06-20UefiPayloadPkg: Always split page table entry to 4K if it covers stack.Liu, Zhiguang1-10/+2
We observed page fault in the following situation: 1.PayloadEntry uses 2M entry in page table to cover DXE stack range. 2.In DXE phase, image protection code needs to mark some sub-range in this 2M entry as readonly. So the the 2M page table entry is split to 512 4K entries, and some of the entries are marked as readonly. (the entries covering stack still remain R/W) 3.Page fault exception happens when trying to access stack. Always split the page table entry to 4K if it covers stack to avoid this issue. More discussion about this issue can be seen at below link https://edk2.groups.io/g/devel/topic/91446026 Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2022-06-17UefiPayloadPkg: Increase the PcdMaximumUnicodeStringLengthXie, Yuanhao1-0/+1
The maximum Unicode string could be as large as 1800000 in certain platforms when HII code builds the configuration strings. This causes assertion in PrintLib. The patch increases the PcdMaximumUnicodeStringLength to 1800000 to avoid the assertion. Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com> Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com>
2022-05-27UefiPayloadPkg: Align SpecRevision value with UPL specGua Guo1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3933 URL: https://universalpayload.github.io/documentation/ 1. Currently, SpecRevision on USF spec is 0.7. Change to align it. 2. SpecRevision is not be patched into UniversalPayloadInfo.bin due to different structure item name. Change item name from "HeaderRevision" to "SpecRevision" to check the correct value can be patched. Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2022-05-27UefiPayloadPkg: Align Identifier value with UPL specGua Guo1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3933 URL: https://universalpayload.github.io/documentation/ Currently, Identifier value is "UPLD", it needs to have correct value "PLDH" based on Universal Payload Specification spec section 2.12.2 Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2022-05-19UefiPayloadPkg: Add VariableFlashInfoLibMichael Kubacki1-0/+1
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3479 Adds an instance of VariableFlashInfoLib to the platform build as it is a new library class introduced in MdeModulePkg. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Guo Dong <guo.dong@intel.com>
2022-05-13UefiPayloadPkg: Connect all root bridge in PlatformBootManagerBeforeConsoleLiu, Zhiguang2-35/+15
Some ConIn or ConOut device may not in the first root bridge, so connect all root bridge before detect ConIn and ConOut device. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2022-05-13UefiPayloadPkg: Add Serial IO device path according to related protocolLiu, Zhiguang3-107/+41
Current code follow some rules to check if the PCI device connected to a serial port device, but some platform or hardware doesn't follow such rule. By locating gEfiSerialIoProtocolGuid protocol, we can find the related device path. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2022-05-13UefiPayloadPkg: Simplify code logicLiu, Zhiguang2-73/+25
A little overdesign about VisitAllPciInstances function, since there are two call back functions. Simplify the code logic by combining the two call back functions, and unused parameters. Change the PROTOCOL_INSTANCE_CALLBACK to SIMPLE_PROTOCOL_INSTANCE_CALLBACK because the former is also defined in OvmfPkg. Rename it to avoid confusion. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2022-05-09UefiPayloadPkg: Fix the UPL build failureTan, Dun1-3/+3
Add double quotes to LlvmObjcopyPath. Blank space in LlvmObjcopyPath will cause build failure. This build failure is introduced by 2306555bf908 ( "UefiPayloadPkg: Fix IA32 entry build failure"). Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems>
2022-05-06UefiPayloadPkg: Add CpuLib to module INFs that depend on UefiCpuLib.Yu Pu3-0/+3
There are two libraries: MdePkg/CpuLib and UefiCpuPkg/UefiCpuLib and UefiCpuPkg/UefiCpuLib will be merged to MdePkg/CpuLib. To avoid build failure, add CpuLib dependency to all modules that depend on UefiCpuLib. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Yu Pu <yu.pu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-05-06UefiPayloadPkg: Add definition for PayloadCommandLine HOBduntan2-0/+29
Add definition for UNIVERSAL_PAYLOAD_COMMAND_LINE Hob. This Hob is used to pass command Line to Payload. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
2022-04-22UefiPayloadPkg: Fix IA32 entry build failureTan, Dun1-6/+12
The ObjCopyFlag and EntryOutputDir need to be modified when building IA32 UniversalPayload Entry Signed-off-by: Dun Tan <dun.tan@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-04-14UefiPayloadPkg: Fix the build failureGuo Dong1-2/+2
When Quite parameter is not provided, its default value would be "None" instead of "". So update its default value not to impact the build. Cc: Ray Ni <ray.ni@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Guo Dong <guo.dong@intel.com> Acked-by: Dun Tan <dun.tan@intel.com>
2022-04-10UefiPayloadPkg: Add --quiet argument to Universal Payload build scriptGuo Dong1-2/+4
Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-04-10UefiPayloadPkg: Add dependency of VariableSmm driver.Li, Zhihao1-1/+2
REF? https://bugzilla.tianocore.org/show_bug.cgi?id=3882 UefiCpuPkg define a new Protocol with the new services SmmWaitForAllProcessor(), which can be used by SMI handler to optionally wait for other APs to complete SMM rendezvous in relaxed AP mode. VariableSmm driver need use SmmCpuRendezvousLib, So add SmmCpuRendezvousLib dependency in UefiPayloadPkg which use VariableSmm driver. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Zhihao Li <zhihao.li@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
2022-04-10UefiPayloadPkg: Support IA32 BuildGuo Dong1-1/+3
The payload entry module should support to build as IA32 image beside X64 image so that it could work with 32bit bootloaders. This patch adds a option build parameter for arch selection. Cc: Ray Ni <ray.ni@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2022-04-10UefiPayloadPkg: Fix PciHostBridgeLibLean Sheng Tan1-4/+9
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. Fixes assertion "ASSERT [PciHostBridgeDxe] Bridge->MemAbove4G.Base >= 0x0000000100000000ULL". Tested with coreboot as bootloader on platforms that have PCI resource above 4GiB and on platforms that don't have resource above 4GiB. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by Sean Rhodes <sean@starlabs.systems> Reviewed-by: Guo Dong <guo.dong@intel.com>
2022-04-03UefiPayloadPkg: Consume the new added DebugPrintErrorLevelLib instanceXie, Yuanhao1-1/+1
Change the DebugPrintErrorLevelLib instance in UefiPayloadPkg.dsc to allow bootloader to config DebugPrintErrorLevel. Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
2022-04-03UefiPayloadPkg: Change some configuration of the payloadXie, Yuanhao1-5/+5
1. Use PeiDxeDebugLibReportStatusCode library for DebugLib, and add ReportStatusCodeLib. 2. Remove gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize overrided in UefiPayloadPkg.dsc. 3. Change PcdHardwareErrorRecordLevel to 1 Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
2022-04-03UefiPayloadPkg: Add a new DebugPrintErrorLevelLib instanceXie, Yuanhao4-1/+151
It consumes the HOB defined in UefiPayloadPkg/Include/Guid/DebugPrintErrorLevel.h, and allow bootloader to config DebugPrintErrorLevel. Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
2022-03-29UefiPayloadPkg: Make Boot Timeout configurableGuo Dong1-1/+2
Signed-off-by: Sean Rhodes sean@starlabs.systems Reviewed-by: Guo Dong <guo.dong@intel.com>
2022-03-29UefiPayloadPkg/Library/PlatformBootManagerLib: Remove broken VGA detectionPatrick Rudolph1-9/+9
This fixes an issue where the framebuffer provided by coreboot or slimbootloader will only work on the primary VGA device. If the framebuffer corresponds to a different device the screen will stay black. In addition, the code doesn't work for multiple graphic cards, has reference to non existing functions, and is a duplication of common code. Call EfiBootManagerConnectVideoController on every display device found, not only the legacy VGA device. This is the same as OvmfPkg does. Allows to display output on the framebuffer set up by firmware, which might not be the VGA device. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
2022-03-29UefiPayloadPkg: Fix PciHostBridgeLibPatrick Rudolph1-119/+18
On modern platforms with TBT devices the coreboot resource allocator opens large PCI bridge MMIO windows above 4GiB to place hotplugable PCI BARs there as they won't fit below 4GiB. In addition modern GPGPU devices have very big PCI bars that doesn't fit below 4GiB. The PciHostBridgeLib made lots of assumptions about the coreboot resource allocator that were not verified at runtime and are no longer true. Remove all of the 'coreboot specific' code and implement the same logic as OvmfPkg's ScanForRootBridges. Fixes assertion "ASSERT [PciHostBridgeDxe] Bridge->Mem.Limit < 0x0000000100000000ULL". Tested with coreboot as bootloader on platforms that have PCI resources above 4GiB and on platforms that don't have resources above 4GiB. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com>
2022-03-29UefiPayloadPkg: Fix architecture in the build instructionAkihiko Odaki1-1/+1
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>