[RISC-V] [tech-chairs] Architecture extension proposal for ConfigPtr CSR to "Unified RISC-V Discovery Method" config structure


Nick Kossifidis
 

Hello Greg,

Στις 2021-06-28 22:29, Greg Favor έγραψε:
To support this, each hart needs to have a CSR that provides an address pointer to the memory-resident config data structure - which can reside anywhere in system address space and may physically reside on or off chip in whatever suitable form of storage. This fast track extension standardizes this CSR. This email (I'm helping out the people developing the overall discovery method) starts a prelim review of this extension on the tech-priv and tech-config email lists.
The proposed official extension name is 'Smdisc'.
The 'mconfigptr' CSR is an MXLEN-wide R/W M-mode CSR that provides a system physical address pointer to a memory-resident config data structure to be used by a software method for low-level discovery of configuration information about harts and the rest of the system. Some implementations may hardwire this CSR to a suitable value. The assigned CSR number is 0x750.
Have you considered using mscratch for this instead of defining a new CSR ?

Regards,
Nick


Greg Favor
 

On Sun, Jul 4, 2021 at 8:16 PM Nick Kossifidis <mick@...> wrote:
Have you considered using mscratch for this instead of defining a new
CSR ?

The mscratch CRS is dedicated architecturally for use by M-mode software, with a description of how it is typically used.  Whether existing M-mode software uses mscratch in that manner and/or in some other manner, it would not be backwards compatible to also start using it for another purpose that may conflict with existing usages.

Greg
 


Bill Huffman
 

I expect the suggestion was to use the reset value of mscratch and not to keep the value there for all time.  It still may not be good to combine these.

 

      Bill

 

From: tech-privileged@... <tech-privileged@...> On Behalf Of Greg Favor
Sent: Tuesday, July 6, 2021 1:53 AM
To: Nick Kossifidis <mick@...>
Cc: tech-privileged <tech-privileged@...>; config <tech-config@...>; Tim Newsome <tim@...>; Philipp Tomsich <philipp.tomsich@...>; chairs <tech-chairs@...>; Mark Himelstein <markhimelstein@...>
Subject: Re: [RISC-V] [tech-privileged] [RISC-V] [tech-chairs] Architecture extension proposal for ConfigPtr CSR to "Unified RISC-V Discovery Method" config structure

 

EXTERNAL MAIL

On Sun, Jul 4, 2021 at 8:16 PM Nick Kossifidis <mick@...> wrote:

Have you considered using mscratch for this instead of defining a new
CSR ?

 

The mscratch CRS is dedicated architecturally for use by M-mode software, with a description of how it is typically used.  Whether existing M-mode software uses mscratch in that manner and/or in some other manner, it would not be backwards compatible to also start using it for another purpose that may conflict with existing usages.

 

Greg

 


Greg Favor
 

On Tue, Jul 6, 2021 at 8:06 AM Bill Huffman <huffman@...> wrote:

I expect the suggestion was to use the reset value of mscratch and not to keep the value there for all time.  It still may not be good to combine these.


Yes.  Combining them would require making presumptions and constraints around when this CSR is "live" for discovery purposes and "live" for non-discovery purposes.  Which depends on the low-level discovery software architecture and on the software use cases for mscratch.  Neither of which the mscratch or mconfigptr arch specs say anything about (intentionally), i.e. the ISA architecture just provides these two CSRs with rough expected usage scenarios, and otherwise leaves it to software architecture to define exactly how these are actually used.  Reusing mscratch for mconfigptr is not generally backward compatible with the completely unconstrained ways that the architecture allows mscratch to be used.

Greg