CS350 COS
COS
|
#include <stdbool.h>
#include <stdint.h>
#include <sys/kconfig.h>
#include <sys/kassert.h>
#include <sys/kmem.h>
#include <sys/mp.h>
#include <sys/irq.h>
#include <sys/spinlock.h>
#include <machine/amd64.h>
#include <machine/ioapic.h>
#include <machine/lapic.h>
#include <machine/trap.h>
#include <machine/pmap.h>
#include <machine/mp.h>
#include <sys/thread.h>
#include <sys/disk.h>
#include <sys/bufcache.h>
#include <sys/vfs.h>
#include <sys/elf64.h>
#include "../dev/console.h"
Go to the source code of this file.
Macros | |
#define | GDT_MAX 8 |
Functions | |
void | KTime_Init () |
void | KTimer_Init () |
void | RTC_Init () |
void | PS2_Init () |
void | PCI_Init () |
void | IDE_Init () |
void | MachineBoot_AddMem () |
void | Loader_LoadInit () |
void | PAlloc_LateInit () |
static void | Machine_GDTInit () |
static void | Machine_TSSInit () |
static void | Machine_SyscallInit () |
void | Machine_EarlyInit () |
static void | Machine_IdleThread (void *test) |
void | Machine_Init () |
void | Machine_InitAP () |
Variables | |
static SegmentDescriptor | GDT [MAX_CPUS][GDT_MAX] |
static PseudoDescriptor | GDTDescriptor [MAX_CPUS] |
TaskStateSegment64 | TSS [MAX_CPUS] |
static char | df_stack [4096] |
void IDE_Init | ( | ) |
Definition at line 86 of file ide.c.
void KTime_Init | ( | ) |
Definition at line 26 of file ktime.c.
void KTimer_Init | ( | ) |
void Loader_LoadInit | ( | ) |
Loader_LoadInit –
The init process is created from the execution kernel thread that initializes the system. This function initializes the thread and process state then loads the init binary.
Definition at line 187 of file loader.c.
void Machine_EarlyInit | ( | ) |
Machine_EarlyInit –
Initializes early kernel state.
Definition at line 146 of file machine.c.
|
static |
Machine_GDTInit –
Configures the Global Descriptor Table (GDT) that lists all segments and privilege levels in x86. 64-bit mode uses flat 64-bit segments and doesn't support offsets and limits except for the special FS/GS segment registers.
We create four segments for the kernel code/data and user code/data.
Definition at line 53 of file machine.c.
|
static |
void Machine_Init | ( | ) |
Machine_Init –
At this point the assembly startup code has setup temporary processor data structures sufficient to execute C code and make it through this initialization routine.
Definition at line 169 of file machine.c.
void Machine_InitAP | ( | ) |
Machine_InitAP –
Shorter initialization routine for co-processors.
Definition at line 251 of file machine.c.
|
static |
Machine_SyscallInit –
Configure the model specific registers (MSRs) that specify how to transfer control to the operating system when the system call instruction is invoked.
Definition at line 128 of file machine.c.
|
static |
void MachineBoot_AddMem | ( | ) |
Definition at line 192 of file mbentry.c.
void PAlloc_LateInit | ( | ) |
PAlloc_LateInit –
The late init call is made after the page tables are initialized using a small boot memory region (2nd 16MBs). This is where initialize the XMem region that represents the PageInfo array, and map memory into it.
Definition at line 71 of file palloc.c.
void PCI_Init | ( | ) |
void PS2_Init | ( | ) |
void RTC_Init | ( | ) |
Definition at line 23 of file rtc.c.
|
static |
|
static |