Revision 5fafdf24 hw/grackle_pci.c

b/hw/grackle_pci.c
2 2
 * QEMU Grackle (heathrow PPC) PCI host
3 3
 *
4 4
 * Copyright (c) 2006 Fabrice Bellard
5
 * 
5
 *
6 6
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 7
 * of this software and associated documentation files (the "Software"), to deal
8 8
 * in the Software without restriction, including without limitation the rights
......
95 95
    s->bus = pci_register_bus(pci_grackle_set_irq, pci_grackle_map_irq,
96 96
                              pic, 0, 0);
97 97

  
98
    pci_mem_config = cpu_register_io_memory(0, pci_grackle_config_read, 
98
    pci_mem_config = cpu_register_io_memory(0, pci_grackle_config_read,
99 99
                                            pci_grackle_config_write, s);
100 100
    pci_mem_data = cpu_register_io_memory(0, pci_grackle_read,
101 101
                                          pci_grackle_write, s);
102 102
    cpu_register_physical_memory(base, 0x1000, pci_mem_config);
103 103
    cpu_register_physical_memory(base + 0x00200000, 0x1000, pci_mem_data);
104
    d = pci_register_device(s->bus, "Grackle host bridge", sizeof(PCIDevice), 
104
    d = pci_register_device(s->bus, "Grackle host bridge", sizeof(PCIDevice),
105 105
                            0, NULL, NULL);
106 106
    d->config[0x00] = 0x57; // vendor_id
107 107
    d->config[0x01] = 0x10;
......
118 118
    d->config[0x1a] = 0x00;  // subordinate_bus
119 119
    d->config[0x1c] = 0x00;
120 120
    d->config[0x1d] = 0x00;
121
    
121
   
122 122
    d->config[0x20] = 0x00; // memory_base
123 123
    d->config[0x21] = 0x00;
124 124
    d->config[0x22] = 0x01; // memory_limit
125 125
    d->config[0x23] = 0x00;
126
    
126
   
127 127
    d->config[0x24] = 0x00; // prefetchable_memory_base
128 128
    d->config[0x25] = 0x00;
129 129
    d->config[0x26] = 0x00; // prefetchable_memory_limit
......
145 145
    d->config[0x1a] = 0x1;  // subordinate_bus
146 146
    d->config[0x1c] = 0x10; // io_base
147 147
    d->config[0x1d] = 0x20; // io_limit
148
    
148
   
149 149
    d->config[0x20] = 0x80; // memory_base
150 150
    d->config[0x21] = 0x80;
151 151
    d->config[0x22] = 0x90; // memory_limit
152 152
    d->config[0x23] = 0x80;
153
    
153
   
154 154
    d->config[0x24] = 0x00; // prefetchable_memory_base
155 155
    d->config[0x25] = 0x84;
156 156
    d->config[0x26] = 0x00; // prefetchable_memory_limit

Also available in: Unified diff