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.web12.415.1635895434742660480 for ; Tue, 02 Nov 2021 16:23:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=wJHuw3/H; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: nathaniel.l.desimone@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10156"; a="228837744" X-IronPort-AV: E=Sophos;i="5.87,203,1631602800"; d="scan'208";a="228837744" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 16:23:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,203,1631602800"; d="scan'208";a="560282749" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga004.fm.intel.com with ESMTP; 02 Nov 2021 16:23:53 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 2 Nov 2021 16:23:52 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 2 Nov 2021 16:23:52 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.171) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 2 Nov 2021 16:23:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nkiXUJC2ZqhZ57bWcSboG+9B1ymnN4gG7NuueatgkgF66AwQ+kVk12uZC1/daQF0f00UfhPlpzQ4XvHXbeNlJaUMt5MhGgk/BsEcwiYPgiXAKIPMxLOPeJurFhqY68E3k8XGVsZkv0YVGCz1e5vdHdN5QDvspolfHUIXFaDLsIbg5un9L5/ov1NiarFxlAJP0RVeXxnboJX1ftwEb1IRioQdW1C50D1y7VXd1QCWik6T2DgtKCiJAGkjyZs+Xg3n35/cRUqEXIUNex9t8qP3kBIuaUl038K0nR7ts/vNdB3CNDozBQb/6hh3X9ZZPiyQsbNT5XerUSZOI+8cSfF5jQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TlibiKrk3U3xSJ8d2bhZSK4bV5AeXM6hvU1NeEIZQ08=; b=U/WVJQSaHP3Ys0dalSeDa4jjEJrrzjCDC+3TT+BJwLX/SN2UgwiTM8dclTqq4WbdjhdrLN1wLkfD3kuWhHUMpuXfrh2fBfWBqRi1FYprsPNGUq5DakqnPj+rkto6uqRyQnxmPr6BcUFSlXB3SCOKVYxK2Q5mr6VEYvJ9a4TSICqGpPwrMARZhJ2qkfR4WRaxnBWVBGvQrybsBLYYFJWEGoDxlCR1FRkM5zvpmnnzVOvX1HcTTkOonSjGFSk5ox1jc3qWu0HB2WvnNFzzt7bhBYBYPZ5Hu34i0zInj0ahMZ9ix/sMFooOWx7NCmAcoYkMugFw46Hc0ZaqiYcJGUmMdg== 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=TlibiKrk3U3xSJ8d2bhZSK4bV5AeXM6hvU1NeEIZQ08=; b=wJHuw3/HEkjsTQE6k0ulTLY1ICIZ+BGUxZSp78dOi9WjbvS910uDK0JQRNWWqXXLVnbJ+1GivQjtd4myZ6OtpEyptdXOItfLciBepORT/56cmxl+Bsz1Kal9+KI8Uu8AK0d9/gzfcdm5k2TyMHtMdvPj57OLkcVmwjUkjiz3hn8= Received: from MW4PR11MB5821.namprd11.prod.outlook.com (2603:10b6:303:184::5) by MWHPR11MB1693.namprd11.prod.outlook.com (2603:10b6:300:2b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.17; Tue, 2 Nov 2021 23:23:31 +0000 Received: from MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::6140:8298:9d5a:df46]) by MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::6140:8298:9d5a:df46%9]) with mapi id 15.20.4649.019; Tue, 2 Nov 2021 23:23:31 +0000 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "mikuback@linux.microsoft.com" CC: "Chiu, Chasel" , "Chaganty, Rangasai V" Subject: Re: [edk2-devel] [PATCH v6 41/52] CoffeelakeSiliconPkg/BasePchSpiCommonLib: Identify flash regions by GUID Thread-Topic: [edk2-devel] [PATCH v6 41/52] CoffeelakeSiliconPkg/BasePchSpiCommonLib: Identify flash regions by GUID Thread-Index: AQHXzEiccCrFY5tFkkKgex6Tqm18tqvw6JYA Date: Tue, 2 Nov 2021 23:23:31 +0000 Message-ID: References: <20211028220846.753-1-mikuback@linux.microsoft.com> <20211028220846.753-6-mikuback@linux.microsoft.com> In-Reply-To: <20211028220846.753-6-mikuback@linux.microsoft.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 110ec7f2-961a-4e84-6ac7-08d99e57c885 x-ms-traffictypediagnostic: MWHPR11MB1693: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EHjZz1AUwPiPbxDfP76SeO7KTINGZfCNa8MbaPHo665am87vEH/XoZ7TVqG0wvGmrfd8qo2B3EERzr5l/JxdzokR5zc89yNdMy1bNfjD23Jrf09JC+6R9hBw8gFBPgKUGBog+7c6yx2LeRH30Gm1JL8DE+nblIpfN+z178d80T4qREOOb6ZDoFLX1+hAnhuRxYurVyfhaDrRut0HlXb1WFxvtp5vAhrVymQCHFLJgVhrXVCCOnnlKo4rOtK6e1H0q/t06hui4C0gDjyFYCa+d/A6SdkPZOBExG9ufCQ8EOmF2AHLuLBmoYig+KRWPHK6UmXxk4lnryn8wG85TubaDm22mU3DHkvrQWsQall9SyTOB7K+UpDfL4Wgkojta2yXzLNcMIH+vppJgO+GVEnytgsSGB23ic7q6BclUHMN8/xvK737eZ8nQswsrjZydsFWkEtj9n0hhpoog6jq4mdRYMUSSJ6i6oHqUqtepITmGQ9rXcGOdArlqxXKHvmRsS4yhi+mfh38HuTX0SuB6o5q6QVbPLCxWX0ORdjwMaNvEKh1c/E2cb94CGW9GiMqLxblFw1EwJyTp91Fy0AitWw2851QXj3AAl7G/8rEi6fy2kRnLcXKXKmRiqWEzAiEgBPfsjYSOd9/1rl1z8kPmoScMkbDPjfPUFEyPZS+P2YoRt/MsoLie/oKJ7dzb3ADiE+5Jkr9lVTFATaFFaGv08q1UYJdO9UlCbpaamahjARdVi48XdDmY7D4wWXeSwHGjy+XS8MDti16AO6qTVnhb3m9N/53XRSeUSpj0XqhXz8fbygH1rhAyUuXF2Y7YyiIKcgI7cpntW/5XVBMh14x6MusTj/Cdt7cmRgjq4zpH6vtOQY= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5821.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(38100700002)(53546011)(122000001)(38070700005)(33656002)(82960400001)(107886003)(71200400001)(6506007)(8676002)(5660300002)(86362001)(8936002)(316002)(110136005)(7696005)(26005)(54906003)(76116006)(66946007)(45080400002)(66476007)(66556008)(4326008)(508600001)(2906002)(186003)(52536014)(83380400001)(64756008)(66446008)(966005)(55016002)(9686003)(30864003)(213903007)(559001)(579004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?D0iKXzOEh6uwRo0Yrxt/j+b1KpM8CC2XYPb/Gg+vJ5TNVAfce6KCtelOx+9s?= =?us-ascii?Q?dyE066mspd2lr1QPCSGBoTNq1uEXla89HYrg4jfGJ9Qkbc7EjMCcU2dwA60K?= =?us-ascii?Q?qCQB1OVl4qTsdjY7REV6msgdNTriZiFe6RoDxV6u9wOqADeTTHD1UK+hzjGz?= =?us-ascii?Q?M37MjcQQsrutcpiIRwl+VS8+faxWxqu8gpNiBvoW5ZPFkk44W6kZM3dqDtJH?= =?us-ascii?Q?i8Hj82V4sNdOsVhW6mJu2hbDk7cC2oveilI9D9acybEHitmcaXgrqAxU3JI8?= =?us-ascii?Q?WqAf2gM3u2N5oQOySEoEny0U4tbffutT+4nHVQDuSzOftTuiMHAV9J2h6xR/?= =?us-ascii?Q?FdY20GwD40YfisLdGSuZkFXbyATje0uyypxjrjQgBUTmC7x7jij9LRfnIRVk?= =?us-ascii?Q?aK7vToL517+vArDOBpyxZeyJKEsKuwm3kcJLZ0H1zg6iY1p6rGfgQNJZiJjc?= =?us-ascii?Q?3tA+qVEh1cNkXW/qIL9AsNZsepbh7TBuZitZlumYIawnLvkFldxoQa6eGlo4?= =?us-ascii?Q?ZUSXaggQBlOaLJlTicawNwtwgwlh7QnsyZ5CSmndWSZHbx0TRNXDlH6yfDrf?= =?us-ascii?Q?0P+S6+8s6g3gsMpS0M3oGrrW8XKGAGEwE4TCzW/JdkTBfHGRxnbuc51dsp8S?= =?us-ascii?Q?uUcgXirL46GAgWZn4AwBCscWyWk5rfPoETlQ/FrJ9okMHgys5UyhluzGF7OW?= =?us-ascii?Q?z9iN5nZgbJUay9sBV5CCkHQJpIK9YaR8LiH2Os9Hm/v8gYnpECKtPqMi2iKw?= =?us-ascii?Q?pyiTr1dJDRBT0b9PfIUgzjbE4KXBZOkvE8IiSvd45WCUL+RL/2VjnXiFPgot?= =?us-ascii?Q?VgpzrlMFZ7oIYXEkNiTsreF/1QhYAn3ZpDkRI9Acrw4AeTSFHF/ftNI8WM1c?= =?us-ascii?Q?9NgxBSazn85GCz81FLuh0foTUZyaemmhq9L0Hl6ABfdrq/reFlDHHUmlS1r1?= =?us-ascii?Q?uAKNXKz9bwy2lbtm8beZrR5Hr8Fwif5Nn8B6sZ+bsmgZMn1594mEbvPaX6gZ?= =?us-ascii?Q?f5zRtHg5WbPUpGXm/n+p+Ho9OZmqKF8j1+jxcUE2OFFy28E8gCF/vpWId8Z0?= =?us-ascii?Q?am5LsF7jY4dkFo15+hEI11JZV7ftMmPTN9fLxEK5pWsz4Y8npadLH/hfUnxo?= =?us-ascii?Q?q9FeNdE8xcSPB/wpIqJvfFO4fmeXMgiMxJuxT/M/IzgZ+TGfBcO7UFeH2zj+?= =?us-ascii?Q?nWjS5ijIf76VsKNkO75QbvJZZeQ2hKhLN8R9cN6QI9SqOdaCjl0USmIy2bjC?= =?us-ascii?Q?4WiiXCIwYKI5rzAN0lon+BdllQyC9g3i7z5m2g2g7Ywglitarz66uvdq5t6e?= =?us-ascii?Q?VFsF33Fx9kwTmNxYcA1rq9vvk739NGeFFAd1zODVlib89nNPY3j0I/KqY7W6?= =?us-ascii?Q?UedfZUUOWiINb1KRO9iLITekizI0ICW0eyMYM7gxFb6oKCFrkc6KKmuzmr6t?= =?us-ascii?Q?z4BGUjbTRKtBQVLUVZm3qvaDxXJ3ry4p5ftpKvw6PoLqBc0i3URPX9yA+FPF?= =?us-ascii?Q?sHsDH64qBqmB7ccatZplqboHJ8CB5eqZ41CJjiGbp/ydcd3r2jwj1v7r76Q4?= =?us-ascii?Q?enggQV/L4NN5K/MAaxIeK8PhlGy3I08svvxJqS28rmlxpYbLmuImRCxRcYPl?= =?us-ascii?Q?Jx81SAGaftrulGIjM68XMpMkLRMdUw2KyBGbfpn5xS5A7w68XEDi84ta6OZR?= =?us-ascii?Q?V9f9vA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 110ec7f2-961a-4e84-6ac7-08d99e57c885 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2021 23:23:31.1911 (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: CdIKDnulqbu0ydgJF0CVsrC/vTAchf0pyP8iPkgIMUrw9NBF7nIfP9UpL4HWKkFGGZSAwrYjsIFWoQQrpmFF57WN4rZAJMSYjANsAd9yKqo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1693 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nate DeSimone -----Original Message----- From: devel@edk2.groups.io On Behalf Of Michael Kuba= cki Sent: Thursday, October 28, 2021 3:09 PM To: devel@edk2.groups.io Cc: Chiu, Chasel ; Chaganty, Rangasai V ; Desimone, Nathaniel L Subject: [edk2-devel] [PATCH v6 41/52] CoffeelakeSiliconPkg/BasePchSpiCommo= nLib: Identify flash regions by GUID From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3307 Updates the library to identify flash regions by GUID and internally map th= e GUID entries to values specific to CoffeelakeSiliconPkg. Cc: Chasel Chiu Cc: Rangasai V Chaganty Cc: Nate DeSimone Signed-off-by: Michael Kubacki Reviewed-by: Chasel Chiu --- Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiCommonLib= /SpiCommon.c | 192 +++++++++++++++----- Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Private/Library/PchSpiCommo= nLib.h | 60 +++--- Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiCommonLib= /BasePchSpiCommonLib.inf | 12 ++ 3 files changed, 187 insertions(+), 77 deletions(-) diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePch= SpiCommonLib/SpiCommon.c b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/P= rivate/BasePchSpiCommonLib/SpiCommon.c index bc84a4f27f1a..df9c55f2cbb1 100644 --- a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiComm= onLib/SpiCommon.c +++ b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiC +++ ommonLib/SpiCommon.c @@ -2,11 +2,13 @@ PCH SPI Common Driver implements the SPI Host Controller Compatibility I= nterface. =20 Copyright (c) 2019 Intel Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 #include +#include #include #include #include @@ -14,12 +16,101 @@ #include #include #include -#include +#include #include #include #include #include =20 +typedef enum { + FlashRegionDescriptor, + FlashRegionBios, + FlashRegionMe, + FlashRegionGbe, + FlashRegionPlatformData, + FlashRegionDer, + FlashRegionEc =3D 8, + FlashRegionAll, + FlashRegionMax +} FLASH_REGION_TYPE; + +typedef struct { + EFI_GUID *Guid; + FLASH_REGION_TYPE Type; +} FLASH_REGION_MAPPING; + +FLASH_REGION_MAPPING mFlashRegionTypes[] =3D { + { + &gFlashRegionDescriptorGuid, + FlashRegionDescriptor + }, + { + &gFlashRegionBiosGuid, + FlashRegionBios + }, + { + &gFlashRegionMeGuid, + FlashRegionMe + }, + { + &gFlashRegionGbeGuid, + FlashRegionGbe + }, + { + &gFlashRegionPlatformDataGuid, + FlashRegionPlatformData + }, + { + &gFlashRegionDerGuid, + FlashRegionDer + }, + { + &gFlashRegionEcGuid, + FlashRegionEc + }, + { + &gFlashRegionAllGuid, + FlashRegionAll + }, + { + &gFlashRegionMaxGuid, + FlashRegionMax + } +}; + +/** + Returns the type of a flash region given its GUID. + + @param[in] FlashRegionGuid Pointer to the flash region GUID. + @param[out] FlashRegionType Pointer to a buffer that will be set to = the flash region type value. + + @retval EFI_SUCCESS The flash region type was found fo= r the given flash region GUID. + @retval EFI_INVALID_PARAMETER A pointer argument passed to the f= unction is NULL. + @retval EFI_NOT_FOUND The flash region type was not foun= d for the given flash region GUID. + +**/ +EFI_STATUS +GetFlashRegionType ( + IN EFI_GUID *FlashRegionGuid, + OUT FLASH_REGION_TYPE *FlashRegionType + ) +{ + UINTN Index; + + if (FlashRegionGuid =3D=3D NULL || FlashRegionType =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + for (Index =3D 0; Index < ARRAY_SIZE (mFlashRegionTypes); Index++) { + if (CompareGuid (mFlashRegionTypes[Index].Guid, FlashRegionGuid)) { + *FlashRegionType =3D mFlashRegionTypes[Index].Type; + return EFI_SUCCESS; + } + } + + return EFI_NOT_FOUND; +} + /** Initialize an SPI protocol instance. =20 @@ -265,7 +356,7 @@ PchPmTimerStallRuntimeSafe ( STATIC BOOLEAN WaitForS= piCycleComplete ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINTN PchSpiBar0, IN BOOLEAN ErrorCheck ) @@ -302,8 +393,8 @@ WaitForSpiCycleComplete ( /** This function sends the programmed SPI command to the slave device. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . - @param[in] SpiRegionType The SPI Region type for flash cycle whic= h is listed in the Descriptor + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. + @param[in] FlashRegionGuid The Flash Region GUID for flash cycle wh= ich corresponds to the type in the descriptor. @param[in] FlashCycleType The Flash SPI cycle type list in HSFC (H= ardware Sequencing Flash Control Register) register @param[in] Address The Flash Linear Address must fall withi= n a region for which BIOS has access permissions. @param[in] ByteCount Number of bytes in the data portion of t= he SPI cycle. @@ -317,8 +408,8 @@ WaitForSpiCycleComplete ( STATIC EFI_STATUS SendSpiC= md ( - IN PCH_SPI_PROTOCOL *This, - IN FLASH_REGION_TYPE FlashRegionType, + IN PCH_SPI2_PROTOCOL *This, + IN EFI_GUID *FlashRegionGuid, IN FLASH_CYCLE_TYPE FlashCycleType, IN UINT32 Address, IN UINT32 ByteCount, @@ -404,7 +495,7 @@ SendSpiCmd ( } } =20 - Status =3D SpiProtocolGetRegionAddress (This, FlashRegionType, &Hardware= SpiAddr, &FlashRegionSize); + Status =3D SpiProtocolGetRegionAddress (This, FlashRegionGuid,=20 + &HardwareSpiAddr, &FlashRegionSize); if (EFI_ERROR (Status)) { goto SendSpiCmdEnd; } @@ -615,8 +706,8 @@ SendSpiCmd ( /** Read data from the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . - @param[in] FlashRegionType The Flash Region type for flash cycle wh= ich is listed in the Descriptor. + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. + @param[in] FlashRegionGuid The Flash Region GUID for flash cycle wh= ich corresponds to the type in the descriptor. @param[in] Address The Flash Linear Address must fall withi= n a region for which BIOS has access permissions. @param[in] ByteCount Number of bytes in the data portion of t= he SPI cycle. @param[out] Buffer The Pointer to caller-allocated buffer c= ontaining the dada received. @@ -629,8 +720,8 @@ SendSpiCmd ( EFI_STATUS EFIAPI SpiProtocolFlashRead ( - IN PCH_SPI_PROTOCOL *This, - IN FLASH_REGION_TYPE FlashRegionType, + IN PCH_SPI2_PROTOCOL *This, + IN EFI_GUID *FlashRegionGuid, IN UINT32 Address, IN UINT32 ByteCount, OUT UINT8 *Buffer @@ -643,7 +734,7 @@ SpiProtocolFlashRead ( // Status =3D SendSpiCmd ( This, - FlashRegionType, + FlashRegionGuid, FlashCycleRead, Address, ByteCount, @@ -655,8 +746,8 @@ SpiProtocolFlashRead ( /** Write data to the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . - @param[in] FlashRegionType The Flash Region type for flash cycle wh= ich is listed in the Descriptor. + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. + @param[in] FlashRegionGuid The Flash Region GUID for flash cycle wh= ich corresponds to the type in the descriptor. @param[in] Address The Flash Linear Address must fall withi= n a region for which BIOS has access permissions. @param[in] ByteCount Number of bytes in the data portion of t= he SPI cycle. @param[in] Buffer Pointer to caller-allocated buffer conta= ining the data sent during the SPI cycle. @@ -668,8 +759,8 @@ SpiProtocolFlashRead ( EFI_STATUS EFIAPI SpiProtocol= FlashWrite ( - IN PCH_SPI_PROTOCOL *This, - IN FLASH_REGION_TYPE FlashRegionType, + IN PCH_SPI2_PROTOCOL *This, + IN EFI_GUID *FlashRegionGuid, IN UINT32 Address, IN UINT32 ByteCount, IN UINT8 *Buffer @@ -682,7 +773,7 @@ SpiProtocolFlashWrite ( // Status =3D SendSpiCmd ( This, - FlashRegionType, + FlashRegionGuid, FlashCycleWrite, Address, ByteCount, @@ -694,8 +785,8 @@ SpiProtocolFlashWrite ( /** Erase some area on the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . - @param[in] FlashRegionType The Flash Region type for flash cycle wh= ich is listed in the Descriptor. + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. + @param[in] FlashRegionGuid The Flash Region GUID for flash cycle wh= ich corresponds to the type in the descriptor. @param[in] Address The Flash Linear Address must fall withi= n a region for which BIOS has access permissions. @param[in] ByteCount Number of bytes in the data portion of t= he SPI cycle. =20 @@ -706,8 +797,8 @@ SpiProtocolFlashWrite ( EFI_STATUS EFIAPI SpiProtoco= lFlashErase ( - IN PCH_SPI_PROTOCOL *This, - IN FLASH_REGION_TYPE FlashRegionType, + IN PCH_SPI2_PROTOCOL *This, + IN EFI_GUID *FlashRegionGuid, IN UINT32 Address, IN UINT32 ByteCount ) @@ -719,7 +810,7 @@ SpiProtocolFlashErase ( // Status =3D SendSpiCmd ( This, - FlashRegionType, + FlashRegionGuid, FlashCycleErase, Address, ByteCount, @@ -731,7 +822,7 @@ SpiProtocolFlashErase ( /** Read SFDP data from the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] ComponentNumber The Componen Number for chip select @param[in] Address The starting byte address for SFDP data = read. @param[in] ByteCount Number of bytes in SFDP data portion of = the SPI cycle @@ -745,7 +836,7 @@ SpiProtocolFlashErase ( EFI_STATUS EFIAPI SpiProtoco= lFlashReadSfdp ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT8 ComponentNumber, IN UINT32 Address, IN UINT32 ByteCount, @@ -774,7 +865,7 @@ SpiProtocolFlashReadSfdp ( // Status =3D SendSpiCmd ( This, - FlashRegionAll, + &gFlashRegionAllGuid, FlashCycleReadSfdp, FlashAddress, ByteCount, @@ -786,7 +877,7 @@ SpiProtocolFlashReadSfdp ( /** Read Jedec Id from the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] ComponentNumber The Componen Number for chip select @param[in] ByteCount Number of bytes in JedecId data portion = of the SPI cycle, the data size is 3 typically @param[out] JedecId The Pointer to caller-allocated buffer c= ontaining JEDEC ID received @@ -799,7 +890,7 @@ SpiProtocolFlashReadSfdp ( EFI_STATUS EFIAPI SpiProt= ocolFlashReadJedecId ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT8 ComponentNumber, IN UINT32 ByteCount, OUT UINT8 *JedecId @@ -827,7 +918,7 @@ SpiProtocolFlashReadJedecId ( // Status =3D SendSpiCmd ( This, - FlashRegionAll, + &gFlashRegionAllGuid, FlashCycleReadJedecId, Address, ByteCount, @@ -839,7 +930,7 @@ SpiProtocolFlashReadJedecId ( /** Write the status register in the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] ByteCount Number of bytes in Status data portion o= f the SPI cycle, the data size is 1 typically @param[in] StatusValue The Pointer to caller-allocated buffer c= ontaining the value of Status register writing =20 @@ -850,7 +941,7 @@ SpiProtocolFlashReadJedecId ( EFI_STATUS EFIAPI SpiP= rotocolFlashWriteStatus ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT32 ByteCount, IN UINT8 *StatusValue ) @@ -862,7 +953,7 @@ SpiProtocolFlashWriteStatus ( // Status =3D SendSpiCmd ( This, - FlashRegionAll, + &gFlashRegionAllGuid, FlashCycleWriteStatus, 0, ByteCount, @@ -874,7 +965,7 @@ SpiProtocolFlashWriteStatus ( /** Read status register in the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] ByteCount Number of bytes in Status data portion o= f the SPI cycle, the data size is 1 typically @param[out] StatusValue The Pointer to caller-allocated buffer c= ontaining the value of Status register received. =20 @@ -885,7 +976,7 @@ SpiProtocolFlashWriteStatus ( EFI_STATUS EFIAPI SpiP= rotocolFlashReadStatus ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT32 ByteCount, OUT UINT8 *StatusValue ) @@ -897,7 +988,7 @@ SpiProtocolFlashReadStatus ( // Status =3D SendSpiCmd ( This, - FlashRegionAll, + &gFlashRegionAllGuid, FlashCycleReadStatus, 0, ByteCount, @@ -909,8 +1000,8 @@ SpiProtocolFlashReadStatus ( /** Get the SPI region base and size, based on the enum type =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . - @param[in] FlashRegionType The Flash Region type for for the base a= ddress which is listed in the Descriptor. + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. + @param[in] FlashRegionGuid The Flash Region GUID for the base addre= ss which corresponds to the type in the descriptor. @param[out] BaseAddress The Flash Linear Address for the Region = 'n' Base @param[out] RegionSize The size for the Region 'n' =20 @@ -921,18 +1012,25 @@ SpiProtocolFlashReadStatus ( EFI_STATUS EFIAPI Sp= iProtocolGetRegionAddress ( - IN PCH_SPI_PROTOCOL *This, - IN FLASH_REGION_TYPE FlashRegionType, + IN PCH_SPI2_PROTOCOL *This, + IN EFI_GUID *FlashRegionGuid, OUT UINT32 *BaseAddress, OUT UINT32 *RegionSize ) { - SPI_INSTANCE *SpiInstance; - UINTN PchSpiBar0; - UINT32 ReadValue; + EFI_STATUS Status; + FLASH_REGION_TYPE FlashRegionType; + SPI_INSTANCE *SpiInstance; + UINTN PchSpiBar0; + UINT32 ReadValue; =20 SpiInstance =3D SPI_INSTANCE_FROM_SPIPROTOCOL (This); =20 + Status =3D GetFlashRegionType (FlashRegionGuid, &FlashRegionType); if=20 + (EFI_ERROR (Status)) { + return EFI_INVALID_PARAMETER; + } + if (FlashRegionType >=3D FlashRegionMax) { return EFI_INVALID_PARAMETER; } @@ -967,7 +1065,7 @@ SpiProtocolGetRegionAddress ( /** Read PCH Soft Strap Values =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] SoftStrapAddr PCH Soft Strap address offset from FPSBA= . @param[in] ByteCount Number of bytes in SoftStrap data portio= n of the SPI cycle @param[out] SoftStrapValue The Pointer to caller-allocated buffer c= ontaining PCH Soft Strap Value. @@ -981,7 +1079,7 @@ SpiProtocolGetRegionAddress ( EFI_STATUS EFIAPI Spi= ProtocolReadPchSoftStrap ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT32 SoftStrapAddr, IN UINT32 ByteCount, OUT VOID *SoftStrapValue @@ -1013,7 +1111,7 @@ SpiProtocolReadPchSoftStrap ( // Status =3D SendSpiCmd ( This, - FlashRegionDescriptor, + &gFlashRegionDescriptorGuid, FlashCycleRead, StrapFlashAddr, ByteCount, @@ -1025,7 +1123,7 @@ SpiProtocolReadPchSoftStrap ( /** Read CPU Soft Strap Values =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] SoftStrapAddr CPU Soft Strap address offset from FCPUS= BA. @param[in] ByteCount Number of bytes in SoftStrap data portio= n of the SPI cycle. @param[out] SoftStrapValue The Pointer to caller-allocated buffer c= ontaining CPU Soft Strap Value. @@ -1039,7 +1137,7 @@ SpiProtocolReadPchSoftStrap ( EFI_STATUS EFIAPI Sp= iProtocolReadCpuSoftStrap ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT32 SoftStrapAddr, IN UINT32 ByteCount, OUT VOID *SoftStrapValue @@ -1071,7 +1169,7 @@ SpiProtocolReadCpuSoftStrap ( // Status =3D SendSpiCmd ( This, - FlashRegionDescriptor, + &gFlashRegionDescriptorGuid, FlashCycleRead, StrapFlashAddr, ByteCount, diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Private/Library= /PchSpiCommonLib.h b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Private= /Library/PchSpiCommonLib.h index 0a973a77a381..3b1720c69434 100644 --- a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Private/Library/PchSpi= CommonLib.h +++ b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Private/Library/Pch +++ SpiCommonLib.h @@ -9,7 +9,7 @@ #ifndef _PCH_SPI_COMMON_LIB_H_ #define _PCH_SPI_COMMON_LIB_H_ =20 -#include +#include =20 // // Maximum time allowed while waiting the SPI cycle to complete @@ -50,7 += 50,7 @@ typedef enum { typedef struct { UINT32 Signature; EFI_HANDLE Handle; - PCH_SPI_PROTOCOL SpiProtocol; + PCH_SPI2_PROTOCOL SpiProtocol; UINT16 PchAcpiBase; UINT64 PchSpiBase; UINT8 ReadPermission; @@ -147,8 +147,8 @@ IsSpiFlashWriteGranted ( /** Read data from the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . - @param[in] FlashRegionType The Flash Region type for flash cycle wh= ich is listed in the Descriptor. + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. + @param[in] FlashRegionGuid The Flash Region GUID for flash cycle wh= ich corresponds to the type in the descriptor. @param[in] Address The Flash Linear Address must fall withi= n a region for which BIOS has access permissions. @param[in] ByteCount Number of bytes in the data portion of t= he SPI cycle. @param[out] Buffer The Pointer to caller-allocated buffer c= ontaining the dada received. @@ -161,8 +161,8 @@ IsSpiFlashWriteGranted ( EFI_STATUS EFIAPI SpiProtoc= olFlashRead ( - IN PCH_SPI_PROTOCOL *This, - IN FLASH_REGION_TYPE FlashRegionType, + IN PCH_SPI2_PROTOCOL *This, + IN EFI_GUID *FlashRegionGuid, IN UINT32 Address, IN UINT32 ByteCount, OUT UINT8 *Buffer @@ -171,8 +171,8 @@ SpiProtocolFlashRead ( /** Write data to the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . - @param[in] FlashRegionType The Flash Region type for flash cycle wh= ich is listed in the Descriptor. + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. + @param[in] FlashRegionGuid The Flash Region GUID for flash cycle wh= ich corresponds to the type in the descriptor. @param[in] Address The Flash Linear Address must fall withi= n a region for which BIOS has access permissions. @param[in] ByteCount Number of bytes in the data portion of t= he SPI cycle. @param[in] Buffer Pointer to caller-allocated buffer conta= ining the data sent during the SPI cycle. @@ -184,8 +184,8 @@ SpiProtocolFlashRead ( EFI_STATUS EFIAPI SpiProtocol= FlashWrite ( - IN PCH_SPI_PROTOCOL *This, - IN FLASH_REGION_TYPE FlashRegionType, + IN PCH_SPI2_PROTOCOL *This, + IN EFI_GUID *FlashRegionGuid, IN UINT32 Address, IN UINT32 ByteCount, IN UINT8 *Buffer @@ -194,8 +194,8 @@ SpiProtocolFlashWrite ( /** Erase some area on the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . - @param[in] FlashRegionType The Flash Region type for flash cycle wh= ich is listed in the Descriptor. + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. + @param[in] FlashRegionGuid The Flash Region GUID for flash cycle wh= ich corresponds to the type in the descriptor. @param[in] Address The Flash Linear Address must fall withi= n a region for which BIOS has access permissions. @param[in] ByteCount Number of bytes in the data portion of t= he SPI cycle. =20 @@ -206,8 +206,8 @@ SpiProtocolFlashWrite ( EFI_STATUS EFIAPI SpiProtoco= lFlashErase ( - IN PCH_SPI_PROTOCOL *This, - IN FLASH_REGION_TYPE FlashRegionType, + IN PCH_SPI2_PROTOCOL *This, + IN EFI_GUID *FlashRegionGuid, IN UINT32 Address, IN UINT32 ByteCount ); @@ -215,7 +215,7 @@ SpiProtocolFlashErase ( /** Read SFDP data from the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] ComponentNumber The Componen Number for chip select @param[in] Address The starting byte address for SFDP data = read. @param[in] ByteCount Number of bytes in SFDP data portion of = the SPI cycle @@ -229,7 +229,7 @@ SpiProtocolFlashErase ( EFI_STATUS EFIAPI SpiProtoco= lFlashReadSfdp ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT8 ComponentNumber, IN UINT32 Address, IN UINT32 ByteCount, @@ -239,7 +239,7 @@ SpiProtocolFlashReadSfdp ( /** Read Jedec Id from the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] ComponentNumber The Componen Number for chip select @param[in] ByteCount Number of bytes in JedecId data portion = of the SPI cycle, the data size is 3 typically @param[out] JedecId The Pointer to caller-allocated buffer c= ontaining JEDEC ID received @@ -252,7 +252,7 @@ SpiProtocolFlashReadSfdp ( EFI_STATUS EFIAPI SpiProt= ocolFlashReadJedecId ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT8 ComponentNumber, IN UINT32 ByteCount, OUT UINT8 *JedecId @@ -261,7 +261,7 @@ SpiProtocolFlashReadJedecId ( /** Write the status register in the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] ByteCount Number of bytes in Status data portion o= f the SPI cycle, the data size is 1 typically @param[in] StatusValue The Pointer to caller-allocated buffer c= ontaining the value of Status register writing =20 @@ -272,7 +272,7 @@ SpiProtocolFlashReadJedecId ( EFI_STATUS EFIAPI SpiP= rotocolFlashWriteStatus ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT32 ByteCount, IN UINT8 *StatusValue ); @@ -280,7 +280,7 @@ SpiProtocolFlashWriteStatus ( /** Read status register in the flash part. =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] ByteCount Number of bytes in Status data portion o= f the SPI cycle, the data size is 1 typically @param[out] StatusValue The Pointer to caller-allocated buffer c= ontaining the value of Status register received. =20 @@ -291,7 +291,7 @@ SpiProtocolFlashWriteStatus ( EFI_STATUS EFIAPI SpiP= rotocolFlashReadStatus ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT32 ByteCount, OUT UINT8 *StatusValue ); @@ -299,8 +299,8 @@ SpiProtocolFlashReadStatus ( /** Get the SPI region base and size, based on the enum type =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . - @param[in] FlashRegionType The Flash Region type for for the base a= ddress which is listed in the Descriptor. + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. + @param[in] FlashRegionGuid The Flash Region GUID for the base addre= ss which corresponds to the type in the descriptor. @param[out] BaseAddress The Flash Linear Address for the Region = 'n' Base @param[out] RegionSize The size for the Region 'n' =20 @@ -311,8 +311,8 @@ SpiProtocolFlashReadStatus ( EFI_STATUS EFIAPI SpiPr= otocolGetRegionAddress ( - IN PCH_SPI_PROTOCOL *This, - IN FLASH_REGION_TYPE FlashRegionType, + IN PCH_SPI2_PROTOCOL *This, + IN EFI_GUID *FlashRegionGuid, OUT UINT32 *BaseAddress, OUT UINT32 *RegionSize ); @@ -320,7 +320,7 @@ SpiProtocolGetRegionAddress ( /** Read PCH Soft Strap Values =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] SoftStrapAddr PCH Soft Strap address offset from FPSBA= . @param[in] ByteCount Number of bytes in SoftStrap data portio= n of the SPI cycle @param[out] SoftStrapValue The Pointer to caller-allocated buffer c= ontaining PCH Soft Strap Value. @@ -334,7 +334,7 @@ SpiProtocolGetRegionAddress ( EFI_STATUS EFIAPI SpiP= rotocolReadPchSoftStrap ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT32 SoftStrapAddr, IN UINT32 ByteCount, OUT VOID *SoftStrapValue @@ -343,7 +343,7 @@ SpiProtocolReadPchSoftStrap ( /** Read CPU Soft Strap Values =20 - @param[in] This Pointer to the PCH_SPI_PROTOCOL instance= . + @param[in] This Pointer to the PCH_SPI2_PROTOCOL instanc= e. @param[in] SoftStrapAddr CPU Soft Strap address offset from FCPUS= BA. @param[in] ByteCount Number of bytes in SoftStrap data portio= n of the SPI cycle. @param[out] SoftStrapValue The Pointer to caller-allocated buffer c= ontaining CPU Soft Strap Value. @@ -357,7 +357,7 @@ SpiProtocolReadPchSoftStrap ( EFI_STATUS EFIAPI SpiP= rotocolReadCpuSoftStrap ( - IN PCH_SPI_PROTOCOL *This, + IN PCH_SPI2_PROTOCOL *This, IN UINT32 SoftStrapAddr, IN UINT32 ByteCount, OUT VOID *SoftStrapValue diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePch= SpiCommonLib/BasePchSpiCommonLib.inf b/Silicon/Intel/CoffeelakeSiliconPkg/P= ch/Library/Private/BasePchSpiCommonLib/BasePchSpiCommonLib.inf index f5dc4ee0bfef..b152d2278839 100644 --- a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiComm= onLib/BasePchSpiCommonLib.inf +++ b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiC +++ ommonLib/BasePchSpiCommonLib.inf @@ -2,6 +2,7 @@ # Component description file for the PchSpiCommonLib # # Copyright (c) = 2019 Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -27,3 +28,14 @@ [Libr= aryClasses] IoLib DebugLib PmcLib + +[Guids] + gFlashRegionDescriptorGuid + gFlashRegionBiosGuid + gFlashRegionMeGuid + gFlashRegionGbeGuid + gFlashRegionPlatformDataGuid + gFlashRegionDerGuid + gFlashRegionEcGuid + gFlashRegionAllGuid + gFlashRegionMaxGuid -- 2.28.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82861): https://edk2.groups.io/g/devel/message/82861 Mute This Topic: https://groups.io/mt/86664057/1767664 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [nathaniel.l.desimone@int= el.com] -=3D-=3D-=3D-=3D-=3D-=3D