feat: started pci driver structure and ide driver structure

This commit is contained in:
2021-02-03 22:50:39 +01:00
parent e8816cfdfd
commit 706147c123
9 changed files with 373 additions and 1 deletions

View File

@@ -12,6 +12,8 @@
#include <libc/readline.h>
#include <libc/string.h>
#include <libk.h>
#include <drivers/pci.h>
#include <drivers/ide.h>
#define BOOTLOADER_NAME_MAX_LENGTH 64
#define CMDLINE_MAX_LENGTH 256
@@ -78,6 +80,8 @@ void print(const char *arg) {
print_current_tick();
} else if (strcmp(arg, "bootinfo") == 0) {
print_bootinfo();
} else if (strcmp(arg, "pci") == 0) {
pci_print_info();
} else {
kprint("Unknown print ");
kprint(arg);
@@ -129,6 +133,12 @@ void kmain(multiboot_info_t *multiboot_info) {
store_bootloader_info(multiboot_info);
init_mmap(multiboot_info);
// register drivers
ide_register();
// scan PCI
pci_scan();
kprint(msg_booted);
kprint(newline);