Exemplo n.º 1
0
// First C-function to be called
void KernelMain(uint16_t* InfoTableAddress)
{
	// InfoTable is our custom structure which has some essential information about the system
	// gained during system boot; and the information that is best found out about in real mode.
	InfoTable = InfoTableAddress;

	// Do memory setup
	if (!InitializePhysicalMemory())
	{
		KernelPanic(SystemInitializationFailed);
	}
	if (!InitializeVirtualMemory(SystemInitializationFailed))
	{
		KernelPanic();
	}

	// Get basic interrupts and exceptions setup
	// Initializing ACPI will generate page faults while parsing ACPI tables
	// so we must first fill the IDT with offsets to basic exceptions and interrupts
	PopulateIDTWithOffsets();
	if(!InitializeACPI3())
	{
		KernelPanic(SystemInitializationFailed);
	}
	if(!SetupHardwareInterrupts())
	{
		KernelPanic(SystemInitializationFailed);
	}

	TerminalSetCursorPosition(33,12);
	TerminalPrintString(HelloWorld, strlen(HelloWorld));
}
Exemplo n.º 2
0
void MenuDisplayItem() // this method could blow up the stack! need to update
{
	TerminalSetCursorPosition(5,1);
	TerminalSendString(MenuItems[HWselection]);
/*	
	switch(selection){
		case MNU_PATTERN:
		TerminalSendString("pattern    ");
		break;
		case MNU_SPEED:
		TerminalSendString("speed      ");
		break;
		case MNU_HOURS:
		TerminalSendString("hours      ");
		break;
		case MNU_AMPM:
		TerminalSendString("AM or PM   ");
		break;
		case MNU_MINS:
		TerminalSendString("mins       ");
		break;
		case MNU_SECS:
		TerminalSendString("secs       ");
		break;
		case MNU_HRMODE:
		TerminalSendString("24 or 12 hr");
		break;
		case MNU_YEAR:
		TerminalSendString("year       ");
		break;
		case MNU_MONTH:
		TerminalSendString("month      ");
		break;
		case MNU_DAY:
		TerminalSendString("day of week");
		break;
		case MNU_DATE:
		TerminalSendString("date       ");
		break;
	}*/
}