switch-coreboot/arch/x86
Carl-Daniel Hailfinger 33de3b2fb5 Right now we face the problem that we can't support processors which
have a CAR area outside the usual RAM area. For those processors, we
have to implement a stack copying and switching mechanism. Since gcc
can't be told that the stack just moved, split stage1_main() into
stage1_phase1() and stage1_phase2() and stage1_phase3().
stage1_phase1() is the new entry point in stage1 and will handle
everything up to the point where we want to disable CAR.
Switching the stack, disabling CAR and handling other tasks related to
the stack switch (printk buffer move) is all wrapped in the
stage1_phase2() function.
stage1_phase2() calls disable_car() which then calls stage1_phase3().
stage1_phase3() is the former second half of stage1_main().

Notes about this patch:
- Code flow is almost unchanged for Qemu, K8 and Geode. No extensive new
testing required.
- We can support stack-keeping and stack-relocating architectures at the
same time, so C7 is definitely supportable
- The comment in stage1_phase2 says "some of this is not yet done". That
refers to the nonexisting code for stack switching on C7.
- "Minimal changes, maximum benefit".

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@932 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-16 03:00:28 +00:00
..
amd Right now we face the problem that we can't support processors which 2008-10-16 03:00:28 +00:00
geodelx Right now we face the problem that we can't support processors which 2008-10-16 03:00:28 +00:00
i586 Right now we face the problem that we can't support processors which 2008-10-16 03:00:28 +00:00
via Right now we face the problem that we can't support processors which 2008-10-16 03:00:28 +00:00
archelfboot.c Move include/console/console.h to include/console.h in order to 2007-05-05 20:18:28 +00:00
archtables.c Signed-off-by: Robert Millan <rmh@aybabtu.com> 2008-09-24 14:54:33 +00:00
coreboot_table.c mainboard_vendor and mainboard_name are constant. Follow that convention 2008-08-25 23:54:50 +00:00
i8259.c Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
isa-dma.c Ron's arch code., slightly changed. Another one will follow 2007-06-27 21:01:01 +00:00
Kconfig Whitespace fixes, readability improvements. 2008-10-11 01:01:07 +00:00
keyboard.c The current parameter situation of post_code() is rather mixed between 2008-01-07 16:34:34 +00:00
ldscript.ld Cover for unknown strange thing that just happened in svn. 2008-10-06 23:20:41 +00:00
Makefile I need this to get my work done and there were no better proposals. 2008-10-13 18:38:50 +00:00
mc146818rtc.c We're getting closer. It has been pointed out that this code is not pretty. I agree. Get 2008-08-03 22:42:01 +00:00
multiboot.c Signed-off-by: Robert Millan <rmh@aybabtu.com> 2008-09-24 14:54:33 +00:00
pci_ops_auto.c Here we start to see the good design of 3. In v2, there were pci ops in 2008-08-13 02:41:29 +00:00
pci_ops_conf1.c Commit a few things I forgot with the vt8237 patch, and also a couple 2008-10-15 06:41:16 +00:00
pci_ops_mmconf.c Constify structs which can be const. 2007-11-26 13:28:52 +00:00
pirq_routing.c Minor cosmetic and/or license header fixes (trivial). 2008-08-11 21:01:54 +00:00
post_code.c Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
resourcemap.c The change to Kconfig is self-acked. 2008-08-13 02:44:46 +00:00
serial.c Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
speaker.c Remove superfluous checks for boolean CONFIG_* variables where we tested 2008-02-14 22:34:40 +00:00
stage0_common.S We have lots of bit-for-bit identical code in the various stage0 2008-10-08 16:07:29 +00:00
stage1.c Right now we face the problem that we can't support processors which 2008-10-16 03:00:28 +00:00
stage1_mtrr.c Finally, after two years, put in real code for stop_ap(). Code has to be 2008-09-29 14:58:56 +00:00
udelay_io.c Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00