Truly enable virtual memory.

Map is still identity-mapped. I think we need to sort and/or clean up
the map before using a higher half address. In-kernel vga output not
working yet, but do_the_set_registers() is getting called.
This commit is contained in:
Justin C. Miller
2018-03-25 13:51:32 -07:00
parent 417f080993
commit 64a6d88e5c
5 changed files with 52 additions and 35 deletions

View File

@@ -18,3 +18,17 @@ const CHAR16 *util_error_message(EFI_STATUS status);
while (1) __asm__("hlt"); \
}
#define CHECK_EFI_STATUS_OR_ASSERT(s, d) \
if (EFI_ERROR((s))) { \
__asm__ __volatile__ ( \
"movq %0, %%r8;" \
"movq %1, %%r9;" \
"movq %2, %%r10;" \
"movq $0, %%rdx;" \
"divq %%rdx;" \
: \
:"r"((uint64_t)s), "r"((uint64_t)d), "r"((uint64_t)__LINE__) \
:"rax", "rdx", "r8", "r9", "r10" \
); \
}