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

25
kernel/drivers/pci.h Normal file
View File

@@ -0,0 +1,25 @@
//
// Created by rick on 02-02-21.
//
#ifndef NEW_KERNEL_PCI_H
#define NEW_KERNEL_PCI_H
#include <types.h>
#define PCI_CLASS_MASS_STORAGE 0x01
#define PCI_SUB_CLASS_IDE 0x01
#define PCI_FLAG_USE_SUBCLASS (1 << 0)
#define PCI_REGISTER_OK 0;
#define PCI_REGISTER_ERR_FULL -1;
typedef void (*pci_driver)(u8 bus, u8 slot, u8 func);
void pci_print_info();
u32 pci_register_driver(u8 pci_class, u8 pci_subclass, u8 flags, pci_driver driver, const char *driver_name);
void pci_scan();
#endif //NEW_KERNEL_PCI_H