Commit 0352142
committed
i386: valid opcodes for 386, 486 and Pentium
I discovered accidentally while trying to run the kernel in an old
machine equipied with an Intel Pentium MMX that the kernel currently
does not boot on anything lower than i686. This is a regression because
trying to run Build 134 on the same machine boots fine.
Once I read the docs of QEMU, I set the machine type to 486 and I could
reproduce the bug in QEMU. It does not have a profile for 386, so
486 will be the lowest architecture that I can debug in the time being.
After bisecting different commits of the code and using the gdb
integration for QEMU, I found that commit 59afb6c (vtcon: virtual
multiple consoles, 2022-01-19) causes an 0x06 Invalid Opcode Exception
when the following code is executed in anything lower than a Pentium II:
fg = i < 3 ? 0x1 : 0x7;
(Line 62 of kernel/device/vtcon/vtcon.c for that specific commit).
Switching clang to a lower profile using the -march flag fixes this.
I've set the march to i386, despite QEMU is only able to emulate 486 and
my retro test hardware is a Pentium MMX (P5-i586).1 parent 4f4df49 commit 0352142
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments