PCI IDE driver, new create_volume () syscall, test scripts
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m37s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m37s
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef _KERNEL_DEVICE_PCI_H
|
||||
#define _KERNEL_DEVICE_PCI_H
|
||||
|
||||
#include <device/pci_info.h>
|
||||
#include <libk/std.h>
|
||||
|
||||
#define PCI_CONFIG_ADDR 0xCF8
|
||||
@@ -20,16 +21,6 @@
|
||||
#define PCI_BIST 0x0F
|
||||
#define PCI_BAR0 0x10
|
||||
|
||||
struct pci_dev {
|
||||
uint8_t bus;
|
||||
uint8_t slot;
|
||||
uint8_t func;
|
||||
uint16_t vendor;
|
||||
uint16_t device;
|
||||
uint8_t classcode;
|
||||
uint8_t subclass;
|
||||
};
|
||||
|
||||
struct pci_vendor {
|
||||
uint16_t id;
|
||||
const char* name;
|
||||
@@ -47,10 +38,28 @@ struct pci_class {
|
||||
const char* name;
|
||||
};
|
||||
|
||||
typedef void (*pci_cb_func_t) (struct pci_dev pci_dev);
|
||||
struct pci_driver_info {
|
||||
uint8_t class;
|
||||
uint8_t subclass;
|
||||
bool (*init) (struct pci_info pci_info);
|
||||
};
|
||||
|
||||
typedef void (*pci_cb_func_t) (struct pci_info pci_info);
|
||||
|
||||
void pci_init (void);
|
||||
|
||||
uint32_t pci_read32 (uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset);
|
||||
|
||||
void pci_write32 (uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset, uint32_t value);
|
||||
|
||||
uint16_t pci_read16 (uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset);
|
||||
|
||||
void pci_write16 (uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset, uint16_t value);
|
||||
|
||||
uint8_t pci_read8 (uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset);
|
||||
|
||||
void pci_write8 (uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset, uint8_t value);
|
||||
|
||||
extern const struct pci_vendor pci_vendors[];
|
||||
|
||||
extern const struct pci_device_id pci_device_names[];
|
||||
|
||||
Reference in New Issue
Block a user