+++ /dev/null
-/** @file\r
- This library will parse the coreboot table in memory and extract those required\r
- information.\r
-\r
- Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-#include <Guid/FrameBufferInfoGuid.h>\r
-\r
-typedef RETURN_STATUS \\r
- (*CB_MEM_INFO_CALLBACK) (UINT64 Base, UINT64 Size, UINT32 Type, VOID *Param);\r
-\r
-/**\r
- Find coreboot record with given Tag from the memory Start in 4096\r
- bytes range.\r
-\r
- @param Start The start memory to be searched in\r
- @param Tag The tag id to be found\r
-\r
- @retval NULL The Tag is not found.\r
- @retval Others The pointer to the record found.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-FindCbTag (\r
- IN VOID *Start,\r
- IN UINT32 Tag\r
- );\r
-\r
-/**\r
- Acquire the memory information from the coreboot table in memory.\r
-\r
- @param MemInfoCallback The callback routine\r
- @param pParam Pointer to the callback routine parameter\r
-\r
- @retval RETURN_SUCCESS Successfully find out the memory information.\r
- @retval RETURN_NOT_FOUND Failed to find the memory information.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-CbParseMemoryInfo (\r
- IN CB_MEM_INFO_CALLBACK MemInfoCallback,\r
- IN VOID *pParam\r
- );\r
-\r
-/**\r
- Acquire the coreboot memory table with the given table id\r
-\r
- @param TableId Table id to be searched\r
- @param pMemTable Pointer to the base address of the memory table\r
- @param pMemTableSize Pointer to the size of the memory table\r
-\r
- @retval RETURN_SUCCESS Successfully find out the memory table.\r
- @retval RETURN_INVALID_PARAMETER Invalid input parameters.\r
- @retval RETURN_NOT_FOUND Failed to find the memory table.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-CbParseCbMemTable (\r
- IN UINT32 TableId,\r
- IN VOID** pMemTable,\r
- IN UINT32* pMemTableSize\r
- );\r
-\r
-/**\r
- Acquire the acpi table from coreboot\r
-\r
- @param pMemTable Pointer to the base address of the memory table\r
- @param pMemTableSize Pointer to the size of the memory table\r
-\r
- @retval RETURN_SUCCESS Successfully find out the memory table.\r
- @retval RETURN_INVALID_PARAMETER Invalid input parameters.\r
- @retval RETURN_NOT_FOUND Failed to find the memory table.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-CbParseAcpiTable (\r
- IN VOID** pMemTable,\r
- IN UINT32* pMemTableSize\r
- );\r
-\r
-/**\r
- Acquire the smbios table from coreboot\r
-\r
- @param pMemTable Pointer to the base address of the memory table\r
- @param pMemTableSize Pointer to the size of the memory table\r
-\r
- @retval RETURN_SUCCESS Successfully find out the memory table.\r
- @retval RETURN_INVALID_PARAMETER Invalid input parameters.\r
- @retval RETURN_NOT_FOUND Failed to find the memory table.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-CbParseSmbiosTable (\r
- IN VOID** pMemTable,\r
- IN UINT32* pMemTableSize\r
- );\r
-\r
-/**\r
- Find the required fadt information\r
-\r
- @param pPmCtrlReg Pointer to the address of power management control register\r
- @param pPmTimerReg Pointer to the address of power management timer register\r
- @param pResetReg Pointer to the address of system reset register\r
- @param pResetValue Pointer to the value to be written to the system reset register\r
- @param pPmEvtReg Pointer to the address of power management event register\r
- @param pPmGpeEnReg Pointer to the address of power management GPE enable register\r
-\r
- @retval RETURN_SUCCESS Successfully find out all the required fadt information.\r
- @retval RETURN_NOT_FOUND Failed to find the fadt table.\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-CbParseFadtInfo (\r
- IN UINTN* pPmCtrlReg,\r
- IN UINTN* pPmTimerReg,\r
- IN UINTN* pResetReg,\r
- IN UINTN* pResetValue,\r
- IN UINTN* pPmEvtReg,\r
- IN UINTN* pPmGpeEnReg\r
- );\r
-\r
-/**\r
- Find the serial port information\r
-\r
- @param pRegBase Pointer to the base address of serial port registers\r
- @param pRegAccessType Pointer to the access type of serial port registers\r
- @param pRegWidth Pointer to the register width in bytes\r
- @param pBaudrate Pointer to the serial port baudrate\r
- @param pInputHertz Pointer to the input clock frequency\r
- @param pUartPciAddr Pointer to the UART PCI bus, dev and func address\r
-\r
- @retval RETURN_SUCCESS Successfully find the serial port information.\r
- @retval RETURN_NOT_FOUND Failed to find the serial port information .\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-CbParseSerialInfo (\r
- OUT UINT32 *pRegBase,\r
- OUT UINT32 *pRegAccessType,\r
- OUT UINT32 *pRegWidth,\r
- OUT UINT32 *pBaudrate,\r
- OUT UINT32 *pInputHertz,\r
- OUT UINT32 *pUartPciAddr\r
- );\r
-\r
-/**\r
- Search for the coreboot table header\r
-\r
- @param Level Level of the search depth\r
- @param HeaderPtr Pointer to the pointer of coreboot table header\r
-\r
- @retval RETURN_SUCCESS Successfully find the coreboot table header .\r
- @retval RETURN_NOT_FOUND Failed to find the coreboot table header .\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-CbParseGetCbHeader (\r
- IN UINTN Level,\r
- IN VOID** HeaderPtr\r
- );\r
-\r
-/**\r
- Find the video frame buffer information\r
-\r
- @param pFbInfo Pointer to the FRAME_BUFFER_INFO structure\r
-\r
- @retval RETURN_SUCCESS Successfully find the video frame buffer information.\r
- @retval RETURN_NOT_FOUND Failed to find the video frame buffer information .\r
-\r
-**/\r
-RETURN_STATUS\r
-EFIAPI\r
-CbParseFbInfo (\r
- IN FRAME_BUFFER_INFO* pFbInfo\r
- );\r
-\r