pci.c File Reference

#include "../drivers.h"
#include <assert.h>
#include <ibm/pci.h>
#include <sys/vm.h>
#include <minix/com.h>
#include <minix/syslib.h>
#include "pci.h"
#include "pci_amd.h"
#include "pci_intel.h"
#include "pci_sis.h"
#include "pci_via.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <minix/sysutil.h>

Include dependency graph for pci.c:

Go to the source code of this file.

Data Structures

struct  pcibus
struct  pcidev
struct  pcidev::bar

Defines

#define USER_SPACE   1
#define NDEBUG
#define irq_mode_pci(irq)   ((void)0)
#define NR_PCIBUS   10
#define NR_PCIDEV   40
#define PBT_INTEL_HOST   1
#define PBT_PCIBRIDGE   2
#define PBT_CARDBUS   3
#define BAM_NR   6
#define PBF_IO   1
#define PBF_INCOMPLETE   2

Functions

FORWARD _PROTOTYPE (void pci_intel_init,(void))
FORWARD _PROTOTYPE (void probe_bus,(int busind))
FORWARD _PROTOTYPE (int is_duplicate,(U8_t busnr, U8_t dev, U8_t func))
FORWARD _PROTOTYPE (void record_irq,(int devind))
FORWARD _PROTOTYPE (void record_bar,(int devind, int bar_nr))
FORWARD _PROTOTYPE (void update_bridge4dev_io,(int devind, u32_t io_base, u32_t io_size))
FORWARD _PROTOTYPE (int get_freebus,(void))
FORWARD _PROTOTYPE (int do_isabridge,(int busind))
FORWARD _PROTOTYPE (int get_busind,(int busnr))
FORWARD _PROTOTYPE (int do_piix,(int devind))
FORWARD _PROTOTYPE (char *pci_vid_name,(U16_t vid))
FORWARD _PROTOTYPE (char *pci_baseclass_name,(U8_t baseclass))
FORWARD _PROTOTYPE (char *pci_subclass_name,(U8_t baseclass, U8_t subclass, U8_t infclass))
FORWARD _PROTOTYPE (void ntostr,(unsigned n, char **str, char *end))
FORWARD _PROTOTYPE (u16_t pci_attr_rsts,(int devind))
FORWARD _PROTOTYPE (void pci_attr_wsts,(int devind, U16_t value))
FORWARD _PROTOTYPE (u16_t pcibr_std_rsts,(int busind))
FORWARD _PROTOTYPE (void pcibr_std_wsts,(int busind, U16_t value))
FORWARD _PROTOTYPE (u8_t pcii_rreg8,(int busind, int devind, int port))
FORWARD _PROTOTYPE (u16_t pcii_rreg16,(int busind, int devind, int port))
FORWARD _PROTOTYPE (u32_t pcii_rreg32,(int busind, int devind, int port))
FORWARD _PROTOTYPE (void pcii_wreg8,(int busind, int devind, int port, U8_t value))
FORWARD _PROTOTYPE (void pcii_wreg32,(int busind, int devind, int port, u32_t value))
PUBLIC unsigned pci_inb (U16_t port)
PUBLIC unsigned pci_inw (U16_t port)
PUBLIC unsigned pci_inl (U16_t port)
PUBLIC void pci_outb (U16_t port, U8_t value)
PUBLIC void pci_outw (U16_t port, U16_t value)
PUBLIC void pci_outl (U16_t port, U32_t value)
PUBLIC void pci_init ()
PUBLIC int pci_find_dev (u8_t bus, u8_t dev, u8_t func, int *devindp)
PUBLIC int pci_first_dev (int *devindp, u16_t *vidp, u16_t *didp)
PUBLIC int pci_next_dev (int *devindp, u16_t *vidp, u16_t *didp)
PUBLIC void pci_reserve3 (int devind, int proc, char *name)
PUBLIC void pci_release (char *name)
PUBLIC void pci_ids (int devind, u16_t *vidp, u16_t *didp)
PUBLIC void pci_rescan_bus (u8_t busnr)
PUBLIC char * pci_slot_name (int devind)
PUBLIC char * pci_dev_name (u16_t vid, u16_t did)
PUBLIC u8_t pci_attr_r8 (int devind, int port)
PUBLIC u16_t pci_attr_r16 (int devind, int port)
PUBLIC u32_t pci_attr_r32 (int devind, int port)
PUBLIC void pci_attr_w8 (int devind, int port, u16_t value)
PUBLIC void pci_attr_w16 (int devind, int port, u16_t value)
PUBLIC void pci_attr_w32 (int devind, int port, u32_t value)
PRIVATE void pci_intel_init ()
PRIVATE void probe_bus (int busind)
PRIVATE int is_duplicate (u8_t busnr, u8_t dev, u8_t func)
PRIVATE void record_irq (int devind)
PRIVATE void record_bars (int devind)
PRIVATE void record_bars_bridge (int devind)
PRIVATE void record_bars_cardbus (int devind)
PRIVATE void record_bar (int devind, int bar_nr)
PRIVATE void complete_bridges ()
PRIVATE void complete_bars ()
PRIVATE void update_bridge4dev_io (int devind, u32_t io_base, u32_t io_size)
PRIVATE int get_freebus ()
PRIVATE int do_isabridge (int busind)
PRIVATE void do_pcibridge (int busind)
PRIVATE int get_busind (int busnr)
PRIVATE int do_piix (int devind)
PRIVATE int do_amd_isabr (int devind)
PRIVATE int do_sis_isabr (int devind)
PRIVATE int do_via_isabr (int devind)
PRIVATE void report_vga (int devind)
PRIVATE char * pci_vid_name (u16_t vid)
PRIVATE char * pci_baseclass_name (u8_t baseclass)
PRIVATE char * pci_subclass_name (u8_t baseclass, u8_t subclass, u8_t infclass)
PRIVATE void ntostr (unsigned n, char **str, char *end)
PRIVATE u16_t pci_attr_rsts (int devind)
PRIVATE u16_t pcibr_std_rsts (int busind)
PRIVATE void pcibr_std_wsts (int busind, u16_t value)
PRIVATE u16_t pcibr_cb_rsts (int busind)
PRIVATE void pcibr_cb_wsts (int busind, u16_t value)
PRIVATE u16_t pcibr_via_rsts (int busind)
PRIVATE void pcibr_via_wsts (int busind, u16_t value)
PRIVATE void pci_attr_wsts (int devind, u16_t value)
PRIVATE u8_t pcii_rreg8 (int busind, int devind, int port)
PRIVATE u16_t pcii_rreg16 (int busind, int devind, int port)
PRIVATE u32_t pcii_rreg32 (int busind, int devind, int port)
PRIVATE void pcii_wreg8 (int busind, int devind, int port, u8_t value)
PRIVATE void pcii_wreg16 (int busind, int devind, int port, u16_t value)
PRIVATE void pcii_wreg32 (int busind, int devind, int port, u32_t value)
PRIVATE u16_t pcii_rsts (int busind)
PRIVATE void pcii_wsts (int busind, u16_t value)
PRIVATE void print_capabilities (int devind)

