[J-core] Port Idea: Little Kernel

Cedric BAIL cedric.bail at free.fr
Sat Nov 11 15:42:48 EST 2017


On Fri, Nov 10, 2017 at 2:01 PM, Cedric BAIL <cedric.bail at free.fr> wrote:
> On Thu, Nov 9, 2017 at 4:24 PM, Rob Landley <rob at landley.net> wrote:
>> Alas, nobody's made time for either yet, I've got my hands full with
>> toybox and $DAYJOB, and if I did wind up with extra time I'd really need
>> to add j-core SOC board and j2 -cpu emulation to qemu.
>>
>> (Qemu commit 143021b26ffe is already making a couple of instructions
>> sh4a-specific. In theory the technique for adding a j2 target wouldn't
>> be that different. Right now we just run qemu under an sh4 kernel with
>> j2 userspace binaries when we want to test in emulation, because then
>> the only j2 userspace instruction missing is cmpxchg, which means
>> futexes don't work. I'm aware there's a kernel patch saying futexes need
>> fixing, but unless Rich gets around to that independently it's behind
>> adding qemu support on my own todo list.)
>
> I looked at that commit and it sounds quite simple to add the same
> tests for all the other instructions. I was planning to use my JSON
> file for this kind of purpose and generate most of it automatically. I
> will try to look at it this weekend or during next week. Would you
> mind sharing the binary you are using to do your current tests with
> sh2 ? I am guessing I can use a sh4 debian to test if the features
> tests are enable and result in an illegal instruction.

It was indeed pretty easy to write the code. I have made necessary
change to qemu to handle the entire SuperH family over night. I don't
really know where to go for a few bits, especially regarding the board
definition. This means it is not tested (Just previous SH4A code now
work with the new logic generated from my JSON file and I can still
start debian on my modified version). You can have a look at it here :
https://github.com/Bluebugs/qemu . If anyone has a clue on a proper
direction for the board definition, would be neat.

Also I discovered a few bugs in the JSON file I had that cover SuperH
instruction set. I have updated my git repo
(https://github.com/Bluebugs/sh-insns) with the assumed correct
version from qemu. Maybe someone here has an idea if this is actually
correct :
   sets: "0000000001011000"
   ldc Rm,DBR: "0100mmmm11111010"

This incoherence where also present in http://www.shared-ptr.com/sh_insns.html .
-- 
Cedric BAIL


More information about the J-core mailing list