Page 1 of 1
APIC logical destination mode mixing
Posted: Sat Dec 31, 2011 2:28 pm
by TudorOS1
First I like to say Happy New Years to anyone looking here.
So, Im making a new project type for visual c++ called "Kernel". It has a kernel stub, a header for a HAL.dll(not related to the hal.dll in windows) and a header for #defines. Its part of the KDK(Kernel Development Kit).
In the HAL there is a function called RedirectInterrupt and Im wondering about Logical Destination Mode. Can I have some local APICs with Logical Flat Mode and some with Logical cluster mode.
PS: Here is something jst for fun
The below sentence is true.
The above sentence is false.
Re: APIC logical destination mode mixing
Posted: Sat Dec 31, 2011 3:36 pm
by Brendan
Hi,
TudorOS1 wrote:Can I have some local APICs with Logical Flat Mode and some with Logical cluster mode.
No.
More specifically, the Destination Format Register in each CPU's local APIC must be configured correctly to match the chipset. If one or more of them (including all of them) are configured incorrectly you get undefined behaviour.
For almost all 80x86 machines the chipset expects "Logical Flat Mode". There were a few (very rare) NUMA machines that used "Logical Cluster Mode" (and had the required "APIC routing" circuitry needed for "Logical Cluster Mode"), but they aren't really worth caring about (partly because they're rare, and partly because they're huge servers purchased for a specific task that doesn't include alternative OSs).
Also note that for newer machines (Nehalem and later) that support x2APIC; when operating in x2APIC mode there is no Destination Format Register and you're forced to use "Logical Cluster Mode".
Cheers,
Brendan
Re: APIC logical destination mode mixing
Posted: Sun Jan 08, 2012 3:13 pm
by TudorOS1
Brendan wrote:No.
Sorry if thats a useless quote to you but it is Brendan's reply to my question. Im adding 2 new functions called SetGlobalLogicalMode and GetGlobalLogicalMode.
Brendan wrote:the Destination Format Register in each CPU's local APIC must be configured correctly to match the chipset.
Thats something I will leave out of the KDK(This is chipset specific)
Brendan wrote:For almost all 80x86 machines the chipset expects "Logical Flat Mode".
Would you mind telling everyone using the KDK that(I might put it in the KDK tutorial).
Brendan wrote:Also note that for newer machines (Nehalem and later) that support x2APIC; when operating in x2APIC mode there is no Destination Format Register and you're forced to use "Logical Cluster Mode".
I don't support x2APIC(yet) so this is irrelavant to me(plus i have Core 2 Duo in my computer so there wont be a x2APIC