Public review of Supervisor Binary Interface (SBI) Specification
I just realized that the below email was not delivered to unix platform mailing list and linux-riscv mailing list because of the attachment. Reseeding it again without the attachment. Apologies for the noise. ----------------------------------------------------------------------------------------------- We are delighted to announce the start of the public review period for the Non-ISA Supervisor Binary Interface (SBI) specification. The SBI specification is considered as frozen now as per the RISC-V International policies. The review period begins today, Monday Jan 10, and ends on Monday Jan 24 (inclusive). The specification can be found here https://github.com/riscv-non-isa/riscv-sbi-doc/releases/download/v1.0-rc1/riscv-sbi.pdfwhich was generated from the source available in the following GitHub repository: https://github.com/riscv-non-isa/riscv-sbi-docTo respond to the public review, please either reply to this email or send comments to the platform mailing list[1] or add issues to the SBI GitHub repo[2]. We welcome all input and appreciate your time and effort in helping us by reviewing the specification. During the public review period, corrections, comments, and suggestions, will be gathered for review by the Platform HSC members. Any minor corrections and/or uncontroversial changes will be incorporated into the specification. Any remaining issues or proposed changes will be addressed in the public review summary report. If there are no issues that require incompatible changes to the public review specification, the platform HSC will recommend the updated specifications be approved and ratified by the RISC-V Technical Steering Committee and the RISC-V Board of Directors. SBI specification is non-ISA specifications and will evolve over time with new extensions as long as they are backward compatible. Any such proposals for new extensions can be included in the future releases after proper discussions in the platform working group meetings. Thanks to all the contributors for all their hard work. [1] tech-unixplatformspec@... [2] https://github.com/riscv-non-isa/riscv-sbi-doc/issuesRegards, Atish Patra
|
|
[PATCH] Updated PCIe sections 4.7.3.4 and 4.7.3.5
As discussed on the mailing list:
- 4.7.3.4 - Fixed typo - Added clarification for requests with NS=1, RO=0 - 4.7.3.5 - Added topology depicting a RP, RCiEP, RCEC on the root bus - Removed constraint for separate ECAM region
Signed-off-by: Mayuresh Chitale <mchitale@...> Signed-off-by: Michael Klinglesmith <michael.klinglesmith@...> --- pcie-topology.ditaa | 30 ++++++++++++++++++++++++++++-- riscv-platform-spec.adoc | 11 ++++------- 2 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/pcie-topology.ditaa b/pcie-topology.ditaa index 7180035..3436fa9 100644 --- a/pcie-topology.ditaa +++ b/pcie-topology.ditaa @@ -23,6 +23,32 @@ | | | | | +--------------------------+ +--------------------------+ + +----------+ + | CPU | + +-----+----+ + | + | + | + +------------------------+-----------------------+ + | | + | Root Complex | + | | + | +--------------+ | + | | Host Bridge | | + | +------+-------+ | + | | | + | Bus 0 | | + | +-----------------+--------------+ | + | | | | | + | | | | | + | +-----+-------+ +---+---+ +---+---+ | + | | Root Port | | RCiEP | | RCEC | | + | +-----+-------+ +-------+ +-------+ | + | | | + | | | + |Bus 1 | | + | | | + +------------------------------------------------+ - RCiEP : Root complex integrated endpoint - RCEC : Root complex event collector + RCiEP - Root complex integrated endpoint + RCEC - Root complex event collector diff --git a/riscv-platform-spec.adoc b/riscv-platform-spec.adoc index 238af3a..1244bf7 100644 --- a/riscv-platform-spec.adoc +++ b/riscv-platform-spec.adoc @@ -845,10 +845,10 @@ software can be 0x10 so that the function can use lower 4 bits to assert each of the 16 vectors. ===== PCIe cache coherency -Memory that is cacheable by harts is not kept coherent by hardware when PCIe -transactions to that memory are marked with a No_Snoop bit of zero. In this -case, software must manage coherency on such memory; otherwise, software -coherency management is not required. +Memory that is cacheable by harts may not be kept coherent by hardware when +PCIe transactions to that memory are marked with a No_Snoop bit of one. On +platforms that honour No_Snoop bit, software must manage coherency on such +memory; otherwise, software coherency management is not required. ===== PCIe Topology Platforms are required to implement at least one of the following topologies @@ -906,9 +906,6 @@ In addition the following requirements must be met: ** If RCiEP is implemented then RCEC must be implemented as well. All requirements for RCEC specified in the PCIe Base specification must be implemented. RCEC is required to terminate the AER and PME messages from RCiEP. -** If both the topologies mentioned above are supported then RCiEP and RCEC -must be implemented in a separate PCIe domain and must be addressable via a -separate ECAM I/O region. ===== PCIe Device Firmware PCI expansion ROM code type 3 (UEFI) image must be provided by PCIe device -- 2.17.1
|
|
Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On Tue, Jan 11, 2022 at 12:48:16PM -0800, Atish Kumar Patra wrote: On Mon, Jan 10, 2022 at 11:57 PM Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> wrote:
-----Original Message----- From: Heinrich Schuchardt <xypron.glpk@...> Sent: Tuesday, January 11, 2022 3:50 PM To: Sunil V L <sunilvl@...>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: Heinrich Schuchardt <heinrich.schuchardt@...>; tech- unixplatformspec@...; Anup Patel <apatel@...>; Atish Patra <atishp@...>; Jessica Clarke <jrtc27@...> Subject: Re: [RISC-V] [tech-unixplatformspec] Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/11/22 07:02, Sunil V L wrote:
On Tue, Jan 11, 2022 at 02:11:40AM +0000, Chang, Abner (HPS SW/FW Technologist) wrote:
-----Original Message----- From: Heinrich Schuchardt <heinrich.schuchardt@...> Sent: Tuesday, January 11, 2022 9:20 AM To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: tech-unixplatformspec@...; Anup Patel <apatel@...>; Atish Patra <atishp@...>;
Jessica
Clarke <jrtc27@...>; Sunil V L <sunilvl@...> Subject: Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/11/22 02:07, Chang, Abner (HPS SW/FW Technologist) wrote:
Hi Sunil, Instead of having a spec for EFI_RISCV_BOOT_PROTOCOL specifically, I suggest to have a RISC-V EFI Protocols Specification. This spec
accommodates
EFI_RISCV_BOOT_PROTOCOL, the future EFI protocols for RISC-V
platform,
and those we had implemented in edk2.
Which protocols in EDK II do you refer to?
"git grep -n RISC edk2/ | grep PRO" yields no result. Oops... RiscVEdk2Sbi was implemented as library for now and the plan is
to rap it as PPI/protocol, bad memory.
Even if there are no other RISC-V protocols today, Abner's suggestion will allow us to add them in future to the same document.
Once we have agreed on the EFI_RISCV_BOOT_PROTOCOL we should
create
an issue in bugzilla.tianocore.org and create a Mantis entry to get it merged into the UEFI specification. I don't think this would be accepted by UEFI forum. This is RISC-V specific
protocol however, UEFI protocol is the abstract interface for platform and architecture. Unless you can come out a abstract interface that can accommodate different processor/platform architectures (if they also need this).
We don't really need to merge the entire protocol to the UEFI spec. We need to maintain this within RISC-V organization like other RISC-V specs and add as a requirement in the platform spec. We can probably add a link under uefi.org/uefi and provide a reference in section 2.3.7.1. UEFI allows us to do like this (ex: TCG2 protocols) and it may be better since we do not need to update the UEFI spec for any new protocols specific to RISC-V in future.
What do you think? Do you see any issue with this approach? The TCG2 protocol is only a UEFI extension (see UEFI spec 2.9, p.68) and not required to claim UEFI compatibility.
If you put a protocol into the UEFI specification, you can be sure that EDK II will implement it. And not firmware can claim to be UEFI compliant without it. To spec out something in either UEFI or RISC-V specific spec is actually the same to RISC-V edk2 port IMO, if those are the mandatory protocols. Edk2 RISC-V port should compliant with the firmware spec defined by either specs, unless the spec says the protocol is specifically to uboot but it is optional for other firmware solutions. I think it would be better to enforce the mandatory requirement explicitly in the UEFI spec. The actual content of the protocol can be hosted under RISC-V. Hi All, I think I have addressed your comments. Please take a look at https://github.com/riscv-non-isa/riscv-uefi/releases/download/0.2/EFI_RISCV_PROTOCOL-spec.pdf. If you think it is fine, I plan to get it reviewed once with Ard and linux-riscv also where this solution was proposed originally. We may not be able to add to mandatory UEFI section 2.6.1 but we can try adding to 2.6.2 and mandate it via platform spec like we do for PCI protocol. Atish, should this be added to EBBR also? Thanks Sunil
Regards, Abner
I would prefer if every UEFI protocol that is absolutely essential for booting were required by the UEFI specification. If the details are maintained inside the UEFI specification or outside, does not matter to me.
Best regards
Heirnich
Thanks Sunil
Regards, Abner
Best regards
Heinrich
Thanks Abner
-----Original Message----- From: Heinrich Schuchardt <heinrich.schuchardt@...> Sent: Tuesday, January 11, 2022 1:28 AM To: Sunil V L <sunilvl@...> Cc: tech-unixplatformspec@...; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>; Anup Patel <apatel@...>; Atish Patra <atishp@...>;
Jessica
Clarke <jrtc27@...> Subject: Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/10/22 18:02, Sunil V L wrote:
Hi All,
As we discussed in the Platform HSC meeting today, here is the document
which details a new RISC-V specific EFI protocol.
https://github.com/riscv-non-isa/riscv- uefi/releases/download/0.1/EFI_RISCV_BOOT_PROTOCOL.pdf
Currently, the main use case of this protocol is to pass the boot
hartid to
the OS. But this can be extended in future if required. A PoC has been developed using EDK2 and Linux.
More details of this requirement and alternatives discussed are
available
at
http://lists.infradead.org/pipermail/linux-riscv/2021- December/010604.html.
I request your review and will be great if you provide the feedback
by
01/17.
Thanks! Sunil
Dear Sunil,
thank you for drafting the protocol specification.
The interface of a protocol may change from version to version. Therefore I understand why there must be a path to convey this information. But using a function like EFI_RISCV_BOOT_PROTOCOL.GetProtocolVersion() makes accessing
this
information unnecessarily complicated. Instead consider adding a
version
field as first element of the interface like many other UEFI protocols do. This will also decrease the implementation size. For alignment reasons make this field UINT64. Other protocols call such a field "Revision". Please, provide a define for the current version. E.g.
#define EFI_RISCV_BOOT_PROTOCOL_REVISION 0x00010000 #define EFI_RISCV_BOOT_PROTOCOL_LATEST_VERSION \ EFI_RISCV_BOOT_PROTOCOL_REVISION
Function EFI_RISCV_BOOT_PROTOCOL.GetBootHartId() looks ok to
me
and is
well described.
Best regards
Heinrich
|
|
Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On Mon, Jan 10, 2022 at 11:57 PM Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> wrote:
-----Original Message----- From: Heinrich Schuchardt <xypron.glpk@...> Sent: Tuesday, January 11, 2022 3:50 PM To: Sunil V L <sunilvl@...>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: Heinrich Schuchardt <heinrich.schuchardt@...>; tech- unixplatformspec@...; Anup Patel <apatel@...>; Atish Patra <atishp@...>; Jessica Clarke <jrtc27@...> Subject: Re: [RISC-V] [tech-unixplatformspec] Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/11/22 07:02, Sunil V L wrote:
On Tue, Jan 11, 2022 at 02:11:40AM +0000, Chang, Abner (HPS SW/FW Technologist) wrote:
-----Original Message----- From: Heinrich Schuchardt <heinrich.schuchardt@...> Sent: Tuesday, January 11, 2022 9:20 AM To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: tech-unixplatformspec@...; Anup Patel <apatel@...>; Atish Patra <atishp@...>;
Jessica
Clarke <jrtc27@...>; Sunil V L <sunilvl@...> Subject: Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/11/22 02:07, Chang, Abner (HPS SW/FW Technologist) wrote:
Hi Sunil, Instead of having a spec for EFI_RISCV_BOOT_PROTOCOL specifically, I suggest to have a RISC-V EFI Protocols Specification. This spec
accommodates
EFI_RISCV_BOOT_PROTOCOL, the future EFI protocols for RISC-V
platform,
and those we had implemented in edk2.
Which protocols in EDK II do you refer to?
"git grep -n RISC edk2/ | grep PRO" yields no result. Oops... RiscVEdk2Sbi was implemented as library for now and the plan is
to rap it as PPI/protocol, bad memory.
Even if there are no other RISC-V protocols today, Abner's suggestion will allow us to add them in future to the same document.
Once we have agreed on the EFI_RISCV_BOOT_PROTOCOL we should
create
an issue in bugzilla.tianocore.org and create a Mantis entry to get it merged into the UEFI specification. I don't think this would be accepted by UEFI forum. This is RISC-V specific
protocol however, UEFI protocol is the abstract interface for platform and architecture. Unless you can come out a abstract interface that can accommodate different processor/platform architectures (if they also need this).
We don't really need to merge the entire protocol to the UEFI spec. We need to maintain this within RISC-V organization like other RISC-V specs and add as a requirement in the platform spec. We can probably add a link under uefi.org/uefi and provide a reference in section 2.3.7.1. UEFI allows us to do like this (ex: TCG2 protocols) and it may be better since we do not need to update the UEFI spec for any new protocols specific to RISC-V in future.
What do you think? Do you see any issue with this approach? The TCG2 protocol is only a UEFI extension (see UEFI spec 2.9, p.68) and not required to claim UEFI compatibility.
If you put a protocol into the UEFI specification, you can be sure that EDK II will implement it. And not firmware can claim to be UEFI compliant without it. To spec out something in either UEFI or RISC-V specific spec is actually the same to RISC-V edk2 port IMO, if those are the mandatory protocols. Edk2 RISC-V port should compliant with the firmware spec defined by either specs, unless the spec says the protocol is specifically to uboot but it is optional for other firmware solutions.
I think it would be better to enforce the mandatory requirement explicitly in the UEFI spec. The actual content of the protocol can be hosted under RISC-V. Regards, Abner
I would prefer if every UEFI protocol that is absolutely essential for booting were required by the UEFI specification. If the details are maintained inside the UEFI specification or outside, does not matter to me.
Best regards
Heirnich
Thanks Sunil
Regards, Abner
Best regards
Heinrich
Thanks Abner
-----Original Message----- From: Heinrich Schuchardt <heinrich.schuchardt@...> Sent: Tuesday, January 11, 2022 1:28 AM To: Sunil V L <sunilvl@...> Cc: tech-unixplatformspec@...; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>; Anup Patel <apatel@...>; Atish Patra <atishp@...>;
Jessica
Clarke <jrtc27@...> Subject: Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/10/22 18:02, Sunil V L wrote:
Hi All,
As we discussed in the Platform HSC meeting today, here is the document
which details a new RISC-V specific EFI protocol.
https://github.com/riscv-non-isa/riscv- uefi/releases/download/0.1/EFI_RISCV_BOOT_PROTOCOL.pdf
Currently, the main use case of this protocol is to pass the boot
hartid to
the OS. But this can be extended in future if required. A PoC has been developed using EDK2 and Linux.
More details of this requirement and alternatives discussed are
available
at
http://lists.infradead.org/pipermail/linux-riscv/2021- December/010604.html.
I request your review and will be great if you provide the feedback
by
01/17.
Thanks! Sunil
Dear Sunil,
thank you for drafting the protocol specification.
The interface of a protocol may change from version to version. Therefore I understand why there must be a path to convey this information. But using a function like EFI_RISCV_BOOT_PROTOCOL.GetProtocolVersion() makes accessing
this
information unnecessarily complicated. Instead consider adding a
version
field as first element of the interface like many other UEFI protocols do. This will also decrease the implementation size. For alignment reasons make this field UINT64. Other protocols call such a field "Revision". Please, provide a define for the current version. E.g.
#define EFI_RISCV_BOOT_PROTOCOL_REVISION 0x00010000 #define EFI_RISCV_BOOT_PROTOCOL_LATEST_VERSION \ EFI_RISCV_BOOT_PROTOCOL_REVISION
Function EFI_RISCV_BOOT_PROTOCOL.GetBootHartId() looks ok to
me
and is
well described.
Best regards
Heinrich
|
|
Re: Review request: New EFI_RISCV_BOOT_PROTOCOL

