a loose pile of links, notes, and things worth keeping.
< back
QEMU/SPARC64 on emulated T1: VIS capability mask

isainfo -v before and after writing the VIS bits into the capability mask I’m continuing to test my T1 QEMU firmware build ahead of its GitHub release, now across 4x GCC versions (13-16) and 6x Sun/Oracle Studio releases (11 to 12.6).

The hard part was getting 20-year-old code to build with a modern GNU toolchain.

But here is the funny part: VIS, the Visual Instruction Set, roughly the SPARC counterpart of MMX.

Oracle Developer Studio 12.5 and 12.6 won’t even start on the emulated T1: their cc is tagged as requiring VIS, and ld.so.1 refuses it:

bash-3.2# /opt/developerstudio12.6/bin/cc
ld.so.1: cc: fatal: /opt/developerstudio12.6/bin/cc: hardware capability (CA_SUNW_HW_1) unsupported: 0x20  [ VIS ]
Killed

The real T1 implements only a subset of VIS in hardware (the rest traps), while QEMU’s SPARC64 model executes it all. So the block isn’t the emulator, it’s the guest’s capability mask.

Write the VIS bits into it with mdb -kw and isainfo -v lists vis vis2 at once, on a running system:

bash-3.2# echo "auxv_cap32_hw/Z 0xeb00000000" | mdb -kw
auxv_cap32_hw:  0x8b00000000            =       0xeb00000000
bash-3.2# echo "auxv_cap_hw/Z 0xe000000000" | mdb -kw
auxv_cap_hw:    0x8000000000            =       0xe000000000
bash-3.2# isainfo -v
64-bit sparcv9 applications
        asi_blk_init vis2 vis
32-bit sparc applications
        asi_blk_init vis2 vis v8plus div32 mul32

cc then compiles and runs, including real VIS code :)

Caveat: this is a declared capability, not real T1 silicon behaviour.

PS: the 5 MHz in the prtdiag output is a declared capability too, not a real speed.