Module Name: src
Committed By: joerg
Date: Wed Jan 15 22:24:41 UTC 2014
Modified Files:
src/sys/arch/amd64/acpi: acpi_wakecode.S
src/sys/arch/amd64/amd64: mptramp.S
src/sys/arch/i386/i386: mptramp.S
Log Message:
LLVM doesn't support data32/addr32, but is smart enough to figure the
necessary prefixes out.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/acpi/acpi_wakecode.S
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amd64/amd64/mptramp.S
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/i386/i386/mptramp.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/acpi/acpi_wakecode.S
diff -u src/sys/arch/amd64/acpi/acpi_wakecode.S:1.11 src/sys/arch/amd64/acpi/acpi_wakecode.S:1.12
--- src/sys/arch/amd64/acpi/acpi_wakecode.S:1.11 Thu Apr 19 18:00:34 2012
+++ src/sys/arch/amd64/acpi/acpi_wakecode.S Wed Jan 15 22:24:41 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_wakecode.S,v 1.11 2012/04/19 18:00:34 jym Exp $ */
+/* $NetBSD: acpi_wakecode.S,v 1.12 2014/01/15 22:24:41 joerg Exp $ */
/*-
* Copyright (c) 2007 Joerg Sonnenberger <[email protected]>
@@ -138,7 +138,11 @@ wakeup_16:
1:
/* Load temporary 32bit GDT */
+#ifdef __clang__
+ lgdt tmp_gdt
+#else
data32 addr32 lgdt tmp_gdt
+#endif
/* Enable protected mode w/o paging */
mov %cr0,%eax
Index: src/sys/arch/amd64/amd64/mptramp.S
diff -u src/sys/arch/amd64/amd64/mptramp.S:1.16 src/sys/arch/amd64/amd64/mptramp.S:1.17
--- src/sys/arch/amd64/amd64/mptramp.S:1.16 Sat Jan 11 19:31:47 2014
+++ src/sys/arch/amd64/amd64/mptramp.S Wed Jan 15 22:24:41 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: mptramp.S,v 1.16 2014/01/11 19:31:47 jakllsch Exp $ */
+/* $NetBSD: mptramp.S,v 1.17 2014/01/15 22:24:41 joerg Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -124,7 +124,11 @@ LABEL(cpu_spinup_trampoline)
movw %ax, %ds
movw %ax, %es
movw %ax, %ss
+#ifdef __clang__
+ lgdt (mptramp_gdt32_desc) # load flat descriptor table
+#else
data32 addr32 lgdt (mptramp_gdt32_desc) # load flat descriptor table
+#endif
movl %cr0, %eax # get cr0
orl $0x1, %eax # enable protected mode
movl %eax, %cr0 # doit
Index: src/sys/arch/i386/i386/mptramp.S
diff -u src/sys/arch/i386/i386/mptramp.S:1.25 src/sys/arch/i386/i386/mptramp.S:1.26
--- src/sys/arch/i386/i386/mptramp.S:1.25 Sat Jun 22 13:09:07 2013
+++ src/sys/arch/i386/i386/mptramp.S Wed Jan 15 22:24:41 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: mptramp.S,v 1.25 2013/06/22 13:09:07 uebayasi Exp $ */
+/* $NetBSD: mptramp.S,v 1.26 2014/01/15 22:24:41 joerg Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: mptramp.S,v 1.25 2013/06/22 13:09:07 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mptramp.S,v 1.26 2014/01/15 22:24:41 joerg Exp $");
#include "opt_mpbios.h" /* for MPDEBUG */
@@ -125,7 +125,11 @@ LABEL(cpu_spinup_trampoline)
movw %ax, %ds
movw %ax, %es
movw %ax, %ss
+#ifdef __clang__
+ lgdt (gdt_desc) # load flat descriptor table
+#else
data32 addr32 lgdt (gdt_desc) # load flat descriptor table
+#endif
movl %cr0, %eax # get cr0
orl $CR0_PE, %eax # enable protected mode
movl %eax, %cr0 # doit