Multicore question

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
z0rr0
Member
Member
Posts: 64
Joined: Sun Apr 03, 2005 11:00 pm
Location: Grenoble, France
Contact:

Multicore question

Post 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.
Hyperdrive
Member
Member
Posts: 93
Joined: Mon Nov 24, 2008 9:13 am

Re: Multicore question

Post 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
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: Multicore question

Post 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.
Laksen
Member
Member
Posts: 140
Joined: Fri Nov 09, 2007 3:30 am
Location: Aalborg, Denmark

Re: Multicore question

Post 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.
http://j-software.dk | JPasKernel - My Object Pascal kernel
z0rr0
Member
Member
Posts: 64
Joined: Sun Apr 03, 2005 11:00 pm
Location: Grenoble, France
Contact:

Re: Multicore question

Post 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.
z0rr0
Member
Member
Posts: 64
Joined: Sun Apr 03, 2005 11:00 pm
Location: Grenoble, France
Contact:

Re: Multicore question

Post by z0rr0 »

The bug was fixed , My source was broken , Thanks.
Post Reply