On 05/13/2014 12:51 PM, Stefan Kristiansson wrote: > On Tue, May 13, 2014 at 1:46 PM, Jonas Bonn <[email protected]> wrote: >> On 05/13/2014 12:17 PM, Stefan Kristiansson wrote: >>> On Tue, May 13, 2014 at 9:09 AM, Stefan Kristiansson >>> <[email protected]> wrote: >> >>> So, a piece of software that is only interested in 1) (i.e. Linux in >>> this case) is completely free to omit 2) and read/write the additional >>> GPR file with the l.mfspr and l.mtspr instructions. >> >> Which SPR's are that? As far as I recall, there's no way to access >> other contexts' registers... and adding such a functionality is probably >> against the spirit of this functionality. >> > > /me thinks you recall wrong then ;) > > "6.4.3 Accessing Other Contexts’ Registers > This operation can be done only in supervisor mode. In the basic > instruction set we > have the l.mtspr and l.mfspr instructions that are used to access > shadowed registers." > > The GPR0-GPR511 SPR space addresses are: group 0, register 1024-1535.
Aha... OK. I don't remember this at all. Is this a recent addition to the spec? If you're going to implement two register files, then you might as well use them fully. Linux could happily use a second register file for running exceptions and it would save a bunch of register copying. The problem is rather the way FCS is spec'ed: i) We _do_ need to access user-context regs from exception-context (apparently this is possible now...) ii) Nested exceptions really don't want to switch to a new register file.. you really only want to switch between user-context regs and supervisor context regs. I don't know if that's in the scope of FCS... /Jonas _______________________________________________ OpenRISC mailing list [email protected] http://lists.openrisc.net/listinfo/openrisc
