-
Notifications
You must be signed in to change notification settings - Fork 0
/
PCI.H
27 lines (17 loc) · 769 Bytes
/
PCI.H
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
#ifndef PCI_H
#define PCI_H
#include "TYPES.H"
/* PCI functions for MS-DOS */
#define PCI_BUS_MAX 255 /* Maximum of 256 PCI buses per machine */
#define PCI_SLOT_MAX 31 /* Maximum of 32 PCI Slots per bus */
u32 pci_read_32(u32 bus, u32 slot, u32 func, u32 offset);
u16 pci_read_16(u32 bus, u32 slot, u32 func, u32 offset);
u8 pci_read_8 (u32 bus, u32 slot, u32 func, u32 offset);
void pci_write_32(u32 bus, u32 slot, u32 func, u32 offset, u32 value);
void pci_write_16(u32 bus, u32 slot, u32 func, u32 offset, u16 value);
void pci_write_8 (u32 bus, u32 slot, u32 func, u32 offset, u8 value);
u16 pci_get_vendor(u8 bus, u8 slot, u8 func);
u16 pci_get_device(u8 bus, u8 slot, u8 func);
int pci_enum_dev(u8 bus, u8 slot);
int pci_test();
#endif