Variables

PRIVATE int debug = 0
PRIVATE int nr_pcibus = 0
PRIVATE int nr_pcidev = 0
PRIVATE int qemu_pci = 0


Define Documentation

#define BAM_NR   6
 

Definition at line 43 of file pci.c.

#define irq_mode_pci irq   )     ((void)0)
 

Definition at line 28 of file pci.c.

Referenced by do_amd_isabr().

#define NDEBUG
 

Definition at line 11 of file pci.c.

#define NR_PCIBUS   10
 

Definition at line 36 of file pci.c.

#define NR_PCIDEV   40
 

Definition at line 37 of file pci.c.

Referenced by do_amd_isabr(), and probe_bus().

#define PBF_INCOMPLETE   2
 

Definition at line 94 of file pci.c.

Referenced by complete_bars(), pci_reserve3(), and record_bar().

#define PBF_IO   1
 

Definition at line 93 of file pci.c.

Referenced by complete_bars(), and record_bar().

#define PBT_CARDBUS   3
 

Definition at line 41 of file pci.c.

Referenced by record_irq(), and update_bridge4dev_io().

#define PBT_INTEL_HOST   1
 

Definition at line 39 of file pci.c.

Referenced by get_freebus(), and update_bridge4dev_io().

#define PBT_PCIBRIDGE   2
 

