Page 1 of 1

I/O APIC read at address 0x0000fec00000 spans 32-boundary

Posted: Mon Apr 03, 2017 3:11 am
by Js2xxx
I let my OS enter 64-bit mode and I mapped I/O APIC at 0xFFFFFF8000800000. However, when I try to read it in 64-bit mode, bochs shouted a message like the topic and a #PF exception occurred.
What's the problem? I guess:

The access to I/O APIC can't span a dword.
Or
The virtual address can't be beyond 4G virtual memory space.

Are those right, or are there any other causes? How to solve the problem?
Thanks for any help.

Re: I/O APIC read at address 0x0000fec00000 spans 32-boundar

Posted: Mon Apr 03, 2017 5:50 am
by Octocontrabass
Js2xxx wrote:The access to I/O APIC can't span a dword.
This is why you see an error from the IOAPIC module. The cause of the page fault is probably something else.

Re: I/O APIC read at address 0x0000fec00000 spans 32-boundar

Posted: Mon Apr 03, 2017 7:27 am
by Js2xxx
Octocontrabass wrote:This is why you see an error from the IOAPIC module.
Well, you may be right. But later when I'm trying to map it at the original address, it works well.
Anyway thanks.

EDIT:Wait. I use it in my loader and it's fixed, but I use it in my kernel it fails. What's the matter...??? Maybe there's another cause. My loader is a pure binary file and my kernel is an ELF file.
EDIT:After a long check, I find that after I change the page tables, it fails. Why though I remap it anywhere, it causes the failure?