Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Paolo Gai <pj@gandalf.sssup.it> |
||
10 | * Massimiliano Giorgi <massy@gandalf.sssup.it> |
||
11 | * Luca Abeni <luca@gandalf.sssup.it> |
||
12 | * (see the web pages for full authors list) |
||
13 | * |
||
14 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
15 | * |
||
16 | * http://www.sssup.it |
||
17 | * http://retis.sssup.it |
||
18 | * http://shark.sssup.it |
||
19 | */ |
||
20 | |||
21 | /** |
||
22 | ------------ |
||
23 | CVS : $Id: pci.h,v 1.1.1.1 2002-03-29 14:12:51 pj Exp $ |
||
24 | |||
25 | File: $File$ |
||
26 | Revision: $Revision: 1.1.1.1 $ |
||
27 | Last update: $Date: 2002-03-29 14:12:51 $ |
||
28 | ------------ |
||
29 | |||
30 | **/ |
||
31 | |||
32 | /* |
||
33 | * Copyright (C) 2000 Luca Abeni |
||
34 | * |
||
35 | * This program is free software; you can redistribute it and/or modify |
||
36 | * it under the terms of the GNU General Public License as published by |
||
37 | * the Free Software Foundation; either version 2 of the License, or |
||
38 | * (at your option) any later version. |
||
39 | * |
||
40 | * This program is distributed in the hope that it will be useful, |
||
41 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
42 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
43 | * GNU General Public License for more details. |
||
44 | * |
||
45 | * You should have received a copy of the GNU General Public License |
||
46 | * along with this program; if not, write to the Free Software |
||
47 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
48 | * |
||
49 | */ |
||
50 | |||
51 | /* Project: HARTIK 3.0 Network Library */ |
||
52 | /* Description: Hard Real TIme Kernel for 8086 compatible */ |
||
53 | /* Author: Luca Abeni */ |
||
54 | /* Date: 14/4/1997 */ |
||
55 | |||
56 | /* File: PCI.H */ |
||
57 | /* Revision: 1.02 */ |
||
58 | |||
59 | #ifndef __PCI_H__ |
||
60 | #define __PCI_H__ |
||
61 | |||
62 | #include <drivers/llpci.h> |
||
63 | |||
64 | #ifdef __cplusplus |
||
65 | extern "C" { |
||
66 | #endif |
||
67 | |||
68 | #define N_MAX_DEVS 10 |
||
69 | |||
70 | typedef struct pci_regs { |
||
71 | WORD VendorId; |
||
72 | WORD DeviceId; |
||
73 | WORD PciCommand; |
||
74 | WORD PciStatus; |
||
75 | BYTE reserved1; |
||
76 | BYTE dummy; |
||
77 | WORD ClassCode; |
||
78 | BYTE reserved2; |
||
79 | BYTE LatencyTimer; |
||
80 | BYTE HeaderType; |
||
81 | BYTE reserved3; |
||
82 | DWORD IoBaseAddress; |
||
83 | DWORD reserved4; |
||
84 | DWORD reserved5; |
||
85 | DWORD reserved6; |
||
86 | DWORD reserved7; |
||
87 | DWORD reserved8; |
||
88 | DWORD reserved9; |
||
89 | DWORD reserved10; |
||
90 | DWORD BiosRomControl; |
||
91 | DWORD reserved11; |
||
92 | DWORD reserver12; |
||
93 | BYTE InterruptLine; |
||
94 | BYTE InterruptPin; |
||
95 | BYTE MinGnt; |
||
96 | BYTE MaxLat; |
||
97 | DWORD InternalConfig; |
||
98 | } PCI_REGS; |
||
99 | |||
100 | typedef struct pci_des { |
||
101 | BYTE bus; |
||
102 | BYTE dev; |
||
103 | BYTE mem[256]; |
||
104 | } PCI_DES; |
||
105 | |||
106 | /* |
||
107 | * Error values that may be returned by the PCI bios. Use |
||
108 | * pcibios_strerror() to convert to a printable string. |
||
109 | */ |
||
110 | #define PCIBIOS_SUCCESSFUL 0x00 |
||
111 | #define PCIBIOS_FUNC_NOT_SUPPORTED 0x81 |
||
112 | #define PCIBIOS_BAD_VENDOR_ID 0x83 |
||
113 | #define PCIBIOS_DEVICE_NOT_FOUND 0x86 |
||
114 | #define PCIBIOS_BAD_REGISTER_NUMBER 0x87 |
||
115 | #define PCIBIOS_SET_FAILED 0x88 |
||
116 | #define PCIBIOS_BUFFER_TOO_SMALL 0x89 |
||
117 | |||
118 | |||
119 | /*int pci_detect(struct pci_des *p_des); |
||
120 | void pci_show(struct pci_des *PCIdes, int n);*/ |
||
121 | int pci_init(void); |
||
122 | void pci_show(void); |
||
123 | int scan_bus(struct pci_des *p_des); |
||
124 | struct pci_regs *pci_class(DWORD class_code, WORD index, BYTE *bus, BYTE *dev); |
||
125 | struct pci_regs *pci_device(WORD vendor, WORD device, WORD index, BYTE *bus, BYTE *dev); |
||
126 | |||
127 | #ifdef __cplusplus |
||
128 | }; |
||
129 | #endif |
||
130 | |||
131 | #endif |
||
132 |