diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2014-01-18 16:24:24 +0100 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2014-02-19 20:56:19 +0100 |
commit | 938ef9fb8d69f8ce28dfc4948e05fe3768b020df (patch) | |
tree | 5fdd451393583820337158d5bc24c9b1eaa5b405 /src/cpu/x86 | |
parent | 0d0b3c5467192a101faaaebcace4ca390c2a5646 (diff) |
x86 bootblock: improve clang compatibility
Its linker doesn't like "." arithmetics, so use .org,
while its assembler doesn't like data32 prefixes.
Change-Id: I3f5bbb350493d6510b8013df15d44c44c5db63c7
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/4714
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r-- | src/cpu/x86/16bit/entry16.inc | 4 | ||||
-rw-r--r-- | src/cpu/x86/16bit/reset16.inc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cpu/x86/16bit/entry16.inc b/src/cpu/x86/16bit/entry16.inc index e4613bf986..c82edfd936 100644 --- a/src/cpu/x86/16bit/entry16.inc +++ b/src/cpu/x86/16bit/entry16.inc @@ -105,7 +105,7 @@ _start: lidt %cs:(%bx) movw $gdtptr16_offset, %bx subw %ax, %bx - data32 lgdt %cs:(%bx) + lgdtl %cs:(%bx) movl %cr0, %eax andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */ @@ -116,7 +116,7 @@ _start: movl %ebp, %eax /* Now that we are in protected mode jump to a 32 bit code segment. */ - data32 ljmp $ROM_CODE_SEG, $__protected_start + ljmpl $ROM_CODE_SEG, $__protected_start /** * The gdt is defined in entry32.inc, it has a 4 Gb code segment diff --git a/src/cpu/x86/16bit/reset16.inc b/src/cpu/x86/16bit/reset16.inc index 1be0e3a94c..33712d1799 100644 --- a/src/cpu/x86/16bit/reset16.inc +++ b/src/cpu/x86/16bit/reset16.inc @@ -10,7 +10,7 @@ reset_vector: * instead of the weird 16 bit relocations that binutils does not * handle consistenly between versions because they are used so rarely. */ - . = 0x8; + .org 0x8; .code32 jmp protected_start .previous |