Heinrich Schuchardt
On 1/11/22 07:02, Sunil V L wrote: On Tue, Jan 11, 2022 at 02:11:40AM +0000, Chang, Abner (HPS SW/FW Technologist) wrote:
-----Original Message----- From: Heinrich Schuchardt <heinrich.schuchardt@...> Sent: Tuesday, January 11, 2022 9:20 AM To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: tech-unixplatformspec@...; Anup Patel <apatel@...>; Atish Patra <atishp@...>; Jessica Clarke <jrtc27@...>; Sunil V L <sunilvl@...> Subject: Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/11/22 02:07, Chang, Abner (HPS SW/FW Technologist) wrote:
Hi Sunil, Instead of having a spec for EFI_RISCV_BOOT_PROTOCOL specifically, I suggest to have a RISC-V EFI Protocols Specification. This spec accommodates EFI_RISCV_BOOT_PROTOCOL, the future EFI protocols for RISC-V platform, and those we had implemented in edk2.
Which protocols in EDK II do you refer to?
"git grep -n RISC edk2/ | grep PRO" yields no result. Oops... RiscVEdk2Sbi was implemented as library for now and the plan is to rap it as PPI/protocol, bad memory. Even if there are no other RISC-V protocols today, Abner's suggestion will allow us to add them in future to the same document.
Once we have agreed on the EFI_RISCV_BOOT_PROTOCOL we should create an issue in bugzilla.tianocore.org and create a Mantis entry to get it merged into the UEFI specification. I don't think this would be accepted by UEFI forum. This is RISC-V specific protocol however, UEFI protocol is the abstract interface for platform and architecture. Unless you can come out a abstract interface that can accommodate different processor/platform architectures (if they also need this).
We don't really need to merge the entire protocol to the UEFI spec. We need to maintain this within RISC-V organization like other RISC-V specs and add as a requirement in the platform spec. We can probably add a link under uefi.org/uefi and provide a reference in section 2.3.7.1. UEFI allows us to do like this (ex: TCG2 protocols) and it may be better since we do not need to update the UEFI spec for any new protocols specific to RISC-V in future.
What do you think? Do you see any issue with this approach? The TCG2 protocol is only a UEFI extension (see UEFI spec 2.9, p.68) and not required to claim UEFI compatibility. If you put a protocol into the UEFI specification, you can be sure that EDK II will implement it. And not firmware can claim to be UEFI compliant without it. I would prefer if every UEFI protocol that is absolutely essential for booting were required by the UEFI specification. If the details are maintained inside the UEFI specification or outside, does not matter to me. Best regards Heirnich Thanks Sunil
Regards, Abner
Best regards
Heinrich
Thanks Abner
-----Original Message----- From: Heinrich Schuchardt <heinrich.schuchardt@...> Sent: Tuesday, January 11, 2022 1:28 AM To: Sunil V L <sunilvl@...> Cc: tech-unixplatformspec@...; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>; Anup Patel <apatel@...>; Atish Patra <atishp@...>; Jessica Clarke <jrtc27@...> Subject: Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/10/22 18:02, Sunil V L wrote:
Hi All,
As we discussed in the Platform HSC meeting today, here is the document
which details a new RISC-V specific EFI protocol.
https://github.com/riscv-non-isa/riscv- uefi/releases/download/0.1/EFI_RISCV_BOOT_PROTOCOL.pdf
Currently, the main use case of this protocol is to pass the boot hartid to the OS. But this can be extended in future if required. A PoC has been developed using EDK2 and Linux.
More details of this requirement and alternatives discussed are available
at
http://lists.infradead.org/pipermail/linux-riscv/2021- December/010604.html.
I request your review and will be great if you provide the feedback by 01/17.
Thanks! Sunil
Dear Sunil,
thank you for drafting the protocol specification.
The interface of a protocol may change from version to version. Therefore I understand why there must be a path to convey this information. But using a function like EFI_RISCV_BOOT_PROTOCOL.GetProtocolVersion() makes accessing this information unnecessarily complicated. Instead consider adding a version field as first element of the interface like many other UEFI protocols do. This will also decrease the implementation size. For alignment reasons make this field UINT64. Other protocols call such a field "Revision". Please, provide a define for the current version. E.g.
#define EFI_RISCV_BOOT_PROTOCOL_REVISION 0x00010000 #define EFI_RISCV_BOOT_PROTOCOL_LATEST_VERSION \ EFI_RISCV_BOOT_PROTOCOL_REVISION
Function EFI_RISCV_BOOT_PROTOCOL.GetBootHartId() looks ok to me
and is
well described.
Best regards
Heinrich
|
|
Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On Tue, Jan 11, 2022 at 02:11:40AM +0000, Chang, Abner (HPS SW/FW Technologist) wrote:
-----Original Message----- From: Heinrich Schuchardt <heinrich.schuchardt@...> Sent: Tuesday, January 11, 2022 9:20 AM To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: tech-unixplatformspec@...; Anup Patel <apatel@...>; Atish Patra <atishp@...>; Jessica Clarke <jrtc27@...>; Sunil V L <sunilvl@...> Subject: Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/11/22 02:07, Chang, Abner (HPS SW/FW Technologist) wrote:
Hi Sunil, Instead of having a spec for EFI_RISCV_BOOT_PROTOCOL specifically, I suggest to have a RISC-V EFI Protocols Specification. This spec accommodates EFI_RISCV_BOOT_PROTOCOL, the future EFI protocols for RISC-V platform, and those we had implemented in edk2.
Which protocols in EDK II do you refer to?
"git grep -n RISC edk2/ | grep PRO" yields no result. Oops... RiscVEdk2Sbi was implemented as library for now and the plan is to rap it as PPI/protocol, bad memory.
Even if there are no other RISC-V protocols today, Abner's suggestion will allow us to add them in future to the same document.
Once we have agreed on the EFI_RISCV_BOOT_PROTOCOL we should create an issue in bugzilla.tianocore.org and create a Mantis entry to get it merged into the UEFI specification. I don't think this would be accepted by UEFI forum. This is RISC-V specific protocol however, UEFI protocol is the abstract interface for platform and architecture. Unless you can come out a abstract interface that can accommodate different processor/platform architectures (if they also need this).
We don't really need to merge the entire protocol to the UEFI spec. We need to maintain this within RISC-V organization like other RISC-V specs and add as a requirement in the platform spec. We can probably add a link under uefi.org/uefi and provide a reference in section 2.3.7.1. UEFI allows us to do like this (ex: TCG2 protocols) and it may be better since we do not need to update the UEFI spec for any new protocols specific to RISC-V in future. What do you think? Do you see any issue with this approach? Thanks Sunil Regards, Abner
Best regards
Heinrich
Thanks Abner
-----Original Message----- From: Heinrich Schuchardt <heinrich.schuchardt@...> Sent: Tuesday, January 11, 2022 1:28 AM To: Sunil V L <sunilvl@...> Cc: tech-unixplatformspec@...; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>; Anup Patel <apatel@...>; Atish Patra <atishp@...>; Jessica Clarke <jrtc27@...> Subject: Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/10/22 18:02, Sunil V L wrote:
Hi All,
As we discussed in the Platform HSC meeting today, here is the document
which details a new RISC-V specific EFI protocol.
https://github.com/riscv-non-isa/riscv- uefi/releases/download/0.1/EFI_RISCV_BOOT_PROTOCOL.pdf
Currently, the main use case of this protocol is to pass the boot hartid to the OS. But this can be extended in future if required. A PoC has been developed using EDK2 and Linux.
More details of this requirement and alternatives discussed are available
at
http://lists.infradead.org/pipermail/linux-riscv/2021- December/010604.html.
I request your review and will be great if you provide the feedback by 01/17.
Thanks! Sunil
Dear Sunil,
thank you for drafting the protocol specification.
The interface of a protocol may change from version to version. Therefore I understand why there must be a path to convey this information. But using a function like EFI_RISCV_BOOT_PROTOCOL.GetProtocolVersion() makes accessing this information unnecessarily complicated. Instead consider adding a version field as first element of the interface like many other UEFI protocols do. This will also decrease the implementation size. For alignment reasons make this field UINT64. Other protocols call such a field "Revision". Please, provide a define for the current version. E.g.
#define EFI_RISCV_BOOT_PROTOCOL_REVISION 0x00010000 #define EFI_RISCV_BOOT_PROTOCOL_LATEST_VERSION \ EFI_RISCV_BOOT_PROTOCOL_REVISION
Function EFI_RISCV_BOOT_PROTOCOL.GetBootHartId() looks ok to me
and is
well described.
Best regards
Heinrich
|
|
Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On Tue, Jan 11, 2022 at 01:07:33AM +0000, Chang, Abner (HPS SW/FW Technologist) wrote: Hi Sunil, Instead of having a spec for EFI_RISCV_BOOT_PROTOCOL specifically, I suggest to have a RISC-V EFI Protocols Specification. This spec accommodates EFI_RISCV_BOOT_PROTOCOL, the future EFI protocols for RISC-V platform, and those we had implemented in edk2.
Sure, Abner. Makes sense. Let me update the spec. Thanks Sunil Thanks Abner
-----Original Message----- From: Heinrich Schuchardt <heinrich.schuchardt@...> Sent: Tuesday, January 11, 2022 1:28 AM To: Sunil V L <sunilvl@...> Cc: tech-unixplatformspec@...; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>; Anup Patel <apatel@...>; Atish Patra <atishp@...>; Jessica Clarke <jrtc27@...> Subject: Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/10/22 18:02, Sunil V L wrote:
Hi All,
As we discussed in the Platform HSC meeting today, here is the document which details a new RISC-V specific EFI protocol.
https://github.com/riscv-non-isa/riscv- uefi/releases/download/0.1/EFI_RISCV_BOOT_PROTOCOL.pdf
Currently, the main use case of this protocol is to pass the boot hartid to the OS. But this can be extended in future if required. A PoC has been developed using EDK2 and Linux.
More details of this requirement and alternatives discussed are available at http://lists.infradead.org/pipermail/linux-riscv/2021-December/010604.html.
I request your review and will be great if you provide the feedback by 01/17.
Thanks! Sunil
Dear Sunil,
thank you for drafting the protocol specification.
The interface of a protocol may change from version to version. Therefore I understand why there must be a path to convey this information. But using a function like EFI_RISCV_BOOT_PROTOCOL.GetProtocolVersion() makes accessing this information unnecessarily complicated. Instead consider adding a version field as first element of the interface like many other UEFI protocols do. This will also decrease the implementation size. For alignment reasons make this field UINT64. Other protocols call such a field "Revision". Please, provide a define for the current version. E.g.
#define EFI_RISCV_BOOT_PROTOCOL_REVISION 0x00010000 #define EFI_RISCV_BOOT_PROTOCOL_LATEST_VERSION \ EFI_RISCV_BOOT_PROTOCOL_REVISION
Function EFI_RISCV_BOOT_PROTOCOL.GetBootHartId() looks ok to me and is well described.
Best regards
Heinrich
|
|
Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On Mon, Jan 10, 2022 at 06:27:37PM +0100, Heinrich Schuchardt wrote: On 1/10/22 18:02, Sunil V L wrote:
Hi All,
As we discussed in the Platform HSC meeting today, here is the document which details a new RISC-V specific EFI protocol.
https://github.com/riscv-non-isa/riscv-uefi/releases/download/0.1/EFI_RISCV_BOOT_PROTOCOL.pdf
Currently, the main use case of this protocol is to pass the boot hartid to the OS. But this can be extended in future if required. A PoC has been developed using EDK2 and Linux.
More details of this requirement and alternatives discussed are available at http://lists.infradead.org/pipermail/linux-riscv/2021-December/010604.html.
I request your review and will be great if you provide the feedback by 01/17.
Thanks! Sunil
Dear Sunil,
thank you for drafting the protocol specification. Hi Heinrich, Thank you very much for your constant feedback and pointers while drafting this spec. The interface of a protocol may change from version to version. Therefore I understand why there must be a path to convey this information. But using a function like EFI_RISCV_BOOT_PROTOCOL.GetProtocolVersion() makes accessing this information unnecessarily complicated. Instead consider adding a version field as first element of the interface like many other UEFI protocols do. This will also decrease the implementation size. For alignment reasons make this field UINT64. Other protocols call such a field "Revision". Please, provide a define for the current version. E.g.
#define EFI_RISCV_BOOT_PROTOCOL_REVISION 0x00010000 #define EFI_RISCV_BOOT_PROTOCOL_LATEST_VERSION \ EFI_RISCV_BOOT_PROTOCOL_REVISION
This makes perfect sense. Will update the spec. Function EFI_RISCV_BOOT_PROTOCOL.GetBootHartId() looks ok to me and is well described.
Jessica has given an input to change the parameter from UINT32 * to UINTN * since mhartid can be of XLEN. I think this is also a great feedback. Will incorporate it in the next update of the spec. Thanks! Sunil Best regards
Heinrich
|
|
Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/11/22 02:07, Chang, Abner (HPS SW/FW Technologist) wrote: Hi Sunil, Instead of having a spec for EFI_RISCV_BOOT_PROTOCOL specifically, I suggest to have a RISC-V EFI Protocols Specification. This spec accommodates EFI_RISCV_BOOT_PROTOCOL, the future EFI protocols for RISC-V platform, and those we had implemented in edk2. Which protocols in EDK II do you refer to? "git grep -n RISC edk2/ | grep PRO" yields no result. Once we have agreed on the EFI_RISCV_BOOT_PROTOCOL we should create an issue in bugzilla.tianocore.org and create a Mantis entry to get it merged into the UEFI specification. Best regards Heinrich Thanks Abner
-----Original Message----- From: Heinrich Schuchardt <heinrich.schuchardt@...> Sent: Tuesday, January 11, 2022 1:28 AM To: Sunil V L <sunilvl@...> Cc: tech-unixplatformspec@...; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>; Anup Patel <apatel@...>; Atish Patra <atishp@...>; Jessica Clarke <jrtc27@...> Subject: Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/10/22 18:02, Sunil V L wrote:
Hi All,
As we discussed in the Platform HSC meeting today, here is the document which details a new RISC-V specific EFI protocol.
https://github.com/riscv-non-isa/riscv- uefi/releases/download/0.1/EFI_RISCV_BOOT_PROTOCOL.pdf
Currently, the main use case of this protocol is to pass the boot hartid to the OS. But this can be extended in future if required. A PoC has been developed using EDK2 and Linux.
More details of this requirement and alternatives discussed are available at http://lists.infradead.org/pipermail/linux-riscv/2021-December/010604.html.
I request your review and will be great if you provide the feedback by 01/17.
Thanks! Sunil
Dear Sunil,
thank you for drafting the protocol specification.
The interface of a protocol may change from version to version. Therefore I understand why there must be a path to convey this information. But using a function like EFI_RISCV_BOOT_PROTOCOL.GetProtocolVersion() makes accessing this information unnecessarily complicated. Instead consider adding a version field as first element of the interface like many other UEFI protocols do. This will also decrease the implementation size. For alignment reasons make this field UINT64. Other protocols call such a field "Revision". Please, provide a define for the current version. E.g.
#define EFI_RISCV_BOOT_PROTOCOL_REVISION 0x00010000 #define EFI_RISCV_BOOT_PROTOCOL_LATEST_VERSION \ EFI_RISCV_BOOT_PROTOCOL_REVISION
Function EFI_RISCV_BOOT_PROTOCOL.GetBootHartId() looks ok to me and is well described.
Best regards
Heinrich
|
|
Re: Review request: New EFI_RISCV_BOOT_PROTOCOL
On 1/10/22 18:02, Sunil V L wrote: Hi All, As we discussed in the Platform HSC meeting today, here is the document which details a new RISC-V specific EFI protocol. https://github.com/riscv-non-isa/riscv-uefi/releases/download/0.1/EFI_RISCV_BOOT_PROTOCOL.pdf Currently, the main use case of this protocol is to pass the boot hartid to the OS. But this can be extended in future if required. A PoC has been developed using EDK2 and Linux. More details of this requirement and alternatives discussed are available at http://lists.infradead.org/pipermail/linux-riscv/2021-December/010604.html. I request your review and will be great if you provide the feedback by 01/17. Thanks! Sunil
Dear Sunil, thank you for drafting the protocol specification. The interface of a protocol may change from version to version. Therefore I understand why there must be a path to convey this information. But using a function like EFI_RISCV_BOOT_PROTOCOL.GetProtocolVersion() makes accessing this information unnecessarily complicated. Instead consider adding a version field as first element of the interface like many other UEFI protocols do. This will also decrease the implementation size. For alignment reasons make this field UINT64. Other protocols call such a field "Revision". Please, provide a define for the current version. E.g. #define EFI_RISCV_BOOT_PROTOCOL_REVISION 0x00010000 #define EFI_RISCV_BOOT_PROTOCOL_LATEST_VERSION \ EFI_RISCV_BOOT_PROTOCOL_REVISION Function EFI_RISCV_BOOT_PROTOCOL.GetBootHartId() looks ok to me and is well described. Best regards Heinrich
|
|
Review request: New EFI_RISCV_BOOT_PROTOCOL
|
|
Next Platform HSC Meeting on Mon Jan 10th 2022 8AM PST

