From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web10.2626.1597484474088076157 for ; Sat, 15 Aug 2020 02:41:14 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=049600e9a4=abner.chang@hpe.com) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07F9cGpF014853; Sat, 15 Aug 2020 09:41:13 GMT Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0b-002e3701.pphosted.com with ESMTP id 32x8we986t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 15 Aug 2020 09:41:13 +0000 Received: from G1W8106.americas.hpqcorp.net (g1w8106.austin.hp.com [16.193.72.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3427.houston.hpe.com (Postfix) with ESMTPS id 6F0B971; Sat, 15 Aug 2020 09:41:12 +0000 (UTC) Received: from G4W9332.americas.hpqcorp.net (16.208.32.118) by G1W8106.americas.hpqcorp.net (16.193.72.61) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 15 Aug 2020 09:40:21 +0000 Received: from G9W9210.americas.hpqcorp.net (2002:10dc:429b::10dc:429b) by G4W9332.americas.hpqcorp.net (2002:10d0:2076::10d0:2076) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 15 Aug 2020 09:40:20 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (15.241.52.13) by G9W9210.americas.hpqcorp.net (16.220.66.155) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sat, 15 Aug 2020 09:40:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V10FsVi6tEl6H2Yi7hL5aFHoDRyqkgMFevzm7Zyxh0Vq6x8tKD5SFnYyvJjkgQmLBrs+EKqYyIop22NJaiHO687vQskW3hdEHyIrxpLYt70/MmlEqdjJOfSdgK7Ocqkmzewi/vs+9pPcLm7XxhJFf7WwJ7GgCLkJUNKcgCM2xNPete7cIdaGCEqaohaQ0W/WjlJvTXaweU8lxs80HsamNp2f9DC+d/YAcMs8zZ+jKHObD4lwenZE8lmaaKzy1bHO6hFkad7SgW3U35qllvYKzM1Q6EzeFV1Lw0QD96dVAJZTaWRBKp6OPYRwxmhQNnfMrWh+e7IVhxeNZlH2G8A/ug== 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=DnBLx+fTbTOb6qKE+kb8eHfvTypdDU1FLtwcC6eZ1zs=; b=ApOqr/hKvMsX4ciEV+78M43XDpPyGicgJAV6wv/lFhixD7ZeJlXXLc+AelQ5gVol7hCCev+cyhNKmvw+mZH7VZdsMk85MSb+TWmQcTbUmoeLyImh4VD9YBYKQEjwzJXj2CkMtJM4CGHWvCOU1bCAJ6lvR+EzsaQBIIPJFU2uT4v1kxAjxXr83ZjHrofd2JbYx/HIxl7WOYyy5grR+ilKosUo3VIJpanY51Gq9DdNO85A3pKxIPr0BpqQpYa5LqwhUnydus0L+yoL/1ZYmHUDjSeGlgTYJEXP6Ng8PE2mVFy2m3k3DWj6cMFPUCD2xTmhSbchIOvUre9DZ6l5WLaVeA== 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 CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7508::16) by CS1PR8401MB0518.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7512::12) 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 09:40:18 +0000 Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::58f4:cfb4:beb0:f5d5]) by CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::58f4:cfb4:beb0:f5d5%7]) with mapi id 15.20.3283.024; Sat, 15 Aug 2020 09:40:18 +0000 From: "Abner Chang" To: "Schaefer, Daniel" , Leif Lindholm , "devel@edk2.groups.io" CC: "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: AQHWbNoW9ZQwRjlezEepn+aKsOQP/ak3p1qAgAD+3oCAAE+HkA== Date: Sat, 15 Aug 2020 09:40:18 +0000 Message-ID: References: <20200807164444.1304-1-daniel.schaefer@hpe.com> <20200807164444.1304-2-daniel.schaefer@hpe.com>,<20200814134053.GW23500@vanye> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: hpe.com; dkim=none (message not signed) header.d=none;hpe.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [1.34.113.40] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b7a2a04a-6b52-4c73-0395-08d840ff38c3 x-ms-traffictypediagnostic: CS1PR8401MB0518: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oLdxfWhYdGU6h7Sc+/5ENezVK9a0ZuegzcQq+mWyHQRg3bbEEOu32zBlsUN+V7pnCm8Bvrw7PbOHi7Qe7qfaLDBslOzxqReu/iz63LJmdp1uvF4SVdsNz+vwvqEhydB9dcG9UECCic48fSIk5OQw/OE9jT3+oHOtZZopwU8zdkaSA2JTQ9Acssnriz2Z9IfWevoGuo2L8PGp72BCEqixtX1L2JX0XEyRhidn7fqyM+IToO8tDI9N8xdoPNJhWd9YEA9stywnvUlobNeEIsBDtFTKd5qNlQDTmPvAIwilI24VaulcqVJHaXkGI6NZWTbLhO3hm5PVSHaH7zlvxMqw+lEZJZzYKfmReyvXceixjxTTl41AVYek8r4w7g+01iIqDazsW4aZUVF2u6+JWi2vkg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(136003)(39860400002)(376002)(366004)(346002)(396003)(966005)(54906003)(33656002)(26005)(478600001)(186003)(166002)(64756008)(66556008)(66946007)(66476007)(86362001)(76116006)(52536014)(5660300002)(66446008)(9686003)(4326008)(110136005)(83380400001)(53546011)(6506007)(71200400001)(8936002)(7696005)(2906002)(55016002)(316002)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: FNbY0bMv5/d3y5lypkgrHgKwdoBaXVSE/ytB0LAzIbV7W1GyUAXRhtW6Ud1ka5FQM1Asg/NxCFyYS39A1601O6dL0KpKJGgAfbeOmdDvrasZQpETziaWZ4dHJZSPsERhtfETUgiFC/7dJqyawCtqMBD70vvcwZUtWzTxCQDMcVB1CBR17cMnVds7W3jglaANzjXxtBapIkiOjWi7VUVy8HvPBsRVvYL0mcy2wGMDpSyCpHebWMRBku1nB4/Bc3sF7ZOYwjtFgUR0ktNH5Z5d0BBf1hIfZWrDgVj2MUd0hG20cV7pur1sNbnpYG9YiryB495cMJzUbGxWN6cPyBhNQ/WtSZuTEZTJDh8pX+AgjoufOi8gMQluraUvtqUW50LToP3jOu8ij82Aa0TMrzNl3rv6bI736ia1GIu/KW9/+HydShBLzNrJ6c4WyJLl4QQpCNvU2mOfO7kJh1nnbXZZW4SI1ledYrciCu6xPUECTKIKqAe0LVg2amHSAMg6aGODvF0yrPJ+VZgONyKuabYMhcVaY19kaRYzljuKLGiSzAj7sc/lNB/FHzok2HjeqIH9VvTMt6Fca/CYKvN2/bxV17tDcwI5+77TLhX79DLoWhWB1otcoddErluZc7m2JvOhSKLWqBp3JsqIX3XOGlQJ6Q== X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: b7a2a04a-6b52-4c73-0395-08d840ff38c3 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Aug 2020 09:40:18.4398 (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: 1VSF+h+yHL3T/P/AIkevhyAvA4ZnsvDNvHK/Xt4VmovhRC6ABrdUFf/7p+m5JotqUO4Dv3/RXU7TOaj/jVTzsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0518 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_05:2020-08-14,2020-08-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 clxscore=1011 phishscore=0 suspectscore=0 mlxscore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008150073 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CS1PR8401MB1144C9BA783E7040BC8E916AFF410CS1PR8401MB1144_" --_000_CS1PR8401MB1144C9BA783E7040BC8E916AFF410CS1PR8401MB1144_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks Leif and Daniel, Now all of the commits were reviewed. I will rebase it to the latest edk2-= platform master branch and check if any problems there. Will merge it if no= problem found. Abner From: Schaefer, Daniel Sent: Saturday, August 15, 2020 12:53 PM To: Leif Lindholm ; devel@edk2.groups.io 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 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 Lindholm > Sent: Friday, August 14, 2020 15:40 To: devel@edk2.groups.io >; Schaefer, Daniel > 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 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_CS1PR8401MB1144C9BA783E7040BC8E916AFF410CS1PR8401MB1144_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Thanks Leif and Daniel,

