blob: 9a5be022864cc871da185db43a035915e376a7d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#include <serial.h>
#include <cpuid.h>
#include <lib.h>
#include <shim.h>
#include <memory.h>
#include "paging.h"
#include "mboot.h"
#include "idt.h"
#include "pic.h"
static struct boot_info boot_info;
void* amd64_shim(void *mboot_data_ptr) {
serial_init();
paging_init();
pic_remap();
idt_init();
//kmap_page(mboot_data_ptr, mboot_data_ptr, F_WRITEABLE);
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;
}
|