[coreboot] [RFC] v3: Stack switching abstraction for C7 and later Intel processors

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Oct 15 14:05:10 CEST 2008


On 14.10.2008 21:15, Marc Jones wrote:
> Carl-Daniel Hailfinger wrote:
>
>>> If the stack is > CARBASE, then it is the CARBASE + CARSIZE - 4. If
>>> < carbase,
>>> it is the RAMBASE + RAMSIZE - 4. Done. But let's make it flexible.
>>>   
>>
>> Hm yes, something along these lines. Which leads to an interesting
>> question: Where do we want the stack if we have to move it? Top of
>> memory?
>
> That should be specific to the CPU or platform but it would be good to
> be below 1MB. 0x1000 is a normal location. This will allow the stack
> to be shared if/when coreboot goes to real mode (SeaBIOS integration
> discussion).

Please think of the children^W^W Suspend-to-RAM. We can't clobber
arbitrary areas. However, it is entirely possible to back up the new
stack location before switching to it. In fact, I plan to write code for
that soon.


Oh, and can we rely on APs never coming that far in the code? Switching
their stacks as well would be a nightmare.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the coreboot mailing list