Kumar Sankaran
|
|
Hi, thanks for the response.
My thinking on intX is that if the HW can provide all the required MSI support, then SW won’t need to fall back to MSIs. The intent of the PCIe spec was to depricate INTx messages eventually. For new risc-v platforms it seems reasonable to build a forward looking system that only supports MSI interrupts. For the topology of a RCiEP and RCEC that have MSI or MSI-X support adding legacy INTx support as a requirement is just make work, since all modern software has the MSI support. For Root Ports, it’s a bit more complicated because the platform designer has less control of what gets plugged in, still it seems reasonable at this time to make INTx support optional.
You are correct that RO and NS are separate bits and it’s legal for a card to set one and not the other. My point is that in implementing the logic above the host bridge, if NS is set, but RO is not it doesn’t provide much value, because the transaction must be strongly ordered with previous writes. In practice its easiest to send such transactions (NS=1, RO=0) through the snooped path to maintain ordering.
The key point is NS is a hint so the statement “Memory that is cacheable by harts is not kept coherent by hardware…” may or may not be true in an implementation. So here’s a smaller change proposal that would make the text more accurate: “ Memory that is cacheable by harts may not be kept coherent by hardware when PCIe transactions to that memory are marked with a No_Snoop bit of one. On systems that honor the No Snoop hint, software must manage coherence on such memory; otherwise, software coherence management is not required.”
Agreed ! I will send a patch for this change.
At the very least the typo on the No Snoop polarity should be corrected.
My final point on topology was that the the spec seems to make it illegal to implement a single host bridge that has both root ports and RCiEP attached. Maybe that wasn’t the intent. It would be nice to see a 3rd topology drawing with a single host bridge, a RCiEP, an RCEC and a Root Port all on Bus 0. If we do add that topology the final rule of section 4.7.3.5 becomes not-needed:
Ok. Will do that. Intel south bridges, as an example, mix RCiEP and root ports in the same PCIe domain addressable by a single ECAM I/O region. What is the motivation for excluding this topology?
Cheers, Michael.
On Jan 4, 2022, at 11:16 AM, Mayuresh Chitale < mchitale@...> wrote:
Hello,
I’m new to participating in the platform WG. I’m working at SiFive now. I spent the last 20 years doing PCIe compliant IO fabrics for Intel chipsets.
I have a few comments / questions about the PCIe:
1) section 4.7.3.3: Why are we requiring INTx? We should allow a modern system to be built without the legacy INTx requirements.
The intention behind requiring intx was to ensure better compatibility. There are few cases where we fallback to INTx if MSI is not available. For e.g: But if such cases are considered to be rare and not required to be supported then this requirement can be removed.
2) section 4.7.3.4: A discussion of No_snoop must also include Relaxed Order (RO). When a root port forwards a mix of traffic with NS=0, RO=0 and NS=1 , RO=0. The requirement to enforce ordering tends to lead to ignoring the NS hint and snooping the trarffic anyway.
A system is required to provide hardware managed coherence for PCIe traffic. A system may ignore the No_snoop hint bit and treat all PCIe traffic as HW coherent. A system may choose to honor the No_snoop (NS) hint bit on incoming PCIe transactions. In this case software must manage coherence for the memory used by the device issuing the transactions. Such systems must also honor the relaxed order (RO) hint bit. To take full advantage of SW coherence the device should set both NS and RO to 1. Otherwise, when RO=0 the snooped and non-snooped traffic arriving through a host bridge must be kept ordered, eliminating the benefit of routing some traffic around the cache hierarchy to memory.
AFAIK, these are two separate attributes and a requester could set either or both of them. I am not sure if we can link the two together. Please correct me if I am wrong but does it mean that ,for e.g, all the mem write requests which may have the NS attribute set must also have the RO attribute set?
2) section 4.7.3.5: Why do we exclude the possibility of a Host bridge that supports both RCiEP and Root Ports?
Actually the requirement is to support atleast one of them ie RCiEP (+RCEC) or Root port but an RC can certainly support both.
|
|
I agree the comments about RO and NS interactions are non-normative clarifications (and not required to be added, it’s covered in the PCIe spec). The key point is the the text today implies the host bridge MUST honor the No Snoop hint. So, are we saying RiscV OS-A server platforms must honor the no snoop hint? If not I think the text as written is miss leading.
Cheers,
toggle quoted message
Show quoted text
On Jan 4, 2022, at 5:14 PM, Greg Favor < gfavor@...> wrote:
On Tue, Jan 4, 2022 at 11:16 AM Mayuresh Chitale < mchitale@...> wrote: 2) section 4.7.3.4: A discussion of No_snoop must also include Relaxed Order (RO). When a root port forwards a mix of traffic with NS=0, RO=0 and NS=1 , RO=0. The requirement to enforce ordering tends to lead to ignoring the NS hint and snooping the trarffic anyway.
A system is required to provide hardware managed coherence for PCIe traffic. A system may ignore the No_snoop hint bit and treat all PCIe traffic as HW coherent. A system may choose to honor the No_snoop (NS) hint bit on incoming PCIe transactions. In this case software must manage coherence for the memory used by the device issuing the transactions. Such systems must also honor the relaxed order (RO) hint bit. To take full advantage of SW coherence the device should set both NS and RO to 1. Otherwise, when RO=0 the snooped and non-snooped traffic arriving through a host bridge must be kept ordered, eliminating the benefit of routing some traffic around the cache hierarchy to memory.
AFAIK, these are two separate attributes and a requester could set either or both of them. I am not sure if we can link the two together. Please correct me if I am wrong but does it mean that ,for e.g, all the mem write requests which may have the NS attribute set must also have the RO attribute set?
Fwiw, through seven generations of ARM SBSA and then the BSA, they talk about No_snoop in a similar way to what we do, but make no corresponding mentions about Relaxed Order (other than mentions of Relaxed Order and No Snoop enable/disable control bits in Device Control Registers). In essence they don't mandate or even suggest any particular connections between the two features.
So it wouldn't be unreasonable for us to not say much and essentially leave complete flexibility to the system designer. Or we could include some non-normative commentary or suggestions.
Greg
On Tue, Jan 4, 2022 at 11:16 AM Mayuresh Chitale < mchitale@...> wrote: Hello,
I’m new to participating in the platform WG. I’m working at SiFive now. I spent the last 20 years doing PCIe compliant IO fabrics for Intel chipsets.
I have a few comments / questions about the PCIe:
1) section 4.7.3.3: Why are we requiring INTx? We should allow a modern system to be built without the legacy INTx requirements.
The intention behind requiring intx was to ensure better compatibility. There are few cases where we fallback to INTx if MSI is not available. For e.g: But if such cases are considered to be rare and not required to be supported then this requirement can be removed.
2) section 4.7.3.4: A discussion of No_snoop must also include Relaxed Order (RO). When a root port forwards a mix of traffic with NS=0, RO=0 and NS=1 , RO=0. The requirement to enforce ordering tends to lead to ignoring the NS hint and snooping the trarffic anyway.
A system is required to provide hardware managed coherence for PCIe traffic. A system may ignore the No_snoop hint bit and treat all PCIe traffic as HW coherent. A system may choose to honor the No_snoop (NS) hint bit on incoming PCIe transactions. In this case software must manage coherence for the memory used by the device issuing the transactions. Such systems must also honor the relaxed order (RO) hint bit. To take full advantage of SW coherence the device should set both NS and RO to 1. Otherwise, when RO=0 the snooped and non-snooped traffic arriving through a host bridge must be kept ordered, eliminating the benefit of routing some traffic around the cache hierarchy to memory.
AFAIK, these are two separate attributes and a requester could set either or both of them. I am not sure if we can link the two together. Please correct me if I am wrong but does it mean that ,for e.g, all the mem write requests which may have the NS attribute set must also have the RO attribute set?
2) section 4.7.3.5: Why do we exclude the possibility of a Host bridge that supports both RCiEP and Root Ports?
Actually the requirement is to support atleast one of them ie RCiEP (+RCEC) or Root port but an RC can certainly support both.
|
|
On Tue, Jan 4, 2022 at 11:16 AM Mayuresh Chitale < mchitale@...> wrote: 2) section 4.7.3.4: A discussion of No_snoop must also include Relaxed Order (RO). When a root port forwards a mix of traffic with NS=0, RO=0 and NS=1 , RO=0. The requirement to enforce ordering tends to lead to ignoring the NS hint and snooping the trarffic anyway.
A system is required to provide hardware managed coherence for PCIe traffic. A system may ignore the No_snoop hint bit and treat all PCIe traffic as HW coherent. A system may choose to honor the No_snoop (NS) hint bit on incoming PCIe transactions. In this case software must manage coherence for the memory used by the device issuing the transactions. Such systems must also honor the relaxed order (RO) hint bit. To take full advantage of SW coherence the device should set both NS and RO to 1. Otherwise, when RO=0 the snooped and non-snooped traffic arriving through a host bridge must be kept ordered, eliminating the benefit of routing some traffic around the cache hierarchy to memory.
AFAIK, these are two separate attributes and a requester could set either or both of them. I am not sure if we can link the two together. Please correct me if I am wrong but does it mean that ,for e.g, all the mem write requests which may have the NS attribute set must also have the RO attribute set?
Fwiw, through seven generations of ARM SBSA and then the BSA, they talk about No_snoop in a similar way to what we do, but make no corresponding mentions about Relaxed Order (other than mentions of Relaxed Order and No Snoop enable/disable control bits in Device Control Registers). In essence they don't mandate or even suggest any particular connections between the two features.
So it wouldn't be unreasonable for us to not say much and essentially leave complete flexibility to the system designer. Or we could include some non-normative commentary or suggestions.
Greg
On Tue, Jan 4, 2022 at 11:16 AM Mayuresh Chitale < mchitale@...> wrote: Hello,
I’m new to participating in the platform WG. I’m working at SiFive now. I spent the last 20 years doing PCIe compliant IO fabrics for Intel chipsets.
I have a few comments / questions about the PCIe:
1) section 4.7.3.3: Why are we requiring INTx? We should allow a modern system to be built without the legacy INTx requirements.
The intention behind requiring intx was to ensure better compatibility. There are few cases where we fallback to INTx if MSI is not available. For e.g: But if such cases are considered to be rare and not required to be supported then this requirement can be removed.
2) section 4.7.3.4: A discussion of No_snoop must also include Relaxed Order (RO). When a root port forwards a mix of traffic with NS=0, RO=0 and NS=1 , RO=0. The requirement to enforce ordering tends to lead to ignoring the NS hint and snooping the trarffic anyway.
A system is required to provide hardware managed coherence for PCIe traffic. A system may ignore the No_snoop hint bit and treat all PCIe traffic as HW coherent. A system may choose to honor the No_snoop (NS) hint bit on incoming PCIe transactions. In this case software must manage coherence for the memory used by the device issuing the transactions. Such systems must also honor the relaxed order (RO) hint bit. To take full advantage of SW coherence the device should set both NS and RO to 1. Otherwise, when RO=0 the snooped and non-snooped traffic arriving through a host bridge must be kept ordered, eliminating the benefit of routing some traffic around the cache hierarchy to memory.
AFAIK, these are two separate attributes and a requester could set either or both of them. I am not sure if we can link the two together. Please correct me if I am wrong but does it mean that ,for e.g, all the mem write requests which may have the NS attribute set must also have the RO attribute set?
2) section 4.7.3.5: Why do we exclude the possibility of a Host bridge that supports both RCiEP and Root Ports?
Actually the requirement is to support atleast one of them ie RCiEP (+RCEC) or Root port but an RC can certainly support both.
|
|
Hi, thanks for the response.
My thinking on intX is that if the HW can provide all the required MSI support, then SW won’t need to fall back to MSIs. The intent of the PCIe spec was to depricate INTx messages eventually. For new risc-v platforms it seems reasonable to build a forward looking system that only supports MSI interrupts. For the topology of a RCiEP and RCEC that have MSI or MSI-X support adding legacy INTx support as a requirement is just make work, since all modern software has the MSI support. For Root Ports, it’s a bit more complicated because the platform designer has less control of what gets plugged in, still it seems reasonable at this time to make INTx support optional.
You are correct that RO and NS are separate bits and it’s legal for a card to set one and not the other. My point is that in implementing the logic above the host bridge, if NS is set, but RO is not it doesn’t provide much value, because the transaction must be strongly ordered with previous writes. In practice its easiest to send such transactions (NS=1, RO=0) through the snooped path to maintain ordering.
The key point is NS is a hint so the statement “Memory that is cacheable by harts is not kept coherent by hardware…” may or may not be true in an implementation. So here’s a smaller change proposal that would make the text more accurate: “ Memory that is cacheable by harts may not be kept coherent by hardware when PCIe transactions to that memory are marked with a No_Snoop bit of one. On systems that honor the No Snoop hint, software must manage coherence on such memory; otherwise, software coherence management is not required.”
At the very least the typo on the No Snoop polarity should be corrected.
My final point on topology was that the the spec seems to make it illegal to implement a single host bridge that has both root ports and RCiEP attached. Maybe that wasn’t the intent. It would be nice to see a 3rd topology drawing with a single host bridge, a RCiEP, an RCEC and a Root Port all on Bus 0. If we do add that topology the final rule of section 4.7.3.5 becomes not-needed: Intel south bridges, as an example, mix RCiEP and root ports in the same PCIe domain addressable by a single ECAM I/O region. What is the motivation for excluding this topology?
Cheers, Michael.
On Jan 4, 2022, at 11:16 AM, Mayuresh Chitale < mchitale@...> wrote:
Hello,
I’m new to participating in the platform WG. I’m working at SiFive now. I spent the last 20 years doing PCIe compliant IO fabrics for Intel chipsets.
I have a few comments / questions about the PCIe:
1) section 4.7.3.3: Why are we requiring INTx? We should allow a modern system to be built without the legacy INTx requirements.
The intention behind requiring intx was to ensure better compatibility. There are few cases where we fallback to INTx if MSI is not available. For e.g: But if such cases are considered to be rare and not required to be supported then this requirement can be removed.
2) section 4.7.3.4: A discussion of No_snoop must also include Relaxed Order (RO). When a root port forwards a mix of traffic with NS=0, RO=0 and NS=1 , RO=0. The requirement to enforce ordering tends to lead to ignoring the NS hint and snooping the trarffic anyway.
A system is required to provide hardware managed coherence for PCIe traffic. A system may ignore the No_snoop hint bit and treat all PCIe traffic as HW coherent. A system may choose to honor the No_snoop (NS) hint bit on incoming PCIe transactions. In this case software must manage coherence for the memory used by the device issuing the transactions. Such systems must also honor the relaxed order (RO) hint bit. To take full advantage of SW coherence the device should set both NS and RO to 1. Otherwise, when RO=0 the snooped and non-snooped traffic arriving through a host bridge must be kept ordered, eliminating the benefit of routing some traffic around the cache hierarchy to memory.
AFAIK, these are two separate attributes and a requester could set either or both of them. I am not sure if we can link the two together. Please correct me if I am wrong but does it mean that ,for e.g, all the mem write requests which may have the NS attribute set must also have the RO attribute set?
2) section 4.7.3.5: Why do we exclude the possibility of a Host bridge that supports both RCiEP and Root Ports?
Actually the requirement is to support atleast one of them ie RCiEP (+RCEC) or Root port but an RC can certainly support both.
|
|
Hello,
I’m new to participating in the platform WG. I’m working at SiFive now. I spent the last 20 years doing PCIe compliant IO fabrics for Intel chipsets.
I have a few comments / questions about the PCIe:
1) section 4.7.3.3: Why are we requiring INTx? We should allow a modern system to be built without the legacy INTx requirements.
The intention behind requiring intx was to ensure better compatibility. There are few cases where we fallback to INTx if MSI is not available. For e.g: But if such cases are considered to be rare and not required to be supported then this requirement can be removed.
2) section 4.7.3.4: A discussion of No_snoop must also include Relaxed Order (RO). When a root port forwards a mix of traffic with NS=0, RO=0 and NS=1 , RO=0. The requirement to enforce ordering tends to lead to ignoring the NS hint and snooping the trarffic anyway.
A system is required to provide hardware managed coherence for PCIe traffic. A system may ignore the No_snoop hint bit and treat all PCIe traffic as HW coherent. A system may choose to honor the No_snoop (NS) hint bit on incoming PCIe transactions. In this case software must manage coherence for the memory used by the device issuing the transactions. Such systems must also honor the relaxed order (RO) hint bit. To take full advantage of SW coherence the device should set both NS and RO to 1. Otherwise, when RO=0 the snooped and non-snooped traffic arriving through a host bridge must be kept ordered, eliminating the benefit of routing some traffic around the cache hierarchy to memory.
AFAIK, these are two separate attributes and a requester could set either or both of them. I am not sure if we can link the two together. Please correct me if I am wrong but does it mean that ,for e.g, all the mem write requests which may have the NS attribute set must also have the RO attribute set?
2) section 4.7.3.5: Why do we exclude the possibility of a Host bridge that supports both RCiEP and Root Ports?
Actually the requirement is to support atleast one of them ie RCiEP (+RCEC) or Root port but an RC can certainly support both.
|
|
Re: OS-A platform stoptime requirement
On Mon, Jan 3, 2022 at 9:43 AM Beeman Strong < beeman@...> wrote: Back to the original topic, it seems there is broad agreement that stoptime=1 shouldn't be a requirement for the OS-A (or server) platform spec. Is there a formal mechanism by which an issue should be filed to get that changed?
Send a patch :)
On Wed, Dec 29, 2021 at 9:44 AM Tim Newsome < tim@...> wrote: On Tue, Dec 28, 2021 at 4:19 PM Ved Shanbhogue < ved@...> wrote: On Tue, Dec 28, 2021 at 10:04:41AM -0800, Tim Newsome wrote:
>stoptime is nice on single-hart systems, but not really practical in
>multi-hart systems where one hart can be running while another is halted.
>The main benefit is that it allows you to single step through code with a
>timer interrupt enabled, without going into that timer interrupt every time
>you single step.
Are there downsides to the debugger inhibiting the timer interrupt by setting STIE to 0?
This seems like would provide similar benefit even for a multi-hart system...
It works fine, but it's not as nice as the system itself slowing down to your debugging speed. (Although slowing the system down will generally be imperfect in any case, because systems have other peripherals that will not stop generating interrupts/counting time/whatever.)
Tim
|
|
Re: OS-A platform stoptime requirement
Back to the original topic, it seems there is broad agreement that stoptime=1 shouldn't be a requirement for the OS-A (or server) platform spec. Is there a formal mechanism by which an issue should be filed to get that changed?
toggle quoted message
Show quoted text
On Wed, Dec 29, 2021 at 9:44 AM Tim Newsome < tim@...> wrote: On Tue, Dec 28, 2021 at 4:19 PM Ved Shanbhogue < ved@...> wrote: On Tue, Dec 28, 2021 at 10:04:41AM -0800, Tim Newsome wrote:
>stoptime is nice on single-hart systems, but not really practical in
>multi-hart systems where one hart can be running while another is halted.
>The main benefit is that it allows you to single step through code with a
>timer interrupt enabled, without going into that timer interrupt every time
>you single step.
Are there downsides to the debugger inhibiting the timer interrupt by setting STIE to 0?
This seems like would provide similar benefit even for a multi-hart system...
It works fine, but it's not as nice as the system itself slowing down to your debugging speed. (Although slowing the system down will generally be imperfect in any case, because systems have other peripherals that will not stop generating interrupts/counting time/whatever.)
Tim
|
|
Hello,
I’m new to participating in the platform WG. I’m working at SiFive now. I spent the last 20 years doing PCIe compliant IO fabrics for Intel chipsets.
I have a few comments / questions about the PCIe:
1) section 4.7.3.3: Why are we requiring INTx? We should allow a modern system to be built without the legacy INTx requirements.
2) section 4.7.3.4: A discussion of No_snoop must also include Relaxed Order (RO). When a root port forwards a mix of traffic with NS=0, RO=0 and NS=1 , RO=0. The requirement to enforce ordering tends to lead to ignoring the NS hint and snooping the trarffic anyway.
Proposed text for 4.7.3.4: A system is required to provide hardware managed coherence for PCIe traffic. A system may ignore the No_snoop hint bit and treat all PCIe traffic as HW coherent. A system may choose to honor the No_snoop (NS) hint bit on incoming PCIe transactions. In this case software must manage coherence for the memory used by the device issuing the transactions. Such systems must also honor the relaxed order (RO) hint bit. To take full advantage of SW coherence the device should set both NS and RO to 1. Otherwise, when RO=0 the snooped and non-snooped traffic arriving through a host bridge must be kept ordered, eliminating the benefit of routing some traffic around the cache hierarchy to memory.
2) section 4.7.3.5: Why do we exclude the possibility of a Host bridge that supports both RCiEP and Root Ports?
Cheers, Michael.
|
|