* [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib @ 2016-10-27 14:59 gdong1 2016-10-27 16:31 ` Ma, Maurice 0 siblings, 1 reply; 4+ messages in thread From: gdong1 @ 2016-10-27 14:59 UTC (permalink / raw) To: edk2-devel; +Cc: maurice.ma, prince.agyeman, guo.dong 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> --- CorebootModulePkg/Include/Library/CbParseLib.h | 29 ++++++++++++++++++++++- CorebootModulePkg/Library/CbParseLib/CbParseLib.c | 10 ++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/CorebootModulePkg/Include/Library/CbParseLib.h b/CorebootModulePkg/Include/Library/CbParseLib.h index 064baf3..18e3d1e 100644 --- a/CorebootModulePkg/Include/Library/CbParseLib.h +++ b/CorebootModulePkg/Include/Library/CbParseLib.h @@ -2,7 +2,7 @@ This library will parse the coreboot table in memory and extract those required 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 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 @@ -18,6 +18,25 @@ typedef RETURN_STATUS \ (*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) ( + IN VOID *Start, + IN UINT32 Tag + ); + +/** Acquire the memory information from the coreboot table in memory. @param MemInfoCallback The callback routine @@ -28,6 +47,7 @@ typedef RETURN_STATUS \ **/ RETURN_STATUS +EFIAPI CbParseMemoryInfo ( IN CB_MEM_INFO_CALLBACK MemInfoCallback, IN VOID *pParam @@ -46,6 +66,7 @@ CbParseMemoryInfo ( **/ RETURN_STATUS +EFIAPI CbParseCbMemTable ( IN UINT32 TableId, IN VOID** pMemTable, @@ -64,6 +85,7 @@ CbParseCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseAcpiTable ( IN VOID** pMemTable, IN UINT32* pMemTableSize @@ -81,6 +103,7 @@ CbParseAcpiTable ( **/ RETURN_STATUS +EFIAPI CbParseSmbiosTable ( IN VOID** pMemTable, IN UINT32* pMemTableSize @@ -101,6 +124,7 @@ CbParseSmbiosTable ( **/ RETURN_STATUS +EFIAPI CbParseFadtInfo ( IN UINTN* pPmCtrlReg, IN UINTN* pPmTimerReg, @@ -125,6 +149,7 @@ CbParseFadtInfo ( **/ RETURN_STATUS +EFIAPI CbParseSerialInfo ( OUT UINT32 *pRegBase, OUT UINT32 *pRegAccessType, @@ -145,6 +170,7 @@ CbParseSerialInfo ( **/ RETURN_STATUS +EFIAPI CbParseGetCbHeader ( IN UINTN Level, IN VOID** HeaderPtr @@ -160,6 +186,7 @@ CbParseGetCbHeader ( **/ RETURN_STATUS +EFIAPI CbParseFbInfo ( IN FRAME_BUFFER_INFO* pFbInfo ); diff --git a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c index 305e38f..0909b0f 100644 --- a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c +++ b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c @@ -94,6 +94,7 @@ CbCheckSum16 ( **/ VOID * +EFIAPI FindCbTag ( IN VOID *Start, IN UINT32 Tag @@ -175,6 +176,7 @@ FindCbTag ( **/ RETURN_STATUS +EFIAPI FindCbMemTable ( IN struct cbmem_root *Root, IN UINT32 TableId, @@ -237,6 +239,7 @@ FindCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseMemoryInfo ( IN CB_MEM_INFO_CALLBACK MemInfoCallback, IN VOID *pParam @@ -287,6 +290,7 @@ CbParseMemoryInfo ( **/ RETURN_STATUS +EFIAPI CbParseCbMemTable ( IN UINT32 TableId, OUT VOID **pMemTable, @@ -343,6 +347,7 @@ CbParseCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseAcpiTable ( OUT VOID **pMemTable, OUT UINT32 *pMemTableSize @@ -363,6 +368,7 @@ CbParseAcpiTable ( **/ RETURN_STATUS +EFIAPI CbParseSmbiosTable ( OUT VOID **pMemTable, OUT UINT32 *pMemTableSize @@ -386,6 +392,7 @@ CbParseSmbiosTable ( **/ RETURN_STATUS +EFIAPI CbParseFadtInfo ( OUT UINTN *pPmCtrlReg, OUT UINTN *pPmTimerReg, @@ -533,6 +540,7 @@ CbParseFadtInfo ( **/ RETURN_STATUS +EFIAPI CbParseSerialInfo ( OUT UINT32 *pRegBase, OUT UINT32 *pRegAccessType, @@ -591,6 +599,7 @@ CbParseSerialInfo ( **/ RETURN_STATUS +EFIAPI CbParseGetCbHeader ( IN UINTN Level, OUT VOID **HeaderPtr @@ -629,6 +638,7 @@ CbParseGetCbHeader ( **/ RETURN_STATUS +EFIAPI CbParseFbInfo ( OUT FRAME_BUFFER_INFO *pFbInfo ) -- 2.7.0.windows.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib 2016-10-27 14:59 [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib gdong1 @ 2016-10-27 16:31 ` Ma, Maurice 2016-10-27 16:37 ` Ma, Maurice 0 siblings, 1 reply; 4+ messages in thread From: Ma, Maurice @ 2016-10-27 16:31 UTC (permalink / raw) To: Dong, Guo; +Cc: Agyeman, Prince, edk2-devel@lists.01.org Reviewed-by: Maurice Ma <maurice.ma@intel.com> -----Original Message----- From: Dong, Guo Sent: Thursday, October 27, 2016 7:59 AM To: edk2-devel@lists.01.org Cc: Ma, Maurice; Agyeman, Prince; Dong, Guo Subject: [edk2] [PATCH v2] 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> --- CorebootModulePkg/Include/Library/CbParseLib.h | 29 ++++++++++++++++++++++- CorebootModulePkg/Library/CbParseLib/CbParseLib.c | 10 ++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/CorebootModulePkg/Include/Library/CbParseLib.h b/CorebootModulePkg/Include/Library/CbParseLib.h index 064baf3..18e3d1e 100644 --- a/CorebootModulePkg/Include/Library/CbParseLib.h +++ b/CorebootModulePkg/Include/Library/CbParseLib.h @@ -2,7 +2,7 @@ This library will parse the coreboot table in memory and extract those required 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 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 @@ -18,6 +18,25 @@ typedef RETURN_STATUS \ (*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) ( + IN VOID *Start, + IN UINT32 Tag + ); + +/** Acquire the memory information from the coreboot table in memory. @param MemInfoCallback The callback routine @@ -28,6 +47,7 @@ typedef RETURN_STATUS \ **/ RETURN_STATUS +EFIAPI CbParseMemoryInfo ( IN CB_MEM_INFO_CALLBACK MemInfoCallback, IN VOID *pParam @@ -46,6 +66,7 @@ CbParseMemoryInfo ( **/ RETURN_STATUS +EFIAPI CbParseCbMemTable ( IN UINT32 TableId, IN VOID** pMemTable, @@ -64,6 +85,7 @@ CbParseCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseAcpiTable ( IN VOID** pMemTable, IN UINT32* pMemTableSize @@ -81,6 +103,7 @@ CbParseAcpiTable ( **/ RETURN_STATUS +EFIAPI CbParseSmbiosTable ( IN VOID** pMemTable, IN UINT32* pMemTableSize @@ -101,6 +124,7 @@ CbParseSmbiosTable ( **/ RETURN_STATUS +EFIAPI CbParseFadtInfo ( IN UINTN* pPmCtrlReg, IN UINTN* pPmTimerReg, @@ -125,6 +149,7 @@ CbParseFadtInfo ( **/ RETURN_STATUS +EFIAPI CbParseSerialInfo ( OUT UINT32 *pRegBase, OUT UINT32 *pRegAccessType, @@ -145,6 +170,7 @@ CbParseSerialInfo ( **/ RETURN_STATUS +EFIAPI CbParseGetCbHeader ( IN UINTN Level, IN VOID** HeaderPtr @@ -160,6 +186,7 @@ CbParseGetCbHeader ( **/ RETURN_STATUS +EFIAPI CbParseFbInfo ( IN FRAME_BUFFER_INFO* pFbInfo ); diff --git a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c index 305e38f..0909b0f 100644 --- a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c +++ b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c @@ -94,6 +94,7 @@ CbCheckSum16 ( **/ VOID * +EFIAPI FindCbTag ( IN VOID *Start, IN UINT32 Tag @@ -175,6 +176,7 @@ FindCbTag ( **/ RETURN_STATUS +EFIAPI FindCbMemTable ( IN struct cbmem_root *Root, IN UINT32 TableId, @@ -237,6 +239,7 @@ FindCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseMemoryInfo ( IN CB_MEM_INFO_CALLBACK MemInfoCallback, IN VOID *pParam @@ -287,6 +290,7 @@ CbParseMemoryInfo ( **/ RETURN_STATUS +EFIAPI CbParseCbMemTable ( IN UINT32 TableId, OUT VOID **pMemTable, @@ -343,6 +347,7 @@ CbParseCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseAcpiTable ( OUT VOID **pMemTable, OUT UINT32 *pMemTableSize @@ -363,6 +368,7 @@ CbParseAcpiTable ( **/ RETURN_STATUS +EFIAPI CbParseSmbiosTable ( OUT VOID **pMemTable, OUT UINT32 *pMemTableSize @@ -386,6 +392,7 @@ CbParseSmbiosTable ( **/ RETURN_STATUS +EFIAPI CbParseFadtInfo ( OUT UINTN *pPmCtrlReg, OUT UINTN *pPmTimerReg, @@ -533,6 +540,7 @@ CbParseFadtInfo ( **/ RETURN_STATUS +EFIAPI CbParseSerialInfo ( OUT UINT32 *pRegBase, OUT UINT32 *pRegAccessType, @@ -591,6 +599,7 @@ CbParseSerialInfo ( **/ RETURN_STATUS +EFIAPI CbParseGetCbHeader ( IN UINTN Level, OUT VOID **HeaderPtr @@ -629,6 +638,7 @@ CbParseGetCbHeader ( **/ RETURN_STATUS +EFIAPI CbParseFbInfo ( OUT FRAME_BUFFER_INFO *pFbInfo ) -- 2.7.0.windows.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib 2016-10-27 16:31 ` Ma, Maurice @ 2016-10-27 16:37 ` Ma, Maurice 2016-10-27 16:49 ` Dong, Guo 0 siblings, 1 reply; 4+ messages in thread From: Ma, Maurice @ 2016-10-27 16:37 UTC (permalink / raw) To: Dong, Guo; +Cc: edk2-devel@lists.01.org, Agyeman, Prince Hi, Guo, I think the following code will have issue on compiling. Can you check ? +EFIAPI +FindCbTag +(IN VOID * Start, IN UINT32 Tag) ( + IN VOID *Start, + IN UINT32 Tag + ); + Thanks Maurice -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ma, Maurice Sent: Thursday, October 27, 2016 9:32 AM To: Dong, Guo Cc: edk2-devel@lists.01.org; Agyeman, Prince Subject: Re: [edk2] [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib Reviewed-by: Maurice Ma <maurice.ma@intel.com> -----Original Message----- From: Dong, Guo Sent: Thursday, October 27, 2016 7:59 AM To: edk2-devel@lists.01.org Cc: Ma, Maurice; Agyeman, Prince; Dong, Guo Subject: [edk2] [PATCH v2] 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> --- CorebootModulePkg/Include/Library/CbParseLib.h | 29 ++++++++++++++++++++++- CorebootModulePkg/Library/CbParseLib/CbParseLib.c | 10 ++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/CorebootModulePkg/Include/Library/CbParseLib.h b/CorebootModulePkg/Include/Library/CbParseLib.h index 064baf3..18e3d1e 100644 --- a/CorebootModulePkg/Include/Library/CbParseLib.h +++ b/CorebootModulePkg/Include/Library/CbParseLib.h @@ -2,7 +2,7 @@ This library will parse the coreboot table in memory and extract those required 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 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 @@ -18,6 +18,25 @@ typedef RETURN_STATUS \ (*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) ( + IN VOID *Start, + IN UINT32 Tag + ); + +/** Acquire the memory information from the coreboot table in memory. @param MemInfoCallback The callback routine @@ -28,6 +47,7 @@ typedef RETURN_STATUS \ **/ RETURN_STATUS +EFIAPI CbParseMemoryInfo ( IN CB_MEM_INFO_CALLBACK MemInfoCallback, IN VOID *pParam @@ -46,6 +66,7 @@ CbParseMemoryInfo ( **/ RETURN_STATUS +EFIAPI CbParseCbMemTable ( IN UINT32 TableId, IN VOID** pMemTable, @@ -64,6 +85,7 @@ CbParseCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseAcpiTable ( IN VOID** pMemTable, IN UINT32* pMemTableSize @@ -81,6 +103,7 @@ CbParseAcpiTable ( **/ RETURN_STATUS +EFIAPI CbParseSmbiosTable ( IN VOID** pMemTable, IN UINT32* pMemTableSize @@ -101,6 +124,7 @@ CbParseSmbiosTable ( **/ RETURN_STATUS +EFIAPI CbParseFadtInfo ( IN UINTN* pPmCtrlReg, IN UINTN* pPmTimerReg, @@ -125,6 +149,7 @@ CbParseFadtInfo ( **/ RETURN_STATUS +EFIAPI CbParseSerialInfo ( OUT UINT32 *pRegBase, OUT UINT32 *pRegAccessType, @@ -145,6 +170,7 @@ CbParseSerialInfo ( **/ RETURN_STATUS +EFIAPI CbParseGetCbHeader ( IN UINTN Level, IN VOID** HeaderPtr @@ -160,6 +186,7 @@ CbParseGetCbHeader ( **/ RETURN_STATUS +EFIAPI CbParseFbInfo ( IN FRAME_BUFFER_INFO* pFbInfo ); diff --git a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c index 305e38f..0909b0f 100644 --- a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c +++ b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c @@ -94,6 +94,7 @@ CbCheckSum16 ( **/ VOID * +EFIAPI FindCbTag ( IN VOID *Start, IN UINT32 Tag @@ -175,6 +176,7 @@ FindCbTag ( **/ RETURN_STATUS +EFIAPI FindCbMemTable ( IN struct cbmem_root *Root, IN UINT32 TableId, @@ -237,6 +239,7 @@ FindCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseMemoryInfo ( IN CB_MEM_INFO_CALLBACK MemInfoCallback, IN VOID *pParam @@ -287,6 +290,7 @@ CbParseMemoryInfo ( **/ RETURN_STATUS +EFIAPI CbParseCbMemTable ( IN UINT32 TableId, OUT VOID **pMemTable, @@ -343,6 +347,7 @@ CbParseCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseAcpiTable ( OUT VOID **pMemTable, OUT UINT32 *pMemTableSize @@ -363,6 +368,7 @@ CbParseAcpiTable ( **/ RETURN_STATUS +EFIAPI CbParseSmbiosTable ( OUT VOID **pMemTable, OUT UINT32 *pMemTableSize @@ -386,6 +392,7 @@ CbParseSmbiosTable ( **/ RETURN_STATUS +EFIAPI CbParseFadtInfo ( OUT UINTN *pPmCtrlReg, OUT UINTN *pPmTimerReg, @@ -533,6 +540,7 @@ CbParseFadtInfo ( **/ RETURN_STATUS +EFIAPI CbParseSerialInfo ( OUT UINT32 *pRegBase, OUT UINT32 *pRegAccessType, @@ -591,6 +599,7 @@ CbParseSerialInfo ( **/ RETURN_STATUS +EFIAPI CbParseGetCbHeader ( IN UINTN Level, OUT VOID **HeaderPtr @@ -629,6 +638,7 @@ CbParseGetCbHeader ( **/ RETURN_STATUS +EFIAPI CbParseFbInfo ( OUT FRAME_BUFFER_INFO *pFbInfo ) -- 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib 2016-10-27 16:37 ` Ma, Maurice @ 2016-10-27 16:49 ` Dong, Guo 0 siblings, 0 replies; 4+ messages in thread From: Dong, Guo @ 2016-10-27 16:49 UTC (permalink / raw) To: Ma, Maurice; +Cc: edk2-devel@lists.01.org, Agyeman, Prince Hi Maurice, Thank you capture this typo. Updated patch has been sent. Thanks, Guo -----Original Message----- From: Ma, Maurice Sent: Thursday, October 27, 2016 9:38 AM To: Dong, Guo <guo.dong@intel.com> Cc: edk2-devel@lists.01.org; Agyeman, Prince <prince.agyeman@intel.com> Subject: RE: [edk2] [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib Hi, Guo, I think the following code will have issue on compiling. Can you check ? +EFIAPI +FindCbTag +(IN VOID * Start, IN UINT32 Tag) ( + IN VOID *Start, + IN UINT32 Tag + ); + Thanks Maurice -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ma, Maurice Sent: Thursday, October 27, 2016 9:32 AM To: Dong, Guo Cc: edk2-devel@lists.01.org; Agyeman, Prince Subject: Re: [edk2] [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib Reviewed-by: Maurice Ma <maurice.ma@intel.com> -----Original Message----- From: Dong, Guo Sent: Thursday, October 27, 2016 7:59 AM To: edk2-devel@lists.01.org Cc: Ma, Maurice; Agyeman, Prince; Dong, Guo Subject: [edk2] [PATCH v2] 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> --- CorebootModulePkg/Include/Library/CbParseLib.h | 29 ++++++++++++++++++++++- CorebootModulePkg/Library/CbParseLib/CbParseLib.c | 10 ++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/CorebootModulePkg/Include/Library/CbParseLib.h b/CorebootModulePkg/Include/Library/CbParseLib.h index 064baf3..18e3d1e 100644 --- a/CorebootModulePkg/Include/Library/CbParseLib.h +++ b/CorebootModulePkg/Include/Library/CbParseLib.h @@ -2,7 +2,7 @@ This library will parse the coreboot table in memory and extract those required 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 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 @@ -18,6 +18,25 @@ typedef RETURN_STATUS \ (*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) ( + IN VOID *Start, + IN UINT32 Tag + ); + +/** Acquire the memory information from the coreboot table in memory. @param MemInfoCallback The callback routine @@ -28,6 +47,7 @@ typedef RETURN_STATUS \ **/ RETURN_STATUS +EFIAPI CbParseMemoryInfo ( IN CB_MEM_INFO_CALLBACK MemInfoCallback, IN VOID *pParam @@ -46,6 +66,7 @@ CbParseMemoryInfo ( **/ RETURN_STATUS +EFIAPI CbParseCbMemTable ( IN UINT32 TableId, IN VOID** pMemTable, @@ -64,6 +85,7 @@ CbParseCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseAcpiTable ( IN VOID** pMemTable, IN UINT32* pMemTableSize @@ -81,6 +103,7 @@ CbParseAcpiTable ( **/ RETURN_STATUS +EFIAPI CbParseSmbiosTable ( IN VOID** pMemTable, IN UINT32* pMemTableSize @@ -101,6 +124,7 @@ CbParseSmbiosTable ( **/ RETURN_STATUS +EFIAPI CbParseFadtInfo ( IN UINTN* pPmCtrlReg, IN UINTN* pPmTimerReg, @@ -125,6 +149,7 @@ CbParseFadtInfo ( **/ RETURN_STATUS +EFIAPI CbParseSerialInfo ( OUT UINT32 *pRegBase, OUT UINT32 *pRegAccessType, @@ -145,6 +170,7 @@ CbParseSerialInfo ( **/ RETURN_STATUS +EFIAPI CbParseGetCbHeader ( IN UINTN Level, IN VOID** HeaderPtr @@ -160,6 +186,7 @@ CbParseGetCbHeader ( **/ RETURN_STATUS +EFIAPI CbParseFbInfo ( IN FRAME_BUFFER_INFO* pFbInfo ); diff --git a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c index 305e38f..0909b0f 100644 --- a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c +++ b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c @@ -94,6 +94,7 @@ CbCheckSum16 ( **/ VOID * +EFIAPI FindCbTag ( IN VOID *Start, IN UINT32 Tag @@ -175,6 +176,7 @@ FindCbTag ( **/ RETURN_STATUS +EFIAPI FindCbMemTable ( IN struct cbmem_root *Root, IN UINT32 TableId, @@ -237,6 +239,7 @@ FindCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseMemoryInfo ( IN CB_MEM_INFO_CALLBACK MemInfoCallback, IN VOID *pParam @@ -287,6 +290,7 @@ CbParseMemoryInfo ( **/ RETURN_STATUS +EFIAPI CbParseCbMemTable ( IN UINT32 TableId, OUT VOID **pMemTable, @@ -343,6 +347,7 @@ CbParseCbMemTable ( **/ RETURN_STATUS +EFIAPI CbParseAcpiTable ( OUT VOID **pMemTable, OUT UINT32 *pMemTableSize @@ -363,6 +368,7 @@ CbParseAcpiTable ( **/ RETURN_STATUS +EFIAPI CbParseSmbiosTable ( OUT VOID **pMemTable, OUT UINT32 *pMemTableSize @@ -386,6 +392,7 @@ CbParseSmbiosTable ( **/ RETURN_STATUS +EFIAPI CbParseFadtInfo ( OUT UINTN *pPmCtrlReg, OUT UINTN *pPmTimerReg, @@ -533,6 +540,7 @@ CbParseFadtInfo ( **/ RETURN_STATUS +EFIAPI CbParseSerialInfo ( OUT UINT32 *pRegBase, OUT UINT32 *pRegAccessType, @@ -591,6 +599,7 @@ CbParseSerialInfo ( **/ RETURN_STATUS +EFIAPI CbParseGetCbHeader ( IN UINTN Level, OUT VOID **HeaderPtr @@ -629,6 +638,7 @@ CbParseGetCbHeader ( **/ RETURN_STATUS +EFIAPI CbParseFbInfo ( OUT FRAME_BUFFER_INFO *pFbInfo ) -- 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-27 16:49 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-27 14:59 [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib gdong1 2016-10-27 16:31 ` Ma, Maurice 2016-10-27 16:37 ` Ma, Maurice 2016-10-27 16:49 ` Dong, Guo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox