Revision feb9e612 hw/cirrus_vga.c

b/hw/cirrus_vga.c
172 172
#define CIRRUS_MMIO_LINEDRAW_MODE     0x39	// byte
173 173
#define CIRRUS_MMIO_BLTSTATUS         0x40	// byte
174 174

  
175
// PCI 0x04: command(word), 0x06(word): status
176
#define PCI_COMMAND_IOACCESS                0x0001
177
#define PCI_COMMAND_MEMACCESS               0x0002
178
#define PCI_COMMAND_BUSMASTER               0x0004
179
#define PCI_COMMAND_SPECIALCYCLE            0x0008
180
#define PCI_COMMAND_MEMWRITEINVALID         0x0010
181
#define PCI_COMMAND_PALETTESNOOPING         0x0020
182
#define PCI_COMMAND_PARITYDETECTION         0x0040
183
#define PCI_COMMAND_ADDRESSDATASTEPPING     0x0080
184
#define PCI_COMMAND_BACKTOBACKTRANS         0x0200
185
// PCI 0x08, 0xff000000 (0x09-0x0b:class,0x08:rev)
186
#define PCI_CLASS_BASE_DISPLAY        0x03
187
// PCI 0x08, 0x00ff0000
188
#define PCI_CLASS_SUB_VGA             0x00
189
// PCI 0x0c, 0x00ff0000 (0x0c:cacheline,0x0d:latency,0x0e:headertype,0x0f:Built-in self test)
190
// 0x10-0x3f (headertype 00h)
191
// PCI 0x10,0x14,0x18,0x1c,0x20,0x24: base address mapping registers
192
//   0x10: MEMBASE, 0x14: IOBASE(hard-coded in XFree86 3.x)
193
#define PCI_MAP_MEM                 0x0
194
#define PCI_MAP_IO                  0x1
195
#define PCI_MAP_MEM_ADDR_MASK       (~0xf)
196
#define PCI_MAP_IO_ADDR_MASK        (~0x3)
197
#define PCI_MAP_MEMFLAGS_32BIT      0x0
198
#define PCI_MAP_MEMFLAGS_32BIT_1M   0x1
199
#define PCI_MAP_MEMFLAGS_64BIT      0x4
200
#define PCI_MAP_MEMFLAGS_CACHEABLE  0x8
201
// PCI 0x28: cardbus CIS pointer
202
// PCI 0x2c: subsystem vendor id, 0x2e: subsystem id
203
// PCI 0x30: expansion ROM base address
204
#define PCI_ROMBIOS_ENABLED         0x1
205
// PCI 0x34: 0xffffff00=reserved, 0x000000ff=capabilities pointer
206
// PCI 0x38: reserved
207
// PCI 0x3c: 0x3c=int-line, 0x3d=int-pin, 0x3e=min-gnt, 0x3f=maax-lat
208

  
209 175
#define CIRRUS_PNPMMIO_SIZE         0x1000
210 176

  
211 177
#define ABS(a) ((signed)(a) > 0 ? a : -a)
......
3232 3198
     pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_CIRRUS);
3233 3199
     pci_config_set_device_id(pci_conf, device_id);
3234 3200
     pci_config_set_class(pci_conf, PCI_CLASS_DISPLAY_VGA);
3235
     pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL;
3236 3201

  
3237 3202
     /* setup memory space */
3238 3203
     /* memory #0 LFB */

Also available in: Unified diff