-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpci.h
More file actions
34 lines (25 loc) · 627 Bytes
/
pci.h
File metadata and controls
34 lines (25 loc) · 627 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef JOS_KERN_PCI_H
#define JOS_KERN_PCI_H
//#include <inc/types.h>
#include "types.h"
// PCI subsystem interface
enum { pci_res_bus, pci_res_mem, pci_res_io, pci_res_max };
struct pci_bus;
struct pci_func {
struct pci_bus *bus; // Primary bus for bridges
uint32_t dev;
uint32_t func;
uint32_t dev_id;
uint32_t dev_class;
uint32_t reg_base[6];
uint32_t reg_size[6];
uint8_t irq_line;
};
struct pci_bus {
struct pci_func *parent_bridge;
uint32_t busno;
};
int pci_init(void);
void pci_func_enable(struct pci_func *f);
//int pci_e1000_attach_me(struct pci_func *pcif);
#endif