2 This library will parse the coreboot table in memory and extract those required
5 Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef BOOTLOADER_PARSE_LIB_
11 #define BOOTLOADER_PARSE_LIB_
14 #include <Guid/GraphicsInfoHob.h>
15 #include <Guid/MemoryMapInfoGuid.h>
16 #include <Guid/SerialPortInfoGuid.h>
17 #include <Guid/AcpiBoardInfoGuid.h>
18 #include <UniversalPayload/AcpiTable.h>
19 #include <UniversalPayload/SmbiosTable.h>
21 #define GET_BOOTLOADER_PARAMETER() PcdGet64 (PcdBootloaderParameter)
23 typedef RETURN_STATUS \
24 (*BL_MEM_INFO_CALLBACK
) (
25 MEMORY_MAP_ENTRY
*MemoryMapEntry
,
30 This function retrieves the parameter base address from boot loader.
32 This function will get bootloader specific parameter address for UEFI payload.
33 e.g. HobList pointer for Slim Bootloader, and coreboot table header for Coreboot.
35 @retval NULL Failed to find the GUID HOB.
36 @retval others GUIDed HOB data pointer.
46 Acquire the memory map information.
48 @param MemInfoCallback The callback routine
49 @param Params Pointer to the callback routine parameter
51 @retval RETURN_SUCCESS Successfully find out the memory information.
52 @retval RETURN_NOT_FOUND Failed to find the memory information.
58 IN BL_MEM_INFO_CALLBACK MemInfoCallback
,
63 Acquire SMBIOS table from bootloader.
65 @param SmbiosTable Pointer to the system table info
67 @retval RETURN_SUCCESS Successfully find out the tables.
68 @retval RETURN_NOT_FOUND Failed to find the tables.
74 OUT UNIVERSAL_PAYLOAD_SMBIOS_TABLE
*SmbiosTable
78 Acquire ACPI table from bootloader.
80 @param AcpiTableHob Pointer to the ACPI table info.
82 @retval RETURN_SUCCESS Successfully find out the tables.
83 @retval RETURN_NOT_FOUND Failed to find the tables.
89 OUT UNIVERSAL_PAYLOAD_ACPI_TABLE
*AcpiTableHob
93 Find the serial port information
95 @param SerialPortInfo Pointer to serial port info structure
97 @retval RETURN_SUCCESS Successfully find the serial port information.
98 @retval RETURN_NOT_FOUND Failed to find the serial port information .
104 OUT SERIAL_PORT_INFO
*SerialPortInfo
108 Find the video frame buffer information
110 @param GfxInfo Pointer to the EFI_PEI_GRAPHICS_INFO_HOB structure
112 @retval RETURN_SUCCESS Successfully find the video frame buffer information.
113 @retval RETURN_NOT_FOUND Failed to find the video frame buffer information .
119 OUT EFI_PEI_GRAPHICS_INFO_HOB
*GfxInfo
123 Find the video frame buffer device information
125 @param GfxDeviceInfo Pointer to the EFI_PEI_GRAPHICS_DEVICE_INFO_HOB structure
127 @retval RETURN_SUCCESS Successfully find the video frame buffer information.
128 @retval RETURN_NOT_FOUND Failed to find the video frame buffer information .
134 OUT EFI_PEI_GRAPHICS_DEVICE_INFO_HOB
*GfxDeviceInfo
138 Parse and handle the misc info provided by bootloader
140 @retval RETURN_SUCCESS The misc information was parsed successfully.
141 @retval RETURN_NOT_FOUND Could not find required misc info.
142 @retval RETURN_OUT_OF_RESOURCES Insufficant memory space.