<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<BR> <BR>
> Date: Sat, 13 Feb 2010 11:23:49 -0700<BR>> Subject: Re: [coreboot] Data in memory changes unexpectedly ininitialize_cpus<BR>> From: marcj303@gmail.com<BR>> To: fishbaoz@hotmail.com<BR>> CC: coreboot@coreboot.org<BR>> <BR>> 2010/2/12 Zheng Bao <fishbaoz@hotmail.com>:<BR>> ><BR>> ><BR>> >> Date: Fri, 12 Feb 2010 16:54:43 -0700<BR>> >> From: marcj303@gmail.com<BR>> >> To: Zheng.Bao@amd.com<BR>> >> CC: coreboot@coreboot.org<BR>> >> Subject: Re: [coreboot] Data in memory changes unexpectedly<BR>> >> ininitialize_cpus<BR>> >><BR>> >> On Fri, Feb 12, 2010 at 4:48 PM, Marc Jones <marcj303@gmail.com> wrote:<BR>> >> > On Thu, Feb 11, 2010 at 6:54 PM, Bao, Zheng <Zheng.Bao@amd.com> wrote:<BR>> >> >> I kept on finding the problem. Now it is narrowed down to the line 108,<BR>> >> >> src/arch/i386/coreboot_ram.ld. It is very, very, very, very confused.<BR>> >> >> My CONFIG_RAMBASE should be 0x200000, which is more than 0x100000, but<BR>> >> >> the location counter "." is CONFIG_STACK_SIZE. Even if I manually set<BR>> >> >> ". = CONFIG_STACK_SIZE * 2 ;", I can not get the correct size. But if I<BR>> >> >> set<BR>> >> >> ". = 0x2000 * 2 ;", or ". = CONFIG_STACK_SIZE << 1", it is right. I<BR>> >> >> kinda doubt the compiler and linker.<BR>> >> >><BR>> >> >> Can you try it on your building machine? Just try the<BR>> >> >> Serengeti_cheetah_fam10 and don't need the hardware. Just check the<BR>> >> >> build/coreboot_ram.map to see if the _estack - _stack is multiple of<BR>> >> >> CONFIG_STACK_SIZE. That problem should happen on all the fam10 board if<BR>> >> >> it is built on my building machine.<BR>> >> ><BR>> >> > Is this due to the hard coded values in lapic_cpu_init. I don't really<BR>> >> > understand the comment or what it is doing. I would expect the AP<BR>> >> > stacks to be setup based on estack as well.<BR>> >> ><BR>> >> > // for all APs, let use stack after pgtbl, 20480 is the pgtbl size for<BR>> >> > every cpu<BR>> >> > stack_end = 0x100000+(20480 + CONFIG_STACK_SIZE)*CONFIG_MAX_CPUS -<BR>> >> > (CONFIG_STACK_SIZE*index);<BR>> >> ><BR>> >><BR>> >> This is what I get in my map file. It seems reasonable.<BR>> >><BR>> >> 00230000 A _stack<BR>> >> 00238000 A _estack<BR>> >> 00238000 A _heap<BR>> >> 002f8000 A _eheap<BR>> >> 002f8000 A _eram_seg<BR>> >> 01000000 A CONFIG_RAMTOP<BR>> >><BR>> > what is the CONFIG_STACK_SIZE in your map file?<BR>> <BR>> 00008000 A CONFIG_STACK_SIZE<BR>
 <BR>
This is not right.<BR>
<BR>> <BR>> I buillt svn head of serengeti_cheetah_fam10.<BR>> <BR>> Marc<BR>> <BR>> -- <BR>> http://se-eng.com<BR><BR>                                        <br /><hr />Hotmail: Trusted email with Microsoft¡¯s powerful SPAM protection. <a href='https://signup.live.com/signup.aspx?id=60969' target='_new'>Sign up now.</a></body>
</html>