X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/316670eb35587141e969394ae8537d66b9211e80..a39ff7e25e19b3a8c3020042a3872ca9ec9659f1:/osfmk/i386/postcode.h diff --git a/osfmk/i386/postcode.h b/osfmk/i386/postcode.h index 9440fcbd0..82a4c0849 100644 --- a/osfmk/i386/postcode.h +++ b/osfmk/i386/postcode.h @@ -29,6 +29,13 @@ #ifndef _I386_POSTCODE_H_ #define _I386_POSTCODE_H_ +/* + * Postcodes are no longer enabled by default in the DEBUG kernel + * because platforms may not have builtin port 0x80 support. + * To re-enable postcode outpout, uncomment the following define: + */ +//#define DEBUG_POSTCODE 1 + /* Define this to delay about 1 sec after posting each code */ //#define POSTCODE_DELAY 1 @@ -38,7 +45,7 @@ #define SPINCOUNT 300000000 #define CPU_PAUSE() rep; nop -#if DEBUG +#if DEBUG_POSTCODE /* * Macro to output byte value to postcode, destoying register al. * Additionally, if POSTCODE_DELAY, spin for about a second. @@ -101,14 +108,14 @@ movl %ebx, %eax; \ POSTCODE_AL -#else /* DEBUG */ +#else /* DEBUG_POSTCODE */ #define POSTCODE_AL #define POSTCODE_AX #define POSTCODE(X) #define POSTCODE2(X) #define POSTCODE_SAVE_EAX(X) #define POSTCODE32_EBX -#endif /* DEBUG */ +#endif /* DEBUG_POSTCODE */ /* * The following postcodes are defined for stages of early startup: @@ -119,40 +126,41 @@ #define PSTART_BEFORE_PAGING 0xFE #define PSTART_VSTART 0xFD #define VSTART_ENTRY 0xFC -#define VSTART_IDLE_PTS_INIT 0xFB -#define VSTART_PHYSMAP_INIT 0xFA -#define VSTART_DESC_ALIAS_INIT 0xF9 -#define VSTART_SET_CR3 0xF8 -#define VSTART_CPU_DESC_INIT 0xF7 -#define VSTART_CPU_MODE_INIT 0xF6 -#define VSTART_EXIT 0xF5 -#define I386_INIT_ENTRY 0xF4 -#define CPU_INIT_D 0xF3 -#define PE_INIT_PLATFORM_D 0xF2 +#define VSTART_IDT_INIT 0xFB +#define VSTART_IDLE_PTS_INIT 0xFA +#define VSTART_PHYSMAP_INIT 0xF9 +#define VSTART_DESC_ALIAS_INIT 0xF8 +#define VSTART_SET_CR3 0xF7 +#define VSTART_CPU_DESC_INIT 0xF6 +#define VSTART_CPU_MODE_INIT 0xF5 +#define VSTART_EXIT 0xF4 +#define I386_INIT_ENTRY 0xF3 +#define CPU_INIT_D 0xF2 +#define PE_INIT_PLATFORM_D 0xF1 #define SLAVE_STARTPROG_ENTRY 0xEF #define SLAVE_PSTART 0xEE #define I386_INIT_SLAVE 0xED #define PANIC_DOUBLE_FAULT 0xDF /* Double Fault exception */ -#define PANIC_MACHINE_CHECK 0xDE /* Machine-Check */ -#define MP_KDP_ENTER 0xDB /* Machine in kdp DeBugger */ +#define PANIC_MACHINE_CHECK 0xDC /* Machine-Check */ +#define MP_KDP_ENTER 0xDB /* Debugger Begin */ +#define MP_KDP_EXIT 0xDE /* Debugger End */ #define PANIC_HLT 0xD1 /* Die an early death */ -#define NO_64BIT 0x64 /* No 64-bit support yet */ +#define BOOT_TRAP_HLT 0xD0 /* D'oh! even earlier */ #define ACPI_WAKE_START_ENTRY 0xCF #define ACPI_WAKE_PROT_ENTRY 0xCE #define ACPI_WAKE_PAGED_ENTRY 0xCD -#define CPU_IA32_ENABLE_ENTRY 0xBF -#define CPU_IA32_ENABLE_EXIT 0xBE -#define ML_LOAD_DESC64_ENTRY 0xBD -#define ML_LOAD_DESC64_GDT 0xBC -#define ML_LOAD_DESC64_IDT 0xBB -#define ML_LOAD_DESC64_LDT 0xBA -#define ML_LOAD_DESC64_EXIT 0xB9 -#define CPU_IA32_DISABLE_ENTRY 0xB8 -#define CPU_IA32_DISABLE_EXIT 0xB7 +#define CPU_DESC_LOAD_ENTRY 0xBF +#define CPU_DESC_LOAD_GS_BASE 0xBE +#define CPU_DESC_LOAD_KERNEL_GS_BASE 0xBD +#define CPU_DESC_LOAD_GDT 0xBC +#define CPU_DESC_LOAD_IDT 0xBB +#define CPU_DESC_LOAD_LDT 0xBA +#define CPU_DESC_LOAD_TSS 0xB9 +#define CPU_DESC_LOAD_EXIT 0xB7 #ifndef ASSEMBLER inline static void @@ -174,7 +182,7 @@ _postcode2(uint16_t xxxx) { asm volatile("outw %0, %1" : : "a" (xxxx), "N" (POSTPORT)); } -#if DEBUG +#if DEBUG_POSTCODE inline static void postcode(uint8_t xx) {