ARM64 Port Status

How ironic would be if Haiku would reach Desktop …

on an ARM based Apple SoC - M1 - at the first time …

As it seems the new contributor - Owen Anderson - does coding on an M1 Max hardware (a laptop ? or an Apple Studio ?) working on ARM64 UEFI boot.

  • Boots all the way into the kernel (and dies in the kernel
    debugger) on M1 Max hardware under virtualization.

… as it turns out of his remark in the latest patch.

1 Like

There is asahiti linux for apple m processors, so the hardware is kind of documented

1 Like

Apple arm macbooks do not use efi. So that doesn’t help at all.

Yepp, I saw - on YT - some linux distro was developed for - if I know/remember well - so then Asahi Linux.

TIL Apple doesn’t provide EFI natively by the Apple Silicon firmware but Asahi Linux does use it via U-Boot. Not sure how’s that helpful right now for our ARM64 port, but if we ever target Apple Silicon machines that will be the way to go.

4 Likes

Ahoy @VoloDroid ,

If you read my post carefully I’written that ARM64 Haiku porting effort / development happens under virtualization – however that VM is running on an M1 Max Apple Silicon. So not directly - right now.

Well, for EFI is supported or not on Apple Silicon - I do not know.
However this ARM64 port - rolling over by Owen - can target general ARM64 install, so I mean any 64 bit ARM SoC or motherboard which ones has potentially newer - so UEFI - firmware …
Also I had not dove deep into ARM64 boot possibilities, so I had not discovered/investigated previously all the exact firmwares and loaders - this way I just wrote earlier what I’ve red on Gerrit’ log tab - under hrev57994 :

hrev57994
arm64: Fix cache enable/disable during bootload

  • Fix crash in arch_mmu_generate_post_efi_page_tables due to MMU being disabled too early. Fixed by only disabling the cache/MMU while TTBRx is being written.
  • Disable I-cache while TTBRx is being written. This mirrors the
    behavior in u-boot.
  • With these fixes, UEFI boot now reaches ExitBootServices before crashing.

Of course I was not really precise as the fixes improvements targeted memory related - loader and OS - functions … what I could shell out from the notes/remarks given to the patch (look above)…

By the way, additional , memory management patches were merged

	Commit message (Expand)											Author				Age		Lines
* 	arm64: Clean up memory GetMemoryAttr.hrev58028				Owen Anderson	19 hours	-24/+45
* 	arm64: Full implementation of MakeTable							Owen Anderson	19 hours	-36/+42
* 	arm64: Implement address space switching							Owen Anderson	19 hours	-5/+111
* 	arm64: Implement translation map freeing							Owen Anderson	19 hours	-16/+54
* 	arm64: Create an empty page table for use 
	       as a placeholder page table.											Owen Anderson	19 hours	-0/+30
* 	arm64: Fix translation map setup.hrev58017							Owen Anderson	3 days	-8/+19
* 	arm64: Fix physical page memcpy operations.hrev58012			Owen Anderson	5 days	-10/+14
* 	kernel/arm64: Give bitfield padding fields names.hrev58009		Augustin Cavalier	5 days	-41/+41
* 	arm64: Small fixes extracted from larger MMU fixup.hrev58005	Owen Anderson	6 days	-0/+8
* 	arm64: Remember to switch address spaces on context switch.	Owen Anderson	6 days	-0/+2
* 	arm64: Disable timer when not in use.hrev58003					Owen Anderson	6 days	-6/+9
* 	kernel/arm64: Use virtual rather than physical timers.				Owen Anderson	6 days	-7/+10


So … development is under progress in a VM actually, I assume Owen has deep knowledge of ARM environment ( if you read the comments in the code :wink: … sorry I may not understand C++, but english : yes … and I never denied - I’m a curious person, of a kind of eccentric :smiley: )

Also seems provided patches are systematically connects each other.

May @tqh, or @pulkomandy, who committed more patches …
or at least @waddlesplash - in the next monthly report -
will reveal more precisely what happens actually –
aaaand what most interesting for us …

Till which stages the boot process is reaching with these latest development efforts ?

Anyway,
soon end of month …
there will be a lot to include in the next report …
→ R1B5 may finalized until then
→ ARM64 port is beeing progressed
→ there are PPC cross build efforts
→ May Risc-V goes into (Haiku way) standardized and will be starting to work on to fit into Haiku regular infrastructure ?
( finally at least building downloadable - nightly or snapshot - images, as for x86 architectures - I can imagine a lot to resolve till it appears on Haiku download page)

Exciting times right now !..

:nerd_face:

EDIT :
fixed typos and “erased” parts of sentences
by my palm and the touchpad

2 Likes

There will be announcements when there is something to show.

“Look! It crashes, but in a different way than before!” is not very exciting, except for the person who found and fixed a bug.

The work so far is in rather low level things that happen early in the kernel initialization. Maybe when we have some of the bootsplash icons lighting up, it will start to become interesting.

10 Likes

Just to follow up on the topic. Here someone got rEFInd running on Apple Silicon MacBook:
https://www.reddit.com/r/mac/comments/1hg7uf1/i_got_refind_on_my_macbook_air_m1_2020/

2 Likes