CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib
CbPlatformSupportLib might use FindCbTag() API to parse platform specific information. So expose this API. And add EFIAPI to all functions in CbParseLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com>
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
This library will parse the coreboot table in memory and extract those required
|
This library will parse the coreboot table in memory and extract those required
|
||||||
information.
|
information.
|
||||||
|
|
||||||
Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -17,6 +17,24 @@
|
|||||||
typedef RETURN_STATUS \
|
typedef RETURN_STATUS \
|
||||||
(*CB_MEM_INFO_CALLBACK) (UINT64 Base, UINT64 Size, UINT32 Type, VOID *Param);
|
(*CB_MEM_INFO_CALLBACK) (UINT64 Base, UINT64 Size, UINT32 Type, VOID *Param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Find coreboot record with given Tag from the memory Start in 4096
|
||||||
|
bytes range.
|
||||||
|
|
||||||
|
@param Start The start memory to be searched in
|
||||||
|
@param Tag The tag id to be found
|
||||||
|
|
||||||
|
@retval NULL The Tag is not found.
|
||||||
|
@retval Others The poiter to the record found.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID *
|
||||||
|
EFIAPI
|
||||||
|
FindCbTag (
|
||||||
|
IN VOID *Start,
|
||||||
|
IN UINT32 Tag
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Acquire the memory information from the coreboot table in memory.
|
Acquire the memory information from the coreboot table in memory.
|
||||||
|
|
||||||
@ -28,6 +46,7 @@ typedef RETURN_STATUS \
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseMemoryInfo (
|
CbParseMemoryInfo (
|
||||||
IN CB_MEM_INFO_CALLBACK MemInfoCallback,
|
IN CB_MEM_INFO_CALLBACK MemInfoCallback,
|
||||||
IN VOID *pParam
|
IN VOID *pParam
|
||||||
@ -46,6 +65,7 @@ CbParseMemoryInfo (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseCbMemTable (
|
CbParseCbMemTable (
|
||||||
IN UINT32 TableId,
|
IN UINT32 TableId,
|
||||||
IN VOID** pMemTable,
|
IN VOID** pMemTable,
|
||||||
@ -64,6 +84,7 @@ CbParseCbMemTable (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseAcpiTable (
|
CbParseAcpiTable (
|
||||||
IN VOID** pMemTable,
|
IN VOID** pMemTable,
|
||||||
IN UINT32* pMemTableSize
|
IN UINT32* pMemTableSize
|
||||||
@ -81,6 +102,7 @@ CbParseAcpiTable (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseSmbiosTable (
|
CbParseSmbiosTable (
|
||||||
IN VOID** pMemTable,
|
IN VOID** pMemTable,
|
||||||
IN UINT32* pMemTableSize
|
IN UINT32* pMemTableSize
|
||||||
@ -101,6 +123,7 @@ CbParseSmbiosTable (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseFadtInfo (
|
CbParseFadtInfo (
|
||||||
IN UINTN* pPmCtrlReg,
|
IN UINTN* pPmCtrlReg,
|
||||||
IN UINTN* pPmTimerReg,
|
IN UINTN* pPmTimerReg,
|
||||||
@ -125,6 +148,7 @@ CbParseFadtInfo (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseSerialInfo (
|
CbParseSerialInfo (
|
||||||
OUT UINT32 *pRegBase,
|
OUT UINT32 *pRegBase,
|
||||||
OUT UINT32 *pRegAccessType,
|
OUT UINT32 *pRegAccessType,
|
||||||
@ -145,6 +169,7 @@ CbParseSerialInfo (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseGetCbHeader (
|
CbParseGetCbHeader (
|
||||||
IN UINTN Level,
|
IN UINTN Level,
|
||||||
IN VOID** HeaderPtr
|
IN VOID** HeaderPtr
|
||||||
@ -160,6 +185,7 @@ CbParseGetCbHeader (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseFbInfo (
|
CbParseFbInfo (
|
||||||
IN FRAME_BUFFER_INFO* pFbInfo
|
IN FRAME_BUFFER_INFO* pFbInfo
|
||||||
);
|
);
|
||||||
|
@ -94,6 +94,7 @@ CbCheckSum16 (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
VOID *
|
VOID *
|
||||||
|
EFIAPI
|
||||||
FindCbTag (
|
FindCbTag (
|
||||||
IN VOID *Start,
|
IN VOID *Start,
|
||||||
IN UINT32 Tag
|
IN UINT32 Tag
|
||||||
@ -175,6 +176,7 @@ FindCbTag (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
FindCbMemTable (
|
FindCbMemTable (
|
||||||
IN struct cbmem_root *Root,
|
IN struct cbmem_root *Root,
|
||||||
IN UINT32 TableId,
|
IN UINT32 TableId,
|
||||||
@ -237,6 +239,7 @@ FindCbMemTable (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseMemoryInfo (
|
CbParseMemoryInfo (
|
||||||
IN CB_MEM_INFO_CALLBACK MemInfoCallback,
|
IN CB_MEM_INFO_CALLBACK MemInfoCallback,
|
||||||
IN VOID *pParam
|
IN VOID *pParam
|
||||||
@ -287,6 +290,7 @@ CbParseMemoryInfo (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseCbMemTable (
|
CbParseCbMemTable (
|
||||||
IN UINT32 TableId,
|
IN UINT32 TableId,
|
||||||
OUT VOID **pMemTable,
|
OUT VOID **pMemTable,
|
||||||
@ -343,6 +347,7 @@ CbParseCbMemTable (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseAcpiTable (
|
CbParseAcpiTable (
|
||||||
OUT VOID **pMemTable,
|
OUT VOID **pMemTable,
|
||||||
OUT UINT32 *pMemTableSize
|
OUT UINT32 *pMemTableSize
|
||||||
@ -363,6 +368,7 @@ CbParseAcpiTable (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseSmbiosTable (
|
CbParseSmbiosTable (
|
||||||
OUT VOID **pMemTable,
|
OUT VOID **pMemTable,
|
||||||
OUT UINT32 *pMemTableSize
|
OUT UINT32 *pMemTableSize
|
||||||
@ -386,6 +392,7 @@ CbParseSmbiosTable (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseFadtInfo (
|
CbParseFadtInfo (
|
||||||
OUT UINTN *pPmCtrlReg,
|
OUT UINTN *pPmCtrlReg,
|
||||||
OUT UINTN *pPmTimerReg,
|
OUT UINTN *pPmTimerReg,
|
||||||
@ -533,6 +540,7 @@ CbParseFadtInfo (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseSerialInfo (
|
CbParseSerialInfo (
|
||||||
OUT UINT32 *pRegBase,
|
OUT UINT32 *pRegBase,
|
||||||
OUT UINT32 *pRegAccessType,
|
OUT UINT32 *pRegAccessType,
|
||||||
@ -591,6 +599,7 @@ CbParseSerialInfo (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseGetCbHeader (
|
CbParseGetCbHeader (
|
||||||
IN UINTN Level,
|
IN UINTN Level,
|
||||||
OUT VOID **HeaderPtr
|
OUT VOID **HeaderPtr
|
||||||
@ -629,6 +638,7 @@ CbParseGetCbHeader (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
CbParseFbInfo (
|
CbParseFbInfo (
|
||||||
OUT FRAME_BUFFER_INFO *pFbInfo
|
OUT FRAME_BUFFER_INFO *pFbInfo
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user