Posted: Fri Jan 25, 2008 6:49 am
Couldn't you just clear present on the interrupt descriptor for the cpu which doesn't need to handle a specific interrupt
The Place to Start for Operating System Developers
http://f.osdev.org/
I find the MP Floating Pointer Structure in memory, i follow the MP Configuration Table pointer.Laksen wrote:As your computer boots the BSP(boot service processor) has control. Your kernel should get loaded like it's a UP(uniprocessor system). Then you search the SMP or ACPI table for processor entries. If you find more than one then your PC should have multiple cores. Then you choose to boot the AP's. You do this by sending interrupts to the designated AP's local APIC. In this interrupt you tell the AP where it should start. Then you would have two kernel's running so to say. They can essentially be running the same code, and you can access the same memory and by that way talk between the processors.
Code: Select all
00 00 00 11 03 F8 06 00 00 FF FB EB 0F 00 00 00 00 00 00 00
00 00 01 11 01 F8 06 00 00 FF FB EB 0F 00 00 00 00 00 00 00
00 01 00 50 43 49 20 20 20 01 01 50 43 49 20 20 20 01 02 49
Decoded:Jef wrote:Code: Select all
00 00 00 11 03 F8 06 00 00 FF FB EB 0F 00 00 00 00 00 00 00 00 00 01 11 01 F8 06 00 00 FF FB EB 0F 00 00 00 00 00 00 00 00 01 00 50 43 49 20 20 20 01 01 50 43 49 20 20 20 01 02 49
Code: Select all
First entry:
00 = Local APIC entry
00 = Local APIC ID = 0
00 = Local APIC version = 0 (which is extremely unlikely)
11 = CPU flags = Usable AP CPU
03 F8 06 00 = CPU Signature (stepping = 3, model = 0, family = 8)
00 FF FB EB = CPU features
0F 00 00 00 00 00 00 00 = reserved
Second entry:
00 = Local APIC entry
00 = Local APIC ID = 0 (which is wrong because the ID is already used by first entry)
01 = Local APIC version = 0 (which is extremely unlikely)
11 = CPU flags = Usable AP CPU
01 F8 06 00 = CPU Signature (stepping = 1, model = 0, family = 8)
00 FF FB EB = CPU features
0F 00 00 00 00 00 00 00 = reserved
Third entry:
00 = Local APIC entry
01 = Local APIC ID = 1
00 = Local APIC version = 0 (which is extremely unlikely)
50 = CPU flags = unusable AP CPU
43 49 20 20 = CPU Signature (stepping = 3, model = 4, family = 9)
20 01 01 50 = CPU features
43 49 20 20 20 01 02 49 = reserved
Code: Select all
00 00 11 03 F8 06 00 00 FF FB EB 0F 00 00 00 00 00 00 00 00
00 01 11 01 F8 06 00 00 FF FB EB 0F 00 00 00 00 00 00 00 00
01 00 50 43 49 20 20 20 01 01 50 43 49 20 20 20 01 02 49 ??
Code: Select all
First entry:
00 = Local APIC entry
00 = Local APIC ID = 0
00 = Local APIC version = 0x11
03 = CPU flags = Usable BSP CPU
F8 06 00 00 = CPU Signature (stepping = 8, model = F, family = 6)
FF FB EB 0F = CPU features
00 00 00 00 00 00 00 00 = reserved
Second entry:
00 = Local APIC entry
01 = Local APIC ID = 1
00 = Local APIC version = 0x11
01 = CPU flags = Usable AP CPU
F8 06 00 00 = CPU Signature (stepping = 8, model = F, family = 6)
FF FB EB 0F = CPU features
00 00 00 00 00 00 00 00 = reserved
Third entry:
01 = Bus entry
00 = Bus ID = 0
50 43 49 20 20 20 = Bus type string = "PCI "
Fourth entry:
01 = Bus entry
01 = Bus ID = 1
50 43 49 20 20 20 = Bus type string = "PCI "
Fifth entry (truncated):
01 = Bus entry
02 = Bus ID = 2
49 ?? ?? ?? ?? ?? = Bus type string = "I?????"
I made the "decode" you say above, but it was 8:30 am (after 8 hours of programing). I am sure you are right.Brendan wrote:Basically, IMHO, you're starting from the wrong byte of data...
Cheers,
Brendan
Of course there are structures.AJ wrote:Hi,
I've done this before too - remember that your configuration table ends with a reserved block - if you don't build this in to your struct and then use sizeof(configurationtable) to work out where the first entry is, you'll read garbage data.
Cheers,
Adam