2 This library will parse the coreboot table in memory and extract those required
5 Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include <Guid/FrameBufferInfoGuid.h>
11 typedef RETURN_STATUS \
12 (*CB_MEM_INFO_CALLBACK
) (UINT64 Base
, UINT64 Size
, UINT32 Type
, VOID
*Param
);
15 Find coreboot record with given Tag from the memory Start in 4096
18 @param Start The start memory to be searched in
19 @param Tag The tag id to be found
21 @retval NULL The Tag is not found.
22 @retval Others The pointer to the record found.
33 Acquire the memory information from the coreboot table in memory.
35 @param MemInfoCallback The callback routine
36 @param pParam Pointer to the callback routine parameter
38 @retval RETURN_SUCCESS Successfully find out the memory information.
39 @retval RETURN_NOT_FOUND Failed to find the memory information.
45 IN CB_MEM_INFO_CALLBACK MemInfoCallback
,
50 Acquire the coreboot memory table with the given table id
52 @param TableId Table id to be searched
53 @param pMemTable Pointer to the base address of the memory table
54 @param pMemTableSize Pointer to the size of the memory table
56 @retval RETURN_SUCCESS Successfully find out the memory table.
57 @retval RETURN_INVALID_PARAMETER Invalid input parameters.
58 @retval RETURN_NOT_FOUND Failed to find the memory table.
66 IN UINT32
* pMemTableSize
70 Acquire the acpi table from coreboot
72 @param pMemTable Pointer to the base address of the memory table
73 @param pMemTableSize Pointer to the size of the memory table
75 @retval RETURN_SUCCESS Successfully find out the memory table.
76 @retval RETURN_INVALID_PARAMETER Invalid input parameters.
77 @retval RETURN_NOT_FOUND Failed to find the memory table.
84 IN UINT32
* pMemTableSize
88 Acquire the smbios table from coreboot
90 @param pMemTable Pointer to the base address of the memory table
91 @param pMemTableSize Pointer to the size of the memory table
93 @retval RETURN_SUCCESS Successfully find out the memory table.
94 @retval RETURN_INVALID_PARAMETER Invalid input parameters.
95 @retval RETURN_NOT_FOUND Failed to find the memory table.
102 IN UINT32
* pMemTableSize
106 Find the required fadt information
108 @param pPmCtrlReg Pointer to the address of power management control register
109 @param pPmTimerReg Pointer to the address of power management timer register
110 @param pResetReg Pointer to the address of system reset register
111 @param pResetValue Pointer to the value to be written to the system reset register
112 @param pPmEvtReg Pointer to the address of power management event register
113 @param pPmGpeEnReg Pointer to the address of power management GPE enable register
115 @retval RETURN_SUCCESS Successfully find out all the required fadt information.
116 @retval RETURN_NOT_FOUND Failed to find the fadt table.
122 IN UINTN
* pPmCtrlReg
,
123 IN UINTN
* pPmTimerReg
,
125 IN UINTN
* pResetValue
,
127 IN UINTN
* pPmGpeEnReg
131 Find the serial port information
133 @param pRegBase Pointer to the base address of serial port registers
134 @param pRegAccessType Pointer to the access type of serial port registers
135 @param pRegWidth Pointer to the register width in bytes
136 @param pBaudrate Pointer to the serial port baudrate
137 @param pInputHertz Pointer to the input clock frequency
138 @param pUartPciAddr Pointer to the UART PCI bus, dev and func address
140 @retval RETURN_SUCCESS Successfully find the serial port information.
141 @retval RETURN_NOT_FOUND Failed to find the serial port information .
147 OUT UINT32
*pRegBase
,
148 OUT UINT32
*pRegAccessType
,
149 OUT UINT32
*pRegWidth
,
150 OUT UINT32
*pBaudrate
,
151 OUT UINT32
*pInputHertz
,
152 OUT UINT32
*pUartPciAddr
156 Search for the coreboot table header
158 @param Level Level of the search depth
159 @param HeaderPtr Pointer to the pointer of coreboot table header
161 @retval RETURN_SUCCESS Successfully find the coreboot table header .
162 @retval RETURN_NOT_FOUND Failed to find the coreboot table header .
173 Find the video frame buffer information
175 @param pFbInfo Pointer to the FRAME_BUFFER_INFO structure
177 @retval RETURN_SUCCESS Successfully find the video frame buffer information.
178 @retval RETURN_NOT_FOUND Failed to find the video frame buffer information .
184 IN FRAME_BUFFER_INFO
* pFbInfo