cpu/x86 asm: Just use the correct op suffix
LLVM AS doesn't support as much GNU junk extensions, data16/32 is almost never needed in truth if we just use the correct op suffix. So do that here, fixes clang/llvm builds with the integrated-as toggled on. Change-Id: I6095d03d0289b418a49a10f135de5eb0e117cae0 Also-by: Damien Zammit <damien@zamaudio.com> Signed-off-by: Damien Zammit <damien@zamaudio.com> Reviewed-on: https://review.coreboot.org/21218 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
5bf3457bc4
commit
4e2294b429
|
@ -31,7 +31,7 @@ _secondary_start:
|
||||||
movw %cs, %ax
|
movw %cs, %ax
|
||||||
movw %ax, %ds
|
movw %ax, %ds
|
||||||
|
|
||||||
data32 lgdt gdtaddr - _secondary_start
|
lgdtl gdtaddr - _secondary_start
|
||||||
|
|
||||||
movl %cr0, %eax
|
movl %cr0, %eax
|
||||||
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */
|
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */
|
||||||
|
|
|
@ -79,7 +79,7 @@ _start:
|
||||||
movl $(gdtaddr), %ebx
|
movl $(gdtaddr), %ebx
|
||||||
sub $(_start), %ebx
|
sub $(_start), %ebx
|
||||||
|
|
||||||
data32 lgdt (%ebx)
|
lgdtl (%ebx)
|
||||||
|
|
||||||
movl %cr0, %eax
|
movl %cr0, %eax
|
||||||
andl $~CR0_CLEAR_FLAGS, %eax
|
andl $~CR0_CLEAR_FLAGS, %eax
|
||||||
|
|
|
@ -68,7 +68,7 @@ fallback_stack_top:
|
||||||
.global _start
|
.global _start
|
||||||
_start:
|
_start:
|
||||||
movl $(smm_relocate_gdt), %ebx
|
movl $(smm_relocate_gdt), %ebx
|
||||||
data32 lgdt (%ebx)
|
lgdtl (%ebx)
|
||||||
|
|
||||||
movl %cr0, %eax
|
movl %cr0, %eax
|
||||||
andl $~CR0_CLEAR_FLAGS, %eax
|
andl $~CR0_CLEAR_FLAGS, %eax
|
||||||
|
@ -76,7 +76,7 @@ _start:
|
||||||
movl %eax, %cr0
|
movl %eax, %cr0
|
||||||
|
|
||||||
/* Enable protected mode */
|
/* Enable protected mode */
|
||||||
data32 ljmp $0x8, $smm_trampoline32
|
ljmpl $0x8, $smm_trampoline32
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
smm_relocate_gdt:
|
smm_relocate_gdt:
|
||||||
|
|
|
@ -110,7 +110,7 @@ smm_handler_start:
|
||||||
untampered_lapic:
|
untampered_lapic:
|
||||||
#endif
|
#endif
|
||||||
movw $(smm_gdtptr16 - smm_handler_start + SMM_HANDLER_OFFSET), %bx
|
movw $(smm_gdtptr16 - smm_handler_start + SMM_HANDLER_OFFSET), %bx
|
||||||
data32 lgdt %cs:(%bx)
|
lgdtl %cs:(%bx)
|
||||||
|
|
||||||
movl %cr0, %eax
|
movl %cr0, %eax
|
||||||
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */
|
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */
|
||||||
|
@ -118,7 +118,7 @@ untampered_lapic:
|
||||||
movl %eax, %cr0
|
movl %eax, %cr0
|
||||||
|
|
||||||
/* Enable protected mode */
|
/* Enable protected mode */
|
||||||
data32 ljmp $0x08, $1f
|
ljmpl $0x08, $1f
|
||||||
|
|
||||||
.code32
|
.code32
|
||||||
1:
|
1:
|
||||||
|
|
|
@ -177,7 +177,7 @@ __lcall_instr = RELOCATED(.)
|
||||||
/* Now that we are in protected mode
|
/* Now that we are in protected mode
|
||||||
* jump to a 32 bit code segment.
|
* jump to a 32 bit code segment.
|
||||||
*/
|
*/
|
||||||
data32 ljmp $0x10, $RELOCATED(1f)
|
ljmpl $0x10, $RELOCATED(1f)
|
||||||
1:
|
1:
|
||||||
.code32
|
.code32
|
||||||
mov $0x18, %ax
|
mov $0x18, %ax
|
||||||
|
@ -253,7 +253,7 @@ __realmode_interrupt:
|
||||||
movl %eax, %cr0
|
movl %eax, %cr0
|
||||||
|
|
||||||
/* Now really going into real mode */
|
/* Now really going into real mode */
|
||||||
data32 ljmp $0, $RELOCATED(1f)
|
ljmpl $0, $RELOCATED(1f)
|
||||||
1:
|
1:
|
||||||
|
|
||||||
/* put the stack at the end of page zero. That way we can easily
|
/* put the stack at the end of page zero. That way we can easily
|
||||||
|
@ -297,7 +297,7 @@ __intXX_instr = RELOCATED(.)
|
||||||
movl %eax, %cr0
|
movl %eax, %cr0
|
||||||
|
|
||||||
/* Now that we are in protected mode jump to a 32-bit code segment. */
|
/* Now that we are in protected mode jump to a 32-bit code segment. */
|
||||||
data32 ljmp $0x10, $RELOCATED(1f)
|
ljmpl $0x10, $RELOCATED(1f)
|
||||||
1:
|
1:
|
||||||
.code32
|
.code32
|
||||||
mov $0x18, %ax
|
mov $0x18, %ax
|
||||||
|
@ -344,7 +344,7 @@ __interrupt_handler_16bit = RELOCATED(.)
|
||||||
movl %eax, %cr0
|
movl %eax, %cr0
|
||||||
|
|
||||||
/* ... and jump to a 32 bit code segment. */
|
/* ... and jump to a 32 bit code segment. */
|
||||||
data32 ljmp $0x10, $RELOCATED(1f)
|
ljmpl $0x10, $RELOCATED(1f)
|
||||||
1:
|
1:
|
||||||
.code32
|
.code32
|
||||||
mov $0x18, %ax
|
mov $0x18, %ax
|
||||||
|
|
Loading…
Reference in New Issue