[coreboot] [RFC] v3: Stack switching abstraction for C7 and later Intel processors
c-d.hailfinger.devel.2006 at gmx.net
Tue Oct 14 18:40:42 CEST 2008
On 14.10.2008 18:31, Marc Jones wrote:
> ron minnich wrote:
>> 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.
> Why not ret and do a call (or ljmp) from stage0_main to main(). It
> would make the code easier to follow and it would be easy to add code
> if anything were required between disable car and the jmp.
The big problem is that you can't return after having switched the
stack, so disable_car() must jump to (or call) the next function. Of
course, if stack switching happens earlier and you just need to disable
CAR, you're right.
More information about the coreboot