GSoC2022: ARM port and device tree support

Hello everyone,

I am a student and I want to try the ARM port and device tree support of GSoC2022 Haiku.

I looked at the mission description and related information, and there are some questions:

  1. The ARM means arm and arm64(aarch64) or just arm?

  2. Is it ok to only use QEMU for testing? I do not have rpi3 for arm.

  3. The port status shows that arm/arm64 completion is relatively low, so how to test my work? Is it possible to just print the information provided by fdt in the kernel?

I am reading the source code, and if there is a question will be put forward here, thanks for help!

@PulkoMandy @kallisti5

6 Likes

Hello,

It can be either 32bit or 64bit ARM, both are work in progress. @davidkaroly @tqh and @oruizdorantes also recently put some work into them and may have some info as well.

I think it’s fine to use QEMU to start with. It provides an easier platform to debug things, and can be configured to emulate a lot of different hardware.

To start with this project idea, I guess the best thing to do is:

  • Decide if you want to work on 32 or 64bit ARM first
  • Make sure you can build the corresponding version of Haiku and boot it in QEMU
  • Check how far it boots (at the moment neither of these run well enough to give you a GUI or even a shell)
  • Set up a plan for what needs to be worked on from there, and what can or can’t easily be tested

The first step will indeed be checking that the kernel can properly find the device tree (passed by the bootloader). Then, the main task would be adjusting device drivers to scan for devices in the FDT, in addition to the PCI bus.

On ARM64 it’s also possible that some devices will be discoverable from ACPI.

If the ARM ports are limiting the testing, and you want to focus on the FDT part of the project, working from the RISC-V or even the x86 port (32 or 64bit) is also possible. For example, on x86, we could use an FDT to represent all the legacy ISA devices (serial port, printer port, timer…) of the PC architecture which are currently all hardcoded.

7 Likes

ARM32 port is progressed quite far, you can see progress in this topic. ARM64 (AARCH64) port is still in early stage, progress topic.

I implemented basic FDT support during my RISC-V port work. FDT is integrated with Haiku kernel device manager and FDT device drivers (mostly VirtIO related) are automatically loaded.

8 Likes

Hi x512,

Thanks for your reply and I have been selected to participate in GSoC 2022 fortunately.

Here is my blog, please comment if you have any questions.

Thank you!

8 Likes