[coreboot] MP table multicore patch

Stefan Reinauer stepan at coresystems.de
Tue Feb 16 20:02:13 CET 2010

On 2/16/10 5:11 AM, Timothy Pearson wrote:
> Here is a cleaned up and tested version of the SMP APIC autodetect patch.
> Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
> ---
> It would of course be helpful to attach the patch.  My Webmail client
> keeps eating it...
> Timothy Pearson
> Raptor Engineering

Do you have a comparison mptable as generated by the old and the new
version on your system?

And, can you describe high level, what the patch changes? It looks to me
as if you are recursing through the tree instead of just walking the
"all_devices" list.
So this implies that you don't catch all devices when running through
all_devices. This sounds like a problem in the resource allocator and
maybe it should be fixed there instead?

The code as it is runs in roughly O(n^3) and on top of that calls itself
which is a little bit scary.
But, looking at it a bit closer I see that the outer loop with p_it does
nothing. I dropped the outer loop and moved the lapic stuff to the inner
loop  where it is used, except passing it around on the stack. It will
probably mean 3 more cpuid calls and 3 more lapic reads as opposed to
heavy stack usage, but I think the stack usage has been more troublesome
in the past..

Please let me know what you think...

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: smp_fix_clean-v2.diff
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100216/a7e49061/attachment.ksh>

More information about the coreboot mailing list