Re: [tech-aia] RISC-V ACLINT specification is now hosted on RISC-V GitHub
Greg Favor
On Thu, Jul 15, 2021 at 5:03 PM Josh Scheid <jscheid@...> wrote:
Here's the most salient part of a long email thread last year with Andrew about this question (I've annotated the latter part with people's initials to help make clear who is saying what): -------------------------------------------------------------------------------------------- On ... Andrew Waterman <andrew@...> wrote:
AW: I think your interpretation of that sentence is accurate. FWIW, the insufficiently described Linux platform does assume such accesses are legal (more precisely, the various SBI implementations make that assumption). -------------------------------------------------------------------------------------------- On ... David Kruckemyer <dkruckemyer@...> wrote: It appears that OpenSBI supports 32b accesses to the CLINT on an RV64 system (the CLINT is where mtime[cmp] live in an SiFive FU540 SOC.): ===================================================== So, in short, we (the Platform specs) need to now address this issue (as Andrew touched on). The platform spec should say, in some form, that on both RV32 and RV64 platforms the MTIME register may be accessed using a pair of 32-bit accesses - and should be done in the manner shown by the example code in the MTIME register section of the Priv Arch spec. Also, the ACLINT spec should specify that the various registers (including MTIME) are (i.e. must be) accessible on both RV32 and RV64 systems using 32-bit accesses (and may also be accessible using 64-bit accesses on RV64 platforms) Lastly, it seems like all this can just be said in the ACLINT spec. The platform specs will automatically then inherit this as part of using ACLINT (or parts of ACLINT). Greg |
|