[hatari-devel] Wrong stackframe for non-autovector IRQ and CPU >= 68020 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: Hatari Development <hatari-devel@xxxxxxxxxxxxxxxxxxx>
- Subject: [hatari-devel] Wrong stackframe for non-autovector IRQ and CPU >= 68020
- From: Christian Zietz <czietz@xxxxxxx>
- Date: Sun, 5 May 2019 14:34:38 +0200
- Autocrypt: addr=czietz@xxxxxxx; prefer-encrypt=mutual; keydata= mQGiBDdn2AURBADksdHVyN55nv0lx4qGx+GQMrbo7zs7lSkAfhkgmgqp84xUeUiWI/kj1on/ wxkmJ96Yzt0ktDbZYM0C9Z66M3rLfXE1vXALHhegeMuOy/tVWybcohRrhfB7tmANTESJOZke 0lZZ59DcIfFoqLYErb6qX8nLPYnOv6sFubxnhuF9QQCg/3GaIR1sVK9Xq+b4B9BtVxd7cHMD /i2hAEOX3WY3K7PNZJziYF54uBbGiVS88W41l1RARcaeogIZcAKpFH3on+Tf60fAC85MCp17 QIeP44hj4Cf46B+UTVhf3EFG4IOsLRxUonpt7dKO8txsKFN/OFsjlPOuDyg7XMpEWkTWZetm HC9/0pcApIXSDnggde4T8AX6nn/+A/4hBOhPxuvkV7Uw/ebLYwXrLo2vt9OvvC1VfeywNseq PIkFX/+n/+niBS+Cb2ess2SVQNKJ9vP5+vBxg5AMfQXqk1ONldGQ/ARHmL6+Iuo47mO51e7R i691hq13wHUvyKh1AN7fpKI2m3YW55XEQ+3iTMIZcqfjr6xYgG8GJTppdbQgQ2hyaXN0aWFu IFppZXR6IDxjemlldHpAZ214Lm5ldD6IYwQQEQIAIwIZAQIeAQIXgAUCVGD5IgcLCQgHAwIB BhUIAgkKCwQWAgMBAAoJEFLLl/ZtoCXKubQAoIHNaurSMQB8MHDoTk3B7WHk2ApoAJ0egA8q aNoVj0kU4+OjeGzFiSHMOrkCDQQ3Z9gFEAgA9kJXtwh/CBdyorrWqULzBej5UxE5T7bxbrlL OCDaAadWoxTpj0BV89AHxstDqZSt90xkhkn4DIO9ZekX1KHTUPj1WV/cdlJPPT2N286Z4VeS Wc39uK50T8X8dryDxUcwYc58yWb/Ffm7/ZFexwGq01uejaClcjrUGvC/RgBYK+X0iP1YTknb zSC0neSRBzZrM2w4DUUdD3yIsxx8Wy2O9vPJI8BD8KVbGI2Ou1WMuF040zT9fBdXQ6MdGGze MyEstSr/POGxKUAYEY18hKcKctaGxAMZyAcpesqVDNmWn6vQClCbAkbTCD1mpF1Bn5x8vYlL IhkmuquiXsNV6TILOwACAgf+JhucyZDzOWGht9e0U71kC2bxIOr4iz+ADd3sxS62okrocHXp B9zYDhmJ74BFfC7xMd9bwWNj7YR0yiUdOzY27OcXcEkVmhVBW6AqxuRAKfmYMvvnyR5z5OP6 vg2YSzgOmooc5vequa5YIjLmFkuRlglLiEgdW9gPBFtirNqxOtAqSxEcRrblSn8JBEU51Ii6 SVVuo1nXOP11g8rVO4YvEED89pHT4jgLZu4th1N+mDumNZlqyUIxZ4tQyw3X2OWvEbKWGn2j h0ZywaomUTpVA+wiwxndawP40oowFYT8LNeLtfZyq6xPpQmT2DaNhP4gdy3qkDfnmXkc2zFM YukXo4g/AwUYN2fYBVLLl/ZtoCXKEQKA3QCfTJstYzXurbt9ZnoTU3SFQQmG0/wAoNX91nWM nsS7JOepPAzOUoke4AIi
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1557059684; bh=AafDA4xpgzOru4ic5gI3kg96Wjs75aoLD9aSW9X1MWk=; h=X-UI-Sender-Class:To:From:Subject:Date; b=SiopoUpW9OoiV9sCMvCQQN/EFW2ayNhFn/VgI8C5nyb+S3AS4OUlZZmKcouWAq6F1 0+4j40jyfYxKAC/BX+69fNf28/quYJkC6Jb8ZQpXeanleegN6TewefBGti9kTBOT08 X5aa02dnWo7vPk8m6vKBw91IrxCItGv858Ori/Dw=
- Openpgp: preference=signencrypt
Hi,
Hatari (or rather the CPU emulation) puts a wrong exception frame on the
stack for non-autovector interrupts (such as MFP, SCC) when a 68020 or
higher CPU is selected. Steps to reproduce: Boot any TOS (that supports
a 68020 or higher), break into the debugger and place a break point on
the handler for MFP Timer C. The vector offset is 0x114:
> m $114
00000114: 00 e0 08 b6 00 e0 0d 6c 00 e0 07 5a 00 e0 07 5a
> a $e008b6
> c
[...]
1. CPU breakpoint condition(s) matched 1 times.
pc = $e008b6
[...]
> m "a7"
m "a7"
- 'a7' -> $a298
0000A298: 23 04 00 e1 fe c8 *00* *78* 00 00 01 8f 00 00 00 00
The two bytes I marked with asterisks are supposed to contain the vector
offset, i.e., 0x114, but the contain the offset to the auto-vector
interrupt level 6 (0x078) instead.
Interestingly, the stack frame is correct for 68010 CPUs or when I use a
68030 including MMU emulation.
Regards
Christian