Simplify boot messages
This commit is contained in:
parent
b23aea77ed
commit
56ebdc2184
@ -72,6 +72,11 @@ void __attribute__((cdecl)) ISR_Handler(Registers* regs) {
|
||||
Serial_Printf(DEBUG_COM_PORT, " ESP=%x EBP=%x EIP=%x EFLAGS=%x CS=%x DS=%x SS=%x\n", regs->esp, regs->ebp, regs->eip, regs->eflags, regs->cs, regs->ds, regs->ss);
|
||||
Serial_Printf(DEBUG_COM_PORT, " INTERRUPT=%x ERRORCODE=%x\n", regs->interrupt, regs->error);
|
||||
Serial_Printf(DEBUG_COM_PORT, "KERNEL PANIC!\n");
|
||||
printf("Unhandled Exception %d %s\n", regs->interrupt, g_Exceptions[regs->interrupt]);
|
||||
printf(" EAX=%x EBX=%x ECX=%x EDX=%x ESI=%x EDI=%x\n", regs->eax, regs->ebx, regs->ecx, regs->edx, regs->esi, regs->edi);
|
||||
printf(" ESP=%x EBP=%x EIP=%x EFLAGS=%x CS=%x DS=%x SS=%x\n", regs->esp, regs->ebp, regs->eip, regs->eflags, regs->cs, regs->ds, regs->ss);
|
||||
printf(" INTERRUPT=%x ERRORCODE=%x\n", regs->interrupt, regs->error);
|
||||
printf("KERNEL PANIC!\n");
|
||||
kernel_panic();
|
||||
}
|
||||
|
||||
|
||||
@ -12,20 +12,20 @@
|
||||
|
||||
void HAL_Initialize() {
|
||||
// init GDT
|
||||
printf("> Initializing GDT...");
|
||||
// printf("> Initializing GDT...");
|
||||
GDT_Initialize();
|
||||
printf("Done!\n");
|
||||
// printf("Done!\n");
|
||||
// init IDT
|
||||
printf("> Initializing IDT...");
|
||||
// printf("> Initializing IDT...");
|
||||
IDT_Initialize();
|
||||
printf("Done!\n");
|
||||
// printf("Done!\n");
|
||||
// init ISR
|
||||
printf("> Initializing ISR...");
|
||||
// printf("> Initializing ISR...");
|
||||
ISR_Initialize();
|
||||
printf("Done!\n");
|
||||
// printf("Done!\n");
|
||||
// init IRQ
|
||||
printf("> Initializing IRQ Handling...");
|
||||
// printf("> Initializing IRQ Handling...");
|
||||
IRQ_Initialize();
|
||||
printf("Done!\n");
|
||||
// printf("Done!\n");
|
||||
|
||||
}
|
||||
@ -6,5 +6,3 @@
|
||||
#include "ata.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
// This Will one day be done, floppy disk comes first (its easier)
|
||||
@ -8,5 +8,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// bool ATA_Drive_Init(DISK* disk, uint8_t driveNumber);
|
||||
// bool ATA_Get_Drive_Params(uint8_t disk, uint8_t* driveType, uint16_t* cylinders, uint16_t* sectors, uint16_t* heads);
|
||||
enum ATA_IO {
|
||||
ATA_IO,
|
||||
};
|
||||
@ -22,7 +22,6 @@ void Timer_Wait(int time)
|
||||
int tmp;
|
||||
tmp = uptime;
|
||||
while(0 == 0) {
|
||||
// Serial_Printf(DEBUG_COM_PORT, "Vaules TMP: %d Uptime: %d Cycles: %d\n", tmp, uptime, time);
|
||||
if(uptime - tmp == time) return;
|
||||
}
|
||||
}
|
||||
@ -38,8 +38,12 @@
|
||||
#include <util/util.h>
|
||||
#include <util/binary.h>
|
||||
|
||||
// Other
|
||||
|
||||
#include <version.h>
|
||||
|
||||
// Declarations
|
||||
|
||||
extern uint8_t __bss_start;
|
||||
extern uint8_t __end;
|
||||
|
||||
@ -48,43 +52,38 @@ extern int uptime;
|
||||
uint16_t DEBUG_COM_PORT = COM1_PORT;
|
||||
void start(unsigned long multiboot_magic, unsigned long multiboot_addr) {
|
||||
|
||||
// multiboot 2 shit
|
||||
// int padded_size = tag->size + ((tag->size % 8)?(8-(tag->size%8)):0);
|
||||
// tag = incptr(tag, padded_size);
|
||||
// print logo
|
||||
// Print logo
|
||||
clrscr();
|
||||
printf("%s", LOGO);
|
||||
printf("The Nano OS %s\n-------------------------------------\n", VERSION);
|
||||
printf("Loaded Kernel!\n");
|
||||
|
||||
// init HAL
|
||||
printf("Initializing HAL...\n");
|
||||
// Init Drivers
|
||||
printf("Initializing Basic Drivers...");
|
||||
// HAL
|
||||
HAL_Initialize();
|
||||
movecursorpos(19, 8);
|
||||
printf("Done!\n\n\n\n\n");
|
||||
|
||||
// Register IRQs
|
||||
printf("Registering IRQs...");
|
||||
IRQ_RegisterHandler(0, Timer_Handler);
|
||||
IRQ_RegisterHandler(1, Keyboard_Handler);
|
||||
IRQ_RegisterHandler(4, COM1_Serial_Handler);
|
||||
IRQ_RegisterHandler(6, Floppy_Handler);
|
||||
IRQ_RegisterHandler(8, CMOS_RTC_Handler);
|
||||
printf("Done!\n");
|
||||
|
||||
// Init Drivers
|
||||
printf("Initializing Basic Drivers...");
|
||||
// Other Stuff
|
||||
Serial_Init(DEBUG_COM_PORT, 9600);
|
||||
Keyboard_Init();
|
||||
// Storage
|
||||
// Floppy_Init(); // This should always be last; its slow as fuck
|
||||
printf("Done!\n");
|
||||
|
||||
printf("Initializing Memory Paging...");
|
||||
Memory_Page_Init();
|
||||
printf("Done!\n");
|
||||
|
||||
// Multiboot Debug Info
|
||||
Serial_Printf(DEBUG_COM_PORT, "Multiboot Magic: %d\n", multiboot_magic);
|
||||
Serial_Printf(DEBUG_COM_PORT, "Multiboot Address: %d\n", multiboot_addr);
|
||||
printf("\nThe Current Time and Date Is: %d:%d:%d %d/%d/%d%d\n",
|
||||
|
||||
// Finish Up
|
||||
printf("The Current Time and Date Is: %d:%d:%d %d/%d/%d%d\n",
|
||||
BCD2BIN(Read_CMOS(CMOS_RTC_Hours)),
|
||||
BCD2BIN(Read_CMOS(CMOS_RTC_Minutes)),
|
||||
BCD2BIN(Read_CMOS(CMOS_RTC_Seconds)),
|
||||
|
||||
@ -6,4 +6,4 @@
|
||||
#pragma once
|
||||
|
||||
#define LOGO " _ _____ _ __________________\n / | / / | / | / / _/_ __/ ____/\n / |/ / /| | / |/ // / / / / __/ \n / /| / ___ |/ /| // / / / / /___ \n/_/ |_/_/ |_/_/ |_/___/ /_/ /_____/ \n"
|
||||
#define VERSION "RD-00049"
|
||||
#define VERSION "RD-00050"
|
||||
Loading…
x
Reference in New Issue
Block a user