Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
2288 clevermous 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
5363 yogev_ezra 3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
2288 clevermous 4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
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
;;                                                              ;;
16
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17
 
18
$Revision: 7122 $
19
 
20
 
21
init_pci_16:
22
 
23
        pushad
24
 
25
        xor     ax, ax
26
        mov     es, ax
7122 dunkaist 27
        mov     byte [es:BOOT_PCI_DATA], 1;default mechanism:1
2288 clevermous 28
        mov     ax, 0xb101
29
        int     0x1a
30
        or      ah, ah
31
        jnz     pci16skip
32
 
7122 dunkaist 33
        mov     [es:BOOT_PCI_DATA+1], cl;last PCI bus in system
34
        mov     [es:BOOT_PCI_DATA+2], bx
35
        mov     [es:BOOT_PCI_DATA+4], edi
2288 clevermous 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
7122 dunkaist 44
        mov     byte [es:BOOT_PCI_DATA], 2; if (al&3)==2 => mechanism 2
2288 clevermous 45
 
46
pci16skip:
47
 
48
        mov     ax, 0x1000
49
        mov     es, ax
50
 
51
        popad