Page 1 of 1
Multicore question
Posted: Fri May 15, 2009 2:52 pm
by z0rr0
I am adding multicore support to my Os and when i am reading ACPI table , in the "Acpi Madt Processor" structure , some cores (not all) has the CPU_FLAG_ENABLED down , and the Apicid is zero .
The AcpiMadtProcessor structure is :
Code: Select all
AcpiMadtProcessor = packed record
Header: AcpiMadtEntry;
AcpiId: byte;
ApicId: byte;
Flags: dword;
end;
That 's an standart ? or maybe i have some problems in detection's procedure .
Saludos.
Re: Multicore question
Posted: Fri May 15, 2009 3:33 pm
by Hyperdrive
z0rr0 wrote:I am adding multicore support to my Os and when i am reading ACPI table , in the "Acpi Madt Processor" structure , some cores (not all) has the CPU_FLAG_ENABLED down , and the Apicid is zero .
Well, this isn't necessarily an error. Are all processors (cores), that you have, reported? (If you have a dual core system, are two enabled processors reported? If you have a quad core system, are four enabled processors reported? ...) If yes, everything is fine.
If not, there are three possibilities:
(1) Some processors are really defective (hardware failure).
(2) The BIOS reports wrong tables.
(3) Your code is broken.
I think (3) is the most likely of these...
--TS
Re: Multicore question
Posted: Fri May 15, 2009 4:18 pm
by quok
Hyperdrive wrote:z0rr0 wrote:I am adding multicore support to my Os and when i am reading ACPI table , in the "Acpi Madt Processor" structure , some cores (not all) has the CPU_FLAG_ENABLED down , and the Apicid is zero .
Well, this isn't necessarily an error. Are all processors (cores), that you have, reported? (If you have a dual core system, are two enabled processors reported? If you have a quad core system, are four enabled processors reported? ...) If yes, everything is fine.
If not, there are three possibilities:
(1) Some processors are really defective (hardware failure).
(2) The BIOS reports wrong tables.
(3) Your code is broken.
I think (3) is the most likely of these...
--TS
In this case I doubt the APIC (it's not really MADT) tables are truly broken. The ACPI standard allows for a BIOS to contain a statically sized structure that reports the present CPUs as well as contain unused entries. This allows a system that can contain a maximum of 4 processors to always have a table properly sized for those 4 processors, even if only 2 are really present. The other two entries will simply not have the enabled flag set and should be ignored.
Re: Multicore question
Posted: Fri May 15, 2009 6:05 pm
by Laksen
Your code is broken. You have multiple fields with the same name in your record structure which doesn't even make sense
You first have the generic header, then you have the LAPIC address and MADT table flags. Both dwords. Then after that, you have all entries, which are variable sized depending on a little identifier/size in the front of each.
Re: Multicore question
Posted: Fri May 15, 2009 6:17 pm
by z0rr0
Hyperdrive wrote:z0rr0 wrote:I am adding multicore support to my Os and when i am reading ACPI table , in the "Acpi Madt Processor" structure , some cores (not all) has the CPU_FLAG_ENABLED down , and the Apicid is zero .
Well, this isn't necessarily an error. Are all processors (cores), that you have, reported? (If you have a dual core system, are two enabled processors reported? If you have a quad core system, are four enabled processors reported? ...) If yes, everything is fine.
If not, there are three possibilities:
(1) Some processors are really defective (hardware failure).
(2) The BIOS reports wrong tables.
(3) Your code is broken.
I think (3) is the most likely of these...
--TS
I have a quad core system , 2 cores are repoted fine, and other cores are detected but the apicid is wrong .
Thanks.
Re: Multicore question
Posted: Sat May 16, 2009 12:09 am
by z0rr0
The bug was fixed , My source was broken , Thanks.