Subversion Repositories Kolibri OS

Rev

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

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