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.719.1596818697086800171 for ; Fri, 07 Aug 2020 09:44:57 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0488a40e80=daniel.schaefer@hpe.com) Received: from pps.filterd (m0150244.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 077GcE7I007559; Fri, 7 Aug 2020 16:44:56 GMT Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 32ryvk4nqq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Aug 2020 16:44:56 +0000 Received: from G9W8453.americas.hpqcorp.net (g9w8453.houston.hp.com [16.216.160.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3425.houston.hpe.com (Postfix) with ESMTPS id 92A2AA8; Fri, 7 Aug 2020 16:44:55 +0000 (UTC) Received: from G4W9119.americas.hpqcorp.net (2002:10d2:14d6::10d2:14d6) by G9W8453.americas.hpqcorp.net (2002:10d8:a0d3::10d8:a0d3) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 Aug 2020 16:44:55 +0000 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (15.241.52.10) by G4W9119.americas.hpqcorp.net (16.210.20.214) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 7 Aug 2020 16:44:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZXrqogOSg1h021ZnZhcVhjrCbvOFuh59w70RgOjsvrpJ7QzmYGqDWL00q/mDRf7IAujwS9pPRdf6Q2NQZLXY4FV/b1eCsftiwfTji6XAcalLgSuHK/1/PCpWzQzzhhdmqWk/+Tm/efUo5I2JFQExfwvOH3PM0mMZmBLT1Pb/GSHONNLSnq65EjZ9uyozPXP2htjsmd5Yp6sApx5VKe09Q9psAKm5zRoyviMHgPmzuwKcT1VGOP3K1gmtSTWHxovzOrbIZgh0LlkhRWmSFQrBNGPB8bfjSmZvEcULz/6VlBAnpdVxAqQqS9JVY28XrXAypRvT5n0Q97qkLuDvsjxU/w== 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=wBOx3ZLU/tt+zPkY4hawmG5Eqh7zqP1MCMOC2Oj7ib0=; b=ZgXRmf3E5Z/g69CbEarBvsraoZdNcV/d5Jg+L3f8mLfVnxla1FFtqDrJwPqWNV0t+5WOyVjuauqMSB92iPrSOfgjK7E25RQp+qTKewZbrFaRU5nHOgDGf83/e1dpxJlTt6mRfXmyrg1NVoxbmm4dw9Oh9R3Mb7HNq/GYyBmDj5ZT9LxAFJFmcqRVAQStIdbBld3hh5IjPS7omtkfdUiertgxA331NbE9wn1/91hAsWKn8ZPzjvMSaLYCb5xBFHmrLFRHco+qeT+/wDscPOy19/Z8BLurTeEjMTyZ+5ybTmv4MzgHliawzEVgENoA6rBCOppckl7bdCvDxnYVz42jZQ== 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 Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=hpe.com; Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) by DF4PR8401MB0506.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7606::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16; Fri, 7 Aug 2020 16:44:54 +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.3261.020; Fri, 7 Aug 2020 16:44:54 +0000 From: "Daniel Schaefer" To: CC: Abner Chang , Gilbert Chen , Leif Lindholm , Michael D Kinney , Ard Biesheuvel Subject: [PATCH 0/1] edk2-platforms: Deduplicate RISC-V SMBIOS Date: Fri, 7 Aug 2020 18:44:43 +0200 Message-ID: <20200807164444.1304-1-daniel.schaefer@hpe.com> X-Mailer: git-send-email 2.26.2 X-ClientProxiedBy: SN2PR01CA0059.prod.exchangelabs.com (2603:10b6:800::27) To DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) X-MS-Exchange-MessageSentRepresentingType: 1 Received: from x360-nix.fritz.box (93.215.219.173) by SN2PR01CA0059.prod.exchangelabs.com (2603:10b6:800::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.19 via Frontend Transport; Fri, 7 Aug 2020 16:44:52 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [93.215.219.173] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5b20fafa-6053-47f1-259e-08d83af135cb X-MS-TrafficTypeDiagnostic: DF4PR8401MB0506: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tqcfxKFrz/o0+q8YQCIu4eMH6uMsjBEQq13UCi8+Lvd+Y73ulu1U78iV9SKDGyox/DgoitgS6JqPTxulroeaxij3ubuamezB4iyb6Nmwxtc/4AZChyvWw5lLNvTMLPtkRaPAXGAUzhoD+vvbxIs4Y0eAYxx7fkBh2NViDPw4SWq3VDwOQnd5rRLR0UDYuTz7sLbp+N+OCq8VncoW2308OdJQDkY9MzhJoxMn5iE2Qh0ppREbs0fvNWOnoRBnKtt74Yv9AAL0+vt0v8DhAPRL3nVR8xqFvlCZltpCeQepdn9qEF32jyfykrUVJzur3EPmwLfJpNMu+bwwO304T0yyLhgGaPAkXChB5stQgUphDx3T3THFOa7Uey7Fe/LCiPfRtd823tgaLJacwqjWv7q/uw== 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;SFTY:;SFS:(346002)(366004)(136003)(396003)(39860400002)(376002)(6916009)(66556008)(66946007)(6512007)(66476007)(8676002)(19627235002)(5660300002)(86362001)(36756003)(6666004)(1076003)(2906002)(54906003)(52116002)(2616005)(956004)(316002)(4326008)(186003)(16526019)(6486002)(26005)(478600001)(44832011)(6506007)(966005)(83380400001)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: yHbLHX1CdGm44idmy0JzSa4PKbWeYFbsrcp3yOL+dbXOJEV1EQQpbRO16wCOjxWDLb2gCgl5n4R2K0A3I64ahX079ohFKMFQHKdH67fcmIuslFaWYeguxn7ad4hCJdnzD2Fh5qHVUB0Mx5eG3/cBfF3qnl+8Fmjtqi1q5qBBiNoZqnlXvFf0PE7QpZH5KTJP0EifnuZseD5CZaDDBgzH0CZRINwCSrtCf+N8gunAC9OGA4eJo1Dr/SccgdLU7hIFGZd+HrZuvGM3wItJvDviL2q7ZIvFtwxhile6cMvzeDH150dBHsYlCpjTUrWDUSq/Oa/N4WVa5C0vRMQEUD1k1ns2NV+Iw6YDFGSlLECW7IapKAt79u7XatpoJz9ELiUu2pNh5+yjARZiTjBHgtFhEjDocVl1C3My9wfb3khxrcwWiz411Bsqp7a50WiterveW9riRK3/HtIeAQmXAITRr0cRjw5sybbec1VKg666KY02gB+tFUscnWvRvak5NSKAfTKxNnM+CSQojfdXimRA0IbyAw89DBBUKsLVgwcie49JSPJS7zamb6oPFHOwh0TX4L9WJ+pKseVtkRbX8OO9ShmHO0OPvq8sseTvaYwxoJKCT4n67VI8yIH/UXg3YjY4j0wrE5TMbKrQXLqwPbepLw== X-MS-Exchange-CrossTenant-Network-Message-Id: 5b20fafa-6053-47f1-259e-08d83af135cb X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2020 16:44:54.0149 (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: 9H/vsn/j4DPB2Sg1uL+vn31eXBeoJj4WDu3gEG0CMJJFl3sSERAWOdJsAoZ8Arstng6c9iNYUFPywYtmYYaxGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0506 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 0 URL was 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-07_15:2020-08-06,2020-08-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 clxscore=1011 phishscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008070116 Content-Type: text/plain Content-Transfer-Encoding: 8bit Hi Leif, the only remaining patches without Reviewed-By are the ones touching the SMBIOS and you mentioned that there's a lot of duplication in that code. See: https://edk2.groups.io/g/devel/message/60400 With this patch I'm trying to address that. You specifically compared the code for the U54 and E51 cores and noted that there was less than 20% difference. I removed the E51 file and squashed the only change into U54. I've never seen E51 used without U54, so it should be okay to have it in that file. If somebody uses E54 without U54, we can split it again. Additionally I noticed that some code wasn't used yet and some other code would generate SMBIOS entries that are duplicated. Those are all removed now. The patch is also available as a PR on our RISC-V fork of EDK2 platforms: https://github.com/riscv/riscv-edk2-platforms/pull/4 There's also a diagram, showing how the components interact with each other and which this patch removes. If you're okay with the changes, should I squash them into the commits, that created those files or is it okay like this? Cc: Abner Chang Cc: Gilbert Chen Cc: Leif Lindholm Cc: Michael D Kinney Cc: Ard Biesheuvel Daniel Schaefer (1): RISC-V: Deduplicate SMBIOS 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(-) delete mode 100644 Silicon/SiFive/E51/Library/PeiCoreInfoHobLib/PeiCoreInfoHobLib.inf delete mode 100644 Silicon/SiFive/U54MCCoreplex/Library/PeiCoreInfoHobLib/PeiCoreInfoHobLib.inf delete mode 100644 Silicon/SiFive/Include/Library/SiFiveE51.h delete mode 100644 Silicon/SiFive/Include/Library/SiFiveU54MCCoreplex.h delete mode 100644 Silicon/SiFive/E51/Library/PeiCoreInfoHobLib/CoreInfoHob.c delete mode 100644 Silicon/SiFive/U54MCCoreplex/Library/PeiCoreInfoHobLib/CoreInfoHob.c -- 2.28.0