Subversion Repositories Kolibri OS

Rev

Rev 465 | Rev 2288 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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