feat: cleanup init code, small other refactors
This commit is contained in:
@@ -5,10 +5,6 @@
|
||||
#ifndef NEW_KERNEL_ACPI_H
|
||||
#define NEW_KERNEL_ACPI_H
|
||||
|
||||
void acpi_parse();
|
||||
|
||||
void acpi_init();
|
||||
|
||||
void* acpi_find_table_by_name(const char* name, int skip);
|
||||
|
||||
#endif //NEW_KERNEL_ACPI_H
|
||||
|
||||
@@ -9,6 +9,4 @@
|
||||
|
||||
void store_bootloader_info(multiboot_info_t *multiboot_info);
|
||||
|
||||
void main_loop(void *data);
|
||||
|
||||
#endif //NEW_KERNEL_COMMAND_H
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
int pit_init(uint32_t freq);
|
||||
int pit_int_frequency(uint32_t freq);
|
||||
|
||||
void print_current_tick();
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@ typedef struct KeyEvent_t {
|
||||
|
||||
char getc();
|
||||
|
||||
void init_keyboard();
|
||||
|
||||
//const char *key_code_to_string(KeyCode key);
|
||||
|
||||
KeyEvent *get_next_event();
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
//
|
||||
// Created by rick on 28-01-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_SERIAL_H
|
||||
#define NEW_KERNEL_SERIAL_H
|
||||
|
||||
int serial_init();
|
||||
|
||||
void serial_kprint(const char *msg);
|
||||
|
||||
#endif //NEW_KERNEL_SERIAL_H
|
||||
@@ -27,8 +27,4 @@
|
||||
#define VGA_COL_MAX 80
|
||||
#define VGA_ROW_MAX 25
|
||||
|
||||
void vga_clear_screen();
|
||||
|
||||
void vga_kprint(const char *msg);
|
||||
|
||||
#endif //MY_KERNEL_VGASCREEN_H
|
||||
|
||||
@@ -17,6 +17,4 @@ void kprint(const char *msg);
|
||||
|
||||
void kprint_sync(const char *msg);
|
||||
|
||||
void kprint_init();
|
||||
|
||||
void kprint_start_task();
|
||||
void kprint_init();
|
||||
@@ -8,13 +8,23 @@
|
||||
#include <sys/types.h>
|
||||
#include <myke/driver.h>
|
||||
|
||||
enum init_stage {
|
||||
INIT_STAGE_EARLY_BOOT_0, // id mapped, high memory, no malloc
|
||||
INIT_STAGE_EARLY_BOOT_1, // memory available, no tasking
|
||||
INIT_STAGE_LATE_BOOT, // time source, memory, most basic hardware available
|
||||
INIT_STAGE_PRE_TASKING, // just before tasking is ready
|
||||
INIT_STAGE_AFTER_BOOT_PRE_INIT, // tasking just started
|
||||
// todo define later stages
|
||||
};
|
||||
|
||||
struct init {
|
||||
const char *name;
|
||||
enum init_stage stage;
|
||||
void (*init)();
|
||||
};
|
||||
|
||||
#define INIT_FUNCTION(order) GENERIC_DRIVER(init, order)
|
||||
|
||||
void init_execute_all();
|
||||
void init_execute_all(enum init_stage stage);
|
||||
|
||||
#endif //NEW_KERNEL_INIT_H
|
||||
|
||||
@@ -66,8 +66,6 @@ uint8_t block_dev_register(block_device_t *device);
|
||||
|
||||
void block_dev_free(block_device_t *device);
|
||||
|
||||
void block_dev_start_task();
|
||||
|
||||
void block_dev_print_info();
|
||||
|
||||
bool block_dev_mount(char *identifier, char *driver);
|
||||
|
||||
Reference in New Issue
Block a user