[SMP] Cpu initialization cleanup

This commit is contained in:
2016-11-20 00:23:47 +01:00
parent 664379b35c
commit f356cc8f95
11 changed files with 126 additions and 43 deletions

View File

@@ -1,15 +1,15 @@
#include <gdt.h>
#include <stdint.h>
#include <debug.h>
#include <cpu.h>
uint64_t gdt[5];
struct gdtp_st gdt_p;
#define GDT gdt
#define GDTP gdt_p
#define GDT cpu->gdt
#define GDTP cpu->gdt_p
void gdt_init()
{
cpu_t *cpu = get_cpu();
GDT[0] = 0;
GDT[SEG_KCODE/8] = (uint64_t)(GDT_PRESENT | GDT_CODEDATA | GDT_WRITE | GDT_EXECUTE | GDT_64BIT);