/[gxemul]/trunk/src/include/bus_pci.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/include/bus_pci.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 29 by dpavlin, Mon Oct 8 16:19:37 2007 UTC revision 30 by dpavlin, Mon Oct 8 16:20:40 2007 UTC
# Line 28  Line 28 
28   *  SUCH DAMAGE.   *  SUCH DAMAGE.
29   *   *
30   *   *
31   *  $Id: bus_pci.h,v 1.29 2006/02/18 13:15:21 debug Exp $   *  $Id: bus_pci.h,v 1.30 2006/08/12 19:32:20 debug Exp $
32   */   */
33    
34  #include "misc.h"  #include "misc.h"
# Line 39  struct memory; Line 39  struct memory;
39    
40  struct pci_device;  struct pci_device;
41    
42    
43  #ifndef BUS_PCI_C  #ifndef BUS_PCI_C
44    
45  struct pci_data;  struct pci_data;
46    
47  #else  #else
48    
49  struct pci_data {  struct pci_data {
# Line 80  struct pci_data { Line 83  struct pci_data {
83  #define PCI_CFG_MEM_SIZE        0x100  #define PCI_CFG_MEM_SIZE        0x100
84    
85  struct pci_device {  struct pci_device {
86            /*  Pointer to the next PCI device on this bus:  */
87          struct pci_device       *next;          struct pci_device       *next;
88    
89            /*  Pointer back to the bus this device is connected to:  */
90          struct pci_data         *pcibus;          struct pci_data         *pcibus;
91    
92            /*  Short device name, and bus/device/function value:  */
93          char                    *name;          char                    *name;
94          int                     bus, device, function;          int                     bus, device, function;
95    
96            /*  Configuration memory:  */
97          unsigned char           cfg_mem[PCI_CFG_MEM_SIZE];          unsigned char           cfg_mem[PCI_CFG_MEM_SIZE];
98          unsigned char           cfg_mem_size[PCI_CFG_MEM_SIZE];          unsigned char           cfg_mem_size[PCI_CFG_MEM_SIZE];
99    
100            /*  Used when setting up the configuration registers:  */
101          int                     cur_mapreg_offset;          int                     cur_mapreg_offset;
102    
103            /*  Function to handle device-specific cfg register writes:  */
104            int                     (*cfg_reg_write)(struct pci_device *pd,
105                                        int reg, uint32_t value);
106            void                    *extra;
107  };  };
108    
109  #define PCIINIT(name)   void pciinit_ ## name(struct machine *machine,  \  #define PCIINIT(name)   void pciinit_ ## name(struct machine *machine,  \
# Line 131  struct pci_data *bus_pci_init(struct mac Line 148  struct pci_data *bus_pci_init(struct mac
148          uint64_t pci_actual_io_offset, uint64_t pci_actual_mem_offset,          uint64_t pci_actual_io_offset, uint64_t pci_actual_mem_offset,
149          uint64_t pci_portbase, uint64_t pci_membase, int pci_irqbase,          uint64_t pci_portbase, uint64_t pci_membase, int pci_irqbase,
150          uint64_t isa_portbase, uint64_t isa_membase, int isa_irqbase);          uint64_t isa_portbase, uint64_t isa_membase, int isa_irqbase);
151    
152    /*  Add a PCI device to a PCI bus:  */
153  void bus_pci_add(struct machine *machine, struct pci_data *pci_data,  void bus_pci_add(struct machine *machine, struct pci_data *pci_data,
154          struct memory *mem, int bus, int device, int function,          struct memory *mem, int bus, int device, int function,
155          const char *name);          const char *name);

Legend:
Removed from v.29  
changed lines
  Added in v.30

  ViewVC Help
Powered by ViewVC 1.1.26