Opened 3 years ago

Closed 3 years ago

#17188 closed bug (no change required)

[riscv] Consider Removing M-mode bootloader

Reported by: waddlesplash Owned by: kallisti5
Priority: normal Milestone: Unscheduled
Component: System Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: riscv64

Description

As discussed on Gerrit, the forums, and IRC, it seems there is not really much value to having an M-mode bootloader. The one major stated goal of it is a way to boot Haiku totally independent of third-party code, but geist points out that this would be much better achieved by writing an SBI boot platform, and then just writing our own SBI loader.

However, at least at present, it seems there is not a whole lot of reason to be so independent. It places a larger maintenance burden on us for little benefit, and Linux, BSD, etc. all use SBI machine platforms instead of rolling their own code. So, for now, we should probably drop the M-mode bootloader altogether.

Change History (7)

comment:1 by kallisti5, 3 years ago

https://dev.haiku-os.org/ticket/17190 is tracking something similar that should happen on the arm/arm64 side.

comment:2 by ahwayakchih, 3 years ago

I do not know much about technical merits of this stuff so i'll just ask.

Why remove something that allows THE ONLY developer currently making huge progress on RISC-V port to quickly iterate over changes/fixes?

If "SBI boot platform" is that much better solution in the long run, why not write it FIRST, and THEN vote to remove "M-mode bootloader" (but only if there's no one there to maintain it!)?

comment:3 by tqh, 3 years ago

I don't understand why removal is necessary or why repeating the same discussion here. At some later point the riscv loader can be transitioned to SBI if wanted/needed. I honestly think that this behviour is getting really bad, and wish waddlesplash focus more on his own contributions than starting arguments with everyone, including me.

comment:4 by kim1963, 3 years ago

I don't understand why removal is necessary.

comment:5 by leavengood, 3 years ago

Summary: [riscv] Remove M-mode bootloader[riscv] Consider Removing M-mode bootloader

First I think the brigading from the forums to vote this ticket down is not needed.

With that said I agree that it seems way too early to post such a ticket and let's see how it goes with the port. I've modified the summary to be a bit less direct.

The current bootloader is written and working. X512 probably has enough sense to know when it might be time to abandon the M-mode bootloader if maintaining it becomes too much work. He is already looking at RISC-V EDK2 port, which has support for the Unleashed (the last RISC-V desktop computer board) so support for Unmatched may come soon. But it isn't there yet so there isn't much reason to worry about it yet.

comment:7 by pulkomandy, 3 years ago

Resolution: no change required
Status: assignedclosed

I don't understand whywaddlesplash is on apersonal quest to remove this bootloader from the sourcecode. It does not get in the way of anything and at l ast one developer thinks it is usefulin one way or another. That's all I need to know.

I think everybody already agreed that it won't be used on real hardware and will not be part of released images and is used only for testing.

Efi booting is already supported, so it's not like we are making our lives more complicated here. The machine mode bootloader is not and will not be the only available option, and will not be the main option.

Note: See TracTickets for help on using tickets.