/*
*/
-#include <platforms.h>
#include <debug.h>
#include <i386/asm.h>
#include <i386/postcode.h>
#include <assym.s>
-#include <i386/mp.h>
#include <i386/cpuid.h>
#include <i386/acpi.h>
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
/*
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:
/* %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 */
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