summaryrefslogtreecommitdiff
path: root/src/arch/i386/init
diff options
context:
space:
mode:
authorYinghai Lu <yinghailu@gmail.com>2006-10-04 20:46:15 +0000
committerYinghai Lu <yinghailu@gmail.com>2006-10-04 20:46:15 +0000
commitd4b278c02c1da92219ebeb34204b9768934aeca3 (patch)
tree488d097cac9744cfc9b8ff7c89ce69bcb21370cb /src/arch/i386/init
parent2e3757d11c565a8fe68dc2a2c34975e98304533c (diff)
downloadcoreboot-d4b278c02c1da92219ebeb34204b9768934aeca3.tar.xz
AMD Rev F support
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2435 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/i386/init')
-rw-r--r--src/arch/i386/init/ldscript.lb5
-rw-r--r--src/arch/i386/init/ldscript_apc.lb13
-rw-r--r--src/arch/i386/init/ldscript_failover.lb56
-rw-r--r--src/arch/i386/init/ldscript_fallback.lb71
4 files changed, 141 insertions, 4 deletions
diff --git a/src/arch/i386/init/ldscript.lb b/src/arch/i386/init/ldscript.lb
index e647fb42fe..c902782681 100644
--- a/src/arch/i386/init/ldscript.lb
+++ b/src/arch/i386/init/ldscript.lb
@@ -36,16 +36,13 @@ INPUT(linuxbios_ram.rom)
SECTIONS
{
. = _ROMBASE;
-
+
.ram . : {
_ram = . ;
linuxbios_ram.rom(*)
_eram = . ;
}
- _x = .;
- . = (_x < (_ROMBASE - 0x10000 + ROM_IMAGE_SIZE)) ? (_ROMBASE - 0x10000 + ROM_IMAGE_SIZE) : _x;
-
/* This section might be better named .setup */
.rom . : {
_rom = .;
diff --git a/src/arch/i386/init/ldscript_apc.lb b/src/arch/i386/init/ldscript_apc.lb
new file mode 100644
index 0000000000..43570ebe90
--- /dev/null
+++ b/src/arch/i386/init/ldscript_apc.lb
@@ -0,0 +1,13 @@
+INPUT(linuxbios_apc.rom)
+SECTIONS
+{
+ .apcrom . : {
+ _apcrom = .;
+ linuxbios_apc.rom(*)
+ _eapcrom = .;
+ }
+ _iseg_apc = DCACHE_RAM_BASE;
+ _eiseg_apc = _iseg_apc + SIZEOF(.apcrom);
+ _liseg_apc = _apcrom;
+ _eliseg_apc = _eapcrom;
+}
diff --git a/src/arch/i386/init/ldscript_failover.lb b/src/arch/i386/init/ldscript_failover.lb
new file mode 100644
index 0000000000..12cb3feba8
--- /dev/null
+++ b/src/arch/i386/init/ldscript_failover.lb
@@ -0,0 +1,56 @@
+/*
+ * Memory map:
+ *
+ * _RAMBASE
+ * : data segment
+ * : bss segment
+ * : heap
+ * : stack
+ * _ROMBASE
+ * : linuxbios text
+ * : readonly text
+ */
+/*
+ * Bootstrap code for the STPC Consumer
+ * Copyright (c) 1999 by Net Insight AB. All Rights Reserved.
+ *
+ */
+
+/*
+ * Written by Johan Rydberg, based on work by Daniel Kahlin.
+ * Rewritten by Eric Biederman
+ */
+/*
+ * We use ELF as output format. So that we can
+ * debug the code in some form.
+ */
+OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+OUTPUT_ARCH(i386)
+
+/*
+ENTRY(_start)
+*/
+
+TARGET(binary)
+SECTIONS
+{
+ . = _ROMBASE;
+
+ /* This section might be better named .setup */
+ .rom . : {
+ _rom = .;
+ *(.rom.text);
+ *(.rom.data);
+ *(.rom.data.*);
+ . = ALIGN(16);
+ _erom = .;
+ }
+
+ _lrom = LOADADDR(.rom);
+ _elrom = LOADADDR(.rom) + SIZEOF(.rom);
+
+ /DISCARD/ : {
+ *(.comment)
+ *(.note)
+ }
+}
diff --git a/src/arch/i386/init/ldscript_fallback.lb b/src/arch/i386/init/ldscript_fallback.lb
new file mode 100644
index 0000000000..f2ffd1288c
--- /dev/null
+++ b/src/arch/i386/init/ldscript_fallback.lb
@@ -0,0 +1,71 @@
+/*
+ * Memory map:
+ *
+ * _RAMBASE
+ * : data segment
+ * : bss segment
+ * : heap
+ * : stack
+ * _ROMBASE
+ * : linuxbios text
+ * : readonly text
+ */
+/*
+ * Bootstrap code for the STPC Consumer
+ * Copyright (c) 1999 by Net Insight AB. All Rights Reserved.
+ *
+ */
+
+/*
+ * Written by Johan Rydberg, based on work by Daniel Kahlin.
+ * Rewritten by Eric Biederman
+ */
+/*
+ * We use ELF as output format. So that we can
+ * debug the code in some form.
+ */
+OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+OUTPUT_ARCH(i386)
+
+/*
+ENTRY(_start)
+*/
+
+TARGET(binary)
+INPUT(linuxbios_ram.rom)
+SECTIONS
+{
+ . = _ROMBASE;
+
+ .ram . : {
+ _ram = . ;
+ linuxbios_ram.rom(*)
+ _eram = . ;
+ }
+
+ /* cut _start into last 64k*/
+ _x = .;
+ . = (_x < (_ROMBASE - 0x10000 + ROM_IMAGE_SIZE)) ? (_ROMBASE - 0x10000 + ROM_IMAGE_SIZE) : _x;
+
+ /* This section might be better named .setup */
+ .rom . : {
+ _rom = .;
+ *(.rom.text);
+ *(.rom.data);
+ *(.rom.data.*);
+ . = ALIGN(16);
+ _erom = .;
+ }
+
+ _lrom = LOADADDR(.rom);
+ _elrom = LOADADDR(.rom) + SIZEOF(.rom);
+ _iseg = _RAMBASE;
+ _eiseg = _iseg + SIZEOF(.ram);
+ _liseg = _ram;
+ _eliseg = _eram;
+
+ /DISCARD/ : {
+ *(.comment)
+ *(.note)
+ }
+}