Rev 6082 | Rev 6295 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6082 | Rev 6102 | ||
---|---|---|---|
Line 12... | Line 12... | ||
12 | int height; |
12 | int height; |
13 | int bpp; |
13 | int bpp; |
14 | int freq; |
14 | int freq; |
15 | }videomode_t; |
15 | }videomode_t; |
Line -... | Line 16... | ||
- | 16 | ||
- | 17 | struct kos32_pdev |
|
- | 18 | { |
|
- | 19 | struct kos32_pdev *prev; |
|
- | 20 | struct kos32_pdev *next; |
|
- | 21 | u32 devid; |
|
- | 22 | u32 class; |
|
- | 23 | u8 devfn; |
|
- | 24 | u8 bus; |
|
- | 25 | u8 reserved[2]; |
|
- | 26 | u32 owner; |
|
- | 27 | } __attribute__((packed)); |
|
16 | 28 | ||
Line 17... | Line 29... | ||
17 | /////////////////////////////////////////////////////////////////////////////// |
29 | /////////////////////////////////////////////////////////////////////////////// |
18 | 30 | ||
Line 84... | Line 96... | ||
84 | void STDCALL SetMouseData(int btn, int x, int y, |
96 | void STDCALL SetMouseData(int btn, int x, int y, |
85 | int z, int h)__asm__("SetMouseData"); |
97 | int z, int h)__asm__("SetMouseData"); |
Line 86... | Line 98... | ||
86 | 98 | ||
Line -... | Line 99... | ||
- | 99 | void FASTCALL SetKeyboardData(u32 data)__asm__("SetKeyboardData"); |
|
Line 87... | Line 100... | ||
87 | void FASTCALL SetKeyboardData(u32 data)__asm__("SetKeyboardData"); |
100 | |
88 | 101 | struct kos32_pdev* IMPORT GetPCIList()__asm__("GetPCIList"); |
|
89 | 102 | ||
Line 111... | Line 124... | ||
111 | PciWrite16(PCI_BUS_FROM_TAG(tag),PCI_DFN_FROM_TAG(tag),(reg),(val)) |
124 | PciWrite16(PCI_BUS_FROM_TAG(tag),PCI_DFN_FROM_TAG(tag),(reg),(val)) |
Line 112... | Line 125... | ||
112 | 125 | ||
113 | #define pciWriteLong(tag, reg, val) \ |
126 | #define pciWriteLong(tag, reg, val) \ |
Line 114... | Line -... | ||
114 | PciWrite32(PCI_BUS_FROM_TAG(tag),PCI_DFN_FROM_TAG(tag),(reg),(val)) |
- | |
115 | - | ||
116 | static inline int pci_read_config_byte(struct pci_dev *dev, int where, |
- | |
117 | u8 *val) |
- | |
118 | { |
- | |
119 | *val = PciRead8(dev->busnr, dev->devfn, where); |
- | |
120 | return 1; |
- | |
121 | } |
- | |
122 | - | ||
123 | static inline int pci_read_config_word(struct pci_dev *dev, int where, |
- | |
124 | u16 *val) |
- | |
125 | { |
- | |
126 | *val = PciRead16(dev->busnr, dev->devfn, where); |
- | |
127 | return 1; |
- | |
128 | } |
- | |
129 | - | ||
130 | static inline int pci_read_config_dword(struct pci_dev *dev, int where, |
- | |
131 | u32 *val) |
- | |
132 | { |
- | |
133 | *val = PciRead32(dev->busnr, dev->devfn, where); |
- | |
134 | return 1; |
- | |
135 | } |
- | |
136 | - | ||
137 | static inline int pci_write_config_byte(struct pci_dev *dev, int where, |
- | |
138 | u8 val) |
- | |
139 | { |
- | |
140 | PciWrite8(dev->busnr, dev->devfn, where, val); |
- | |
141 | return 1; |
- | |
142 | } |
- | |
143 | - | ||
144 | static inline int pci_write_config_word(struct pci_dev *dev, int where, |
- | |
145 | u16 val) |
- | |
146 | { |
- | |
147 | PciWrite16(dev->busnr, dev->devfn, where, val); |
- | |
148 | return 1; |
- | |
149 | } |
- | |
150 | - | ||
151 | static inline int pci_write_config_dword(struct pci_dev *dev, int where, |
- | |
152 | u32 val) |
- | |
153 | { |
- | |
154 | PciWrite32(dev->busnr, dev->devfn, where, val); |
- | |
Line 155... | Line 127... | ||
155 | return 1; |
127 | PciWrite32(PCI_BUS_FROM_TAG(tag),PCI_DFN_FROM_TAG(tag),(reg),(val)) |
Line 156... | Line 128... | ||
156 | } |
128 | |
157 | 129 |