diff --git a/arch/i386/gdt.s b/arch/i386/gdt.s deleted file mode 100755 index 1da1011..0000000 --- a/arch/i386/gdt.s +++ /dev/null @@ -1,17 +0,0 @@ -; This file is written with Intel ASM Syntax. - -[GLOBAL load_gdt] ; Allows the C code to call gdt_flush(). -[EXTERN gp] -load_gdt: - ; Get the pointer to the GDT, passed as a parameter. - lgdt [gp] ; Load the new GDT pointer - - mov ax, 0x10 ; 0x10 is the offset in the GDT to our data segment - mov ds, ax ; Load all data segment selectors - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax - jmp 0x08:flush ; 0x08 is the offset to our code segment: Far jump! -flush: - ret \ No newline at end of file diff --git a/arch/i386/isr.s b/arch/i386/isr.s deleted file mode 100755 index 75e3af3..0000000 --- a/arch/i386/isr.s +++ /dev/null @@ -1,135 +0,0 @@ -%macro ISR 1 - global isr%1 - isr%1: - cli - push byte 0 - push byte %1 - jmp isr_common -%endmacro - -%macro ISR_ERR 1 - global isr%1 - isr%1: - cli - push byte %1 - jmp isr_common -%endmacro - -%macro IRQ 2 - global irq%1 - irq%1: - cli - push byte 0 - push byte %2 - jmp irq_common -%endmacro - -ISR 0 -ISR 1 -ISR 2 -ISR 3 -ISR 4 -ISR 5 -ISR 6 -ISR 7 -ISR_ERR 8 -ISR 9 -ISR_ERR 10 -ISR_ERR 11 -ISR_ERR 12 -ISR_ERR 13 -ISR_ERR 14 -ISR 15 -ISR 16 -ISR_ERR 17 -ISR 18 -ISR 19 -ISR 20 -ISR 21 -ISR 22 -ISR 23 -ISR 24 -ISR 25 -ISR 26 -ISR 27 -ISR 28 -ISR 29 -ISR_ERR 30 -ISR 31 - -IRQ 0, 32 -IRQ 1, 33 -IRQ 2, 34 -IRQ 3, 35 -IRQ 4, 36 -IRQ 5, 37 -IRQ 6, 38 -IRQ 7, 39 -IRQ 8, 40 -IRQ 9, 41 -IRQ 10, 42 -IRQ 11, 43 -IRQ 12, 44 -IRQ 13, 45 -IRQ 14, 46 -IRQ 15, 47 - -extern fault_handler - -isr_common: - pusha - push ds - push es - push fs - push gs - mov ax, 0x10 - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov eax, esp - push eax - - mov eax, fault_handler - call eax - - pop eax - pop gs - pop fs - pop es - pop ds - popa - add esp, 8 - iret - -extern irq_handler - -irq_common: - pusha - push ds - push es - push fs - push gs - mov ax, 0x10 - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov eax, esp - push eax - mov eax, irq_handler - call eax - pop eax - pop gs - pop fs - pop es - pop ds - popa - add esp, 8 - iret - -global idt_load -extern idtp -idt_load: - lidt [idtp] - ret \ No newline at end of file diff --git a/arch/i386/sys_clock.c b/arch/i386/sys_clock.c index f53907d..df0cb8d 100755 --- a/arch/i386/sys_clock.c +++ b/arch/i386/sys_clock.c @@ -1,3 +1,12 @@ +/************************ + *** Team Kitty, 2019 *** + *** Sync *** + ***********************/ + +/* This file provides an interface to + * the hardware timer / RTC. Not much + * more to be said about it. */ + #include #include #include diff --git a/arch/i386/tty.c b/arch/i386/tty.c index e8615e0..417cfc3 100644 --- a/arch/i386/tty.c +++ b/arch/i386/tty.c @@ -1,3 +1,18 @@ +/************************ + *** Team Kitty, 2019 *** + *** Sync *** + ***********************/ + + /* This file provides all of the functionality + * needed to interact with the Text-Mode VGA + * buffer, which will soon be defunct due to + * EFI and graphics. + * + * This file will be left for the forseeable + * future, because it allows for easy debugging. + * 17/07/19 Curle + */ + #include #include #include diff --git a/kernel/descriptor_tables.c b/kernel/descriptor_tables.c index 0bb2907..6b88931 100755 --- a/kernel/descriptor_tables.c +++ b/kernel/descriptor_tables.c @@ -1,6 +1,6 @@ /************************ *** Team Kitty, 2019 *** - *** ProjectRED *** + *** Sync *** ***********************/ /* This file combines the implementation diff --git a/kernel/interrupts.c b/kernel/interrupts.c index 1b87f48..f738d87 100644 --- a/kernel/interrupts.c +++ b/kernel/interrupts.c @@ -1,6 +1,6 @@ /************************ *** Team Kitty, 2019 *** - *******ProjectRED******* + *** Sync *** ***********************/ /* This file contains all of the ISR and IRQ diff --git a/kernel/kernel.c b/kernel/kernel.c index 974a90d..d62fe5e 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -1,8 +1,16 @@ /************************ *** Team Kitty, 2019 *** - *** ProjectRED *** + *** Sync *** ***********************/ +/* This file contains the entry point + * to the kernel. This section consists + * mainly of bootloading functions. + * + * Graphics and memory will be setup + * at later stages. + */ + //#include #include #include @@ -60,11 +68,10 @@ int kernel_main(void) { serial_print(0x3F8, "[INFO] All subsystems ready. Printing message.\r\n"); /* Everything is ready; print a pretty message. */ + term_setcolor(RED); term_writes("\n(c)"); term_setcolor(GREEN); - term_writes(" Project"); - term_setcolor(RED); - term_writes("RED"); + term_writes(" Sync"); term_setcolor(WHITE); term_writes(", 2019\n"); diff --git a/kernel/serial.c b/kernel/serial.c index 01f808f..bc06ab3 100755 --- a/kernel/serial.c +++ b/kernel/serial.c @@ -1,3 +1,13 @@ +/************************ + *** Team Kitty, 2019 *** + *** Sync *** + ***********************/ + + /* This file provides an interface to the serial port. + * Most emulators allow the serial port to be saved into + * a text buffer, or a file, but this code should work on + * hardware with an actual serial port and monitor. */ + #include #include #include diff --git a/kernel/utils.c b/kernel/utils.c index 1ede1ec..bc2de7a 100644 --- a/kernel/utils.c +++ b/kernel/utils.c @@ -1,7 +1,15 @@ /************************ *** Team Kitty, 2019 *** - *** ProjectRED *** + *** Sync *** ***********************/ + +/* This file contains utility functions + * for the kernel and OS to use. They + * will be naturally optimized through + * the run of development, and thus are + * to be used scarcely until a more + * permanent solution can be found. + */ #include #include