|
libhd 5.0
|
#include "v86bios.h"Go to the source code of this file.
Data Structures | |
| union | PciSlot |
| struct | pciBusRec |
| struct | pciStructRec |
Defines | |
| #define | PCI_MODE2_ENABLE_REG 0xCF8 |
| #define | PCI_MODE2_FORWARD_REG 0xCFA |
| #define | PCI_MODE1_ADDRESS_REG 0xCF8 |
| #define | PCI_MODE1_DATA_REG 0xCFC |
| #define | PCI_EN 0x80000000 |
| #define | MAX_DEV_PER_VENDOR_CFG1 32 |
| #define | BRIDGE_CLASS(x) (x == 0x06) |
| #define | BRIDGE_PCI_CLASS(x) (x == 0x04) |
| #define | BRIDGE_HOST_CLASS(x) (x == 0x00) |
| #define | PCI_CLASS_PREHISTORIC 0x00 |
| #define | PCI_SUBCLASS_PREHISTORIC_VGA 0x01 |
| #define | PCI_CLASS_DISPLAY 0x03 |
| #define | PCI_SUBCLASS_DISPLAY_VGA 0x00 |
| #define | PCI_SUBCLASS_DISPLAY_XGA 0x01 |
| #define | PCI_SUBCLASS_DISPLAY_MISC 0x80 |
| #define | VIDEO_CLASS(b, s) |
| #define | PCI_MULTIFUNC_DEV 0x80 |
| #define | MAX_PCI_DEVICES 64 |
| #define | PCI_MAXBUS 16 |
| #define | PCI_IS_MEM 0x00000001 |
| #define | MAX_PCI_ROM_SIZE (1024 * 1024 * 16) |
| #define | IS_MEM32(x) ((x & 0x7) == 0 && x != 0) |
| #define | IS_MEM64(x) ((x & 0x7) == 0x4) |
Typedefs | |
| typedef struct pciBusRec | PciBusRec |
| typedef struct pciBusRec * | PciBusPtr |
| typedef struct pciStructRec | PciStructRec |
| typedef struct pciStructRec * | PciStructPtr |
Functions | |
| CARD32 | findPci (CARD16 slotBX) |
| CARD16 | pciSlotBX (PciStructPtr) |
| PciStructPtr | findPciDevice (CARD16 vendorID, CARD16 deviceID, char n) |
| PciStructPtr | findPciClass (CARD8 intf, CARD8 subClass, CARD16 class, char n) |
| CARD8 | PciRead8 (int offset, CARD32 slot) |
| CARD16 | PciRead16 (int offset, CARD32 slot) |
| CARD32 | PciRead32 (int offset, CARD32 slot) |
| void | PciWrite8 (int offset, CARD8 byte, CARD32 slot) |
| void | PciWrite16 (int offset, CARD16 word, CARD32 slot) |
| void | PciWrite32 (int offset, CARD32 lg, CARD32 slot) |
| void | scan_pci (int) |
| void | pciVideoDisable (void) |
| void | pciVideoRestore (void) |
| void | EnableCurrent (void) |
| int | mapPciRom (PciStructPtr pciP) |
| int | cfg1out (CARD16 addr, CARD32 val) |
| int | cfg1in (CARD16 addr, CARD32 *val) |
| void | list_pci (void) |
| PciStructPtr | findPciByIDs (int bus, int dev, int func) |
Variables | |
| PciStructPtr | CurrentPci |
| PciStructPtr | PciList |
| PciStructPtr | BootBios |
| int | pciMaxBus |
| #define BRIDGE_CLASS | ( | x | ) | (x == 0x06) |
Referenced by interpretConfigSpace().
| #define BRIDGE_HOST_CLASS | ( | x | ) | (x == 0x00) |
Referenced by interpretConfigSpace().
| #define BRIDGE_PCI_CLASS | ( | x | ) | (x == 0x04) |
Referenced by interpretConfigSpace().
| #define IS_MEM32 | ( | x | ) | ((x & 0x7) == 0 && x != 0) |
Referenced by interpretConfigSpace().
| #define IS_MEM64 | ( | x | ) | ((x & 0x7) == 0x4) |
Referenced by interpretConfigSpace().
| #define MAX_DEV_PER_VENDOR_CFG1 32 |
Referenced by scan_pci().
| #define MAX_PCI_DEVICES 64 |
Referenced by scan_pci().
| #define MAX_PCI_ROM_SIZE (1024 * 1024 * 16) |
| #define PCI_CLASS_DISPLAY 0x03 |
| #define PCI_CLASS_PREHISTORIC 0x00 |
| #define PCI_EN 0x80000000 |
| #define PCI_IS_MEM 0x00000001 |
| #define PCI_MAXBUS 16 |
Referenced by scan_pci().
| #define PCI_MODE1_ADDRESS_REG 0xCF8 |
Referenced by checkSlotCfg1(), readConfigSpaceCfg1(), readPciCfg1(), scan_pci(), and writePciCfg1().
| #define PCI_MODE1_DATA_REG 0xCFC |
Referenced by checkSlotCfg1(), readConfigSpaceCfg1(), readPciCfg1(), and writePciCfg1().
| #define PCI_MODE2_ENABLE_REG 0xCF8 |
Referenced by checkSlotCfg2(), readConfigSpaceCfg2(), readPciCfg2(), scan_pci(), and writePciCfg2().
| #define PCI_MODE2_FORWARD_REG 0xCFA |
Referenced by checkSlotCfg2(), readConfigSpaceCfg2(), readPciCfg2(), scan_pci(), and writePciCfg2().
| #define PCI_MULTIFUNC_DEV 0x80 |
Referenced by interpretConfigSpace().
| #define PCI_SUBCLASS_DISPLAY_MISC 0x80 |
| #define PCI_SUBCLASS_DISPLAY_VGA 0x00 |
| #define PCI_SUBCLASS_DISPLAY_XGA 0x01 |
| #define PCI_SUBCLASS_PREHISTORIC_VGA 0x01 |
| #define VIDEO_CLASS | ( | b, | |
| s | |||
| ) |
(((b) == PCI_CLASS_PREHISTORIC && (s) == PCI_SUBCLASS_PREHISTORIC_VGA) || \ ((b) == PCI_CLASS_DISPLAY && (s) == PCI_SUBCLASS_DISPLAY_VGA) ||\ ((b) == PCI_CLASS_DISPLAY && (s) == PCI_SUBCLASS_DISPLAY_XGA) ||\ ((b) == PCI_CLASS_DISPLAY && (s) == PCI_SUBCLASS_DISPLAY_MISC))
Referenced by interpretConfigSpace().
| typedef struct pciStructRec * PciStructPtr |
| typedef struct pciStructRec PciStructRec |
References PciCfg1Addr, and readPci.
References PciCfg1Addr, val, and writePci.
| void EnableCurrent | ( | void | ) |
References PciSlot::l, pciStructRec::next, pciBusRec::next, pciStructRec::pBus, PCI_EN, PciStruct, pciBusRec::Slot, and pciStructRec::Slot.
Referenced by int1A_handler().
| PciStructPtr findPciByIDs | ( | int | bus, |
| int | dev, | ||
| int | func | ||
| ) |
References pciStructRec::bus, pciStructRec::dev, pciStructRec::func, pciStructRec::next, and PciList.
| PciStructPtr findPciClass | ( | CARD8 | intf, |
| CARD8 | subClass, | ||
| CARD16 | class, | ||
| char | n | ||
| ) |
References pciStructRec::BaseClass, CurrentPci, pciStructRec::Interface, pciStructRec::next, and pciStructRec::SubClass.
| PciStructPtr findPciDevice | ( | CARD16 | vendorID, |
| CARD16 | deviceID, | ||
| char | n | ||
| ) |
References CurrentPci, pciStructRec::DeviceID, pciStructRec::next, and pciStructRec::VendorID.
| void list_pci | ( | void | ) |
| int mapPciRom | ( | PciStructPtr | pciP | ) |
References CurrentPci, findBIOSMap(), FIX_ROM, PciSlot::l, MEM_FILE, PciRead32(), PciWrite32(), restoreMem(), pciStructRec::RomBase, pciStructRec::Slot, V_BIOS, and writePci.
References readPci.
Referenced by int1A_handler().
References readPci.
Referenced by findBIOSMap(), int1A_handler(), mapPciRom(), and remapMem().
References readPci.
Referenced by int1A_handler().
| CARD16 pciSlotBX | ( | PciStructPtr | ) |
References PciSlot::l, and pciStructRec::Slot.
Referenced by int1A_handler().
| void pciVideoDisable | ( | void | ) |
References pciBusRec::bctl, pciStructRec::cmd_st, PciSlot::l, pciStructRec::next, pciBusRec::next, PciBuses, PciStruct, pciStructRec::RomBase, pciStructRec::Slot, pciBusRec::Slot, and writePci.
Referenced by EnableCurrent().
| void pciVideoRestore | ( | void | ) |
References readPci, val, and writePci.
Referenced by int1A_handler().
References writePci.
Referenced by findBIOSMap(), int1A_handler(), mapPciRom(), remapMem(), and restoreMem().
References readPci, val, and writePci.
Referenced by int1A_handler().
| void scan_pci | ( | int | ) |
References pciStructRec::bus, checkSlotCfg1(), checkSlotCfg2(), interpretConfigSpace(), MAX_DEV_PER_VENDOR_CFG1, MAX_PCI_DEVICES, pciStructRec::next, pciBusRec::next, pciStructRec::pBus, pciBusRec::pBus, PCI_EN, PCI_MAXBUS, PCI_MODE1_ADDRESS_REG, PCI_MODE2_ENABLE_REG, PCI_MODE2_FORWARD_REG, PciBuses, pciMaxBus, PciStruct, pciBusRec::primary, readConfigSpaceCfg1(), readConfigSpaceCfg2(), readPci, readPciCfg2(), RESORT, pciBusRec::secondary, writePci, and writePciCfg2().
Referenced by InitInt10().
Referenced by EnableCurrent(), findPciClass(), findPciDevice(), InitInt10(), int1A_handler(), and mapPciRom().
Referenced by findPciByIDs().
| int pciMaxBus |
Referenced by int1A_handler(), and scan_pci().