libhd
5.0
|
#include <fcntl.h>
#include <unistd.h>
#include <malloc.h>
#include <stdio.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include "AsmMacros.h"
#include "pci.h"
Macros | |
#define | RESORT 1 |
#define | FIX_ROM 0 |
#define | PCI_EN 0x80000000 |
Variables | |
PciStructPtr | PciStruct = NULL |
PciBusPtr | PciBuses = NULL |
PciStructPtr | CurrentPci = NULL |
PciStructPtr | PciList = NULL |
int | pciMaxBus = 0 |
static CARD32 | PciCfg1Addr |
static CARD32(* | readPci )(CARD32 reg) = readPciCfg1 |
static void(* | writePci )(CARD32 reg, CARD32 val) = writePciCfg1 |
static int | numbus |
static int | hostbridges = 1 |
static unsigned long | pciMinMemReg = ~0 |
static CARD32 | remapMEM_val |
static int | remapMEM_num |
#define FIX_ROM 0 |
Referenced by mapPciRom().
#define PCI_EN 0x80000000 |
Referenced by checkSlotCfg1(), findPci(), interpretConfigSpace(), readConfigSpaceCfg1(), and scan_pci().
#define RESORT 1 |
Referenced by scan_pci().
References PciCfg1Addr, and readPci.
References PciCfg1Addr, val, and writePci.
References PCI_EN, PCI_MODE1_ADDRESS_REG, and PCI_MODE1_DATA_REG.
Referenced by scan_pci().
|
static |
References PCI_MODE2_ENABLE_REG, PCI_MODE2_FORWARD_REG, and val.
Referenced by scan_pci().
|
static |
References pciStructRec::bus, PciSlot::l, pciStructRec::next, PciRead32(), PciStruct, PciWrite32(), remapMem(), pciStructRec::RomBase, pciStructRec::Slot, and val.
Referenced by mapPciRom().
References PciSlot::l, pciBusRec::next, pciStructRec::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.
References pciStructRec::active, pciStructRec::BaseClass, pciBusRec::bctl, BRIDGE_CLASS, BRIDGE_HOST_CLASS, BRIDGE_PCI_CLASS, pciStructRec::bus, pciStructRec::cmd_st, pciStructRec::dev, device, pciStructRec::DeviceID, pciStructRec::func, interface, pciStructRec::Interface, IS_MEM32, IS_MEM64, PciSlot::l, pciBusRec::next, pciStructRec::next, PCI_EN, PCI_MULTIFUNC_DEV, PciBuses, pciMinMemReg, PciStruct, pciBusRec::primary, pciStructRec::RomBase, pciBusRec::secondary, pciBusRec::Slot, pciStructRec::Slot, pciStructRec::SubClass, vendor, pciStructRec::VendorID, and VIDEO_CLASS.
Referenced by scan_pci().
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 | pPci | ) |
References PciSlot::l, and pciStructRec::Slot.
Referenced by int1A_handler().
References pciBusRec::bctl, pciStructRec::cmd_st, PciSlot::l, pciBusRec::next, pciStructRec::next, PciBuses, PciStruct, pciStructRec::RomBase, pciBusRec::Slot, pciStructRec::Slot, and writePci.
Referenced by EnableCurrent().
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().
References PCI_EN, PCI_MODE1_ADDRESS_REG, and PCI_MODE1_DATA_REG.
Referenced by scan_pci().
References PCI_MODE2_ENABLE_REG, and PCI_MODE2_FORWARD_REG.
Referenced by scan_pci().
References PCI_MODE1_ADDRESS_REG, PCI_MODE1_DATA_REG, and val.
References PCI_MODE2_ENABLE_REG, PCI_MODE2_FORWARD_REG, and val.
Referenced by scan_pci().
|
static |
References PciSlot::l, pciStructRec::next, PciRead32(), PciStruct, PciWrite32(), pciStructRec::Slot, and val.
Referenced by findBIOSMap().
|
static |
References PciSlot::l, PciWrite32(), and pciStructRec::Slot.
Referenced by mapPciRom().
void scan_pci | ( | int | pci_cfg_method | ) |
References pciStructRec::bus, checkSlotCfg1(), checkSlotCfg2(), interpretConfigSpace(), MAX_DEV_PER_VENDOR_CFG1, MAX_PCI_DEVICES, pciBusRec::next, pciStructRec::next, pciBusRec::pBus, pciStructRec::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().
References PCI_MODE1_ADDRESS_REG, and PCI_MODE1_DATA_REG.
References PCI_MODE2_ENABLE_REG, and PCI_MODE2_FORWARD_REG.
Referenced by scan_pci().
PciStructPtr CurrentPci = NULL |
Referenced by EnableCurrent(), findPciClass(), findPciDevice(), InitInt10(), int1A_handler(), and mapPciRom().
|
static |
|
static |
PciBusPtr PciBuses = NULL |
Referenced by interpretConfigSpace(), pciVideoDisable(), pciVideoRestore(), and scan_pci().
PciStructPtr PciList = NULL |
Referenced by findPciByIDs().
int pciMaxBus = 0 |
Referenced by int1A_handler(), and scan_pci().
|
static |
Referenced by interpretConfigSpace().
PciStructPtr PciStruct = NULL |
Referenced by findBIOSMap(), findPci(), interpretConfigSpace(), pciVideoDisable(), pciVideoRestore(), remapMem(), and scan_pci().
|
static |
Referenced by cfg1in(), PciRead16(), PciRead32(), PciRead8(), PciWrite16(), PciWrite8(), and scan_pci().
|
static |
|
static |
|
static |
Referenced by cfg1out(), EnableCurrent(), mapPciRom(), pciVideoDisable(), pciVideoRestore(), PciWrite16(), PciWrite32(), PciWrite8(), and scan_pci().