]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/x86_64/locore.s
xnu-4903.221.2.tar.gz
[apple/xnu.git] / osfmk / x86_64 / locore.s
index 88c3372aa42eeb96910069a37a3824e9c08c6388..d88f2a08a32dd77eb9631712b9a2ef0ad68f9923 100644 (file)
@@ -53,8 +53,8 @@
  * any improvements or extensions that they make and grant Carnegie Mellon
  * the rights to redistribute these changes.
  */
+
 #include <debug.h>
-#include <mach_rt.h>
 #include <mach_kdp.h>
 #include <mach_assert.h>
 
@@ -62,6 +62,7 @@
 #include <i386/asm.h>
 #include <i386/cpuid.h>
 #include <i386/eflags.h>
+#include <i386/postcode.h>
 #include <i386/proc_reg.h>
 #include <i386/trap.h>
 #include <assym.s>
@@ -158,6 +159,12 @@ wrmsr_fail:
        ret
 
 #if DEBUG
+#ifndef TERI
+#define TERI 1
+#endif
+#endif
+
+#if TERI
 .globl EXT(thread_exception_return_internal)
 #else
 .globl EXT(thread_exception_return)
@@ -168,7 +175,7 @@ LEXT(thread_bootstrap_return)
        call EXT(dtrace_thread_bootstrap)
 #endif
 
-#if DEBUG
+#if TERI
 LEXT(thread_exception_return_internal)
 #else
 LEXT(thread_exception_return)
@@ -352,3 +359,12 @@ L_copyin_word_fail:
        RECOVERY_SECTION
        RECOVER_TABLE_END
 
+
+/*
+ * Vector here on any exception at startup prior to switching to
+ * the kernel's idle page-tables and installing the kernel master IDT.
+ */
+Entry(vstart_trap_handler)
+       POSTCODE(BOOT_TRAP_HLT)
+       hlt
+