Definition at line 40 of file pci.c.

Referenced by update_bridge4dev_io().

#define USER_SPACE   1
 

Definition at line 1 of file pci.c.


Function Documentation

FORWARD _PROTOTYPE void  pcii_wreg32,
(int busind, int devind, int port, u32_t value
 

FORWARD _PROTOTYPE void  pcii_wreg8,
(int busind, int devind, int port, U8_t value
 

FORWARD _PROTOTYPE u32_t  pcii_rreg32,
(int busind, int devind, int port
 

FORWARD _PROTOTYPE u16_t  pcii_rreg16,
(int busind, int devind, int port
 

FORWARD _PROTOTYPE u8_t  pcii_rreg8,
(int busind, int devind, int port
 

FORWARD _PROTOTYPE void  pcibr_std_wsts,
(int busind, U16_t value
 

FORWARD _PROTOTYPE u16_t  pcibr_std_rsts,
(int busind) 
 

FORWARD _PROTOTYPE void  pci_attr_wsts,
(int devind, U16_t value
 

FORWARD _PROTOTYPE u16_t  pci_attr_rsts,
(int devind) 
 

FORWARD _PROTOTYPE void  ntostr,
(unsigned n, char **str, char *end) 
 

FORWARD _PROTOTYPE char *  pci_subclass_name,
(U8_t baseclass, U8_t subclass, U8_t infclass) 
 

FORWARD _PROTOTYPE char *  pci_baseclass_name,
(U8_t baseclass) 
 

FORWARD _PROTOTYPE char *  pci_vid_name,
(U16_t vid) 
 

FORWARD _PROTOTYPE int  do_piix,
(int devind) 
 

FORWARD _PROTOTYPE int  get_busind,
(int busnr) 
 

FORWARD _PROTOTYPE int  do_isabridge,
(int busind) 
 

FORWARD _PROTOTYPE int  get_freebus,
(void) 
 

FORWARD _PROTOTYPE void  update_bridge4dev_io,
(int devind, u32_t io_base, u32_t io_size) 
 

FORWARD _PROTOTYPE void  record_bar,
(int devind, int bar_nr) 
 

FORWARD _PROTOTYPE void  record_irq,
(int devind) 
 

FORWARD _PROTOTYPE int  is_duplicate,
(U8_t busnr, U8_t dev, U8_t func) 
 

FORWARD _PROTOTYPE void  probe_bus,
(int busind) 
 

FORWARD _PROTOTYPE void  pci_intel_init,
(void) 
 

PRIVATE void complete_bars  ) 
 

Definition at line 1197 of file pci.c.

References base, cp, env_get_param(), i, j, next, NO_NUM, nr_pcidev, NULL, OK, panic, PBF_INCOMPLETE, PBF_IO, printf, r, reg, size, and strtoul().

Referenced by pci_rescan_bus().

PRIVATE void complete_bridges  ) 
 

Definition at line 1156 of file pci.c.

References get_freebus(), i, nr_pcibus, pci_attr_r16(), pci_attr_r8(), pci_attr_w8(), PCI_CR, PPB_BRIDGECTRL, PPB_PRIMBN, PPB_SECBLT, PPB_SECBN, PPB_SUBORDBN, and printf.

Referenced by pci_rescan_bus().

PRIVATE int do_amd_isabr int  devind  ) 
 

Definition at line 1802 of file pci.c.

References AMD_ISABR_FUNC, AMD_ISABR_PCIIRQ_LEV, AMD_ISABR_PCIIRQ_ROUTE, debug, dev, func, i, irq_mode_pci, NR_PCIDEV, panic, pci_attr_r16(), pci_attr_r8(), and printf.

PRIVATE int do_isabridge int  busind  ) 
 

Definition at line 1480 of file pci.c.

References i, j, PCI_T3_ISA, r, and type.

PRIVATE void do_pcibridge int  busind  ) 
 

Definition at line 1587 of file pci.c.

References i, printf, and type.

PRIVATE int do_piix int  devind  ) 
 

Definition at line 1750 of file pci.c.

References debug, dev, func, i, inb(), OK, pci_attr_r8(), PIIX_ELCR1, PIIX_ELCR2, PIIX_IRQ_DI, PIIX_PIRQRCA, printf, s, and sys_inb.

PRIVATE int do_sis_isabr int  devind  ) 
 

