Code for 8295A runs well on xAPIC
Posted: Tue Dec 16, 2014 9:03 pm
Hi everyone, I am learning OS development and come across a questsion.
When handling interrupts the book I choose tells me to use 8295A and IDT. I wrote some code according to the book, init 8295A and IDT. The code runs well. (The interrupt can be triggered and the handler is calleld) But the point is I think the code should report error.
The environment is bochs 2.6.7 with Pentium 4 cpu. The cpu uses xAPIC instead of 8295A. So I think the code I wrote for 8295A should not work on the platform, but it does work. I have searched a lot and it seems that they are not compatible.
So why my code for 8295A can run on the xAPIC platform? Does this mean Pentium 4 cpu still have 8295A inside, and how about the newer cpus?
Note: From the Intel manual I know APIC can be disabled but in my code I don't do this and I don't even know what will happen if APIC is disabled. And the code I wrote is compiled into a com file running on freedos since I have not written a complete boot loader. The book tells me right now it is OK to treat it as a com file on freedos.
Sorry if the question is stupid and thanks everyone in advance.
When handling interrupts the book I choose tells me to use 8295A and IDT. I wrote some code according to the book, init 8295A and IDT. The code runs well. (The interrupt can be triggered and the handler is calleld) But the point is I think the code should report error.
The environment is bochs 2.6.7 with Pentium 4 cpu. The cpu uses xAPIC instead of 8295A. So I think the code I wrote for 8295A should not work on the platform, but it does work. I have searched a lot and it seems that they are not compatible.
So why my code for 8295A can run on the xAPIC platform? Does this mean Pentium 4 cpu still have 8295A inside, and how about the newer cpus?
Note: From the Intel manual I know APIC can be disabled but in my code I don't do this and I don't even know what will happen if APIC is disabled. And the code I wrote is compiled into a com file running on freedos since I have not written a complete boot loader. The book tells me right now it is OK to treat it as a com file on freedos.
Sorry if the question is stupid and thanks everyone in advance.