]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/m68k: don't set SSW ATC bit for physical bus errors
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mon, 8 Mar 2021 12:11:53 +0000 (12:11 +0000)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 11 Mar 2021 20:12:32 +0000 (21:12 +0100)
commitd6cbd8f7a19e6f0fd22a598aad992c4913f481f2
treefd17ab2c0201138c80b974143eb622365c65ceb5
parent6abcec36741e589c855084e59195fc3454bf4be6
target/m68k: don't set SSW ATC bit for physical bus errors

If a NuBus slot doesn't contain a card, the Quadra hardware generates a physical
bus error if the CPU attempts to access the slot address space. Both Linux and
MacOS use a separate bus error handler during NuBus accesses in order to detect
and recover when addressing empty slots.

According to the MC68040 users manual the ATC bit of the SSW is used to
distinguish between ATC faults and physical bus errors. MacOS specifically checks
the stack frame generated by a NuBus error and panics if the SSW ATC bit is set.

Update m68k_cpu_transaction_failed() so that the SSW ATC bit is not set if the
memory API returns MEMTX_DECODE_ERROR which will be used to indicate that an
access to an empty NuBus slot occurred.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210308121155.2476-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
target/m68k/op_helper.c