Definition at line 1855 of file pci.c.

References debug, dev, func, i, pci_attr_r8(), printf, SIS_IRQ_DISABLED, and SIS_ISABR_IRQ_A.

PRIVATE int do_via_isabr int  devind  ) 
 

Definition at line 1885 of file pci.c.

References assert, dev, func, i, pci_attr_r8(), VIA_ISABR_EL, VIA_ISABR_EL_INTA, VIA_ISABR_EL_INTB, VIA_ISABR_EL_INTC, VIA_ISABR_EL_INTD, VIA_ISABR_IRQ_R1, VIA_ISABR_IRQ_R2, and VIA_ISABR_IRQ_R3.

PRIVATE int get_busind int  busnr  ) 
 

Definition at line 1734 of file pci.c.

References i, and nr_pcibus.

Referenced by pci_attr_r16(), pci_attr_r32(), pci_attr_r8(), pci_attr_rsts(), pci_attr_w16(), pci_attr_w32(), pci_attr_w8(), pci_attr_wsts(), pci_rescan_bus(), record_irq(), and update_bridge4dev_io().

PRIVATE int get_freebus  ) 
 

Definition at line 1459 of file pci.c.

References i, nr_pcibus, PBT_INTEL_HOST, and printf.

Referenced by complete_bridges().

PRIVATE int is_duplicate u8_t  busnr,
u8_t  dev,
u8_t  func
 

Definition at line 823 of file pci.c.

References i, and nr_pcidev.

Referenced by probe_bus().

PRIVATE void ntostr unsigned  n,
char **  str,
char *  end
 

Definition at line 2037 of file pci.c.

References i.

Referenced by pci_slot_name().

PUBLIC u16_t pci_attr_r16 int  devind,
int  port
 

Definition at line 481 of file pci.c.

References get_busind().

Referenced by complete_bridges(), do_amd_isabr(), do_attr_r16(), do_int(), hw_init(), pcibr_cb_rsts(), pcibr_std_rsts(), print_capabilities(), probe_bus(), record_bars_bridge(), and update_bridge4dev_io().

PUBLIC u32_t pci_attr_r32 int  devind,
int  port
 

Definition at line 495 of file pci.c.

References get_busind().

Referenced by do_attr_r32(), getAddressing(), hw_init(), record_bar(), and record_bars_cardbus().

PUBLIC u8_t pci_attr_r8 int  devind,
int  port
 

Definition at line 467 of file pci.c.

References get_busind().

Referenced by complete_bridges(), do_amd_isabr(), do_attr_r8(), do_int(), do_piix(), do_sis_isabr(), do_via_isabr(), getAddressing(), hw_init(), init_params_pci(), print_capabilities(), probe_bus(), record_bars_bridge(), and record_irq().

PRIVATE u16_t pci_attr_rsts int  devind  ) 
 

Definition at line 2076 of file pci.c.

References get_busind().

Referenced by probe_bus().

PUBLIC void pci_attr_w16 int  devind,
int  port,
u16_t  value
 

Definition at line 524 of file pci.c.

References get_busind().

Referenced by do_attr_w16(), do_int(), hw_init(), pcibr_cb_wsts(), pcibr_std_wsts(), and update_bridge4dev_io().

PUBLIC void pci_attr_w32 int  devind,
int  port,
u32_t  value
 

Definition at line 539 of file pci.c.

References get_busind().

Referenced by do_attr_w32(), record_bar(), and update_bridge4dev_io().

PUBLIC void pci_attr_w8 int  devind,
int  port,
u16_t  value
 

Definition at line 509 of file pci.c.

References get_busind().

Referenced by complete_bridges(), do_attr_w8(), do_int(), and record_irq().

PRIVATE void pci_attr_wsts int  devind,
u16_t  value
 

Definition at line 2176 of file pci.c.

