next up previous contents index
Next: 10.6.6 base_cpuid: global variable Up: (X86) Base Environment Previous: 10.6.4 base_cpu_init: initialize the

10.6.5 base_cpu_load: activate the base processor execution environment

   

SYNOPSIS

#include <oskit/machine/base_cpu.h>

void base_cpu_load(void);

DESCRIPTION

This function loads the critical base environment data structures (in particular, the GDT, IDT, and TSS) into the processor, and reinitializes all segment registers from the new GDT as recommended in Intel processor documentation. The structures must already have been set up by a call to base_cpu_init and/or custom initialization code in the client OS.

This function returns with the CS segment set to KERNEL_CS (the default kernel code segment; see Section 10.7.1 for details), DS, ES, and SS set to KERNEL_DS (the default kernel data segment), and FS and GS set to 0. After the base_cpu_load call completes, a full working kernel environment is in place: segment registers can be loaded, interrupts and traps can be fielded by the OS, privilege level changes can occur, etc.

DEPENDENCIES

base_gdt_load
10.7.3
base_idt_load
10.7.5
base_tss_load
10.7.8



University of Utah Flux Research Group