Now all of the commits were reviewed= . I will rebase it to the latest edk2-platform master branch and check if a= ny problems there. Will merge it if no problem found.

 

Abner

 

From: Schaefer, Daniel
Sent: Saturday, August 15, 2020 12:53 PM
To: Leif Lindholm <leif@nuviainc.com>; devel@edk2.groups.io 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 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 refactoring. And hope it was easier to review this way= .

 

Yes, we dropped some tables because we rethought ho= w to apply smbios to this flexible RISC-V SoC, which doesn't really fit int= o the rigid view smbios has of hardware.

 

Cheers,

Daniel


From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf o= f Leif Lindholm <leif@nuviainc.com<= /a>>
Sent: Friday, August 14, 2020 15:40
To:
devel@edk2.groups.io <devel@edk2.groups.io>;= Schaefer, Daniel <daniel.sch= aefer@hpe.com>
Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Chen, Gilbert <gilbert.chen@hpe.com>; Michael D Kinne= y <michael.d.kinney@intel.= com>; Ard Biesheuvel <ard.biesh= euvel@linaro.org>
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.chan= g@hpe.com>
> Cc: Gilbert Chen <gilbert.= chen@hpe.com>
> Cc: Leif Lindholm <leif@nuvia= inc.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Ard Biesheuvel <a= rd.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@n= uviainc.com>
If not, I might start grumbling about some unrelated cleanup in this
patch...

/
    Leif

--_000_CS1PR8401MB1144C9BA783E7040BC8E916AFF410CS1PR8401MB1144_--