#include #include #include #include #include #include "mboot.h" static struct boot_info boot_info; // entry point for amd64 void* amd64_shim(void *mboot_data_ptr) { //struct pml4e *pml4 = (struct pml4e *)0x1000; //struct pdpte *pdpt = (struct pdpte *)0x2000; //struct pde *pd = (struct pde *)0x3000; //struct pte *pt = (struct pte *)0x4000; //pd[1].flags = F_PRESENT | F_WRITEABLE; //pd[1].address = ((uint64_t)pt) >> 12; //map_page(pml4, (void *)0x80000000, (void *)0xB8002, F_WRITEABLE); //__asm("invlpg 0x200000"); //void *ret; //find_phys_addr(pml4, (void *)0x80000000, &ret); //return ret; struct mboot_info mboot_info; mboot_info = mboot_load_info(mboot_data_ptr); struct mboot_tag *map_tag; map_tag = mboot_get_tag(&mboot_info, MBOOT_MEMORYMAP); boot_info.map = map_tag->data.memory_map; return &boot_info; }