summaryrefslogtreecommitdiff
path: root/UefiPayloadPkg
AgeCommit message (Collapse)AuthorFilesLines
2024-06-11UefiPayloadPkg: Enable UPL FIT build config from cmdlineDhaval1-1/+3
Provide commandline configuration to select proper platform file. Cc: Gua Guo <gua.guo@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: James Lu <james.lu@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
2024-06-10UefiPayloadPkg: Fix LoadDxeCore for payload size > 16MBSebastian Witt1-2/+3
Fix calculation of first section in FileFindSection for FILE2 headers in UefiPayloadEntry module. Signed-off-by: Sebastian Witt <sebastian.witt@siemens.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2024-05-30UefiPayloadPkg: Update ReadMe.md to swig installGua Guo1-1/+3
Update ReadMe.md for swig install process in windows OS. Cc: Chasel Chiu <chasel.chiu@intel.com> 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> Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
2024-05-08UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLibJiaxin Wu1-0/+2
This patch just includes SmmRelocationLib in 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: Ray Ni <ray.ni@intel.com> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
2024-04-17UefiPayloadPkg: Prepare UefiPayloadPkg to use the AmdSvsmLib libraryTom Lendacky1-0/+1
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4654 The MpInitLib library will be updated to use the new AmdSvsmLib library. To prevent any build breakage, update the UefiPayloadPkg DSC file to include the AmdSvsmLib NULL library. Cc: Gua Guo <gua.guo@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: James Lu <james.lu@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
2024-03-08UefiPayloadPkg: auto-generate SEC ProcessLibraryConstructorList() declLaszlo Ersek4-13/+3
Rely on AutoGen for declaring ProcessLibraryConstructorList(). Build-tested with: python UefiPayloadPkg/UniversalPayloadBuild.py -a X64 -b DEBUG -t GCC5 python UefiPayloadPkg/UniversalPayloadBuild.py -a X64 -b DEBUG -f \ -t GCC5 build -a X64 -b DEBUG -p UefiPayloadPkg/UefiPayloadPkg.dsc -t GCC5 \ -D BUILD_ARCH=X64 Cc: Gua Guo <gua.guo@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: James Lu <james.lu@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20240305113843.68812-11-lersek@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
2024-03-06UefiPayloadPkg: Make Dsc accomodative of other archsDhaval1-21/+27
Current DSC files contains a lot of files which are specific to X86 arch. Need to move around files under arch specific sections. 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> Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2024-03-04UefiPayloadPkg: UPL arch backward support ELFGua Guo1-1/+1
After 11ad164bcea6b0ed3628d merge, ELF format API won't meet backward requirement. Cc: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2024-02-24UefiPayloadPkg/Gop: Clean up unused protocol and GuidGua Guo1-11/+0
Below Guid is redundant code on UefiPayloadPkg.dec 1. gBmpImageGuid 2. gPlatformGOPPolicyGuid Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Cc: Guo Dong <guo.dong@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: Gua Guo <gua.guo@intel.com>
2024-02-23UefiPayloadPkg: Make UPL build script arch agnosticDhaval4-22/+26
Current implementation makes assumptions about arch it will be built for. Need to make it more generic to add follow up support for RISCV. Right now it does not build for RV until relevant dsc file is available. Cc: Guo Dong <guo.dong@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: Dhaval Sharma <dhaval@rivosinc.com>
2024-02-01UefiPayloadPkg/Crypto: Support external Crypto drivers.MarsX Lin1-0/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4661 There is potential build problem when CRYPTO_PROTOCOL_SUPPORT is set to TRUE and CRYPTO_DRIVER_EXTERNAL_SUPPORT is set to TRUE Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Guo Dong <guo.dong@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>
2024-01-26UefiPayloadPkg/Crypto: Support external Crypto drivers.Gua Guo2-1/+11
Crypto in serveral case will use old version or latest version, Platform may choose to only update Crypto drivers without updating whole UPL, in this case the Crypto driver will provide by platform payload outside the common UPL binary. Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2024-01-22UefiPayloadPkg: CbParseLib: Fix integer overflowPatrick Rudolph1-1/+1
The IMD entry uses the 32bit start field as relative offset to root. On Ia32X64 this works fine as UINTN is also 32 bit and negative relative offsets are properly calculated due to an integer overflow. On X64 this doesn't work as UINTN is 64 bit and the offset is no longer subtracted, but it's added to the root. Fix that by sign extending the start field to 64 bit. Test: Booting UefiPayloadPkg still works on Ia32X64 and now also works on X64. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-01-16UefiPayloadPkg/Hob: Integer Overflow in CreateHob()Gua Guo3-6/+53
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4166 Fix integer overflow in various CreateHob instances. Fixes: CVE-2022-36765 The CreateHob() function aligns the requested size to 8 performing the following operation: ``` HobLength = (UINT16)((HobLength + 0x7) & (~0x7)); ``` No checks are performed to ensure this value doesn't overflow, and could lead to CreateHob() returning a smaller HOB than requested, which could lead to OOB HOB accesses. Reported-by: Marc Beatove <mbeatove@google.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Cc: John Mathew <john.mathews@intel.com> Authored-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2024-01-10UefiPayloadPkg/UefiPayloadEntry: Remove SCI enabling checkGang Chen1-38/+0
It's too early to check the SCI enable status, which is set in the BDS phase ususally. Remove the check from UPL. Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Gang Chen <gang.c.chen@intel.com>
2024-01-08UefiPayloadPkg: Add macro to enable selection of timerHua Ma2-0/+20
Add macro to enable selection of timer - HPET: UEFI Payload will use HPET timer - LAPIC: UEFI Payload will use local APIC timer 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> Signed-off-by: Hua Ma <hua.ma@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-12-20UefiPayloadPkg: Specifies SmmCpuSyncLib instanceJiaxin Wu1-0/+1
This patch is to specify SmmCpuSyncLib instance for UefiPayloadPkg. Cc: Laszlo Ersek <lersek@redhat.com> 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: Ray Ni <ray.ni@intel.com> Cc: Zeng Star <star.zeng@intel.com> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2023-11-27UefiPayloadPkg: Add ImagePropertiesRecordLib InstanceTaylor Beebe1-0/+1
Add an instance of ImagePropertiesRecordLib which will be used by the DXE Core. 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> Signed-off-by: Taylor Beebe <taylor.d.beebe@gmail.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-10-27UefiPayloadPkg: Fix incorrect code on Fit function.BruceX Wang2-11/+6
1. Add firmware volume need to check firmware volume exist or not. 2. Remove clang version check dependency. 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> Signed-off-by: BruceX Wang <brucex.wang@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-09-26UefiPayloadPkg: Add FIT supportBrucex.Wang12-96/+1892
Provide Fit format for UniversalPayload, developer can use argument "--Fit" to build UniversalPayload.fit 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> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: BruceX Wang <brucex.wang@intel.com>
2023-08-28UefiPayloadPkg:Enhance the build processing for UniversalpayloadKasimX Liu1-3/+8
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4532 To Copy the PrebuildUplBinary to Build folder then add/replace Fvs. 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>
2023-07-11UefiPayloadPkg: Integrate UiApp and BootManagerMenuApp into MultiFvMarsX Lin7-94/+11
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4347 To put UiApp.inf and BootManagerMenuApp.inf to proper FV(BDSFV) 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>
2023-06-14UefiPayloadPkg: Fix incorrect code on AddSectionHeaderBruceX Wang1-3/+3
Fix incorrect code on AddSectionHeader32() and AddSectionHeader64() 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> Signed-off-by: BruceX Wang <brucex.wang@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-06-13UefiPayloadPkg: Add CAPSULE_SUPPORT in UPL and set it as FALSE in defaultMarsX Lin1-0/+5
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4479 Add CAPSULE_SUPPORT to optionally select CapsuleLib instance, default value is FALSE. Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Cc: Guo Dong <guo.dong@intel.com> Signed-off-by: MarsX Lin <marsx.lin@intel.com>
2023-06-07UefiPayloadPkg: Enhance build script for BuildEntryOnlyGua Guo1-2/+3
Currently, have two command for pre-build binary support 1. --BuildEntryOnly: build UPL Entry file 2. --PreBuildUplBinary: build UPL binary based on UPL And these two commands should be exclusived, shouldn't have chance run it in the meantime. Case1: Build UPL entry with CLANGDWARF python UefiPayloadPkg/UniversalPayloadBuild.py --BuildEntryOnly Case2: Use pre-built UPL entry and build other fv by VS2019 python UefiPayloadPkg/UniversalPayloadBuild.py -t VS2019 \ --PreBuildUplBinary UniversalPayload.elf Case3: Build UPL Entry with CLANGDWARF and build other fv by VS2019 python UefiPayloadPkg/UniversalPayloadBuild.py -t VS2019 Cc: 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> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: James Lu <james.lu@intel.com>
2023-05-31UefiPayloadPkg: Add CpuPageTableLib required by SecCore & CpuMpPeiJiaxin Wu1-1/+1
Add CpuPageTableLib required by SecCore & CpuMpPei in 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: Ray Ni <ray.ni@intel.com> Cc: Zeng Star <star.zeng@intel.com> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-05-15UefiPayloadPkg: Fix boot shell issue for universal UEFI payloadGuo Dong3-12/+78
After moving BDS driver to a new FV for universal UEFI payload, the shell boot option path is not correct since it used the BDS FV instead of DXE FV in its device path. This patch would find the correct FV by reading shell file. It also removed PcdShellFile by using gUefiShellFileGuid. Signed-off-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> Cc: Gua Guo <gua.guo@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2023-05-02UefiPayloadPkg: Fix issues when MULTIPLE_DEBUG_PORT_SUPPORT is truePaytonX Hsieh4-3/+120
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4427 1. Since UART speed is slower than CPU, BIOS need to check the write buffer is empty, to avoid overwrite the buffer content. 2. LPSS UART might disable MMIO space for Windows debug usage during ExitBootServices event. BIOS need to avoid access the MMIO space after ExitBootServices. Cc: 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: PaytonX Hsieh <paytonx.hsieh@intel.com>
2023-04-28UefiPayloadPkg: Clang dependency removalBruceX Wang4-125/+923
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4426 Use Python to replace llvm-objcopy in UniversalPayloadBuild.py. 1. AddSection32() and AddSection64(): Make a section named <section> with the contents of <file>. 2. RemoveSection32() and RemoveSection64(): Remove <section>. 3. ReplaceFv (): remove the section before add the section if the file exists. Cc: 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> Signed-off-by: BruceX Wang <brucex.wang@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-04-20UefiPayloadPkg: Move Network modules from Dxe FV to Network FV in elfLinus Wu2-2/+42
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4417 Since UefiPayload had supported multiple FV, move Network.fdf.inc to new firmware volume and add this network FV into elf file. Cc: 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> Signed-off-by: Linus Wu <linusx.wu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-04-12UefiPayloadPkg: Update default memory type information for S4Sean Rhodes1-4/+4
Copied values from OVMF, these are sufficient for a debug build. Cc: 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> Cc: Gua Guo <gua.guo@intel.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com> Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2023-04-12UefiPayloadPkg: Always build MemoryTypeInformation HOB for DXE GCDBenjamin Doron4-35/+8
MemoryType information assists GCD with defragmenting the memory map. When the DXE core starts, GCD adds memory descriptors for the resource descriptors HOBs. This allocates heap space which can be reused later as the bins by memory type. It seems memory allocation prefers low ranges. It seems "below 4G" is an artifact of this heap reuse. However, the memory type information determines the DXE core's `MinimalMemorySizeNeeded`, determining which system memory descriptor HOB may be used by DXE. Furthermore, it's important that the memory type information be correct, for an S4 memory map. Therefore, follow other bootloaders, such as [MinPlatform][1], and do this unconditionally. As of [edk2-stable202011][2], it was. [1]: https://github.com/tianocore/edk2-platforms/blob/b6f96743891be51541184bf61dd2970c008e2c43/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c#L164-L201 [2]: https://github.com/tianocore/edk2/blob/edk2-stable202011/UefiPayloadPkg/BlSupportPei/BlSupportPei.c#L462-L466 Cc: 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> Cc: Gua Guo <gua.guo@intel.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
2023-04-10UefiPayloadPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2-3/+3
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout UefiPayloadPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: James Lu <james.lu@intel.com>
2023-04-07UefiPayloadPkg:Add new build commands for UniversalPayloadKasimX Liu1-36/+42
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4375 add '-pb' command of build bios with exist PreUniversalPayload file. '-e' command of olny build the UniversalPayloadentry file. 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>
2023-03-30UefiPayloadPkg: Support more input parameterLinus Wu1-1/+44
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4386 Add additional input parameter support --SpecRevision: user input spec version --Revision: user input revision --ProducerId: producer company name 1. UniversalPayloadBuild.py 2. Downgrade spec revision from 0.9 to 0.7 Cc: 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: Linus Wu <linusx.wu@intel.com>
2023-03-27UefiPayloadPkg: Add gUefiAcpiBoardInfoGuid supportGua Guo1-3/+6
if system both exist gUefiAcpiBoardInfoGuid and rsdp, we may need to use gUefiAcpiBoardInfoGuid as final config to have backward support. 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> Signed-off-by: Gua Guo <gua.guo@intel.com>
2023-03-14UefiPayloadPkg: Correct MAX_LOGICAL_PROCESSORS valueMarsX Lin1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4372 Correct MAX_LOGICAL_PROCESSORS value to 1024 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>
2023-03-10UefiPayloadPkg: Remove UefiCpuLib from module INFs.Yu Pu4-4/+0
Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the dependency of UefiCpuLib. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@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>
2023-03-07UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib.Xie, Yuanhao1-1/+2
Add CpuPageTableLib required by MpInitLib in UefiPayloadPkg. Cc: 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> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2023-02-23UefiPayloadPkg: remove the change that get platform specific logicMarsX Lin4-114/+0
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4241 Since UefiPayloadPkg had supported multiple firmware volume, remove the platform specific logic via protocol Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: Gua Guo <gua.guo@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Signed-off-by: MarsX Lin <marsx.lin@intel.com>
2023-01-31UefiPayloadPkg: Set RTC dynamic PCD to PeiPCDdatabaseKasimX Liu1-0/+5
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4193 In order to remove RTC_INDEX/RTC_TARGET from the UplBuild macro list,change the RTC_INDEX /RTC_TARGET type from PcdsFixedAtBuild to PcdsDynamicEx 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: KasimX Liu <kasimx.liu@intel.com>
2023-01-10UefiPayloadPkg: Fix debug print error level hob not save correctNing Feng1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4264 Fix debug print error level hob not save correct DebugPrintErrorlevel Should cover the case: Header.Length == UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD () Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: Ning Feng <ning.feng@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-01-09Revert "UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib."Yuanhao Xie1-1/+0
This reverts commit 3f378450dfafc11754bfdb64af28060ec8466acb, since the commit 73ccde8 introduced CpuPageTableLib dependency which resolved for UefiPayloadPkg need to be reverted. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4234 Cc: 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> Cc: Gua Guo <gua.guo@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
2023-01-06UefiPayloadPkg: Move RTC PCD to dynamic PCDKasimX Liu1-2/+3
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4193 In order to remove RTC_INDEX/RTC_TARGET from the UplBuild macro list,change the RTC_INDEX /RTC_TARGET type from PcdsFixedAtBuild to PcdsDynamicEx 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: KasimX Liu <kasimx.liu@intel.com>
2022-12-22UefiPayloadPkg: Fix boot issue for non-universal payloadGuo Dong1-3/+4
BDS module was moved from DXEFV to newly created BDSFV recently. Non-universal UEFI payload doesn't support multiple FV, so it failed to boot since BDS module could not be found. This patch add BDS back to DXEFV when UNIVERSAL_PAYLOAD is not set. Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: Guo Dong <guo.dong@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2022-12-21UefiPayloadPkg: Fixed that The UPL info section is not aligned at 4-byteMarsX Lin1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4196 Align .upld_info with 4-byte boundary by spec 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-12-20UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib.Yuanhao Xie1-0/+1
Add CpuPageTableLib required by MpInitLib in UefiPayloadPkg. Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-12-20UefiPayloadPkg/SerialPortLib: Enhance multi port behaviourKavya1-6/+35
Add condition to return success if mUartCount is greater than zero in SerialPortInitialize() to avoid filling mUartInfo with the same hob data when SerialPortInitialize() is called multiple times. Also add proper conditions in SerialPortRead function to read the data properly from multiple UART's. Cc: 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: Kavya <k.kavyax.sravanthi@intel.com>
2022-12-20UefiPayloadPkg: Define default values for the DynamicEX PCDsjdzhang1-8/+8
The following PCDs have no value in UefiPayloadPkg.dsc and they can not pass the Ecc tool check, so assign the default values the same as they are in *.dec file. 1. gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport 2. gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport 3. gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSuppor 4. gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize 5. gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds 6. gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode 7. gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress 8. gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: jdzhang <jdzhang@kunluntech.com.cn>
2022-12-19UefiPayloadPkg: Move bdsdxe.inf from DXEFV to BDSFVMarsX Lin2-6/+33
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4196 Since UefiPayload had supported multiple fv, move bdsdxe.inf to new firmware volume and modify the script of UniversalPayloadPkgBuild.py to support bdsdxe fv in elf file 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>