embeddedgo / go

The Go programming language with support for bare-matal programing
https://embeddedgo.github.io
BSD 3-Clause "New" or "Revised" License
76 stars 5 forks source link

Support for GOARCH=mips64 #8

Closed clktmr closed 2 months ago

clktmr commented 2 months ago

Follow up to #6

Changes since last push:

Tested with latest n64 module ~(cd8534ed58561a61701f3305f5ea2644b795eb31)~ (c0dccb15ff67961f321c5ebeae119359c9e33521)

clktmr commented 2 months ago

PR7 "Fixes from n64 branch" can be probably removed because this one contains the same fixes.

I removed these commits from this branch. I think it's worth having the eventual merge only contain mips64 related changes.

To get mips64 support on the same level as the other archs, support for setprivlevel syscall and noostest need to be added. Anything else that I missed?

michalderkacz commented 2 months ago

To get mips64 support on the same level as the other archs, support for setprivlevel syscall and noostest need to be added. Anything else that I missed?

Hmm... I'm unsure. It will come out in the wash.

Just merged this PR locally and want to test it against emulated linux/mips64. I did some research and it looks like there is no easy to find any big-endian MIPS64 Linux distro that may run on Qemu. I ended up building the openwrt-malta-be64-vmlinux-initramfs.elf image right now, hoping that it will start with qemu-system-mips64 -cpu R4000. What should I try next if the R4000 will be incompatible with this OpenWRT image?

MIPS '4Kc'
MIPS '4Km'
MIPS '4KEcR1'
MIPS '4KEmR1'
MIPS '4KEc'
MIPS '4KEm'
MIPS '24Kc'
MIPS '24KEc'
MIPS '24Kf'
MIPS '34Kf'
MIPS '74Kf'
MIPS 'M14K'
MIPS 'M14Kc'
MIPS 'P5600'
MIPS 'mips32r6-generic'
MIPS 'I7200'
MIPS 'R4000'
MIPS 'VR5432'
MIPS '5Kc'
MIPS '5Kf'
MIPS '20Kc'
MIPS 'MIPS64R2-generic'
MIPS '5KEc'
MIPS '5KEf'
MIPS 'I6400'
MIPS 'I6500'
MIPS 'Loongson-2E'
MIPS 'Loongson-2F'
MIPS 'Loongson-3A1000'
MIPS 'Loongson-3A4000'
MIPS 'mips64dspr2'
MIPS 'Octeon68XX'
michalderkacz commented 2 months ago

Some files in this PR have no standard Go copyright header. Please add it.

Anything else that I missed?

MMIO intrinsics came to my mind but they are just optimization. Should have their own PR.

michalderkacz commented 2 months ago

Go tests pass on linux/mips64.