Rev 2 | Rev 431 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
425 | victor | 1 | $Revision: 425 $ |
1 | ha | 2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
3 | ;; ;; |
||
4 | ;; PCI16.INC ;; |
||
5 | ;; ;; |
||
6 | ;; 16 bit PCI driver code ;; |
||
7 | ;; ;; |
||
8 | ;; Version 0.2 December 21st, 2002 ;; |
||
9 | ;; ;; |
||
10 | ;; Author: Victor Prodan, victorprodan@yahoo.com ;; |
||
11 | ;; ;; |
||
12 | ;; See file COPYING for details ;; |
||
13 | ;; ;; |
||
14 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
15 | |||
16 | |||
17 | init_pci_16: |
||
18 | |||
19 | pushad |
||
20 | |||
21 | xor ax,ax |
||
22 | mov es,ax |
||
23 | mov byte [es:0x9020],1 ;default mechanism:1 |
||
24 | mov ax,0xb101 |
||
25 | int 0x1a |
||
26 | or ah,ah |
||
27 | jnz pci16skip |
||
28 | |||
29 | mov [es:0x9021],cl ;last PCI bus in system |
||
30 | mov [es:0x9022],bx |
||
31 | mov [es:0x9024],edi |
||
32 | |||
33 | ; we have a PCI BIOS, so check which configuration mechanism(s) |
||
34 | ; it supports |
||
35 | ; AL = PCI hardware characteristics (bit0 => mechanism1, bit1 => mechanism2) |
||
36 | test al,1 |
||
37 | jnz pci16skip |
||
38 | test al,2 |
||
39 | jz pci16skip |
||
40 | mov byte [es:0x9020],2 ; if (al&3)==2 => mechanism 2 |
||
41 | |||
42 | pci16skip: |
||
43 | |||
44 | mov ax,0x1000 |
||
45 | mov es,ax |
||
46 | |||
47 | popad |