pcibios.inc revision 5a309ae79b4530e584852c4da9808eb4074e075c
;;
;; Copyright (C) 2006-2011 Oracle Corporation
;;
;; This file is part of VirtualBox Open Source Edition (OSE), as
;; available from http://www.virtualbox.org. This file is free software;
;; you can redistribute it and/or modify it under the terms of the GNU
;; General Public License (GPL) as published by the Free Software
;; Foundation, in version 2 as it comes in the "COPYING" file of the
;; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
;; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;; --------------------------------------------------------------------
;;
;; This code is based on:
;;
;; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;;
;; Copyright (C) 2002 MandrakeSoft S.A.
;;
;; MandrakeSoft S.A.
;; 43, rue d'Aboukir
;; 75002 Paris - France
;; http://www.linux-mandrake.com/
;; http://www.mandrakesoft.com/
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
;; License as published by the Free Software Foundation; either
;; version 2 of the License, or (at your option) any later version.
;;
;; This library is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Lesser General Public License for more details.
;;
;; You should have received a copy of the GNU Lesser General Public
;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;;
;;
; Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
; other than GPL or LGPL is available it will apply instead, Oracle elects to use only
; the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
; a choice of LGPL license versions is made available with the language indicating
; that LGPLv2 or any later version may be used, or where a choice of which version
; of the LGPL is applied is otherwise unspecified.
include pcicfg.inc
if BX_PCIBIOS
ifdef DEBUG
; Publics for easier debugging and disassembly
public pcibios_init_iomem_bases
public pci_init_io_loop1
public pci_init_io_loop2
public init_io_base
public next_pci_base
public enable_iomem_space
public next_pci_dev
public pcibios_init_set_elcr
public is_master_pic
public pcibios_init_irqs
public pci_init_irq_loop1
public pci_init_irq_loop2
public pci_test_int_pin
public pirq_found
public next_pci_func
public next_pir_entry
public pci_init_end
endif
.386
if not BX_ROMBIOS32
pci_irq_list:
pcibios_init_sel_reg:
pcibios_init_iomem_bases:
pci_init_io_loop1:
call pcibios_init_sel_reg
ifndef VBOX ; This currently breaks restoring a previously saved state. */
call pcibios_init_sel_reg
pci_init_io_loop2:
call pcibios_init_sel_reg
init_io_base:
next_pci_base:
endif ; !VBOX
enable_iomem_space:
call pcibios_init_sel_reg
or al, 7
ifdef VBOX
call pcibios_init_sel_reg
call pcibios_init_sel_reg
endif ; VBOX
next_pci_dev:
pcibios_init_set_elcr:
and al, 7
is_master_pic:
pcibios_init_irqs:
call pcibios_init_sel_reg
call pcibios_init_sel_reg
pci_init_irq_loop1:
pci_init_irq_loop2:
call pcibios_init_sel_reg
pci_test_int_pin:
call pcibios_init_sel_reg
and al, 7
call pcibios_init_sel_reg
and al, 3
pirq_found:
call pcibios_init_sel_reg
next_pci_func:
next_pir_entry:
pci_init_end:
.286
endif ; !BX_ROMBIOS32
endif ; BX_PCIBIOS