Where is the Local APIC in Long Mode?

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
amd64pager
Member
Member
Posts: 73
Joined: Fri Nov 25, 2011 8:27 am
Location: In the 266 squadron of the RFC,near Maranique in the Southern Front in the WW1

Where is the Local APIC in Long Mode?

Post by amd64pager »

I am developing a 64-bit OS.I wanted to implement multiprocessing but where will the Local and I\O APIC be?
I have read the Intel documents for it's 32-bit APICs,but in 64-bit mode it is the same or it is different?
It's surprising what the semiconductor industry's definition of macro is and what the CS description is.
User avatar
davispuh
Posts: 9
Joined: Sat Oct 15, 2011 5:55 am

Re: Where is the Local APIC in Long Mode?

Post by davispuh »

it will be in same location, usually
  • Local APIC: FEE0 0000h
  • I/O APIC: FEC0 0000h
but I suggest parse MADT (Multiple APIC Description Table) from ACPI spec and get address from there, because theoretically it can be elsewhere also PC can have several I/O APICs
I Love Life because Life Loves Me!
User avatar
amd64pager
Member
Member
Posts: 73
Joined: Fri Nov 25, 2011 8:27 am
Location: In the 266 squadron of the RFC,near Maranique in the Southern Front in the WW1

Re: Where is the Local APIC in Long Mode?

Post by amd64pager »

Thanks for the reply. :D
The Local APIC has pointers to ISRs(Interrupt Service Routines), but will that still be 32-bit or will it be extended? #-o
You can include references to the AMD64 Architecture Programmers Guide Volume 2.
It's surprising what the semiconductor industry's definition of macro is and what the CS description is.
User avatar
davispuh
Posts: 9
Joined: Sat Oct 15, 2011 5:55 am

Re: Where is the Local APIC in Long Mode?

Post by davispuh »

I think you've misunderstood something :?
Local APIC isn't related to ISRs
IDT (Interrupt Descriptor Table) it contains pointers to ISRs and IDT structure changes in long mode so it can contain 64-bit pointers
IDTR specifies size and location to IDT


I haven't read AMD manuals, just Intel (because all my PCs have only Intel CPUs)
anyway:
I Love Life because Life Loves Me!
User avatar
amd64pager
Member
Member
Posts: 73
Joined: Fri Nov 25, 2011 8:27 am
Location: In the 266 squadron of the RFC,near Maranique in the Southern Front in the WW1

Re: Where is the Local APIC in Long Mode?

Post by amd64pager »

Thanks for that reply also. :D
So I\O APIC and Local APICs are the same in long mode.
It's surprising what the semiconductor industry's definition of macro is and what the CS description is.
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: Where is the Local APIC in Long Mode?

Post by turdus »

Ask the cpu to tell it's local apic address. It's in MSR 1Bh, and it's a 64 bit address.
Post Reply