wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2002 |
| 3 | * Daniel Engström, Omicron Ceti AB, daniel@omicron.se |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 4 | * |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 5 | * See file CREDITS for list of people who contributed to this |
| 6 | * project. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of |
| 11 | * the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 21 | * MA 02111-1307 USA |
| 22 | */ |
| 23 | |
| 24 | /* |
| 25 | * x86 realmode assembly implementation of a PCI BIOS |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 26 | * for platforms that use one PCI hose and configuration |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 27 | * access type 1. (The common case for low-end PC's) |
| 28 | */ |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 29 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 30 | #include "bios.h" |
| 31 | |
| 32 | #define PCI_BIOS_DEBUG |
| 33 | |
| 34 | .section .bios, "ax" |
| 35 | .code16 |
| 36 | .globl realmode_pci_bios_call_entry |
| 37 | realmode_pci_bios_call_entry: |
| 38 | MAKE_BIOS_STACK |
| 39 | call realmode_pci_bios |
| 40 | RESTORE_CALLERS_STACK |
| 41 | ret |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 42 | |
| 43 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 44 | .globl realmode_pci_bios |
| 45 | realmode_pci_bios: |
| 46 | gs movw OFFS_AX(%bp), %ax |
| 47 | cmpb $1, %al |
| 48 | je pci_bios_present |
| 49 | cmpb $2, %al |
| 50 | je pci_bios_find_device |
| 51 | cmpb $3, %al |
| 52 | je pci_bios_find_class |
| 53 | cmpb $6, %al |
| 54 | je pci_bios_generate_special_cycle |
| 55 | cmpb $8, %al |
| 56 | je pci_bios_read_cfg_byte |
| 57 | cmpb $9, %al |
| 58 | je pci_bios_read_cfg_word |
| 59 | cmpb $10, %al |
| 60 | je pci_bios_read_cfg_dword |
| 61 | cmpb $11, %al |
| 62 | je pci_bios_write_cfg_byte |
| 63 | cmpb $12, %al |
| 64 | je pci_bios_write_cfg_word |
| 65 | cmpb $13, %al |
| 66 | je pci_bios_write_cfg_dword |
| 67 | cmpb $14, %al |
| 68 | je pci_bios_get_irq_routing |
| 69 | cmpb $15, %al |
| 70 | je pci_bios_set_irq |
| 71 | jmp unknown_function |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 72 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 73 | /*****************************************************************************/ |
| 74 | |
| 75 | pci_bios_present: |
| 76 | #ifdef PCI_BIOS_DEBUG |
| 77 | cs incl num_pci_bios_present |
| 78 | #endif |
| 79 | movl $0x20494350, %eax |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 80 | gs movl %eax, OFFS_EDX(%bp) |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 81 | movb $0x01, %al |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 82 | gs movb %al, OFFS_AL(%bp) /* We support cfg type 1 */ |
| 83 | movw $0x0210, %ax /* version 2.10 */ |
| 84 | gs movw %ax, OFFS_BX(%bp) |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 85 | cs movb pci_last_bus, %al /* last bus number */ |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 86 | gs movb %al, OFFS_CL(%bp) |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 87 | jmp clear_carry |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 88 | |
| 89 | /*****************************************************************************/ |
| 90 | |
| 91 | /* device 0-31, function 0-7 */ |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 92 | pci_bios_find_device: |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 93 | #ifdef PCI_BIOS_DEBUG |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 94 | cs incl num_pci_bios_find_device |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 95 | #endif |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 96 | gs movw OFFS_CX(%bp), %di |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 97 | shll $16, %edi |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 98 | gs movw OFFS_DX(%bp), %di /* edi now holds device in upper 16 |
| 99 | * bits and vendor in lower 16 bits */ |
| 100 | gs movw OFFS_SI(%bp), %si |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 101 | xorw %bx, %bx /* start at bus 0 dev 0 function 0 */ |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 102 | pfd_loop: |
| 103 | xorw %ax, %ax /* dword 0 is vendor/device */ |
| 104 | call __pci_bios_select_register |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 105 | movw $0xcfc, %dx |
| 106 | inl %dx, %eax |
| 107 | cmpl %edi, %eax /* our device ? */ |
| 108 | je pfd_found_one |
| 109 | pfd_next_dev: |
| 110 | /* check for multi function devices */ |
| 111 | movw %bx, %ax |
| 112 | andw $3, %ax |
| 113 | jnz pfd_function_not_zero |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 114 | movw $0x000c, %ax |
| 115 | call __pci_bios_select_register |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 116 | movw $0xcfe, %dx |
| 117 | inb %dx, %al |
| 118 | andb $0x80, %al |
| 119 | jz pfd_not_multi_function |
| 120 | pfd_function_not_zero: |
| 121 | incw %bx /* next function, overflows in to |
| 122 | * device number, then bus number */ |
| 123 | jmp pfd_check_bus |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 124 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 125 | pfd_not_multi_function: |
| 126 | andw $0xfff8, %bx /* remove function bits */ |
| 127 | addw $0x0008, %bx /* next device, overflows in to bus number */ |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 128 | pfd_check_bus: |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 129 | cs movb pci_last_bus, %ah |
| 130 | cmpb %ah, %bh |
| 131 | ja pfd_not_found |
| 132 | jmp pfd_loop |
| 133 | pfd_found_one: |
| 134 | decw %si |
| 135 | js pfd_done |
| 136 | jmp pfd_next_dev |
| 137 | |
| 138 | pfd_done: |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 139 | gs movw %bx, OFFS_BX(%bp) |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 140 | jmp clear_carry |
| 141 | |
| 142 | pfd_not_found: |
| 143 | movb $0x86, %ah /* device not found */ |
| 144 | jmp set_carry |
| 145 | |
| 146 | /*****************************************************************************/ |
| 147 | |
| 148 | pci_bios_find_class: |
| 149 | #ifdef PCI_BIOS_DEBUG |
| 150 | cs incl num_pci_bios_find_class |
| 151 | #endif |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 152 | gs movl OFFS_ECX(%bp), %edi |
| 153 | andl $0x00ffffff, %edi /* edi now holds class-code in lower 24 bits */ |
| 154 | gs movw OFFS_SI(%bp), %si |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 155 | xorw %bx, %bx /* start at bus 0 dev 0 function 0 */ |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 156 | pfc_loop: |
| 157 | movw $8, %ax /* dword 8 is class-code high 24bits */ |
| 158 | call __pci_bios_select_register |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 159 | movw $0xcfc, %dx |
| 160 | inl %dx, %eax |
| 161 | shrl $8, %eax |
| 162 | andl $0x00ffffff, %eax |
| 163 | cmpl %edi, %eax /* our device ? */ |
| 164 | je pfc_found_one |
| 165 | pfc_next_dev: |
| 166 | /* check for multi function devices */ |
| 167 | andw $3, %bx |
| 168 | jnz pfc_function_not_zero |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 169 | movw $0x000c, %ax |
| 170 | call __pci_bios_select_register |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 171 | movw $0xcfe, %dx |
| 172 | inb %dx, %al |
| 173 | andb $0x80, %al |
| 174 | jz pfc_not_multi_function |
| 175 | pfc_function_not_zero: |
| 176 | incw %bx /* next function, overflows in to |
| 177 | * device number, then bus number */ |
| 178 | jmp pfc_check_bus |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 179 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 180 | pfc_not_multi_function: |
| 181 | andw $0xfff8, %bx /* remove function bits */ |
| 182 | addw $0x0008, %bx /* next device, overflows in to bus number */ |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 183 | pfc_check_bus: |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 184 | cs movb pci_last_bus, %ah |
| 185 | cmpb %ah, %bh |
| 186 | ja pfc_not_found |
| 187 | jmp pfc_loop |
| 188 | pfc_found_one: |
| 189 | decw %si |
| 190 | js pfc_done |
| 191 | jmp pfc_next_dev |
| 192 | |
| 193 | pfc_done: |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 194 | gs movw %bx, OFFS_BX(%bp) |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 195 | jmp clear_carry |
| 196 | |
| 197 | pfc_not_found: |
| 198 | movb $0x86, %ah /* device not found */ |
| 199 | jmp set_carry |
| 200 | |
| 201 | /*****************************************************************************/ |
| 202 | |
| 203 | pci_bios_generate_special_cycle: |
| 204 | #ifdef PCI_BIOS_DEBUG |
| 205 | cs incl num_pci_bios_generate_special_cycle |
| 206 | #endif |
| 207 | movb $0x81, %ah /* function not supported */ |
| 208 | jmp set_carry |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 209 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 210 | /*****************************************************************************/ |
| 211 | |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 212 | pci_bios_read_cfg_byte: |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 213 | #ifdef PCI_BIOS_DEBUG |
| 214 | cs incl num_pci_bios_read_cfg_byte |
| 215 | #endif |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 216 | call pci_bios_select_register |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 217 | gs movw OFFS_DI(%bp), %dx |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 218 | andw $3, %dx |
| 219 | addw $0xcfc, %dx |
| 220 | inb %dx, %al |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 221 | gs movb %al, OFFS_CL(%bp) |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 222 | jmp clear_carry |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 223 | |
| 224 | /*****************************************************************************/ |
| 225 | |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 226 | pci_bios_read_cfg_word: |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 227 | #ifdef PCI_BIOS_DEBUG |
| 228 | cs incl num_pci_bios_read_cfg_word |
| 229 | #endif |
| 230 | call pci_bios_select_register |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 231 | gs movw OFFS_DI(%bp), %dx |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 232 | andw $2, %dx |
| 233 | addw $0xcfc, %dx |
| 234 | inw %dx, %ax |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 235 | gs movw %ax, OFFS_CX(%bp) |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 236 | jmp clear_carry |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 237 | |
| 238 | |
| 239 | /*****************************************************************************/ |
| 240 | |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 241 | pci_bios_read_cfg_dword: |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 242 | #ifdef PCI_BIOS_DEBUG |
| 243 | cs incl num_pci_bios_read_cfg_dword |
| 244 | #endif |
| 245 | call pci_bios_select_register |
| 246 | movw $0xcfc, %dx |
| 247 | inl %dx, %eax |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 248 | gs movl %eax, OFFS_ECX(%bp) |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 249 | jmp clear_carry |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 250 | |
| 251 | /*****************************************************************************/ |
| 252 | |
| 253 | pci_bios_write_cfg_byte: |
| 254 | #ifdef PCI_BIOS_DEBUG |
| 255 | cs incl num_pci_bios_write_cfg_byte |
| 256 | #endif |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 257 | call pci_bios_select_register |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 258 | gs movw OFFS_DI(%bp), %dx |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 259 | gs movb OFFS_CL(%bp), %al |
| 260 | andw $3, %dx |
| 261 | addw $0xcfc, %dx |
| 262 | outb %al, %dx |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 263 | jmp clear_carry |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 264 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 265 | /*****************************************************************************/ |
| 266 | |
| 267 | pci_bios_write_cfg_word: |
| 268 | #ifdef PCI_BIOS_DEBUG |
| 269 | cs incl num_pci_bios_write_cfg_word |
| 270 | #endif |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 271 | call pci_bios_select_register |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 272 | gs movw OFFS_DI(%bp), %dx |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 273 | gs movw OFFS_CX(%bp), %ax |
| 274 | andw $2, %dx |
| 275 | addw $0xcfc, %dx |
| 276 | outw %ax, %dx |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 277 | jmp clear_carry |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 278 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 279 | /*****************************************************************************/ |
| 280 | |
| 281 | pci_bios_write_cfg_dword: |
| 282 | #ifdef PCI_BIOS_DEBUG |
| 283 | cs incl num_pci_bios_write_cfg_dword |
| 284 | #endif |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 285 | call pci_bios_select_register |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 286 | gs movl OFFS_ECX(%bp), %eax |
| 287 | movw $0xcfc, %dx |
| 288 | outl %eax, %dx |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 289 | jmp clear_carry |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 290 | |
| 291 | /*****************************************************************************/ |
| 292 | |
| 293 | pci_bios_get_irq_routing: |
| 294 | #ifdef PCI_BIOS_DEBUG |
| 295 | cs incl num_pci_bios_get_irq_routing |
| 296 | #endif |
| 297 | movb $0x81, %ah /* function not supported */ |
| 298 | jmp set_carry |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 299 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 300 | /*****************************************************************************/ |
| 301 | |
| 302 | pci_bios_set_irq: |
| 303 | #ifdef PCI_BIOS_DEBUG |
| 304 | cs incl num_pci_bios_set_irq |
| 305 | #endif |
| 306 | movb $0x81, %ah /* function not supported */ |
| 307 | jmp set_carry |
| 308 | |
| 309 | /*****************************************************************************/ |
| 310 | |
| 311 | unknown_function: |
| 312 | #ifdef PCI_BIOS_DEBUG |
| 313 | cs incl num_pci_bios_unknown_function |
| 314 | #endif |
| 315 | movb $0x81, %ah /* function not supported */ |
| 316 | jmp set_carry |
| 317 | |
| 318 | /*****************************************************************************/ |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 319 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 320 | pci_bios_select_register: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 321 | gs movw OFFS_BX(%bp), %bx |
| 322 | gs movw OFFS_DI(%bp), %ax |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 323 | /* destroys eax, dx */ |
| 324 | __pci_bios_select_register: /* BX holds device id, AX holds register index */ |
| 325 | pushl %ebx |
| 326 | andl $0xfc, %eax |
| 327 | andl $0xffff, %ebx |
| 328 | shll $8, %ebx |
| 329 | orl %ebx, %eax |
| 330 | orl $0x80000000, %eax |
| 331 | movw $0xcf8, %dx |
| 332 | outl %eax, %dx |
| 333 | popl %ebx |
| 334 | ret |
| 335 | |
| 336 | |
| 337 | clear_carry: |
| 338 | gs movw OFFS_FLAGS(%bp), %ax |
| 339 | andw $0xfffe, %ax /* clear carry -- function succeeded */ |
| 340 | gs movw %ax, OFFS_FLAGS(%bp) |
| 341 | xorw %ax, %ax |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 342 | gs movb %ah, OFFS_AH(%bp) |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 343 | ret |
| 344 | |
| 345 | set_carry: |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 346 | gs movb %ah, OFFS_AH(%bp) |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 347 | gs movw OFFS_FLAGS(%bp), %ax |
| 348 | orw $1, %ax /* return carry -- function not supported */ |
| 349 | gs movw %ax, OFFS_FLAGS(%bp) |
| 350 | movw $-1, %ax |
| 351 | ret |
| 352 | |
| 353 | /*****************************************************************************/ |
| 354 | |
| 355 | .globl pci_last_bus |
| 356 | pci_last_bus: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 357 | .byte 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 358 | |
| 359 | #ifdef PCI_BIOS_DEBUG |
| 360 | .globl num_pci_bios_present |
| 361 | num_pci_bios_present: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 362 | .long 0 |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 363 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 364 | .globl num_pci_bios_find_device |
| 365 | num_pci_bios_find_device: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 366 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 367 | |
| 368 | .globl num_pci_bios_find_class |
| 369 | num_pci_bios_find_class: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 370 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 371 | |
| 372 | .globl num_pci_bios_generate_special_cycle |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 373 | num_pci_bios_generate_special_cycle: |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 374 | .long 0 |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 375 | |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 376 | .globl num_pci_bios_read_cfg_byte |
| 377 | num_pci_bios_read_cfg_byte: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 378 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 379 | |
| 380 | .globl num_pci_bios_read_cfg_word |
| 381 | num_pci_bios_read_cfg_word: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 382 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 383 | |
| 384 | .globl num_pci_bios_read_cfg_dword |
| 385 | num_pci_bios_read_cfg_dword: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 386 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 387 | |
| 388 | .globl num_pci_bios_write_cfg_byte |
| 389 | num_pci_bios_write_cfg_byte: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 390 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 391 | |
| 392 | .globl num_pci_bios_write_cfg_word |
| 393 | num_pci_bios_write_cfg_word: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 394 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 395 | |
| 396 | .globl num_pci_bios_write_cfg_dword |
| 397 | num_pci_bios_write_cfg_dword: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 398 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 399 | |
| 400 | .globl num_pci_bios_get_irq_routing |
| 401 | num_pci_bios_get_irq_routing: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 402 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 403 | |
| 404 | .globl num_pci_bios_set_irq |
| 405 | num_pci_bios_set_irq: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 406 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 407 | |
| 408 | .globl num_pci_bios_unknown_function |
| 409 | num_pci_bios_unknown_function: |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 410 | .long 0 |
wdenk | 7a8e9bed | 2003-05-31 18:35:21 +0000 | [diff] [blame] | 411 | #endif |