Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* Project: HARTIK 3.0 Network Library */ |
2 | /* Description: Hard Real TIme Kernel for 8086 compatible */ |
||
3 | /* Author: Luca Abeni */ |
||
4 | /* Date: 14/4/1997 */ |
||
5 | |||
6 | /* File: PCI.H */ |
||
7 | /* Revision: 1.02 */ |
||
8 | |||
9 | #ifndef __PCI_H__ |
||
10 | #define __PCI_H__ |
||
11 | |||
80 | pj | 12 | #include "ll/sys/cdefs.h" |
2 | pj | 13 | |
80 | pj | 14 | __BEGIN_DECLS |
15 | |||
2 | pj | 16 | #define N_MAX_DEVS 10 |
17 | |||
18 | typedef struct pci_regs { |
||
19 | WORD VendorId; |
||
20 | WORD DeviceId; |
||
21 | WORD PciCommand; |
||
22 | WORD PciStatus; |
||
23 | BYTE reserved1; |
||
24 | BYTE dummy; |
||
25 | WORD ClassCode; |
||
26 | BYTE reserved2; |
||
27 | BYTE LatencyTimer; |
||
28 | BYTE HeaderType; |
||
29 | BYTE reserved3; |
||
30 | DWORD IoBaseAddress; |
||
31 | DWORD reserved4; |
||
32 | DWORD reserved5; |
||
33 | DWORD reserved6; |
||
34 | DWORD reserved7; |
||
35 | DWORD reserved8; |
||
36 | DWORD reserved9; |
||
37 | DWORD reserved10; |
||
38 | DWORD BiosRomControl; |
||
39 | DWORD reserved11; |
||
40 | DWORD reserver12; |
||
41 | BYTE InterruptLine; |
||
42 | BYTE InterruptPin; |
||
43 | BYTE MinGnt; |
||
44 | BYTE MaxLat; |
||
45 | DWORD InternalConfig; |
||
46 | } PCI_REGS; |
||
47 | |||
48 | typedef struct pci_des { |
||
49 | BYTE bus; |
||
50 | BYTE dev; |
||
51 | BYTE mem[256]; |
||
52 | } PCI_DES; |
||
53 | |||
54 | /* |
||
55 | * Error values that may be returned by the PCI bios. Use |
||
56 | * pcibios_strerror() to convert to a printable string. |
||
57 | */ |
||
58 | #define PCIBIOS_SUCCESSFUL 0x00 |
||
59 | #define PCIBIOS_FUNC_NOT_SUPPORTED 0x81 |
||
60 | #define PCIBIOS_BAD_VENDOR_ID 0x83 |
||
61 | #define PCIBIOS_DEVICE_NOT_FOUND 0x86 |
||
62 | #define PCIBIOS_BAD_REGISTER_NUMBER 0x87 |
||
63 | #define PCIBIOS_SET_FAILED 0x88 |
||
64 | #define PCIBIOS_BUFFER_TOO_SMALL 0x89 |
||
65 | |||
66 | |||
67 | /*int pci_detect(struct pci_des *p_des); |
||
68 | void pci_show(struct pci_des *PCIdes, int n);*/ |
||
69 | int pci_init(void); |
||
70 | void pci_show(void); |
||
71 | int scan_bus(struct pci_des *p_des); |
||
72 | struct pci_regs *pci_class(DWORD class_code, WORD index, BYTE *bus, BYTE *dev); |
||
73 | struct pci_regs *pci_device(WORD vendor, WORD device, WORD index, BYTE *bus, BYTE *dev); |
||
74 | |||
80 | pj | 75 | __END_DECLS |
2 | pj | 76 | |
77 | #endif |
||
78 |