feature (sysconfig): implemented basic system configuration
This commit is contained in:
parent
c1ec695ff6
commit
a6e11d7e4e
|
@ -0,0 +1,16 @@
|
||||||
|
// This file is part of noxos and licensed under the MIT open source license
|
||||||
|
|
||||||
|
#ifndef NOXOS_CONFIG_H
|
||||||
|
#define NOXOS_CONFIG_H
|
||||||
|
|
||||||
|
#include "utils/stdtypes.h"
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
bool ps2_acpi_validation;
|
||||||
|
} sysconfig_T;
|
||||||
|
|
||||||
|
void sysconfig_default_init();
|
||||||
|
|
||||||
|
extern sysconfig_T* g_sysconfig;
|
||||||
|
|
||||||
|
#endif //NOXOS_CONFIG_H
|
|
@ -0,0 +1,10 @@
|
||||||
|
// This file is part of noxos and licensed under the MIT open source license
|
||||||
|
|
||||||
|
#include "boot/config.h"
|
||||||
|
|
||||||
|
sysconfig_T G_sysconfig;
|
||||||
|
sysconfig_T* g_sysconfig = &G_sysconfig;
|
||||||
|
|
||||||
|
void sysconfig_default_init() {
|
||||||
|
g_sysconfig->ps2_acpi_validation = true;
|
||||||
|
}
|
|
@ -4,6 +4,7 @@
|
||||||
#include "utils/core.h"
|
#include "utils/core.h"
|
||||||
#include "utils/memory.h"
|
#include "utils/memory.h"
|
||||||
#include "boot/boot_info.h"
|
#include "boot/boot_info.h"
|
||||||
|
#include "boot/config.h"
|
||||||
#include "platform/interrupts.h"
|
#include "platform/interrupts.h"
|
||||||
#include "platform/gdt.h"
|
#include "platform/gdt.h"
|
||||||
#include "mm/page_frame.h"
|
#include "mm/page_frame.h"
|
||||||
|
@ -14,11 +15,9 @@
|
||||||
#include "drivers/fs/vfs.h"
|
#include "drivers/fs/vfs.h"
|
||||||
#include "drivers/acpi/acpi.h"
|
#include "drivers/acpi/acpi.h"
|
||||||
#include "drivers/pci.h"
|
#include "drivers/pci.h"
|
||||||
//#include "drivers/ps2/keyboard.h"
|
#include "drivers/ps2/controller.h"
|
||||||
#include "proc/scheduler.h"
|
#include "proc/scheduler.h"
|
||||||
|
|
||||||
#include "platform/syscall.h"
|
|
||||||
|
|
||||||
void limine_terminal_print(boot_info_T* boot_info, string_t string) {
|
void limine_terminal_print(boot_info_T* boot_info, string_t string) {
|
||||||
boot_info->terminal->write(boot_info->terminal->terminals[0], string, string_length(string));
|
boot_info->terminal->write(boot_info->terminal->terminals[0], string, string_length(string));
|
||||||
}
|
}
|
||||||
|
@ -42,11 +41,13 @@ void kernel_init(boot_info_T* boot_info) {
|
||||||
|
|
||||||
vfs_init(boot_info);
|
vfs_init(boot_info);
|
||||||
|
|
||||||
|
sysconfig_default_init();
|
||||||
|
|
||||||
acpi_init(boot_info);
|
acpi_init(boot_info);
|
||||||
|
|
||||||
pci_init();
|
pci_init();
|
||||||
|
|
||||||
// ps2_keyboard_init();
|
ps2_controller_init();
|
||||||
|
|
||||||
scheduler_init(boot_info);
|
scheduler_init(boot_info);
|
||||||
}
|
}
|
||||||
|
@ -60,8 +61,6 @@ void kmain(boot_info_T boot_info) {
|
||||||
|
|
||||||
log(LOG_INFO, "!=====[ Kernel Initialized ]=====!\n");
|
log(LOG_INFO, "!=====[ Kernel Initialized ]=====!\n");
|
||||||
|
|
||||||
DEBUG("test %d", 1312);
|
|
||||||
|
|
||||||
pci_device_T* ahci_controller = pci_manager_find_device(PCI_CLASS_MASS_STORAGE_CONTROLLER, PCI_SUBCLASS_SERIAL_ATA_CONTROLLER, 1);
|
pci_device_T* ahci_controller = pci_manager_find_device(PCI_CLASS_MASS_STORAGE_CONTROLLER, PCI_SUBCLASS_SERIAL_ATA_CONTROLLER, 1);
|
||||||
|
|
||||||
CORE_HALT_FOREVER
|
CORE_HALT_FOREVER
|
||||||
|
|
Loading…
Reference in New Issue