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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Js2xxx
Member
Member
Posts: 48
Joined: Sat Dec 31, 2016 1:43 am
Libera.chat IRC: wrgq
Location: China

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

Post 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.
Attachments
The screenshot.
The screenshot.
Doing steadfastly, or doing nil.
Octocontrabass
Member
Member
Posts: 5587
Joined: Mon Mar 25, 2013 7:01 pm

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

Post 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.
User avatar
Js2xxx
Member
Member
Posts: 48
Joined: Sat Dec 31, 2016 1:43 am
Libera.chat IRC: wrgq
Location: China

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

Post 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?
Doing steadfastly, or doing nil.
Post Reply