From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.401.1597467391036141489 for ; Fri, 14 Aug 2020 21:56:31 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=04960913a5=daniel.schaefer@hpe.com) Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07F4mO8r005061; Sat, 15 Aug 2020 04:56:30 GMT Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0a-002e3701.pphosted.com with ESMTP id 32x68hgqda-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 15 Aug 2020 04:56:30 +0000 Received: from G4W9120.americas.hpqcorp.net (g4w9120.houston.hp.com [16.210.21.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5009.houston.hpe.com (Postfix) with ESMTPS id 4D58158; Sat, 15 Aug 2020 04:56:29 +0000 (UTC) Received: from G9W8455.americas.hpqcorp.net (2002:10d8:a15e::10d8:a15e) by G4W9120.americas.hpqcorp.net (2002:10d2:150f::10d2:150f) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 15 Aug 2020 04:53:09 +0000 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (15.241.52.12) by G9W8455.americas.hpqcorp.net (16.216.161.94) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sat, 15 Aug 2020 04:53:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RBBn3cif8kk9O2MGPGam+fdknPnykEtFw+ji4adTn8fI0ME60aQ59WUQ1NYDmVO1YC8J1nfX8BS8MWwo1tcSdRP7W7LvwCQcF77X2BIyWubKIM57LC36DMU+Y5SiARz9w0ygqAeO7B2V0o8KrBgOy5T1vqZOorjj+pnldBmCLeg2O7CD0EiGEub0+ZuopGHb5axhUYAsIXGg8fvOh6JwwZy0aQ5YYkZBo7sr5SVZNwaSh9kNHz3VKBw7lmdN+zGjNt4Dk1HcF0Fjpg9eo/UZVIKnNf7LbRTCwPrnvpFPhIkssn03nrxlB1TAkIFpCgLE/4y5FLCKOPzgCk+5RH1BmQ== 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=ClA+wwLrVUXdWraKUXFUzNavvg5euX1ErRs8sCd3/9Y=; b=Pgsw8AGguipZ8YXhzbPlCuvi1Nc82Z3FfIIwvwVi3hz05aKCwYwqGZ/LirFT/WPCHaMlDGFXaH9GxYAm/dL5/8FibrYxSH8OD8gloLH6LQGyUNzEjxBdCS4WH43zJpHazdrAjxi21RnM9LeZoQKGxPKl6h1XLiG2TMwAjhoMcLRynB90ov5rWV0Ss8GKrGOMuUaAe13s2kcgeKU6yN39BaF80fPc1gScNc2wivX4pDBJH3VSM2ZuztoYPr03lUpq+0mjNo3l19Ula2PLpMQaWbwzl5SsMNOcRFiyXhX/olpNwoqBncApvAk8wHOtYfsx7t1GBMf9SERujjMs6T24RQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) by DF4PR8401MB0666.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7607::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.20; Sat, 15 Aug 2020 04:53:05 +0000 Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::4cbe:3dd0:cae4:b093]) by DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::4cbe:3dd0:cae4:b093%3]) with mapi id 15.20.3283.022; Sat, 15 Aug 2020 04:53:05 +0000 From: "Daniel Schaefer" To: Leif Lindholm , "devel@edk2.groups.io" CC: "Chang, Abner (HPS SW/FW Technologist)" , "Chen, Gilbert" , Michael D Kinney , Ard Biesheuvel Subject: Re: [edk2-devel] [PATCH 1/1] edk2-platforms: Deduplicate RISC-V SMBIOS Thread-Topic: [edk2-devel] [PATCH 1/1] edk2-platforms: Deduplicate RISC-V SMBIOS Thread-Index: AQHWbNoUzl6SFtv4DEyMB6F+Xe8keqk3p1qAgAD9mfc= Date: Sat, 15 Aug 2020 04:53:05 +0000 Message-ID: References: <20200807164444.1304-1-daniel.schaefer@hpe.com> <20200807164444.1304-2-daniel.schaefer@hpe.com>,<20200814134053.GW23500@vanye> In-Reply-To: <20200814134053.GW23500@vanye> Accept-Language: en-US, de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [2a01:598:90a4:3e5d:36c7:d0b6:d1fb:595c] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 4f556192-5335-4e78-794b-08d840d718d6 x-ms-traffictypediagnostic: DF4PR8401MB0666: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JSJvU9Epe0qUbDIpDuYo3LfOfMHhfQAzG9AqtTZQNXVl8IVkjunAqvVoa/gQEl5CoEOcfEPt9RvMxHkv+JPZ+GPF3bcA93O/53xz8jrAD+lBQjeWb+NFzEjX4L0l3ARxspNO6NixTxxr+NfeN4dk2djOmO37NvTENvOrHVgp10Hr1+yyp/nk4QwMibgiv0FAZNBK9VqxyQunMzJZNRua963BO6IWnuLurXO7NVrQvqbX/on/sFeRGK97BM70Ky1/fG4IvNKCx03jCzBHLLwEKOKDazMkdIztM5/y8iAi7w9dBY8zbnn6j7JXyMgoy+Eb/w0ZacUrfZ3eHhGNJJEeNSSjs4j3oCkaY2mgmkFzDG/FmSKwsz1peJgHj0pRb6gEGyB0QXgmAEY8G1byhfrciw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(136003)(376002)(39860400002)(346002)(366004)(396003)(76116006)(83380400001)(66476007)(66556008)(66446008)(166002)(478600001)(86362001)(71200400001)(64756008)(66946007)(9686003)(966005)(7696005)(4326008)(91956017)(55016002)(8676002)(54906003)(33656002)(52536014)(110136005)(8936002)(316002)(186003)(2906002)(5660300002)(6506007)(53546011);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: 8cMmpPphgc/JicjM5fasyqKjaPswOxOfcTo6yui9uxpngkUONMrBZQcGraQMI/txaEKuZolu1R7eN0Wwf+t/kFDrerisGt6+Bw/HLygsqKsBGhRmp0lYPD/UK7iiL8g2yt8ly2oQUpfp8Bp1jUPNt94DVDZsX6BDCpum0yODhutX7zBlaXYhpnbsLjJHDZSXPEvDZ8wTYKpl2i247+sPkQyElYG7/eKs+iovrUQPLBKpnYgdNqkihbRs6ToWEdFJs+xBQw3ZesaYVtSYni70xnRZovPD1tvXNQqdNVs5vu791HcUSL0h5WrjhcjDyV5AKxhtJRFhsMbxBebrwSKou/WAtRELxm7UgVWD1KTFnXtHJ+bPi9dMgq4AK0fywLTMgOajc3X31cHkZ0AAfEsjzwr2QvhXrF6lmwHYIDVFs4ZSuk/lkjbquvna5JMp0kfN996dTkGA4iAl5kVoRGC4VElhTzxSz0IL4GWXVYGITsIl0jUwsJwd3cxV2cdYdHmJ58snuezT9H5BwNC1q0ZmI9qxV9YOf5feX0Ya4yhzKiDbIxzgZWp9hnSMizGw152uegRILsJdi8cUrypf+4oj7UoToAHISWKs6BMfpD14pud264l+kSjhUhX/cKJZQs2Oc+E5C7rgTqmMrI/kz4RFvw0wJYHKfMZRkzAqxIIw3jR5rwFu4rmvhEs5rdlPhQ+KKYLDc+ai9b8NEDwKd1WGcA== X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 4f556192-5335-4e78-794b-08d840d718d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Aug 2020 04:53:05.0231 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ojvGNdNB9F3QWptSmhQEMCKhHxzBUzpTwO+RC4wlPzXg7j4uFJ/hjfrLtv4FbSWHe8aaTHTda+8VeyUO7XmuhA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0666 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 6 URL's were un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-15_01:2020-08-14,2020-08-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 mlxscore=0 clxscore=1015 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008150036 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DF4PR8401MB0444E981A485B02DAF4C2BA7E0410DF4PR8401MB0444_" --_000_DF4PR8401MB0444E981A485B02DAF4C2BA7E0410DF4PR8401MB0444_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Leif, Great, thanks! Yes, we'll fold it into the commits that introduced the mess in the first = place. I just didn't want to make this effort before you sign off on the re= factoring. And hope it was easier to review this way. Yes, we dropped some tables because we rethought how to apply smbios to th= is flexible RISC-V SoC, which doesn't really fit into the rigid view smbios= has of hardware. Cheers, Daniel ________________________________ From: devel@edk2.groups.io on behalf of Leif Lindho= lm Sent: Friday, August 14, 2020 15:40 To: devel@edk2.groups.io ; Schaefer, Daniel Cc: Chang, Abner (HPS SW/FW Technologist) ; Chen, Gil= bert ; Michael D Kinney ;= Ard Biesheuvel Subject: Re: [edk2-devel] [PATCH 1/1] edk2-platforms: Deduplicate RISC-V S= MBIOS Hi Daniel, Thanks for this rework. It looks a massive improvement. On Fri, Aug 07, 2020 at 18:44:44 +0200, Daniel Schaefer wrote: > There was too much code, which wasn't called but it could have generated= those SMBIOS table entries: > > - Type 4 for each core (4xU51, 1xE51) > - Type 7 L1 instruction/data for each core > - Type 7 L2 for U54 > - Type 44 for each core > - Type 4 for the coreplex > - Type 7 L2 for the coreplex > > Now it only has code for those entries: > > - Type 4 for SOC [1x] > - Type 7 L1 for SOC [1x] (even though every hart has own L1, but my Lapt= op's Intel i5 does that also) > - Type 7 L2 for SOC [1x] > - Type 44 for each hart, associated with CPU [5x] > > In addition to simplifying the SMBIOS tables, the code for U54 and E51 i= s > combined, like Leif suggested in his review. > > Here's what happened to the files: > > Expanded: > > - Platform/RISC-V/PlatformPkg/Library/FirmwareContextProcessorSpecificLi= b/FirmwareContextProcessorSpecificLib.c > > Deleted file: > > - Silicon/SiFive/E51/Library/PeiCoreInfoHobLib/CoreInfoHob.c > - Silicon/SiFive/U54MCCoreplex/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > Merged with E51 code into single file: > > - Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > Added SMBIOS Type 7 for L1 Cache, removed duplicated SMBIOS (Type 4 and = 7 code): > > - Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfoHob.c > > Cc: Abner Chang > Cc: Gilbert Chen > Cc: Leif Lindholm > Cc: Michael D Kinney > Cc: Ard Biesheuvel > --- > Silicon/SiFive/SiFive.dec | 2 - > .../FreedomU500VC707Board/U500.dsc | 1 - > .../FreedomU540HiFiveUnleashedBoard/U540.dsc | 1 - > .../PeiCoreInfoHobLib/PeiCoreInfoHobLib.inf | 1 - > .../PeiCoreInfoHobLib/PeiCoreInfoHobLib.inf | 47 ---- > .../PeiCoreInfoHobLib/PeiCoreInfoHobLib.inf | 4 + > .../PeiCoreInfoHobLib/PeiCoreInfoHobLib.inf | 46 ---- > .../FirmwareContextProcessorSpecificLib.h | 11 + > .../Include/ProcessorSpecificHobData.h | 3 +- > Silicon/SiFive/Include/Library/SiFiveE51.h | 60 ----- > Silicon/SiFive/Include/Library/SiFiveU54.h | 50 ++-- > .../Include/Library/SiFiveU54MCCoreplex.h | 55 ---- > .../FirmwareContextProcessorSpecificLib.c | 26 ++ > .../Universal/Pei/PlatformPei/Platform.c | 2 +- > .../Universal/Pei/PlatformPei/Platform.c | 2 +- > .../Library/PeiCoreInfoHobLib/CoreInfoHob.c | 58 +---- > .../Library/PeiCoreInfoHobLib/CoreInfoHob.c | 235 ----------------- > .../Library/PeiCoreInfoHobLib/CoreInfoHob.c | 244 +++++++----------- > .../Library/PeiCoreInfoHobLib/CoreInfoHob.c | 184 ------------- > 19 files changed, 178 insertions(+), 854 deletions(-) I know you dropped some tables, but that's a *nice* diffstat. I guess this is effectively meant to be folded into existing commits? If so: Reviewed-by: Leif Lindholm If not, I might start grumbling about some unrelated cleanup in this patch... / Leif --_000_DF4PR8401MB0444E981A485B02DAF4C2BA7E0410DF4PR8401MB0444_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi Leif,

