38 klogv(
"Starting MPX boot sequence...");
39 klogv(
"Initialized serial I/O on COM1 device...");
72 if ( magic != 0x2BADB002 ){
79 klogv(
"Initializing Global descriptor table...");
82 klogv(
"Initializing Interrupt Descriptor table..");
85 klogv(
"Initializing Programmable interrupt controller");
93 klogv(
"Installing interrupts...");
96 klogv(
"Enabling interrupts.");
100 klogv(
"Initializing virtual memory...");
103 klogv(
"Initializing PCB Memory");
107 klogv(
"Transferring control to commhand...");
123 cp->
ebp = (
u32int )( newPCB->stackBase );
124 cp->
esp = (
u32int )( newPCB->stackTop );
131 cp = ( newPCB->context );
138 cp->
ebp = (
u32int )( newPCB->stackBase );
147 klogv(
"Starting system shutdown procedure...");
150 klogv(
"Shutdown complete. You may now turn off the machine. (QEMU: C-a x)");
void klogv(const char *msg)
int set_serial_out(int device)
void initPCBQueues(void)
initPCBQueues initlize the queues for each process queue. This function calls the list init function ...
The s_processContext struct defines the context that each process stores .
void sys_set_malloc(void *(*func)(size_t))
void initHeap(size_t initialHeapSize)
initHeap initializes the system heap by calling kmalloc with a valid byte size. Creates a CMCB at the...
int set_serial_in(int device)
void sys_set_free(int(*func)(void *))
pcb_t * setupPCB(const char *processName, e_PROCESS_CLASS_t processClass, processPriority_t processPriority)
setupPCB calls allocatePCB, initializes the PCB with the arguments and sets it state to ready ...
e_PCB_ERROR_CODE_t changeProcessSuspensionState(const char *processName, e_PROCESS_SUSPENSION_STATE_t suspensionState)
changeProcessSuspensionState
void init_commhand(void)
init_commhand Starts input loop and waits for shutdown code
void * allocateMemFromHeap(size_t requestedSize)
allocateMemFromHeap takes the requested size and finds the first block that fits. Implements first fi...
void * memset(void *s, int c, size_t n)
memset Set a region of memory.
int freeHeapMem(void *blockAddress)
freeHeapMem takes the block address and frees the memory from the CMCB start to the LMCB end location...