On 14.10.2008 18:31, Marc Jones wrote: > ron minnich wrote: >> Here is a version I put together yesterday as a straw main. >> >> summary: >> >> 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, >> BUT: >> 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. Regards, Carl-Daniel -- http://www.hailfinger.org/ -- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

