summaryrefslogtreecommitdiff
path: root/src/cpu/i386
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2003-07-16 01:58:18 +0000
committerEric Biederman <ebiederm@xmission.com>2003-07-16 01:58:18 +0000
commit61b29a9b7227fedea5e53cd0456849d5f20be79b (patch)
tree78922a4bc9fef795dfc637d3884ed3277c1eaa58 /src/cpu/i386
parentae948f78e6720067f86ef917b41f2628ce8f205e (diff)
downloadcoreboot-61b29a9b7227fedea5e53cd0456849d5f20be79b.tar.xz
- Commit a binutils safe version of reset16.inc
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@964 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/cpu/i386')
-rw-r--r--src/cpu/i386/reset16.inc24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/cpu/i386/reset16.inc b/src/cpu/i386/reset16.inc
index 7ea92774b6..d36c94085e 100644
--- a/src/cpu/i386/reset16.inc
+++ b/src/cpu/i386/reset16.inc
@@ -3,25 +3,19 @@
.globl reset_vector
reset_vector:
#if _ROMBASE >= 0xffff0000
- /* Hmm.
- * _start_offset is the low 16 bits of _start.
- * Theoretically we should have problems but it compiles
- * and links properly with binutils 2.9.5 & 2.10.90
- * This is probably a case that needs fixing in binutils.
- * And then we can just use _start.
- * We also need something like the assume directive in
- * other assemblers to tell it where the segment registers
- * are pointing in memory right now.
+ /* jmp _start */
+ .byte 0xe9
+ .int _start - ( . + 2 )
+ /* Note: The above jump is hand coded to work around bugs in binutils.
+ * 5 byte are used for a 3 byte instruction. This works because x86
+ * is little endian and allows us to use supported 32bit relocations
+ * instead of the weird 16 bit relocations that binutils does not
+ * handle consistenly between versions because they are used so rarely.
*/
- jmp _start
-#elif (_ROMBASE < 0x100000)
- ljmp $((_ROMBASE & 0xf0000)>>4),$_start_offse);
#else
-#error _ROMBASE is an unsupported value
+# error _ROMBASE is an unsupported value
#endif
-
. = 0x8;
.code32
jmp protected_start
-
.previous