[edk2-devel] [edk2 0/3] v2 RISC-V SBI-backed SerialLib

Andrei Warkentin posted 3 patches 1 year, 1 month ago
Failed in applying to current master (apply log)
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   | 264 ++++++++++++++++++++
MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.c       | 223 +++++++++++++++++
OvmfPkg/RiscVVirt/Sec/SecMain.c                                                |   4 +-
MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.uni |  16 ++
MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.uni     |  16 ++
11 files changed, 637 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
[edk2-devel] [edk2 0/3] v2 RISC-V SBI-backed SerialLib
Posted by Andrei Warkentin 1 year, 1 month ago
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).

This is also available at https://github.com/andreiw/edk2-rv-wip/tree/patchset-2

Andrei Warkentin (3):
  MdePkg: BaseRiscVSbiLib: make more useful to consumers
  MdePkg: add SecPeiRiscVSerialPortLibSbi and
    PrePiDxeRiscVSerialPortLibSbi
  OvmfPkg: RiscVVirt: Add missing SerialPortInitialize to Sec

 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   | 264 ++++++++++++++++++++
 MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.c       | 223 +++++++++++++++++
 OvmfPkg/RiscVVirt/Sec/SecMain.c                                                |   4 +-
 MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.uni |  16 ++
 MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.uni     |  16 ++
 11 files changed, 637 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 (#100645): https://edk2.groups.io/g/devel/message/100645
Mute This Topic: https://groups.io/mt/97349678/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2 0/3] v2 RISC-V SBI-backed SerialLib
Posted by Sunil V L 1 year, 1 month ago
On Thu, Mar 02, 2023 at 03:49:17PM -0600, Andrei Warkentin wrote:
> 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).
> 
> This is also available at https://github.com/andreiw/edk2-rv-wip/tree/patchset-2
> 
Hi Andrei,

Here are some quick comments.

1) Please run python BaseTools/Scripts/SetupGit.py -n edk2 in your clone
always.

2) Please run BaseTools/Scripts/PatchCheck.py on each patch/commit and
fix the errors.

for ex: I see many CRLF errors

* Line ending ('\n') is not CRLF
   File: OvmfPkg/RiscVVirt/Sec/SecMain.c


3)Since these are new INF files, it should have INF_VERSION as 1.27
(0x0001001B)

https://tianocore-docs.github.io/edk2-InfSpecification/release-1.27/2_inf_overview/24_[defines]_section.html#24-defines-section

4) GUID should be unique for different libraries.

5) MODULE_TYPE should not be BASE but something like SEC|PEI. BASE will
include DXE also. Similarly, DXE library should exclude SEC/PEI.

6) Legacy extensions can be deprecated. So, I think it is
better to probe both DBCN and legacy extension and then only use it.

Will review in detail some time next week.

Thanks,
Sunil


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100661): https://edk2.groups.io/g/devel/message/100661
Mute This Topic: https://groups.io/mt/97349678/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2 0/3] v2 RISC-V SBI-backed SerialLib
Posted by Andrei Warkentin 1 year, 1 month ago
Hi Sunil,

Thanks for the feedback.

I had run SetupGit, and CheckPatch doesn't find any CR/LF issues. Are you seeing this in the email or up on  https://github.com/andreiw/edk2-rv-wip/tree/patchset-2?

Is it possible this is getting mangled by the mail server? I do have "transferEncoding = 8bit" set.

-----Original Message-----
From: Sunil V L <sunilvl@ventanamicro.com> 
Sent: Thursday, March 2, 2023 11:54 PM
To: devel@edk2.groups.io; Warkentin, Andrei <andrei.warkentin@intel.com>
Subject: Re: [edk2-devel] [edk2 0/3] v2 RISC-V SBI-backed SerialLib

On Thu, Mar 02, 2023 at 03:49:17PM -0600, Andrei Warkentin wrote:
> 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).
> 
> This is also available at 
> https://github.com/andreiw/edk2-rv-wip/tree/patchset-2
> 
Hi Andrei,

Here are some quick comments.

1) Please run python BaseTools/Scripts/SetupGit.py -n edk2 in your clone always.

2) Please run BaseTools/Scripts/PatchCheck.py on each patch/commit and fix the errors.

for ex: I see many CRLF errors

* Line ending ('\n') is not CRLF
   File: OvmfPkg/RiscVVirt/Sec/SecMain.c


3)Since these are new INF files, it should have INF_VERSION as 1.27
(0x0001001B)

https://tianocore-docs.github.io/edk2-InfSpecification/release-1.27/2_inf_overview/24_[defines]_section.html#24-defines-section

4) GUID should be unique for different libraries.

5) MODULE_TYPE should not be BASE but something like SEC|PEI. BASE will include DXE also. Similarly, DXE library should exclude SEC/PEI.

6) Legacy extensions can be deprecated. So, I think it is better to probe both DBCN and legacy extension and then only use it.

Will review in detail some time next week.

Thanks,
Sunil


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100697): https://edk2.groups.io/g/devel/message/100697
Mute This Topic: https://groups.io/mt/97349678/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-