Stichting-MINIX-Research-Foundation / minix

Official MINIX sources - Automatically replicated from gerrit.minix3.org
Other
2.99k stars 969 forks source link

Do i386 CPUs push an error code for #AC (alignment check) interruptions? #354

Open jboillot opened 7 months ago

jboillot commented 7 months ago

Hello,

I am new to working with OSes, so sorry in advance if my question is dumb. While looking for examples of setup of IDTs I found out that Minix is considering that, for i386 cpu, the #AC interruption is not associated with an error code that is pushed on the stack: https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/4db99f4012570a577414fe2a43697b2f239b699e/minix/kernel/arch/i386/mpx.S#L579 However, both the IA-32 Manual (Section 6.3.1. Table 6-1), Linux https://github.com/torvalds/linux/blob/4f5e5092fdbf5cec6bedc19fbe69cce4f5f08372/arch/x86/kernel/traps.c#L293, and OSdev (https://wiki.osdev.org/Exceptions) agree on the fact that an error code is indeed pushed on the stack. So, my question is: who is right? I guess it does not matter, but currently I can't find the reason why. Would you have any idea of the reason?

Have a great day!