Subversion Repositories Kolibri OS

Rev

Rev 2434 | 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
;;                                                              ;;
2465 Serge 3
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
431 serge 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: 2465 $
1 ha 19
 
593 mikedld 20
 
1 ha 21
init_pci_16:
22
 
23
        pushad
24
 
2434 Serge 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
1 ha 32
 
2434 Serge 33
        mov     [es:0x9021], cl;last PCI bus in system
34
        mov     [es:0x9022], bx
35
        mov     [es:0x9024], edi
1 ha 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)
2434 Serge 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
1 ha 45
 
46
pci16skip:
47
 
2434 Serge 48
        mov     ax, 0x1000
49
        mov     es, ax
1 ha 50
 
431 serge 51
        popad