Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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