Hello, Here are three patches that provide a SerialLib backed by SBI console. Both legacy and DBCN mechanisms are supported in various execution environments and have been tested with UART and HTIF consoles.
MdePkg reviewers: please review MdePkg.dsc changes. This is also available at https://github.com/andreiw/edk2-rv-wip/tree/patchset-2 Compared to v4: (not sent out). CC MdePkg maintainers, fix copyright date in SecMain.c. Comapred to v3 EccCheck fixes. Add MdePkg infs to DSC. Compared to v2: - Probes legacy extension as well. - Encode supported module types in the INF file. This is done using LIBRARY_CLASS, as MODULE_TYPE cannot encode multiple types, so MODULE_TYPE is retained as BASE. - Update INF version and generate brand new GUIDs instead of editing them. - Checked that all patches retain ^M endings. Andrei Warkentin (3): MdePkg: BaseRiscVSbiLib: make more useful to consumers MdePkg: add SBI-based SerialPortLib for RISC-V OvmfPkg: RiscVVirt: Add missing SerialPortInitialize to Sec MdePkg/MdePkg.dsc | 2 + MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.inf | 36 +++ MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.inf | 39 +++ OvmfPkg/RiscVVirt/Sec/SecMain.inf | 1 + MdePkg/Include/Library/BaseRiscVSbiLib.h | 40 ++- OvmfPkg/RiscVVirt/Sec/SecMain.h | 1 + MdePkg/Library/BaseRiscVSbiLib/BaseRiscVSbiLib.c | 3 +- MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.c | 288 ++++++++++++++++++++ MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.c | 233 ++++++++++++++++ OvmfPkg/RiscVVirt/Sec/SecMain.c | 4 +- MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.uni | 16 ++ MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.uni | 16 ++ 12 files changed, 673 insertions(+), 6 deletions(-) create mode 100644 MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.inf create mode 100644 MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.inf create mode 100644 MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.c create mode 100644 MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.c create mode 100644 MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.uni create mode 100644 MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.uni -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101010): https://edk2.groups.io/g/devel/message/101010 Mute This Topic: https://groups.io/mt/97524248/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-