- Commit a binutils safe version of reset16.inc

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@964 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Eric Biederman 2003-07-16 01:58:18 +00:00
parent ae948f78e6
commit 61b29a9b72
1 changed files with 9 additions and 15 deletions

View File

@ -3,25 +3,19 @@
.globl reset_vector .globl reset_vector
reset_vector: reset_vector:
#if _ROMBASE >= 0xffff0000 #if _ROMBASE >= 0xffff0000
/* Hmm. /* jmp _start */
* _start_offset is the low 16 bits of _start. .byte 0xe9
* Theoretically we should have problems but it compiles .int _start - ( . + 2 )
* and links properly with binutils 2.9.5 & 2.10.90 /* Note: The above jump is hand coded to work around bugs in binutils.
* This is probably a case that needs fixing in binutils. * 5 byte are used for a 3 byte instruction. This works because x86
* And then we can just use _start. * is little endian and allows us to use supported 32bit relocations
* We also need something like the assume directive in * instead of the weird 16 bit relocations that binutils does not
* other assemblers to tell it where the segment registers * handle consistenly between versions because they are used so rarely.
* are pointing in memory right now.
*/ */
jmp _start
#elif (_ROMBASE < 0x100000)
ljmp $((_ROMBASE & 0xf0000)>>4),$_start_offse);
#else #else
#error _ROMBASE is an unsupported value # error _ROMBASE is an unsupported value
#endif #endif
. = 0x8; . = 0x8;
.code32 .code32
jmp protected_start jmp protected_start
.previous .previous