1 | /* $Id: pciutil.h 78052 2019-04-09 10:13:30Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * Utility routines for calling the PCI BIOS.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011-2019 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef VBOX_INCLUDED_SRC_PC_BIOS_pciutil_h
|
---|
19 | #define VBOX_INCLUDED_SRC_PC_BIOS_pciutil_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | extern uint16_t pci_find_device(uint16_t v_id, uint16_t d_id);
|
---|
25 | /* Warning: pci_find_classcode destroys the high bits of ECX. */
|
---|
26 | extern uint16_t pci_find_classcode(uint32_t dev_class);
|
---|
27 | extern uint32_t pci_read_config_byte(uint8_t bus, uint8_t dev_fn, uint8_t reg);
|
---|
28 | extern uint32_t pci_read_config_word(uint8_t bus, uint8_t dev_fn, uint8_t reg);
|
---|
29 | /* Warning: pci_read_config_dword destroys the high bits of ECX. */
|
---|
30 | extern uint32_t pci_read_config_dword(uint8_t bus, uint8_t dev_fn, uint8_t reg);
|
---|
31 | extern void pci_write_config_byte(uint8_t bus, uint8_t dev_fn, uint8_t reg, uint8_t val);
|
---|
32 | extern void pci_write_config_word(uint8_t bus, uint8_t dev_fn, uint8_t reg, uint16_t val);
|
---|
33 | /* Warning: pci_write_config_dword destroys the high bits of ECX. */
|
---|
34 | extern void pci_write_config_dword(uint8_t bus, uint8_t dev_fn, uint8_t reg, uint32_t val);
|
---|
35 | extern uint16_t pci_find_class_noif(uint16_t dev_class);
|
---|
36 |
|
---|
37 | #endif /* !VBOX_INCLUDED_SRC_PC_BIOS_pciutil_h */
|
---|
38 |
|
---|