riscvarchive / riscv-edk2-platforms

Port of EDK2 implementation of UEFI to RISC-V. See documentation at:
https://github.com/riscv/riscv-uefi-edk2-docs
Other
18 stars 7 forks source link

Deduplicate and split platforms #17

Closed JohnAZoidberg closed 3 years ago

JohnAZoidberg commented 3 years ago

Currently we are working on the following platforms:

Currently only the first one is on the main branch and upstreamed. The other two have WIP branches where they don't have their own platform but only the Hifive Unleashed code is modified.

Progress

On branch riscv-virt-gh-actions

~- [ ] Follow MinPlatform~ See #24

JohnAZoidberg commented 3 years ago

OpenSBI platform files are generic now. They're only configured by the device tree. So we can move the OpenSbiPlatformLib to RISC-V/PlatformPkg.

JohnAZoidberg commented 3 years ago

The DSC and FDF files could be deduplicated by implementing MinPlatform.

JohnAZoidberg commented 3 years ago

E.g. see how it's done for Cometlake: https://github.com/riscv/riscv-edk2-platforms/blob/master/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc

JohnAZoidberg commented 3 years ago

What's remaining is https://github.com/riscv/riscv-edk2-platforms/blob/master/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/Universal/Pei/PlatformPei/ These are 300 lines of code that could be shared and be configured using a couple of PCDs on each platform.

JohnAZoidberg commented 3 years ago

Done with 36bcc51328910cfb961423ada86deaaf9c146fcd and 1442441f356cfcc8cf0d8ccf0c70dfb56e06c1cd