References get_busind().

Referenced by probe_bus().

PRIVATE char* pci_baseclass_name u8_t  baseclass  ) 
 

Definition at line 1995 of file pci.c.

References i, pci_baseclass::name, and pci_baseclass_table.

Referenced by probe_bus().

PUBLIC char* pci_dev_name u16_t  vid,
u16_t  did
 

Definition at line 447 of file pci.c.

References i, pci_device::name, and pci_device_table.

Referenced by do_dev_name(), and probe_bus().

PUBLIC int pci_find_dev u8_t  bus,
u8_t  dev,
u8_t  func,
int *  devindp
 

Definition at line 225 of file pci.c.

References nr_pcidev.

Referenced by do_find_dev(), fxp_probe(), lance_probe(), rl_probe(), and rtl_probe().

PUBLIC int pci_first_dev int *  devindp,
u16_t vidp,
u16_t didp
 

Definition at line 253 of file pci.c.

References nr_pcidev.

Referenced by do_first_dev(), fxp_probe(), init(), init_params_pci(), lance_probe(), rl_probe(), and rtl_probe().

PUBLIC void pci_ids int  devind,
u16_t vidp,
u16_t didp
 

Definition at line 392 of file pci.c.

References assert, and nr_pcidev.

Referenced by do_ids(), fxp_probe(), lance_probe(), rl_probe(), and rtl_probe().

PUBLIC unsigned pci_inb U16_t  port  ) 
 

Definition at line 153 of file pci.c.

References OK, printf, s, and sys_inb.

PUBLIC void pci_init  ) 
 

Definition at line 193 of file pci.c.

References assert, debug, env_parse(), pci_intel_init(), and qemu_pci.

Referenced by do_init(), init_params_pci(), main(), and rtl_probe().

PUBLIC unsigned pci_inl U16_t  port  ) 
 

Definition at line 167 of file pci.c.

References OK, printf, s, and sys_inl.

PRIVATE void pci_intel_init  ) 
 

Definition at line 554 of file pci.c.

References dev, func, i, OK, outl(), PCI_DID, PCI_VID, PCII_CONFADD, PCII_RREG16_, PCII_UNSEL, printf, r, s, and sys_outl.

Referenced by pci_init().

PUBLIC unsigned pci_inw U16_t  port  ) 
 

Definition at line 160 of file pci.c.

References OK, printf, s, and sys_inw.

PUBLIC int pci_next_dev int *  devindp,
u16_t vidp,
u16_t didp
 

Definition at line 276 of file pci.c.

References nr_pcidev.

Referenced by do_next_dev(), and init_params_pci().

PUBLIC void pci_outb U16_t  port,
U8_t  value
 

Definition at line 174 of file pci.c.

References OK, printf, s, and sys_outb.

PUBLIC void pci_outl U16_t  port,
U32_t  value
 

Definition at line 184 of file pci.c.

References OK, printf, s, and sys_outl.

PUBLIC void pci_outw U16_t  port,
U16_t  value
 

Definition at line 179 of file pci.c.

References OK, printf, s, and sys_outw.

PUBLIC void pci_release char *  name  ) 
 

Definition at line 374 of file pci.c.

References i, nr_pcidev, and strcmp.

PUBLIC void pci_rescan_bus u8_t  busnr  ) 
 

Definition at line 405 of file pci.c.

References complete_bars(), complete_bridges(), get_busind(), and probe_bus().

Referenced by do_int(), and do_rescan_bus().

PUBLIC void pci_reserve3 int  devind,
int  proc,
char *  name
 

Definition at line 299 of file pci.c.

References assert, i, mr, nr_pcidev, PBF_INCOMPLETE, printf, r, and strcpy().

PUBLIC char* pci_slot_name int  devind  ) 
 

Definition at line 423 of file pci.c.

References ntostr(), and p.

Referenced by do_slot_name().

PRIVATE char* pci_subclass_name u8_t  baseclass,
u8_t  subclass,
u8_t  infclass
 

Definition at line 2011 of file pci.c.

References i, pci_subclass::name, and pci_subclass_table.

Referenced by probe_bus().

PRIVATE char* pci_vid_name u16_t  vid  ) 
 

