X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3903760236c30e3b5ace7a4eefac3a269d68957c..5ba3f43ea354af8ad55bea84372a2bc834d8757c:/osfmk/x86_64/locore.s?ds=sidebyside diff --git a/osfmk/x86_64/locore.s b/osfmk/x86_64/locore.s index 8620c19fc..0638e5162 100644 --- a/osfmk/x86_64/locore.s +++ b/osfmk/x86_64/locore.s @@ -54,7 +54,7 @@ * the rights to redistribute these changes. */ -#include +#include #include #include @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -157,14 +158,22 @@ wrmsr_fail: movl $1, %eax ret +#if DEBUG +.globl EXT(thread_exception_return_internal) +#else .globl EXT(thread_exception_return) +#endif .globl EXT(thread_bootstrap_return) LEXT(thread_bootstrap_return) #if CONFIG_DTRACE call EXT(dtrace_thread_bootstrap) #endif +#if DEBUG +LEXT(thread_exception_return_internal) +#else LEXT(thread_exception_return) +#endif cli xorl %ecx, %ecx /* don't check if we're in the PFZ */ jmp EXT(return_from_trap) @@ -344,3 +353,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 +