2 This library will parse the coreboot table in memory and extract those required
5 Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Guid/GraphicsInfoHob.h>
11 #include <Guid/MemoryMapInfoGuid.h>
12 #include <Guid/SerialPortInfoGuid.h>
13 #include <Guid/SystemTableInfoGuid.h>
14 #include <Guid/AcpiBoardInfoGuid.h>
16 #ifndef __BOOTLOADER_PARSE_LIB__
17 #define __BOOTLOADER_PARSE_LIB__
19 #define GET_BOOTLOADER_PARAMETER() (*(UINT32 *)(UINTN)(PcdGet32(PcdPayloadStackTop) - sizeof(UINT32)))
20 #define SET_BOOTLOADER_PARAMETER(Value) GET_BOOTLOADER_PARAMETER()=Value
22 typedef RETURN_STATUS \
23 (*BL_MEM_INFO_CALLBACK
) (MEMROY_MAP_ENTRY
*MemoryMapEntry
, VOID
*Param
);
26 This function retrieves the parameter base address from boot loader.
28 This function will get bootloader specific parameter address for UEFI payload.
29 e.g. HobList pointer for Slim Bootloader, and coreboot table header for Coreboot.
31 @retval NULL Failed to find the GUID HOB.
32 @retval others GUIDed HOB data pointer.
42 Acquire the memory map information.
44 @param MemInfoCallback The callback routine
45 @param Params Pointer to the callback routine parameter
47 @retval RETURN_SUCCESS Successfully find out the memory information.
48 @retval RETURN_NOT_FOUND Failed to find the memory information.
54 IN BL_MEM_INFO_CALLBACK MemInfoCallback
,
59 Acquire acpi table and smbios table from slim bootloader
61 @param SystemTableInfo Pointer to the system table info
63 @retval RETURN_SUCCESS Successfully find out the tables.
64 @retval RETURN_NOT_FOUND Failed to find the tables.
70 OUT SYSTEM_TABLE_INFO
*SystemTableInfo
75 Find the serial port information
77 @param SERIAL_PORT_INFO Pointer to serial port info structure
79 @retval RETURN_SUCCESS Successfully find the serial port information.
80 @retval RETURN_NOT_FOUND Failed to find the serial port information .
86 OUT SERIAL_PORT_INFO
*SerialPortInfo
91 Find the video frame buffer information
93 @param GfxInfo Pointer to the EFI_PEI_GRAPHICS_INFO_HOB structure
95 @retval RETURN_SUCCESS Successfully find the video frame buffer information.
96 @retval RETURN_NOT_FOUND Failed to find the video frame buffer information .
102 OUT EFI_PEI_GRAPHICS_INFO_HOB
*GfxInfo
106 Find the video frame buffer device information
108 @param GfxDeviceInfo Pointer to the EFI_PEI_GRAPHICS_DEVICE_INFO_HOB structure
110 @retval RETURN_SUCCESS Successfully find the video frame buffer information.
111 @retval RETURN_NOT_FOUND Failed to find the video frame buffer information .
117 OUT EFI_PEI_GRAPHICS_DEVICE_INFO_HOB
*GfxDeviceInfo