Definition at line 1979 of file pci.c.

References i, pci_vendor::name, and pci_vendor_table.

Referenced by probe_bus().

PRIVATE u16_t pcibr_cb_rsts int  busind  ) 
 

Definition at line 2119 of file pci.c.

References CBB_SSTS, and pci_attr_r16().

PRIVATE void pcibr_cb_wsts int  busind,
u16_t  value
 

Definition at line 2131 of file pci.c.

References CBB_SSTS, pci_attr_w16(), and printf.

PRIVATE u16_t pcibr_std_rsts int  busind  ) 
 

Definition at line 2090 of file pci.c.

References pci_attr_r16(), and PPB_SSTS.

PRIVATE void pcibr_std_wsts int  busind,
u16_t  value
 

Definition at line 2102 of file pci.c.

References pci_attr_w16(), PPB_SSTS, and printf.

PRIVATE u16_t pcibr_via_rsts int  busind  ) 
 

Definition at line 2148 of file pci.c.

PRIVATE void pcibr_via_wsts int  busind,
u16_t  value
 

Definition at line 2160 of file pci.c.

References printf.

PRIVATE u16_t pcii_rreg16 int  busind,
int  devind,
int  port
 

Definition at line 2220 of file pci.c.

References OK, outl(), PCII_CONFADD, PCII_RREG16_, PCII_UNSEL, printf, s, and sys_outl.

PRIVATE u32_t pcii_rreg32 int  busind,
int  devind,
int  port
 

Definition at line 2249 of file pci.c.

References OK, outl(), PCII_CONFADD, PCII_RREG32_, PCII_UNSEL, printf, s, and sys_outl.

PRIVATE u8_t pcii_rreg8 int  busind,
int  devind,
int  port
 

Definition at line 2191 of file pci.c.

References OK, outl(), PCII_CONFADD, PCII_RREG8_, PCII_UNSEL, printf, s, and sys_outl.

PRIVATE u16_t pcii_rsts int  busind  ) 
 

Definition at line 2359 of file pci.c.

References OK, outl(), PCI_SR, PCII_CONFADD, PCII_RREG16_, PCII_UNSEL, printf, s, and sys_outl.

PRIVATE void pcii_wreg16 int  busind,
int  devind,
int  port,
u16_t  value
 

Definition at line 2305 of file pci.c.

References OK, outl(), PCII_CONFADD, PCII_UNSEL, PCII_WREG16_, printf, s, and sys_outl.

PRIVATE void pcii_wreg32 int  busind,
int  devind,
int  port,
u32_t  value
 

Definition at line 2332 of file pci.c.

References OK, outl(), PCII_CONFADD, PCII_UNSEL, PCII_WREG32_, printf, s, and sys_outl.

PRIVATE void pcii_wreg8 int  busind,
int  devind,
int  port,
u8_t  value
 

Definition at line 2278 of file pci.c.

References OK, outl(), PCII_CONFADD, PCII_UNSEL, PCII_WREG8_, printf, s, and sys_outl.

PRIVATE void pcii_wsts int  busind,
u16_t  value
 

Definition at line 2378 of file pci.c.

References OK, outl(), PCI_SR, PCII_CONFADD, PCII_UNSEL, PCII_WREG16_, printf, s, and sys_outl.

PRIVATE void print_capabilities int  devind  ) 
 

Definition at line 2396 of file pci.c.

References CAP_NEXT, CAP_TYPE, next, pci_attr_r16(), pci_attr_r8(), PCI_CAPPTR, PCI_CP_MASK, PCI_SR, printf, PSR_CAPPTR, status, and type.

Referenced by probe_bus().

PRIVATE void probe_bus int  busind  ) 
 

Definition at line 658 of file pci.c.

