Page 1 of 1

Where is the Local APIC in Long Mode?

Posted: Fri Nov 25, 2011 8:34 am
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?

Re: Where is the Local APIC in Long Mode?

Posted: Fri Nov 25, 2011 8:58 am
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

Re: Where is the Local APIC in Long Mode?

Posted: Fri Nov 25, 2011 9:07 am
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.

Re: Where is the Local APIC in Long Mode?

Posted: Fri Nov 25, 2011 9:33 am
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:

Re: Where is the Local APIC in Long Mode?

Posted: Fri Nov 25, 2011 9:43 pm
by amd64pager
Thanks for that reply also. :D
So I\O APIC and Local APICs are the same in long mode.

Re: Where is the Local APIC in Long Mode?

Posted: Sat Nov 26, 2011 7:18 am
by turdus
Ask the cpu to tell it's local apic address. It's in MSR 1Bh, and it's a 64 bit address.