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