[SMP] Cpu initialization cleanup
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <string.h>
|
||||
#include <multiboot.h>
|
||||
#include <int.h>
|
||||
#include <cpu.h>
|
||||
|
||||
RSDP_st *find_rsdp()
|
||||
{
|
||||
@@ -80,6 +81,8 @@ void parse_MADT(SDT_header *header)
|
||||
if(f->proc.flags & 0x1)
|
||||
{
|
||||
debug(" enabled");
|
||||
// Add processor and LAPIC to list
|
||||
cpu_add(f->proc.proc_ID, f->proc.APIC_ID);
|
||||
}
|
||||
debug("\n");
|
||||
break;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user