Port-mips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

NetBSD/pmax 11_BETA and current kernel fail to boot on gxemul (32 bit vs 64 bit?)



Testing with emulators/gxemul

gxemul -e 3max -X -d NetBSD-{foo}-pmax.iso

- NetBSD-9.4 release boots fine
- NetBSD-10.1 fails with "No ELF header", but netbsd-10.1_STABLE works
fine, so good there

- NetBSD-11_BETA - starts to load kernel then stops with "attempt to
execute a 64-bit instruction on an emulated 32-bit processor;
pc=0x80007f10"
- NetBSD-11.99.4 (HEAD) - same as NetBSD-11_BETA

Taking a quick look at the differences between netbsd-10 and netbsd-11:

- The only difference between "gcc -Q --help=target" is a newly
enabled "-munaligned-access" which is enabled by default in gcc 12, so
no obvious changed default

- both boot.pmax and the built netbsd kernels are reported as "ELF
32-bit LSB executable, MIPS, MIPS-I version 1 (SYSV), statically
linked [...]

- copying the netbsd-10 built boot.pmax into a NetBSD-11 ISO gives the
same error (it shows "NetBSD/pmax 10.1_STABLE Secondary Bootstrap" so
reasonably confident it is taking effect)

- copying distrib/pmax/instkernel/obj/netbsd-INSTALL.gz from a
netbsd-10 build into netbsd-11 and running "./build.sh -U -j 22 -m
pmax -u iso-image" to rebuild the iso image gives a bootable iso - so
it looks like the NetBSD kernel may be unconditionally executing a 64
bit instruction which chokes on an (emulated) R3000.

- There are no obvious candidate changes in sys/arch/pmax (to my
non-mips eyes), sys/arch/mips/include/lwp_private.h references some
mips32r2, but it is ifdeffed out....

#if 1
        // For some reason the syscall is much faster than
        // emulating rdhwr $3,$29 on a CN50xx
        "addiu $2,$0,316; syscall; nop; move %[__tcb],$2"
#else
        ".set push"
        ";.set mips32r2"
        ";.p2align 4"
        ";ssnop"
        ";rdhwr $3,$29"
        ";ssnop"
        ";move %0,$3"
        ";.set pop"
#endif


Anyone have any thoughts?

Thanks

David


Home | Main Index | Thread Index | Old Index