On Tue, May 13, 2014 at 2:33 PM, Jonas Bonn <[email protected]> wrote: > On 05/13/2014 01:21 PM, Stefan Kristiansson wrote: >> Ok, fair enough. The only reservation I have against implementing it >> fully in hardware, >> is that you are then forced to involve the SR[CID] connection back >> into not only the register file, >> but also into the MMU. (This is the heavy weightiness I've been >> speaking about earlier). >> >> Otoh, there might be interest in the CID stuff for the MMU as well... > > Ick... yes, maybe. But this is probably a pretty big change to make... > >> >>> 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... >> >> I think that should be possible to achieve by turning off the CE bit >> on userspace->kernel transition and turn it back on on >> kernel->userspace transition > > OK, that's probably doable. > > Try to keep in mind that whatever change we make needs to play > reasonably nicely with systems without FCS (given that it's optional)... > I see this going down the road of two substantially different codebases > selected by a config option that will need to be maintained. >
True... that's actually another reservation I have against the full FCS, just accessing the second file could be done with a lot less intrusive changes to the current code base. As for example like this: http://git.openrisc.net/cgit.cgi/stefan/linux/commit/?h=smp&id=ae421650e81dabc4f9cddb3f705f81acf2f19c10 (yes, it's ugly, and it even have a bug that I've fixed higher up in that branch, don't sue me ;)) > Deciding that r30 and r31 be used as kernel-only regs (in the spirit of > mips k0 and k1) is something that works for _all_ implementations of > OR1K, even if it's an ABI break. > Also true, that's why I was so keen on my r10 hack, it'd be implementation backwards compatible... Even though r30 and r31 as kernel-regs might be nice, I think the ABI break might not be worth it though. Stefan _______________________________________________ OpenRISC mailing list [email protected] http://lists.openrisc.net/listinfo/openrisc
