From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7738C1A1E24 for ; Thu, 27 Oct 2016 09:49:03 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP; 27 Oct 2016 09:49:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,553,1473145200"; d="scan'208";a="24412256" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 27 Oct 2016 09:49:02 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 27 Oct 2016 09:49:02 -0700 Received: from fmsmsx120.amr.corp.intel.com ([169.254.15.251]) by fmsmsx116.amr.corp.intel.com ([169.254.2.184]) with mapi id 14.03.0248.002; Thu, 27 Oct 2016 09:49:02 -0700 From: "Dong, Guo" To: "Ma, Maurice" CC: "edk2-devel@lists.01.org" , "Agyeman, Prince" Thread-Topic: [edk2] [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib Thread-Index: AQHSMHBybspnJtTOqUC3zzYllFpvqKC8gtxg Date: Thu, 27 Oct 2016 16:49:01 +0000 Message-ID: <0DE6ECBAEEB99B4DA9564FF580F3580A0D2C538F@fmsmsx120.amr.corp.intel.com> References: <7AAC936950815649B5F88FAE785306C28417745B@ORSMSX113.amr.corp.intel.com> <7AAC936950815649B5F88FAE785306C28417746C@ORSMSX113.amr.corp.intel.com> In-Reply-To: <7AAC936950815649B5F88FAE785306C28417746C@ORSMSX113.amr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDRiMDVhYWMtYTVkNi00OGQ2LWE3YWQtNjkyOGUzZjg4MTY0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ikp0R09qKzJXQWpyRWhZSU9ja2VickxxQVU4RlpPa2FEY3kwZkh2SzFvMUk9In0= x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API from CbParseLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2016 16:49:03 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Maurice, Thank you capture this typo. Updated patch has been sent. Thanks, Guo -----Original Message----- From: Ma, Maurice=20 Sent: Thursday, October 27, 2016 9:38 AM To: Dong, Guo Cc: edk2-devel@lists.01.org; Agyeman, Prince Subject: RE: [edk2] [PATCH v2] CorebootModulePkgPkg: Expose FindCbTag API f= rom 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 f= rom CbParseLib Reviewed-by: Maurice Ma -----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 i= nformation. So expose this API. And add EFIAPI to all functions in CbParseLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Dong --- 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/CorebootModul= ePkg/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 r= equired information. =20 - Copyright (c) 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2016, Intel Corporation. All rights=20 + reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -18,6 +18,25 @@ typedef RETURN_STATUS \ (*CB_MEM_INFO_CALLBACK) (UINT64 Base, UINT64 Size, UINT32 Type, VO= ID *Param); =20 /** + Find coreboot record with given Tag from the memory Start in 4096=20 + 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. =20 @param MemInfoCallback The callback routine @@ -28,6 +47,7 @@ typedef RETURN_STATUS \ =20 **/ RETURN_STATUS +EFIAPI CbParseMemoryInfo ( IN CB_MEM_INFO_CALLBACK MemInfoCallback, IN VOID *pParam @@ -46,6 +66,7 @@ CbParseMemoryInfo ( =20 **/ RETURN_STATUS +EFIAPI CbParseCbMemTable ( IN UINT32 TableId, IN VOID** pMemTable, @@ -64,6 +85,7 @@ CbParseCbMemTable ( =20 **/ RETURN_STATUS +EFIAPI CbParseAcpiTable ( IN VOID** pMemTable, IN UINT32* pMemTableSize @@ -81,6 +103,7 @@ CbParseAcpiTable ( =20 **/ RETURN_STATUS +EFIAPI CbParseSmbiosTable ( IN VOID** pMemTable, IN UINT32* pMemTableSize @@ -101,6 +124,7 @@ CbParseSmbiosTable ( =20 **/ RETURN_STATUS +EFIAPI CbParseFadtInfo ( IN UINTN* pPmCtrlReg, IN UINTN* pPmTimerReg, @@ -125,6 +149,7 @@ CbParseFadtInfo ( =20 **/ RETURN_STATUS +EFIAPI CbParseSerialInfo ( OUT UINT32 *pRegBase, OUT UINT32 *pRegAccessType, @@ -145,6 +170,7 @@ CbParseSerialInfo ( =20 **/ RETURN_STATUS +EFIAPI CbParseGetCbHeader ( IN UINTN Level, IN VOID** HeaderPtr @@ -160,6 +186,7 @@ CbParseGetCbHeader ( =20 **/ RETURN_STATUS +EFIAPI CbParseFbInfo ( IN FRAME_BUFFER_INFO* pFbInfo ); diff --git a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c b/CorebootMo= dulePkg/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 ( =20 **/ VOID * +EFIAPI FindCbTag ( IN VOID *Start, IN UINT32 Tag @@ -175,6 +176,7 @@ FindCbTag ( =20 **/ RETURN_STATUS +EFIAPI FindCbMemTable ( IN struct cbmem_root *Root, IN UINT32 TableId, @@ -237,6 +239,7 @@ FindCbMemTable ( =20 **/ RETURN_STATUS +EFIAPI CbParseMemoryInfo ( IN CB_MEM_INFO_CALLBACK MemInfoCallback, IN VOID *pParam @@ -287,6 +290,7 @@ CbParseMemoryInfo ( =20 **/ RETURN_STATUS +EFIAPI CbParseCbMemTable ( IN UINT32 TableId, OUT VOID **pMemTable, @@ -343,6 +347,7 @@ CbParseCbMemTable ( =20 **/ RETURN_STATUS +EFIAPI CbParseAcpiTable ( OUT VOID **pMemTable, OUT UINT32 *pMemTableSize @@ -363,6 +368,7 @@ CbParseAcpiTable ( =20 **/ RETURN_STATUS +EFIAPI CbParseSmbiosTable ( OUT VOID **pMemTable, OUT UINT32 *pMemTableSize @@ -386,6 +392,7 @@ CbParseSmbiosTable ( =20 **/ RETURN_STATUS +EFIAPI CbParseFadtInfo ( OUT UINTN *pPmCtrlReg, OUT UINTN *pPmTimerReg, @@ -533,6 +540,7 @@ CbParseFadtInfo ( =20 **/ RETURN_STATUS +EFIAPI CbParseSerialInfo ( OUT UINT32 *pRegBase, OUT UINT32 *pRegAccessType, @@ -591,6 +599,7 @@ CbParseSerialInfo ( =20 **/ RETURN_STATUS +EFIAPI CbParseGetCbHeader ( IN UINTN Level, OUT VOID **HeaderPtr @@ -629,6 +638,7 @@ CbParseGetCbHeader ( =20 **/ 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