]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/x86_64/start.s
xnu-7195.60.75.tar.gz
[apple/xnu.git] / osfmk / x86_64 / start.s
index 22045a2d526eb03171c96662aeb3b834f86429e1..256b9d2fbcab2e31d99768d7a3444b13d2c9c88a 100644 (file)
@@ -56,7 +56,6 @@
 /*
  */
 
-#include <platforms.h>
 #include <debug.h>
 
 #include <i386/asm.h>
@@ -64,7 +63,6 @@
 #include <i386/postcode.h>
 #include <assym.s>
 
-#include <i386/mp.h>
 #include <i386/cpuid.h>
 #include <i386/acpi.h>
 
@@ -120,9 +118,8 @@ EXT(mc_task_stack_end):
        movl    %cr0,%eax                                       ;\
        orl     $(CR0_PG|CR0_WP),%eax   /* enable paging */     ;\
        movl    %eax,%cr0                                       ;\
-       /* "The Aussie Maneuver" ("Myria" variant) */           ;\
-       pushl $(0xcb<<24)|KERNEL64_CS /* reload CS with 0x08 */ ;\
-       call .-1                                                ;\
+       ljmpl   $KERNEL64_CS,$64f                               ;\
+64:                                                            ;\
        .code64
 
 /*
@@ -213,7 +210,7 @@ L_pstart_common:
        cpuid
        test    $(1 << 30), %ecx
        jz      Lnon_rdrand
-       RDRAND_RAX              /* RAX := 64 bits of DRBG entropy */
+       rdrand  %rax            /* RAX := 64 bits of DRBG entropy */
        jnc     Lnon_rdrand     /* TODO: complain if DRBG fails at this stage */
 
 Lstore_random_guard:
@@ -227,7 +224,7 @@ Lvstartshim:
        /* %edi = boot_args_start */
        
        leaq    _vstart(%rip), %rcx
-       movq    $0xffffff8000000000, %rax       /* adjust pointer up high */
+       movq    $(KERNEL_BASE), %rax            /* adjust pointer up high */
        or      %rax, %rsp                      /* and stack pointer up there */
        or      %rcx, %rax
        andq    $0xfffffffffffffff0, %rsp       /* align stack */
@@ -311,7 +308,7 @@ LEXT(hibernate_machine_entrypoint)
        leaq    EXT(hibernate_kernel_entrypoint)(%rip),%rcx
 
        /* adjust the pointers to be up high */
-       movq    $0xffffff8000000000, %rax
+       movq    $(KERNEL_BASE), %rax
        orq     %rax, %rsp
        orq     %rcx, %rax