Espresso 0.0.0e
This commit is contained in:
+2
-1
@@ -3,7 +3,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <kernel/boot.h>
|
||||
|
||||
|
||||
|
||||
uint8_t parse_boot_data(const char* data)
|
||||
{
|
||||
if (strlen(data) == 0)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <stdio.h>
|
||||
#include <port_io.h>
|
||||
|
||||
#include <kernel/intro_anim.h>
|
||||
#include <kernel/intro.h>
|
||||
|
||||
void delay_us(uint32_t microseconds, uint32_t cpu_mhz) {
|
||||
uint32_t count = cpu_mhz * microseconds;
|
||||
+29
-17
@@ -18,14 +18,14 @@
|
||||
#include <panic.h>
|
||||
|
||||
#include <gdt.h>
|
||||
#include <idt.h>
|
||||
#include <drivers/idt.h>
|
||||
|
||||
#include <multiboot.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <drivers/pci.h>
|
||||
#include <drivers/ps2_keyboard.h>
|
||||
//#include <drivers/ahci.h>
|
||||
/*#include <drivers/ahci.h>*/
|
||||
#include <drivers/ide.h>
|
||||
#include <mm/mm.h>
|
||||
#include <fs/ramfs.h>
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <vector_extentions/sse.h>
|
||||
|
||||
#include <kernel/intro_anim.h>
|
||||
#include <kernel/intro.h>
|
||||
|
||||
#define DEBUG
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
extern HBA_PORT *ahci_port;*/
|
||||
|
||||
extern void _hang_asm(void);
|
||||
extern void _sti_asm(void);
|
||||
|
||||
|
||||
void kernel_main(multiboot_info_t* mbd, unsigned int magic)
|
||||
@@ -49,9 +50,13 @@ void kernel_main(multiboot_info_t* mbd, unsigned int magic)
|
||||
|
||||
/* --- BEGIN INITIALIZATION SECTION --- */
|
||||
|
||||
const char* espresso_kernel_version = "0.0.0e";
|
||||
|
||||
/* We need to initialize the terminal so that any error/debuging messages show. */
|
||||
terminal_initialize();
|
||||
|
||||
printf("Loading Espresso %s...\n", espresso_kernel_version);
|
||||
|
||||
terminal_setcolor(VGA_COLOR_RED);
|
||||
|
||||
/* Make sure the magic number matches for memory mapping*/
|
||||
@@ -69,17 +74,17 @@ void kernel_main(multiboot_info_t* mbd, unsigned int magic)
|
||||
_hang_asm();
|
||||
}
|
||||
|
||||
gdt_install();
|
||||
gdt_install(false);
|
||||
|
||||
pic_remap();
|
||||
idt_install_isrs();
|
||||
idt_install();
|
||||
idt_init();
|
||||
/*pit_init(1000); 1000 Hz = 1ms tick */
|
||||
_sti_asm();
|
||||
|
||||
terminal_setcolor(VGA_COLOR_GREEN);
|
||||
|
||||
printd("Initializing physical memory manager...\n");
|
||||
|
||||
pmm_init(mbd);
|
||||
|
||||
printd("Physical memory manager initialized\n");
|
||||
|
||||
printd("Initializing paging...\n");
|
||||
@@ -115,23 +120,30 @@ void kernel_main(multiboot_info_t* mbd, unsigned int magic)
|
||||
ide_initialize();
|
||||
printd("IDE initialized\n");
|
||||
|
||||
printd("Initializing DuckFS...\n");
|
||||
/*printd("Initializing DuckFS...\n");
|
||||
int32_t duckfs_init_rv = duckfs_init(0);
|
||||
printf("[ DEBUG ] DuckFS initialized with RV %d\n", duckfs_init_rv);
|
||||
printf("[ DEBUG ] DuckFS initialized with RV %d\n", duckfs_init_rv);*/
|
||||
|
||||
/*printd("Initializing FAT32...\n");
|
||||
fat32_init(0);
|
||||
printd("FAT32 initialized\n");*/
|
||||
|
||||
/*printd("Initializing the PIT...\n");
|
||||
pit_init(1000);
|
||||
printd("PIT initialized\n");*/
|
||||
|
||||
/* --- END INITIALIZATION SECTION --- */
|
||||
|
||||
terminal_setcolor(VGA_COLOR_LIGHT_GREEN);
|
||||
|
||||
const char* espresso_kernel_version = "0.0.0b";
|
||||
/*sleep(1000);*/
|
||||
|
||||
printf("Loading Espresso %s...\n", espresso_kernel_version);
|
||||
begin_anim(espresso_kernel_version);
|
||||
|
||||
/*begin_anim(espresso_kernel_version);*/
|
||||
printf("Guten tag and welcome to Espresso\n");
|
||||
|
||||
printf("Hello and welcome to Espresso\n");
|
||||
|
||||
|
||||
_hang_asm();
|
||||
while (true)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <kernel/syscalls.h>
|
||||
|
||||
|
||||
int16_t syscall_write(int32_t fd, const void* buffer, int32_t length)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
Reference in New Issue
Block a user