Great, thanks!
Yes, we'll fold it into the commits that introduced the mess in the f= irst place. I just didn't want to make this effort before you sign off on t= he refactoring. And hope it was easier to review this way.

Yes, we dropped some tables because we rethought how to apply smbios = to this flexible RISC-V SoC, which doesn't really fit into the rigid view s= mbios has of hardware.

Cheers,
Daniel

From: devel@edk2.groups.io= <devel@edk2.groups.io> on behalf of Leif Lindholm <leif@nuviainc.= com>
Sent: Friday, August 14, 2020 15:40
To: devel@edk2.groups.io <devel@edk2.groups.io>; Schaefer, Da= niel <daniel.schaefer@hpe.com>
Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com&g= t;; Chen, Gilbert <gilbert.chen@hpe.com>; Michael D Kinney <michae= l.d.kinney@intel.com>; Ard Biesheuvel <ard.biesheuvel@linaro.org><= br> Subject: Re: [edk2-devel] [PATCH 1/1] edk2-platforms: Deduplicate R= ISC-V SMBIOS
 
Hi Daniel,

Thanks for this rework. It looks a massive improvement.

On Fri, Aug 07, 2020 at 18:44:44 +0200, Daniel Schaefer wrote:
> There was too much code, which wasn't called but it could have genera= ted those SMBIOS table entries:
>
> - Type 4 for each core (4xU51, 1xE51)
> - Type 7 L1 instruction/data for each core
> - Type 7 L2 for U54
> - Type 44 for each core
> - Type 4 for the coreplex
> - Type 7 L2 for the coreplex
>
> Now it only has code for those entries:
>
> - Type 4 for SOC [1x]
> - Type 7 L1 for SOC [1x] (even though every hart has own L1, but my L= aptop's Intel i5 does that also)
> - Type 7 L2 for SOC [1x]
> - Type 44 for each hart, associated with CPU [5x]
>
> In addition to simplifying the SMBIOS tables, the code for U54 and E5= 1 is
> combined, like Leif suggested in his review.
>
> Here's what happened to the files:
>
> Expanded:
>
> - Platform/RISC-V/PlatformPkg/Library/FirmwareContextProcessorSpecifi= cLib/FirmwareContextProcessorSpecificLib.c
>
> Deleted file:
>
> - Silicon/SiFive/E51/Library/PeiCoreInfoHobLib/CoreInfoHob.c
> - Silicon/SiFive/U54MCCoreplex/Library/PeiCoreInfoHobLib/CoreInfoHob.= c
>
> Merged with E51 code into single file:
>
> - Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c
>
> Added SMBIOS Type 7 for L1 Cache, removed duplicated SMBIOS (Type 4 a= nd 7 code):
>
> - Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfoHob.c=
>
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Gilbert Chen <gilbert.chen@hpe.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  Silicon/SiFive/SiFive.dec      &n= bsp;            = ;  |   2 -
>  .../FreedomU500VC707Board/U500.dsc     = ;       |   1 -
>  .../FreedomU540HiFiveUnleashedBoard/U540.dsc  |  = ; 1 -
>  .../PeiCoreInfoHobLib/PeiCoreInfoHobLib.inf   | =   1 -
>  .../PeiCoreInfoHobLib/PeiCoreInfoHobLib.inf   | = 47 ----
>  .../PeiCoreInfoHobLib/PeiCoreInfoHobLib.inf   | =   4 +
>  .../PeiCoreInfoHobLib/PeiCoreInfoHobLib.inf   | = 46 ----
>  .../FirmwareContextProcessorSpecificLib.h   &nbs= p; |  11 +
>  .../Include/ProcessorSpecificHobData.h    &= nbsp;   |   3 +-
>  Silicon/SiFive/Include/Library/SiFiveE51.h    |&= nbsp; 60 -----
>  Silicon/SiFive/Include/Library/SiFiveU54.h    |&= nbsp; 50 ++--
>  .../Include/Library/SiFiveU54MCCoreplex.h   &nbs= p; |  55 ----
>  .../FirmwareContextProcessorSpecificLib.c   &nbs= p; |  26 ++
>  .../Universal/Pei/PlatformPei/Platform.c    = ;  |   2 +-
>  .../Universal/Pei/PlatformPei/Platform.c    = ;  |   2 +-
>  .../Library/PeiCoreInfoHobLib/CoreInfoHob.c   | = 58 +----
>  .../Library/PeiCoreInfoHobLib/CoreInfoHob.c   | 235 -= ----------------
>  .../Library/PeiCoreInfoHobLib/CoreInfoHob.c   | 244 += ++++++-----------
>  .../Library/PeiCoreInfoHobLib/CoreInfoHob.c   | 184 -= ------------
>  19 files changed, 178 insertions(+), 854 deletions(-)

I know you dropped some tables, but that's a *nice* diffstat.

I guess this is effectively meant to be folded into existing commits?
If so:
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
If not, I might start grumbling about some unrelated cleanup in this
patch...

/
    Leif



--_000_DF4PR8401MB0444E981A485B02DAF4C2BA7E0410DF4PR8401MB0444_--