[edk2-devel] [PATCH 0/1] edk2-platforms: Deduplicate RISC-V SMBIOS

Daniel Schaefer posted 1 patch 3 years, 8 months ago
Failed in applying to current master (apply log)
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
[edk2-devel] [PATCH 0/1] edk2-platforms: Deduplicate RISC-V SMBIOS
Posted by Daniel Schaefer 3 years, 8 months ago
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 <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>

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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63831): https://edk2.groups.io/g/devel/message/63831
Mute This Topic: https://groups.io/mt/76053051/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-