My Haiku RISC-V port progress

haiku_loader.riscv

17 Likes

Implemented simple ATA PIO mode driver in haiku_loader.riscv and loading progressed a bit in RVVM:

Welcome to kernel debugger output!
Haiku revision: hrev55942+45+dirty, debug level: 2
arch_int_init()
  CPU 0:
    hartId: 0
    plicContext: 0
reserve_io_interrupt_vectors: reserved 128 vectors starting from 0
PANIC: page fault with interrupts disabled
Welcome to Kernel Debugging Land...
Thread 0 "" running on CPU 0
Stack:
FP: 0xffffffc00062c970
FP: 0xffffffc00062c990, PC: 0xffffffc00015338a kdebug>
20 Likes

This would be a nice Haiku machine:

4 Likes

They look super cool, but someone needs to tell the devterm guys about hinges. And ergonomics.

1 Like

I didnā€™t realise there was a market for RISC-V devkits with thermal printers :rofl:

Instagram/Kickstarter driven development, I guess? If it looks cool, people will buy it. Doesnā€™t matter if itā€™s usable for anything.

(more seriously, itā€™s based on late 80s pocket computers like the Amstrad NC100, Z88 or the TRS-80 equivalent of that. But these arenā€™t really convenient machines to useā€¦).

1 Like

Why it use a fan?

Maybe to cool the ARM64 processor. Not all models use RISC-V:

This might require the ARM ports to progress further first. The RISC-V port by comparison is much further ahead.

1 Like

Yeah, I have an nc100 and the screen angle makes it basically unusableā€¦ Which is a great shame. Theres a reason that form factor died! If they just made the screen able to tilt upwards a bit it would make a massive difference.

1 Like

Difficulty radiating heat out of a enclosed box with no circulation ?

1 Like

Progressed to ā€œdid not find any boot partitions!ā€ on RVVM. Fixed some bug in haiku_loader.riscv like enabling FPU before calling dprintf (it use FPU for print floating point values) and fixing ATA PIO driver.

Also implemented initial native Haiku GUI backend for RVVM (Xlibe was used before).

17 Likes

I managed to run Haiku desktop on RVVM with haiku_loader.riscv. Keyboard and moue input is not working for now.

One of problems is that MMIO PCI BAR registers are not supported by Haiku ATA driver, I currently added MMIO support by quick hacks. ATA driver store 16 bit register addresses in ata_adapter_channel_info structure that is used in multiple driver add-ons so changing it to support 32 bit MMIO registers will break API.

27 Likes

Did you have to make a lot of changes to RVVM to get it to run on Haiku and with a Haiku guest? It would be cool to upstream that, especially since the RVVM author mentions Haiku in the readme.

Currently Haiku can run in RVVM without RVVM changes, but Haiku side implementation is incomplete. I added Haiku GUI backed to RVVM so it can be used on Haiku host without xlib.

7 Likes

Experiments with PS/2 bus in Mini OS.

I also published source code of Mini OS: GitHub - X547/Mini-OS: Simple OS for RISC-V architecture. Note that Mini OS is basically a testing playground and it is not intended for actual use.

10 Likes

Can you spin up a kernel add-on accelerant for the ata differences ? maybe just move these changes to 64b haiku ?

1 Like

Is there a known list of compatible boards ??? Iā€™m working on porting machine kit to haiku x86-64, but when Iā€™m done Iā€™m working on embedded boards next.

I may need help with porting the hal, thankfully linuxcnc and machine kit share that.

You mean this one? GitHub - machinekit/machinekit-hal: Universal framework for machine control based on Hardware Abstraction Layer principle