Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* [libre-riscv-dev] [Bug 264] New: ISA switch needs to be a privileged operation
@ 2020-03-22 23:19 bugzilla-daemon
  2020-03-23  0:01 ` [libre-riscv-dev] [Bug 264] " bugzilla-daemon
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: bugzilla-daemon @ 2020-03-22 23:19 UTC (permalink / raw)
  To: libre-riscv-dev

http://bugs.libre-riscv.org/show_bug.cgi?id=264

            Bug ID: 264
           Summary: ISA switch needs to be a privileged operation
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: Other
                OS: Linux
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Specification
          Assignee: lkcl@lkcl.net
          Reporter: lkcl@lkcl.net
                CC: libre-riscv-dev@lists.libre-riscv.org
   NLnet milestone: ---

we've had a request from the OpenPOWER foundation that ISA switching be a
privileged operation.

this to prevent endusers from mix and matching arbitrary assembler from
multiple compilers and then expecting "vanilla" systems to support the
resultant excruciatingly nauseous binaries.

a privileged operation will allow say a thread to be established by the kernel
with the same memory space as the userspace application but with a different
executable (the 3D shader compiled application)

in particular we have a bit of a problem when it comes to inlining POWER
assembler with SVPrefix: POWER opcodes can be either LE or BE, and
unfortunately it is the TOP 6 bits which specify the opcode.

if they are LE, it is not ok, exactly, to read 32 bits and have the decoder
then work out if the opcode is actually a 16 bit Compressed instruction.

that just doesn't work.  it's "ok" for 48 and 64 bit SVPrefix (just a bit
weird) however for C it most definitely is not.

however for BE it just so happens that those top 6 bits of a 32 bit opcode will
be byte reversed and so will be in the very first byte of an instruction
stream.

this kind of mess is also why it should be a privileged op to do the ISA
switch, really.

needs thinking through, properly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-22 23:19 [libre-riscv-dev] [Bug 264] New: ISA switch needs to be a privileged operation bugzilla-daemon
2020-03-23  0:01 ` [libre-riscv-dev] [Bug 264] " bugzilla-daemon
2020-03-23  0:26 ` bugzilla-daemon
2020-03-23  1:12 ` bugzilla-daemon
2020-03-23  7:54 ` bugzilla-daemon
2020-03-23  8:30 ` bugzilla-daemon
2020-03-23  8:37 ` bugzilla-daemon
2020-03-23  8:47 ` bugzilla-daemon
2020-03-23  8:54 ` bugzilla-daemon
2020-03-23  8:57 ` bugzilla-daemon
2020-03-23 10:24 ` bugzilla-daemon
2020-03-23 10:28 ` bugzilla-daemon

Libre RISC-V Mailing list Archives (accessible via public-inbox)

Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git