[coreboot] Data in memory changes unexpectedly ininitialize_cpus

Bao, Zheng Zheng.Bao at amd.com
Thu Feb 11 11:26:29 CET 2010

I finally find out why. Your suggestion is quite usefull. The stack size
is not set correctly. Each core should get 0x2000 bytes as its own
stack. But the whole stack size is only 0x2000. So the stacks for AP
overlap with the BSS/DATA of the BSP. I will find a solution. Now I can
have a relaxed Chinese New Year.


-----Original Message-----
From: coreboot-bounces at coreboot.org
[mailto:coreboot-bounces at coreboot.org] On Behalf Of Patrick Georgi
Sent: Wednesday, February 10, 2010 6:52 PM
To: coreboot at coreboot.org
Subject: Re: [coreboot] Data in memory changes unexpectedly

Am 10.02.2010 11:24, schrieb Bao, Zheng:
> I am debugging the fam10+RS780+SB700. Now I am facing a problem which
> troubles me for quite a long time. It came up since CBFS play its
> The data in memory changes unexpectedly. The printk_debug can not help
> to narrow down the point where the writing happens.
> So I set the memory address which changes during booting as a
> trigger. Anyone writes data to this address will cause a breakpoint.
> unfortunately nothing can be captured. So I had to set breakpoint in
> whole process to narrow down. Now I narrow down to the initialize_cpus
> in src/cpu/x86/lapic/. The functions called in initialize_cpus are
> static which can not find a symbol in the coreboot.map. I need to
> disassemble the binary to find out why. Before that, I need to guess
> what on earth happens.
> It seems to have something to do with the SMP. It seems that other
> write data into the memory which is not belong to them. Do you think
> can happen?
Can you narrow down a bit what kind of data is overwritten there?

The only thing related to SMP that I can think of is stacks and CBFS
loading. For both it might (but should not) happen that multiple cores
try to do the same thing and overwrite each other's data.

Stacks seem fine in AMD code (from a short look), you could try to look
what the APs so once they are started. cbfs might happen early, and we
need to change things there, eg. have the BSP decompress the AP code
once, before starting the APs, instead of the APs, which would require
locking to not stumble over each other.


coreboot mailing list: coreboot at coreboot.org

More information about the coreboot mailing list