References debug, dev, func, is_duplicate(), NO_VID, NR_PCIDEV, nr_pcidev, panic, pci_attr_r16(), pci_attr_r8(), pci_attr_rsts(), pci_attr_wsts(), pci_baseclass_name(), PCI_BCR, pci_dev_name(), PCI_DID, PCI_HEADT, PCI_PIFR, PCI_SCR, pci_subclass_name(), PCI_SUBDID, PCI_SUBVID, PCI_T3_VGA, PCI_T3_VGA_OLD, PCI_VID, pci_vid_name(), PHT_BRIDGE, PHT_CARDBUS, PHT_MASK, PHT_MULTIFUNC, PHT_NORMAL, print_capabilities(), printf, PSR_RMAS, PSR_RTAS, PSR_SSE, qemu_pci, record_bars(), record_bars_bridge(), record_bars_cardbus(), record_irq(), report_vga(), and s.

Referenced by pci_rescan_bus().

PRIVATE void record_bar int  devind,
int  bar_nr
 

Definition at line 1077 of file pci.c.

References assert, PBF_INCOMPLETE, PBF_IO, pci_attr_r32(), pci_attr_w32(), PCI_BAR, PCI_BAR_IO, PCI_BAR_PREFETCH, PCI_BAR_TYPE, printf, reg, and type.

Referenced by record_bars(), record_bars_bridge(), and record_bars_cardbus().

PRIVATE void record_bars int  devind  ) 
 

Definition at line 912 of file pci.c.

References i, j, PCI_BAR, PCI_BAR_6, record_bar(), reg, and type.

Referenced by probe_bus().

PRIVATE void record_bars_bridge int  devind  ) 
 

Definition at line 976 of file pci.c.

References base, pci_attr_r16(), pci_attr_r8(), PPB_IOB_MASK, PPB_IOBASE, PPB_IOBASEU16, PPB_IOL_MASK, PPB_IOLIMIT, PPB_IOLIMITU16, PPB_MEMB_MASK, PPB_MEMBASE, PPB_MEML_MASK, PPB_MEMLIMIT, PPB_PFMEMB_MASK, PPB_PFMEMBASE, PPB_PFMEML_MASK, PPB_PFMEMLIMIT, printf, record_bar(), and size.

Referenced by probe_bus().

PRIVATE void record_bars_cardbus int  devind  ) 
 

Definition at line 1026 of file pci.c.

References base, CBB_IOBASE_0, CBB_IOBASE_1, CBB_IOL_MASK, CBB_IOLIMIT_0, CBB_IOLIMIT_1, CBB_MEMBASE_0, CBB_MEMBASE_1, CBB_MEML_MASK, CBB_MEMLIMIT_0, CBB_MEMLIMIT_1, pci_attr_r32(), printf, record_bar(), and size.

Referenced by probe_bus().

PRIVATE void record_irq int  devind  ) 
 

Definition at line 845 of file pci.c.

References debug, first, get_busind(), PBT_CARDBUS, pci_attr_r8(), pci_attr_w8(), PCI_ILR, PCI_ILR_UNKNOWN, PCI_IPR, and printf.

Referenced by probe_bus().

PRIVATE void report_vga int  devind  ) 
 

Definition at line 1945 of file pci.c.

References i.

Referenced by probe_bus().

PRIVATE void update_bridge4dev_io int  devind,
u32_t  io_base,
u32_t  io_size
 

Definition at line 1420 of file pci.c.

References CBB_IOBASE_0, CBB_IOLIMIT_0, debug, get_busind(), panic, PBT_CARDBUS, PBT_INTEL_HOST, PBT_PCIBRIDGE, pci_attr_r16(), pci_attr_w16(), pci_attr_w32(), PCI_CR, PCI_CR_IO_EN, PCI_CR_MAST_EN, printf, and type.


Variable Documentation

PRIVATE int debug = 0
 

Definition at line 45 of file pci.c.

PRIVATE int nr_pcibus = 0
 

Definition at line 65 of file pci.c.

Referenced by complete_bridges(), get_busind(), and get_freebus().

PRIVATE int nr_pcidev = 0
 

Definition at line 96 of file pci.c.

Referenced by complete_bars(), is_duplicate(), pci_find_dev(), pci_first_dev(), pci_ids(), pci_next_dev(), pci_release(), pci_reserve3(), and probe_bus().

PRIVATE int qemu_pci = 0
 

Definition at line 99 of file pci.c.

Referenced by pci_init(), and probe_bus().


Generated on Fri Apr 14 23:09:09 2006 for minix by  doxygen 1.4.6