Re: Exceptions crash the system
Posted: Mon Aug 17, 2020 10:58 am
The value of eax was 0x258. It's possible that that's a valid selector, but unlikely.
The Place to Start for Operating System Developers
http://f.osdev.org/
I don't know exactly what you're talking about.iansjack wrote:The value of eax was 0x258. It's possible that that's a valid selector, but unlikely.
Your message made me think that the data is not in the right order, so I added __attribute__((packed)) to the gdt_ptr structure and everything worked as it should.Octocontrabass wrote:EAX contains the correct value, but does the memory at that address contain the correct values?
You may also want to read the section titled "Aggregates and Unions" in the System V ABI Intel386 Architecture Processor Supplement.