summaryrefslogtreecommitdiffstats
path: root/UefiPayloadPkg
Commit message (Collapse)AuthorAgeFilesLines
* UefiPayloadPkg: Add integration instruction for coreboot common errorLi, Aaron2021-12-081-0/+2
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3753 When integrate the latest UefiPayload with coreboot 4.14 or older, a common error would occur like "E: Not a usable UEFI firmware volume." The change adds an entry for how to solve this issue. Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Aaron Li <aaron.li@intel.com>
* UefiPayloadPkg/UefiPayloadPkg.dsc:Add BootManagerLib for BootManagerMenuAppFeng, Ning2021-12-081-2/+4
| | | | | | | | | | | | Add PlatformBootManagerLibconstructor for BootManagerMenuApp, to get the value PcdBootManagefile overrided by platform side. Signed-off-by: Ning Feng <ning.feng@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> Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: Skip ModuleInfo HOB in PayloadJiang, Guomin2021-12-081-1/+31
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3754 1. DxeCore will use ModuleInfo to install LoadedImage protocol for DxeCore. 2. DxeIpl will create the ModuleInfo of UniversalPayload. and UniversalPayload will create the ModuleInfo of DxeCore. 3. UniversalPayload should skip the ModuleInfo from the DxeIpl to avoid the mismatched ModuleInfo for DxeCore. Changes: 1. Use function IsHobNeed to check if the HOB should be added 2. Add the ModuleInfo check logic in IsHobNeed function Signed-off-by: Guomin Jiang <guomin.jiang@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>
* UefiPayloadPkg: Add performance measurement featureLiu, Zhiguang2021-12-082-1/+39
| | | | | | | | | | | | | Add a Macro to enable performance measurement feature. For any platform that uses UniversalPayload, we assume it supports BaseCpuTimerLib and use it to align timerlib to get more accurate performance result. Reviewed-by: 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: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: Add missing Guid gUefiAcpiBoardInfoGuidLiu, Zhiguang2021-12-081-0/+3
| | | | | | | | | | The library PciSegmentInfoLibAcpiBoardInfo consumes the Guid gUefiAcpiBoardInfoGuid. Reviewed-by: 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: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: Increase SystemMemoryUefiRegionSize from 32M to 64MLiu, Zhiguang2021-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Current, the SystemMemoryUefiRegionSize is 32M, which means in universal payload entry, we can at most use 32M heap. However, this can't meet the memory requirment for 5 level page table. In UefiPayloadPkg\UefiPayloadEntry\X64\VirtualMemory.c, we assume the Physical Address at most has 52 bits. Using 1G table support, with 52 bits Physical Address, to build page table, we need one page to hold 16 PML5 entries, each PML5 entry points to one page containing 512 PML4 entries. One PML4 entry points to one page containing 512 PML3 entries. Each PML3 entries will point to 1G memory space. Totally 8209 pages are needed, which is around 32M bytes. Therefore, increase SystemMemoryUefiRegionSize from 32M to 64M to support 5 level page tables. 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> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg/PayloadEntry: Inherit 4/5-level paging from bootloaderNi, Ray2021-12-083-51/+39
| | | | | | | | | | | | | | | | | The patch removes the dep on PcdUse5LevelPageTable. Now the payload inherits the 5-level paging setting from bootloader in IA-32e mode and uses 4-level paging in legacy protected mode. This fix the potential issue when bootloader enables 5-level paging but 64bit payload sets 4-level page table to CR3 resulting CPU exception because PcdUse5LevelPageTable is FALSE. Signed-off-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com>
* UefiPayloadPkg/UefiPayloadPkg.fdf: Update DXE Apriori listCheng, Gao2021-12-081-0/+2
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3729 Put ReportStatusCodeRouterRuntimeDxe and StatusCodeHandlerRuntimeDxe in DXE Apriori list to enable DEBUG() via serial port through PeiDxeDebugLibReportStatusCode DebugLib instance as early as possible. The earliest point to add them is right before BlSupportDxe. Signed-off-by: Gao Cheng <gao.cheng@intel.com> 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>
* UefiPayloadPkg: Apply uncrustify changesMichael Kubacki2021-12-0776-4104/+4313
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the UefiPayloadPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* UefiPayloadPkg: Change OPTIONAL keyword usage styleMichael D Kinney2021-12-077-12/+8
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* UefiPayloadPkg: Update YAML to ignore specific ECC files/errorsMichael D Kinney2021-11-301-0/+6
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3749 Update package YAML files to ignore ECC errors that are already present. These issues must be fixed in the future, but should not block source code changes for these known issues. 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 Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
* UefiPayloadPkg: Remove SystemTableInfo GUID.Kesavan Balakrishnan, ThiyaguX2021-10-3012-72/+95
| | | | | | | | | | | | | | | | SystemTableInfo GUID is not a Spec defined GUID. The latest SBL and CBL produces ACPI and SMBIOS table information. So removing the SystemTableInfo GUID implementation. Cc: Maurice Ma <maurice.ma@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Guo Dong <guo.dong@intel.com> Signed-off-by: Thiyagu Kesavan Balakrishnan <thiyagux.kesavan.balakrishnan@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
* UefiPayloadPkg: Add SMM support and SMM variable supportGuo Dong2021-10-252-11/+128
| | | | | | | | | | | | Add SMM variable support for universal UEFI payload. By default they are disabled. Signed-off-by: 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> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
* UefiPayloadPkg: Add a SMM dispatch moduleGuo Dong2021-10-253-0/+543
| | | | | | | | | | | | | | | | | PCH SMM module would install SMM SW dispatch2 protocol. And it supports to register SMI handlers based on SMI APM interrupt from the bootloader information gSmmRegisterInfoGuid. It is possible to extend bootloader HOB to pass other information to support more SMI sources. If this module is not required by bootloader for some reason, the bootloader could skip this HOB or build a HOB without EOS info. Signed-off-by: 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> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
* UefiPayloadPkg: Add a common FVB SMM moduleGuo Dong2021-10-258-0/+1735
| | | | | | | | | | | | | | | | | | | This FVB module is used to initialize NV variable region and provide SMM FVB protocol to read/write SPI variable region. This module consume HOB gNvVariableInfoGuid and depends on FlashDeviceLib for the actual SPI device operate. During FVB initialization, it will initialize the variable region if the variable region is not valid. And it support to write initial variable data from FFS file if it is found. Signed-off-by: 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> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
* UefiPayloadPkg: Add FlashDeviceLibGuo Dong2021-10-253-0/+311
| | | | | | | | | | | | This library provides FlashDeviceLib APIs based on SpiFlashLib and consumed by FVB driver. Signed-off-by: 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> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
* UefiPayloadPkg: Add SpiFlashLibGuo Dong2021-10-258-0/+1669
| | | | | | | | | | | | | This is a common SPI Flash library used for the Intel platform that supports SPI hardware sequence. This library provides actual SPI flash operation via Intel PCH SPI controller. Signed-off-by: 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> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
* UefiPayloadPkg: Add bootloader SMM support moduleGuo Dong2021-10-255-0/+576
| | | | | | | | | | | | | | | | | This module is only used for SMM S3 support for the bootloader that doesn't support SMM. The payload would save SMM rebase info to SMM communication area in normal boot and expect the bootloader in S3 path to rebase the SMM and trigger SMI by writing 0xB2 port with the given value from SMM communication area. The payload SMM handler would get chance to restore some registers in S3 path. Signed-off-by: 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> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
* UefiPayloadPkg: Add a common SMM control Runtime DXE moduleGuo Dong2021-10-254-0/+356
| | | | | | | | | | | | | | This module consumes SMM Registers HOB (SMI_GBL_EN and SMI_APM_EN) to install SMM control 2 protocol gEfiSmmControl2ProtocolGuid. The protocol activate() would set SMI_GBL_EN and SMI_APM_EN and trigger SMI by writing to IO port 0xB3 and 0xB2. Signed-off-by: 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> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
* UefiPayloadPkg: Add a common SmmAccessDxe moduleGuo Dong2021-10-253-0/+342
| | | | | | | | | | | | | SmmAccessDxe module would consume EFI_SMRAM_HOB_DESCRIPTOR_BLOCK HOB to produce SMM access protocol gEfiSmmAccess2ProtocolGuid (open, close, lock, and GetCapabilities.) Signed-off-by: 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> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
* UefiPayloadPkg: Fix the build failure for non-universal payloadGuo Dong2021-10-191-2/+2
| | | | | | | | | | | | Applied an old patch which caused non-universal payload build failed since that code was added after the old patch. This patch fixed the build failure. Signed-off-by: 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> Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: Fix ECC reported issuesGuo Dong2021-10-1925-99/+98
| | | | | | | | | | | | | | | V2: Fix more header files on #ifdef variable ECC reported some issues on UefiPayloadPkg, this patch fixed most of them except several files including ElfLib\Elf32.h, coreboot.h, CbParseLib.c, etc. It also removed unused functions in ResetSystemLib and Hob.c. Signed-off-by: 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> Reviewed-by: Maurice Ma <maurice.ma@intel.com>
* UefiPayloadPkg: Replace MEMROY_ENTRY by MEMORY_ENTRYGuo Dong2021-10-195-8/+8
| | | | | | | | | | Fixes simple typo, no behavioral change. Cc: Maurice Ma <maurice.ma@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Moritz Fischer <moritzf@google.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
* UefiPayloadPkg: Fix the build issue for corebootGuo Dong2021-10-152-3/+5
| | | | | | | | | | | | | V2: Fix GCC build issue. There is typo in previous change caused coreboot build failure. This patch fixed the build issue. Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* UefiPayloadPkg: Use SECURITY_STUB_ENABLE to control the SecurityStubDxeLiu, Zhiguang2021-10-141-0/+2
| | | | | | | | | | | | | The SecurityStubDxe driver may be provided by platform payload. In UefiPayloadPkg\UefiPayloadPkg.fdf file, SecurityStubDxe should only be included if SECURITY_STUB_ENABLE is TRUE 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> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: Add PCI root bridge info hob support for SBLMa, Maurice2021-10-135-2/+84
| | | | | | | | | | | | | | | | | | | | Current UefiPayloadPkg can suport PCI root bridge info HOB provided by bootloader. For UniversalPayload, bootloader can directly provide this HOB for payload consumption. However, for legacy UEFI payload, it is required to migrate the HOB information from bootloader HOB space to UEFI payload HOB space. This patch added the missing part for the bootloader ParseLib in order to support both legacy and universal UEFI payload. This patch was tested on Slim Bootloader with latest UEFI payload, and it worked as expected. Cc: Ray Ni <ray.ni@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
* UefiPayloadPkg: Add a macro to select the SecurityStubDxe driver.Liu, Zhiguang2021-10-111-1/+3
| | | | | | | | | | | The SecurityStubDxe driver may be provided by platform payload. 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> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: Remove asm code and sharing librariesGuo Dong2021-09-3016-321/+105
| | | | | | | | | | | | | | | | | Remove asm code used for payload entry. Use patchable PCD instead a fixed PCD PcdPayloadStackTop to avoid potential conflict. Based on the removal, use same HobLib regardless UNIVERSAL_PAYLOAD. Use same PlatformHookLib regardless UNIVERSAL_PAYLOAD. The original PlatformHookLib was removed and UniversalPayloadPlatformHookLib was rename to new PlatformHookLib. Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* UefiPayloadPkg: Update maximum logic processor to 256Cheng-Chieh Huang2021-09-291-1/+1
| | | | | | | | | | | | | Signed-off-by: Cheng-Chieh Huang <chengchieh@google.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Cheng-Chieh Huang <chengchieh@google.com> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Cc: Trammell Hudson <hudson@trmm.net> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Ray Ni <ray.ni@intel.com>
* UefiPayloadPkg: Add ".upld_info" in universal payloadGuo Dong2021-09-291-3/+39
| | | | | | | | | | | | | | V2: Use LittleEndianStructure by review comment. From the universal scalable firmware payload requirement V0.75, Payload must have Universal Payload Information Section ".upld_info" So update the build tool to add this section. Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Guo Dong <guo.dong@intel.com>
* UefiPayloadPkg: Use dummy constructor for PlatformHookLibGuo Dong2021-09-292-1/+18
| | | | | | | | | | | | The Library constructor is only used for library dependency. So use a dummy function to make it clear instead of using an actual function. Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Guo Dong <guo.dong@intel.com>
* UefiPayloadPkg: Build a HOB from bootloader ACPI tableGuo Dong2021-09-296-173/+233
| | | | | | | | | | | | | | V2: Update BuildHobFromAcpi() to return a HOB pointer. For universal UEFI payload, build a HOB from the ACPI table, so that other modules could use this info from HOB at very early DXE phase. This code are shared by universal payload and non universal payload. Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Guo Dong <guo.dong@intel.com>
* UefiPayloadPkg: Add Macro to enable or disable some drivers.Zhiguang Liu2021-09-242-4/+13
| | | | | | | | | | | Add Macro to enable or disable RamDiskDxe and SioBusDxe drivers. 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> Reviewed-by: Maurice Ma <maurice.ma@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: Fix the warning when building UefiPayloadPkg with IA32+X64Tan, Dun2021-09-161-3/+5
| | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3603 Move the unspecified PCDs from .common section. to .X64 section in .dsc file. The corresponding PCDs are not used in IA32. 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> Signed-off-by: Dun Tan <dun.tan@intel.com>
* UefiPayloadPkg: Add script to build UniversalPayload in UefiPayloadPkgTan, Dun2021-09-161-0/+98
| | | | | | | | | | | | | | | V1: Add script to build UniversalPayload, which can be used after edksetup rebuild The final UPL.elf will be located at root folder of edk2 V2: Revise the ouput directory of generated files and coding style in the script 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: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Dun Tan <dun.tan@intel.com>
* UefiPayloadPkg: Dump hob info from gEdkiiBootManagerMenuFileGuidduntan2021-09-102-1/+26
| | | | | | | | | | | | | V1: Dump this hob infomation from gEdkiiBootManagerMenuFileGuid V2: Delete the duplicated assertions V3: Add input parameter in Comment 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> Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Dun Tan <dun.tan@intel.com>
* UefiPayloadPkg: Fix the bug in dump guid HOB info functionsduntan2021-09-101-3/+7
| | | | | | | | | | | The input HobLength of PrintHandler should be data size instead of whole length of HOB 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> Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Dun Tan <dun.tan@intel.com>
* UefiPayloadPkg: Include Network modules in UefiPayloadPkg.Sravanthi2021-09-092-2/+23
| | | | | | | | | | | Include Network modules in UefiPayloadPkg.dsc and UefiPayloadPkg.fdf 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: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Sravanthi <k.kavyax.sravanthi@intel.com>
* UefiPayloadPkg: Include more modules in UefiPayloadPkg.Sravanthi2021-09-092-0/+12
| | | | | | | | | | | Include core modules in UefiPayloadPkg.dsc and UefiPayloadPkg.fdf 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: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Sravanthi <k.kavyax.sravanthi@intel.com>
* UefiPayloadPkg: Create .yaml file in UefiPayloadPkgduntan2021-09-021-0/+90
| | | | | | | | | | | Create .yaml file in UefiPayloadPkg to enable Core ci for UefiPayloadPkg 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: DunTan <dun.tan@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* UefiPayloadPkg/UefiPayloadEntry: Fix memory corruptionMarvin H?user2021-09-011-1/+1
| | | | | | | | | | | | | | UefiPayloadEntry's AllocatePool() applies the "sizeof" operator to HOB index rather than the HOB header structure. This yields 4 Bytes compared to the 8 Bytes the structure header requires. Fix the call to allocate the required space instead. 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: Vitaly Cheptsov <vit9696@protonmail.com> Signed-off-by: Marvin H?user <mhaeuser@posteo.de>
* UefiPayloadPkg: Fix the build error when enable Core ci for UefiPayloadPkgduntan2021-09-013-20/+4
| | | | | | | | | | | | | | V1: Add quotes when using $(ARCH) in .dsc and .fdf file. The quotes are added due to the way by which Core ci parse the .dsc file. Add UINTN in Hob.c to fix cast from pointer to integer of different size error. V2: Delete lines which reference ShellBinPkg.The pkg doesn't exist in edk2. 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: DunTan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* UefiPayloadPkg: Fix the non-ascii character in UniversalPayloadEntry.cedk2-stable202108-rc0DunTan2021-08-091-1/+1
| | | | | | | | | | | Fix the non-ascii character in UniversalPayloadEntry.c 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> Signed-off-by: DunTan <dun.tan@intel.com>
* UefiPayloadPkg: Add a macro to enable or diable the serial driver.Zhiguang Liu2021-08-092-0/+6
| | | | | | | | | | | This patch doesn't change the default behavior. 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> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: change the default value of some PCDs.Zhiguang Liu2021-08-091-1/+3
| | | | | | | | | | | | | | Change the default value of the below PCDs to diable some legacy feature. gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0 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> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: define some PCD as DynamicEX PCDZhiguang Liu2021-08-095-21/+18
| | | | | | | | | | | | | Define some PCDs as DynamicEX PCD to be used as global variable. Because PcdUartDefaultBaudRate is defined as DynamicEX, remove the code to set it in platformlib. That code was actually redundant. 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> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value.Zhiguang Liu2021-08-091-1/+10
| | | | | | | | | | | | | | | | Add the three PCDs as fixed at build PCD: gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister The default value is defined as Macro, so it can be passed in at build command. 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> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
* UefiPayloadPkg: Add FV Guid for DXEFV and PLDFVZhiguang Liu2021-07-161-0/+2
| | | | | | Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
* UefiPayloadPkg: Add PCD_DYNAMIC_AS_DYNAMICEX and set to TrueLiu, Zhiguang2021-07-141-0/+1
| | | | | | | | | | | | PCD_DYNAMIC_AS_DYNAMICEX is recently added to Edk2, and it can treat Dynamic PCD to Dynamic Ex PCD, which is Uefi Payload needs. 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: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* UefiPayloadPkg: Assign the length of UniversalPayload ExtraDataTan, Dun2021-07-131-1/+5
| | | | | | | | | | | | | | V1: Assign the length and revision of UniversalPayload ExtraData V2: Force int to UINT16 V3: Create a local variable to hold the size of ExtraData 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: DunTan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>