[coreboot] [RFC] v3: Stack switching abstraction for C7 and later Intel processors
rminnich at gmail.com
Tue Oct 14 17:43:46 CEST 2008
Here is a version I put together yesterday as a straw main.
stage1_main is now split into stage0_main and main(). stage0_main runs
up to and including initram. It then calls disable_car.
disable_car does what it does now:
copy CAR stack to ram stack, disable car,
instead of a ret, it does a ljmp to main.
very little of disable_car has to change since we already copy stack
to stack. We do need a new
constant, RAM_STACK, or some such, so we know where stack goes in RAM.
I don't see a need for swtich_stack, since disable_car pretty much
does that now -- it copies stacks, and all it need do is change %esp.
main is main. It calls everything else.
I don't like names like xxx_eary and xxx_late-- they don't convey enough
information. main() calls stage2 and payload and, later, code to load
microcode (needed on k10) and possibly
code to set up the resource maps (k8 and k10).
We should move the LAR pointer into
global variables so it will be find-able after disable_car. We should
not call the LAR init twice.
The bottom_of_stack will now work for any stack, not just CAR
stack.Given a properly aligned stack
it will always work.
This will fix issues with via and intel.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the coreboot