-#define PSTART_ENTRY 0xFF
-#define PSTART_PAGE_TABLES 0xFE
-#define PSTART_BEFORE_PAGING 0xFD
-#define VSTART_ENTRY 0xFC
-#define VSTART_STACK_SWITCH 0xFB
-#define VSTART_EXIT 0xFA
-#define I386_INIT_ENTRY 0xF9
-#define CPU_INIT_D 0xF8
-#define PROCESSOR_BOOTSTRAP_D 0xF7
-#define PE_INIT_PLATFORM_D 0xF6
-#define THREAD_BOOTSTRAP_D 0xF5
-
-#define SLAVE_PSTART_ENTRY 0xEF
-#define REAL_TO_PROT_ENTRY 0xEE
-#define REAL_TO_PROT_EXIT 0xED
-#define STARTPROG_ENTRY 0xEC
-#define STARTPROG_EXIT 0xEB
-#define SLAVE_START_ENTRY 0xEA
-#define SLAVE_START_EXIT 0xE9
-#define SVSTART_ENTRY 0xE8
-#define SVSTART_DESC_INIT 0xE7
-#define SVSTART_STACK_SWITCH 0xE6
-#define SVSTART_EXIT 0xE5
-#define I386_INIT_SLAVE 0xE4
-
-#define MP_KDP_ENTER 0xDB /* Machine in kdp DeBugger */
-#define PANIC_HLT 0xD1 /* Die an early death */
-
-#define ACPI_WAKE_START_ENTRY 0xCF
-#define ACPI_WAKE_PROT_ENTRY 0xCE
-#define ACPI_WAKE_PAGED_ENTRY 0xCD
+#define _PSTART_ENTRY 0xFF
+#define _PSTART_RELOC 0xFE
+#define PSTART_ENTRY 0xFD
+#define PSTART_PAGE_TABLES 0xFC
+#if defined(__x86_64__)
+#define PSTART_BEFORE_ID_MAP 0xFB
+#else
+#define PSTART_BEFORE_PAGING 0xFB
+#endif
+#define VSTART_ENTRY 0xFA
+#define VSTART_STACK_SWITCH 0xF9
+#define VSTART_BEFORE_PAGING 0xF8
+#define VSTART_EXIT 0xF7
+#define I386_INIT_ENTRY 0xF6
+#define CPU_INIT_D 0xF5
+#define PE_INIT_PLATFORM_D 0xF4
+
+#define SLAVE_RSTART_ENTRY 0xEF
+#define SLAVE_REAL_TO_PROT_ENTRY 0xEE
+#define SLAVE_REAL_TO_PROT_EXIT 0xED
+#define SLAVE_STARTPROG_ENTRY 0xEC
+#define SLAVE_STARTPROG_EXIT 0xEB
+#define SLAVE_PSTART_ENTRY 0xEA
+#define SLAVE_PSTART_EXIT 0xE9
+#if defined(__i386__)
+#define SLAVE_VSTART_ENTRY 0xE8
+#define SLAVE_VSTART_DESC_INIT 0xE7
+#define SLAVE_VSTART_STACK_SWITCH 0xE6
+#define SLAVE_VSTART_EXIT 0xE5
+#endif
+#define I386_INIT_SLAVE 0xE4
+
+#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_HLT 0xD1 /* Die an early death */
+#define NO_64BIT 0x64 /* No 64-bit support yet */
+
+#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