From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.6638.1573198789737469249 for ; Thu, 07 Nov 2019 23:39:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=Mu6nQkWA; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: ethan.tsao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2019 23:39:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,280,1569308400"; d="scan'208";a="193089737" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 07 Nov 2019 23:39:48 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 Nov 2019 23:39:48 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 Nov 2019 23:39:48 -0800 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.54) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 Nov 2019 23:39:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BDEzE0K/0FrKEVcii1+Hwr3GaQER1hD6UGcg/R7XvKRiETSJp49TzvQv6cXRkKBX3k9AhdJD8I3PKKF1sy0Qoga6wr4d3wIAHqy0lTxTj6h1xt6fzbH6DK7U2El0j6irtR/0KOydL4K8qTlbYqwxldJhFWuznBFjspMJeVdX0gr/oqH3eaCqNM2BGNixxtjbgAO6i2cMmVyGGasLsTIkLAA+LMO1V+avBmXpnTl5QnVAk8c4Y3ZpdegDa6a4q+ht+Mlx+qn1/vyi/CUTDq8GsHm1lrfZaRXuVbR359C0eRslMBZFUw+C1B0Vum8oCNH63fVY0MdkgGwZ/8KySnlFSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D7f7tyTATbLhPruj5rVCjdLzeQuwPxH7XeNoIrtE1eI=; b=buB0L846iLIypYTw+roDFfpK4qQovzdcB/oaC+/0t2DNXvMRBzli4h5ZUy/eqgMvSaNwg1Of7D6xgYz3JnNExTPTbkaQn9poKcKx5qZ0nVPBROzh5nM0DURkpu7Z1goxaH4HKD5pl80sIpPDxXOV+UM2kOaA3fYQ53pq/FP7w5iX/Kam5PKv/6+bsYAyMKVxQJtO57y3xcKlksdgjxyaf0JnepyMO9jU2NFfXCVOcuGRCGXp0cB7wieXmsJs/AY0RKLwWo3QRWSXjmmKkT+rA1Va96SXuqHgSz8h1LXYqNPGRik42s21WPXTlzWfmyP06ycOdEHUcJ+k2lt4coZFLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D7f7tyTATbLhPruj5rVCjdLzeQuwPxH7XeNoIrtE1eI=; b=Mu6nQkWA4gjISew03Mug80P1ZjSAf8KE33GVfB1hzKj1kdk8MZ1M2/bWYs6fCSDVwprit+R4/QZtbk1AMgqw9/2UqMFuu5gUPDy3ETDM/tr7I33X2SmQf7rG0UmHHoXrf6utZUd1VvyRStvAjxX1SMccBIBBoWlUNQyQA2clyzc= Received: from MWHPR11MB1662.namprd11.prod.outlook.com (10.172.55.15) by MWHPR11MB2015.namprd11.prod.outlook.com (10.169.236.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Fri, 8 Nov 2019 07:39:33 +0000 Received: from MWHPR11MB1662.namprd11.prod.outlook.com ([fe80::c3:2ae9:b8a4:e407]) by MWHPR11MB1662.namprd11.prod.outlook.com ([fe80::c3:2ae9:b8a4:e407%9]) with mapi id 15.20.2430.020; Fri, 8 Nov 2019 07:39:33 +0000 From: "Ethan Tsao" To: "Ni, Ray" , "devel@edk2.groups.io" CC: "Chaganty, Rangasai V" Subject: Re: [PATCH] IntelSiliconPkg/Library:Add BaseConfigBlockLib Library Thread-Topic: [PATCH] IntelSiliconPkg/Library:Add BaseConfigBlockLib Library Thread-Index: AQHVlRvJrFzkKZUq1EqIXhOFe7+FQKd/SHjggAATvACAAXHBIIAADxbQgAAF2IA= Date: Fri, 8 Nov 2019 07:39:32 +0000 Message-ID: References: <20191107033058.180-1-ethan.tsao@intel.com> <734D49CCEBEEF84792F5B80ED585239D5C352F1D@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5C354EC3@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODBlMTk2MmUtZjU5Yi00YzMxLWE2ZGMtNjZkYjA1NGVlOWI4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaURhK0Y4ekJcL3pJZW5lSzFmMHNEeHRVdXFoZmQ0VUNQZ0F4bUlrT3FZUGVTXC9nR241eW5UaVhiMDFMMFYyRnBhIn0= dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT dlp-product: dlpe-windows authentication-results: spf=none (sender IP is ) smtp.mailfrom=ethan.tsao@intel.com; x-originating-ip: [192.55.79.113] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 76696570-39a6-4698-7d09-08d7641ecc04 x-ms-traffictypediagnostic: MWHPR11MB2015: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0215D7173F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(136003)(376002)(366004)(396003)(39860400002)(199004)(189003)(13464003)(26005)(8936002)(76176011)(33656002)(6506007)(81166006)(81156014)(8676002)(53546011)(7696005)(74316002)(86362001)(186003)(14454004)(305945005)(7736002)(6116002)(102836004)(229853002)(478600001)(4326008)(25786009)(2501003)(52536014)(6246003)(55016002)(110136005)(2906002)(9686003)(66066001)(3846002)(486006)(30864003)(99286004)(71190400001)(71200400001)(476003)(5660300002)(11346002)(2940100002)(6436002)(107886003)(316002)(14444005)(66556008)(256004)(64756008)(66446008)(446003)(66946007)(6306002)(66476007)(76116006);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR11MB2015;H:MWHPR11MB1662.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dwEUCX/YJOlXGRZD6IZqnEgXLC5yPdMt5V6tM2WKJ8FPO5S8sFBCTbNpSN2Ksh3vlwqhB8Ser2ilmM+xWOt972TaiImJNEKylUzGosWazymgotBdk2RrHcnTZpNhl1VefWT+0MwKANPzafxt/88BjTmgQwuTpf8/G6i9ARs5EHzPtYH1G2ZkHWxO0H/XZwegNiDwIHDNH8M6b4po1d6hBEP87kSLpKW9pLuPoxvjLeXUH0HD9gDzxXczmfGG0ttuBuFJ8TFFoeoMBi0YudrC2Cc9fnIi9CcYZU1qRXyKcUhcYZBvkCzBoWCScVE0nmqpk7Y1Z0CFCA9pm4Sh/NlIgBaZbjnaAwouIx0SxkKgwU+PEcZcss02YDrVCreIUMhlJ1M6QNjM4nVICvrrZn5Ih5KLfLXbaJgLDqRvHmQE1pM/B5fEo8z1rhoVIr9ELQxY MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 76696570-39a6-4698-7d09-08d7641ecc04 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2019 07:39:32.8558 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: K8QQrtLw/WSFV1+6linnYx92SROFKsT2Fz6uThqCoekdPVvBxNMbQ8/p08rvhnhWNk9DhHzqMXJ1zhWD6LmOLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB2015 Return-Path: ethan.tsao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ray, There is one debug message print available and requested Config block size = while Config Block table is not enough to add new. Caller only know size is not enough by return status. With this debug messa= ge, Caller can know how many size need to enlarge. What do you think to keep this debug message? DEBUG ((DEBUG_ERROR, "Available Config Block Size: 0x%x bytes / Requested C= onfig Block Size: 0x%x bytes\n", ConfigBlkTblAddrPtr->AvailableSize, Config= BlkSize)); Best Regards, Ethan > -----Original Message----- > From: Tsao, Ethan > Sent: Friday, November 8, 2019 3:17 PM > To: Ni, Ray ; devel@edk2.groups.io > Cc: Chaganty, Rangasai V > Subject: RE: [PATCH] IntelSiliconPkg/Library:Add BaseConfigBlockLib Libra= ry >=20 > Hi Ray, > I do agree with you. I will remove all debug message since all error scen= ario can > be cover by return status. > Caller can understanding through return status. >=20 > Best Regards, > Ethan >=20 > > -----Original Message----- > > From: Ni, Ray > > Sent: Friday, November 8, 2019 2:25 PM > > To: Tsao, Ethan ; devel@edk2.groups.io > > Cc: Chaganty, Rangasai V > > Subject: RE: [PATCH] IntelSiliconPkg/Library:Add BaseConfigBlockLib > > Library > > > > Ethan, > > What if all of the debug message are removed? > > Library especially very fundamental like ConfigBlock is better to be qu= ite. > > It's the ConfigBlock API designer's responsibility to ensure the error > > is returned properly to caller, otherwise it's the API's bug. > > When the API can return correct status out, it's caller's > > responsibility to check the status and do proper handling of the errors= . > > > > With the debug message added in this fundamental library, it may give > > callers wrong impression that the library itself can handle the error > > and callers don't need to check the error status. > > > > If we search code in MdePkg, quite few debug messages are printed out > > from library code. > > > > Thanks, > > Ray > > > > > -----Original Message----- > > > From: Tsao, Ethan > > > Sent: Thursday, November 7, 2019 4:14 PM > > > To: Ni, Ray ; devel@edk2.groups.io > > > Cc: Chaganty, Rangasai V > > > Subject: RE: [PATCH] IntelSiliconPkg/Library:Add BaseConfigBlockLib > > > Library > > > > > > Hi Ray, > > > Thanks your good input. I just review all debug message and most > > > print is for error report purpose, such as allocate memory failure,..= .etc. > > > From my opinion, this kind debug message is useful for BIOS when > > > unexpected error happen. In normal case, it will not be print. > > > > > > Best Regards, > > > Ethan > > > > > > > -----Original Message----- > > > > From: Ni, Ray > > > > Sent: Thursday, November 7, 2019 3:15 PM > > > > To: Tsao, Ethan ; edk2-devel@lists.01.org > > > > Cc: Chaganty, Rangasai V > > > > Subject: RE: [PATCH] IntelSiliconPkg/Library:Add > > > > BaseConfigBlockLib Library > > > > > > > > Given the patch only moves the code from one place to another, I > > > > am ok > > > with > > > > that. > > > > > > > > By the way, is it still valuable to have so many debug messages > > > > everywhere > > > in > > > > this library? > > > > If no, can we remove them or at least some of them? > > > > > > > > Debug messages are valuable I agree. But we also need to think > > > > about > > > producing > > > > helpful debug messages, not treated by platform developers as > > > > noise > > > > : ) > > > > > > > > > > > > > -----Original Message----- > > > > > From: Tsao, Ethan > > > > > Sent: Thursday, November 7, 2019 11:31 AM > > > > > To: edk2-devel@lists.01.org > > > > > Cc: Chaganty, Rangasai V ; Ni, > > > > > Ray > > > > > Subject: [PATCH] IntelSiliconPkg/Library:Add BaseConfigBlockLib > > > > > Library > > > > > > > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2318 > > > > > > > > > > Establish one copy of Config blocks library class and instance > > > > > in IntelSiliconPkg and remove copies from other silicon packages > > > > > , like KabyLakeSiliconPkg, CoffelakeSiliconPkg. > > > > > > > > > > Signed-off-by: Ethan Tsao > > > > > Cc: Sai Chaganty > > > > > Cc: Ray Ni > > > > > --- > > > > > > > > > > > > > Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseConfigBlockLib/BaseCo > > > nf > > > igBlo > > > > > ckLib.c | 146 ------------------------------= ----------------------------- > -- > > > ---- > > > > - > > > > > ---------------------------------------------------------------- > > > > > -- > > > > > ---- > > > > > ---------- > > > > > > > > > > > > > Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseConfigBlockLib/BaseCo > > > nf > > > igBlo > > > > > ckLib.inf | 29 ----------------------------- > > > > > Silicon/Intel/{KabylakeSiliconPkg =3D> > > > > > IntelSiliconPkg}/Library/BaseConfigBlockLib/BaseConfigBlockLib.c = | 0 > > > > > Silicon/Intel/{KabylakeSiliconPkg =3D> > > > > > IntelSiliconPkg}/Library/BaseConfigBlockLib/BaseConfigBlockLib.in= f | 0 > > > > > 4 files changed, 175 deletions(-) > > > > > > > > > > diff --git > > > > > a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseConfigBlockLib/ > > > > > Ba > > > > > seCo > > > > > nfigB > > > > > lockLib.c > > > > > b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseConfigBlockLib/ > > > > > Ba > > > > > seCo > > > > > nfig > > > > > BlockLib.c > > > > > deleted file mode 100644 > > > > > index 369dab97ee..0000000000 > > > > > --- > > > > > a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseConfigBlockLib/ > > > > > Ba > > > > > seCo > > > > > nfigB > > > > > lockLib.c > > > > > +++ /dev/null > > > > > @@ -1,146 +0,0 @@ > > > > > -/** @file > > > > > - Library functions for Config Block management. > > > > > - > > > > > - Copyright (c) 2019 Intel Corporation. All rights reserved. > > > > >
> > > > > - > > > > > - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ > > > > > - > > > > > -#include > > > > > -#include -#include > > > > > -#include > > > > > -#include > > > > > - > > > > > -/** > > > > > - Create config block table > > > > > - > > > > > - @param[in] TotalSize - Max size to be a= llocated for the > > > Config > > > > > Block Table > > > > > - @param[out] ConfigBlockTableAddress - On return, point= s to a > > > pointer > > > > > to the beginning of Config Block Table Address > > > > > - > > > > > - @retval EFI_INVALID_PARAMETER - Invalid Parameter > > > > > - @retval EFI_OUT_OF_RESOURCES - Out of resources > > > > > - @retval EFI_SUCCESS - Successfully created Config Bl= ock Table at > > > > > ConfigBlockTableAddress > > > > > -**/ > > > > > -EFI_STATUS > > > > > -EFIAPI > > > > > -CreateConfigBlockTable ( > > > > > - IN UINT16 TotalSize, > > > > > - OUT VOID **ConfigBlockTableAddress > > > > > - ) > > > > > -{ > > > > > - CONFIG_BLOCK_TABLE_HEADER *ConfigBlkTblAddrPtr; > > > > > - UINT32 ConfigBlkTblHdrSize; > > > > > - > > > > > - ConfigBlkTblHdrSize =3D (UINT32)(sizeof > > > (CONFIG_BLOCK_TABLE_HEADER)); > > > > > - > > > > > - if (TotalSize <=3D (ConfigBlkTblHdrSize + sizeof > > > (CONFIG_BLOCK_HEADER))) { > > > > > - DEBUG ((DEBUG_ERROR, "Invalid Parameter\n")); > > > > > - return EFI_INVALID_PARAMETER; > > > > > - } > > > > > - > > > > > - ConfigBlkTblAddrPtr =3D (CONFIG_BLOCK_TABLE_HEADER > > > *)AllocateZeroPool > > > > > (TotalSize); > > > > > - if (ConfigBlkTblAddrPtr =3D=3D NULL) { > > > > > - DEBUG ((DEBUG_ERROR, "Could not allocate memory.\n")); > > > > > - return EFI_OUT_OF_RESOURCES; > > > > > - } > > > > > - ConfigBlkTblAddrPtr->NumberOfBlocks =3D 0; > > > > > - ConfigBlkTblAddrPtr->Header.GuidHob.Header.HobLength =3D > > > > > TotalSize; > > > > > - ConfigBlkTblAddrPtr->AvailableSize =3D TotalSize - > > > > > ConfigBlkTblHdrSize; > > > > > - > > > > > - *ConfigBlockTableAddress =3D (VOID *)ConfigBlkTblAddrPtr; > > > > > - > > > > > - return EFI_SUCCESS; > > > > > -} > > > > > - > > > > > -/** > > > > > - Add config block into config block table structure > > > > > - > > > > > - @param[in] ConfigBlockTableAddress - A pointer to the= beginning > > > of > > > > > Config Block Table Address > > > > > - @param[out] ConfigBlockAddress - On return, point= s to a > pointer > > > to > > > > > the beginning of Config Block Address > > > > > - > > > > > - @retval EFI_OUT_OF_RESOURCES - Config Block Table is full and > > > > > cannot add new Config Block or > > > > > - Config Block Offset Table is fu= ll and cannot add new > > > Config > > > > > Block. > > > > > - @retval EFI_SUCCESS - Successfully added Config Block > > > > > -**/ > > > > > -EFI_STATUS > > > > > -EFIAPI > > > > > -AddConfigBlock ( > > > > > - IN VOID *ConfigBlockTableAddress, > > > > > - OUT VOID **ConfigBlockAddress > > > > > - ) > > > > > -{ > > > > > - CONFIG_BLOCK *TempConfigBlk; > > > > > - CONFIG_BLOCK_TABLE_HEADER *ConfigBlkTblAddrPtr; > > > > > - CONFIG_BLOCK *ConfigBlkAddrPtr; > > > > > - UINT16 ConfigBlkSize; > > > > > - > > > > > - ConfigBlkTblAddrPtr =3D (CONFIG_BLOCK_TABLE_HEADER > > > > > *)ConfigBlockTableAddress; > > > > > - ConfigBlkAddrPtr =3D (CONFIG_BLOCK *)(*ConfigBlockAddress); > > > > > - ConfigBlkSize =3D > > > > > ConfigBlkAddrPtr->Header.GuidHob.Header.HobLength; > > > > > - DEBUG ((DEBUG_INFO, "Config Block GUID: %g / Config Block Size= : > > > > > 0x%x bytes\n", &(ConfigBlkAddrPtr->Header.GuidHob.Name), > > > > > ConfigBlkSize)); > > > > > - if ((ConfigBlkSize % 4) !=3D 0) { > > > > > - DEBUG ((DEBUG_ERROR, "Config Block must be multiples of 4 > > > bytes\n")); > > > > > - return EFI_INVALID_PARAMETER; > > > > > - } > > > > > - if (ConfigBlkTblAddrPtr->AvailableSize < ConfigBlkSize) { > > > > > - DEBUG ((DEBUG_ERROR, "Config Block Table is full and cannot = add > > > new > > > > > Config Block.\n")); > > > > > - DEBUG ((DEBUG_ERROR, "Available Config Block Size: 0x%x byte= s / > > > > > Requested Config Block Size: 0x%x bytes\n", ConfigBlkTblAddrPtr- > > > > > >AvailableSize, ConfigBlkSize)); > > > > > - return EFI_OUT_OF_RESOURCES; > > > > > - } > > > > > - > > > > > - TempConfigBlk =3D (CONFIG_BLOCK *)((UINTN)ConfigBlkTblAddrPtr = + > > > > > (UINTN)(ConfigBlkTblAddrPtr->Header.GuidHob.Header.HobLength - > > > > > ConfigBlkTblAddrPtr->AvailableSize)); > > > > > - CopyMem (&TempConfigBlk->Header, &ConfigBlkAddrPtr->Header, > > > > > sizeof(CONFIG_BLOCK_HEADER)); > > > > > - > > > > > - ConfigBlkTblAddrPtr->NumberOfBlocks++; > > > > > - ConfigBlkTblAddrPtr->AvailableSize =3D > > > > > ConfigBlkTblAddrPtr->AvailableSize - ConfigBlkSize; > > > > > - > > > > > - *ConfigBlockAddress =3D (VOID *) TempConfigBlk; > > > > > - DEBUG ((DEBUG_INFO, "Config Block Address: 0x%x / Available > > > > > Config Block Size: 0x%x bytes\n", > > > > > (UINT32)(UINTN)*ConfigBlockAddress, > > > > > ConfigBlkTblAddrPtr->AvailableSize)); > > > > > - return EFI_SUCCESS; > > > > > -} > > > > > - > > > > > -/** > > > > > - Retrieve a specific Config Block data by GUID > > > > > - > > > > > - @param[in] ConfigBlockTableAddress - A pointer to th= e beginning > > > of > > > > > Config Block Table Address > > > > > - @param[in] ConfigBlockGuid - A pointer to th= e GUID uses to > > > > > search specific Config Block > > > > > - @param[out] ConfigBlockAddress - On return, poin= ts to a > > > pointer to > > > > > the beginning of Config Block Address > > > > > - > > > > > - @retval EFI_NOT_FOUND - Could not find the Config Bloc= k > > > > > - @retval EFI_SUCCESS - Config Block found and return > > > > > -**/ > > > > > -EFI_STATUS > > > > > -EFIAPI > > > > > -GetConfigBlock ( > > > > > - IN VOID *ConfigBlockTableAddress, > > > > > - IN EFI_GUID *ConfigBlockGuid, > > > > > - OUT VOID **ConfigBlockAddress > > > > > - ) > > > > > -{ > > > > > - UINT16 OffsetIndex; > > > > > - CONFIG_BLOCK *TempConfigBlk; > > > > > - CONFIG_BLOCK_TABLE_HEADER *ConfigBlkTblAddrPtr; > > > > > - UINT32 ConfigBlkTblHdrSize; > > > > > - UINT32 ConfigBlkOffset; > > > > > - UINT16 NumOfBlocks; > > > > > - > > > > > - ConfigBlkTblHdrSize =3D (UINT32)(sizeof > > > (CONFIG_BLOCK_TABLE_HEADER)); > > > > > - ConfigBlkTblAddrPtr =3D (CONFIG_BLOCK_TABLE_HEADER > > > > > *)ConfigBlockTableAddress; > > > > > - NumOfBlocks =3D ConfigBlkTblAddrPtr->NumberOfBlocks; > > > > > - > > > > > - ConfigBlkOffset =3D 0; > > > > > - for (OffsetIndex =3D 0; OffsetIndex < NumOfBlocks; OffsetIndex= ++) { > > > > > - if ((ConfigBlkTblHdrSize + ConfigBlkOffset) > (ConfigBlkTblA= ddrPtr- > > > > > >Header.GuidHob.Header.HobLength)) { > > > > > - break; > > > > > - } > > > > > - TempConfigBlk =3D (CONFIG_BLOCK *)((UINTN)ConfigBlkTblAddrPt= r + > > > > > (UINTN)ConfigBlkTblHdrSize + (UINTN)ConfigBlkOffset); > > > > > - if (CompareGuid (&(TempConfigBlk->Header.GuidHob.Name), > > > > > ConfigBlockGuid)) { > > > > > - *ConfigBlockAddress =3D (VOID *)TempConfigBlk; > > > > > - return EFI_SUCCESS; > > > > > - } > > > > > - ConfigBlkOffset =3D ConfigBlkOffset + TempConfigBlk- > > > > > >Header.GuidHob.Header.HobLength; > > > > > - } > > > > > - DEBUG ((DEBUG_ERROR, "Could not find the config block.\n")); > > > > > - return EFI_NOT_FOUND; > > > > > -} > > > > > diff --git > > > > > a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseConfigBlockLib/ > > > > > Ba > > > > > seCo > > > > > nfigB > > > > > lockLib.inf > > > > > b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseConfigBlockLib/ > > > > > Ba > > > > > seCo > > > > > nfig > > > > > BlockLib.inf > > > > > deleted file mode 100644 > > > > > index a7def2481d..0000000000 > > > > > --- > > > > > a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseConfigBlockLib/ > > > > > Ba > > > > > seCo > > > > > nfigB > > > > > lockLib.inf > > > > > +++ /dev/null > > > > > @@ -1,29 +0,0 @@ > > > > > -## @file > > > > > -# Component INF file for the BaseConfigBlock library. > > > > > -# > > > > > -# Copyright (c) 2019 Intel Corporation. All rights reserved. > > > > >
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -## > > > > > - > > > > > -[Defines] > > > > > -INF_VERSION =3D 0x00010017 > > > > > -BASE_NAME =3D BaseConfigBlockLib > > > > > -FILE_GUID =3D 1EC07EA8-7808-4e06-9D79-309AE331D2D5 > > > > > -VERSION_STRING =3D 1.0 > > > > > -MODULE_TYPE =3D BASE > > > > > -LIBRARY_CLASS =3D ConfigBlockLib > > > > > - > > > > > - > > > > > -[Packages] > > > > > -MdePkg/MdePkg.dec > > > > > -CoffeelakeSiliconPkg/SiPkg.dec > > > > > - > > > > > -[Sources] > > > > > -BaseConfigBlockLib.c > > > > > - > > > > > -[LibraryClasses] > > > > > -DebugLib > > > > > -BaseMemoryLib > > > > > -MemoryAllocationLib > > > > > diff --git > > > > > a/Silicon/Intel/KabylakeSiliconPkg/Library/BaseConfigBlockLib/Ba > > > > > se > > > > > Conf > > > > > igBlo > > > > > ckLib.c > > > > > b/Silicon/Intel/IntelSiliconPkg/Library/BaseConfigBlockLib/BaseC > > > > > on > > > > > figB > > > > > lockLi > > > > > b.c > > > > > similarity index 100% > > > > > rename from > > > > > Silicon/Intel/KabylakeSiliconPkg/Library/BaseConfigBlockLib/Base > > > > > Co > > > > > nfig > > > > > Block > > > > > Lib.c > > > > > rename to > > > > > Silicon/Intel/IntelSiliconPkg/Library/BaseConfigBlockLib/BaseCon > > > > > fi > > > > > gBlo > > > > > ckLib.c > > > > > diff --git > > > > > a/Silicon/Intel/KabylakeSiliconPkg/Library/BaseConfigBlockLib/Ba > > > > > se > > > > > Conf > > > > > igBlo > > > > > ckLib.inf > > > > > b/Silicon/Intel/IntelSiliconPkg/Library/BaseConfigBlockLib/BaseC > > > > > on > > > > > figB > > > > > lockLi > > > > > b.inf > > > > > similarity index 100% > > > > > rename from > > > > > Silicon/Intel/KabylakeSiliconPkg/Library/BaseConfigBlockLib/Base > > > > > Co > > > > > nfig > > > > > Block > > > > > Lib.inf > > > > > rename to > > > > > Silicon/Intel/IntelSiliconPkg/Library/BaseConfigBlockLib/BaseCon > > > > > fi > > > > > gBlo > > > > > ckLib.i > > > > > nf > > > > > -- > > > > > 2.16.2.windows.1 > > > > > > > > >