Revision 5fafdf24 hw/piix_pci.c

b/hw/piix_pci.c
2 2
 * QEMU i440FX/PIIX3 PCI Bridge Emulation
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
......
63 63
    switch(r) {
64 64
    case 3:
65 65
        /* RAM */
66
        cpu_register_physical_memory(start, end - start, 
66
        cpu_register_physical_memory(start, end - start,
67 67
                                     start);
68 68
        break;
69 69
    case 1:
70 70
        /* ROM (XXX: not quite correct) */
71
        cpu_register_physical_memory(start, end - start, 
71
        cpu_register_physical_memory(start, end - start,
72 72
                                     start | IO_MEM_ROM);
73 73
        break;
74 74
    case 2:
75 75
    case 0:
76 76
        /* XXX: should distinguish read/write cases */
77 77
        for(addr = start; addr < end; addr += 4096) {
78
            cpu_register_physical_memory(addr, 4096, 
78
            cpu_register_physical_memory(addr, 4096,
79 79
                                         isa_page_descs[(addr - 0xa0000) >> 12]);
80 80
        }
81 81
        break;
......
97 97
        cpu_register_physical_memory(0xa0000, 0x20000, 0xa0000);
98 98
    } else {
99 99
        for(addr = 0xa0000; addr < 0xc0000; addr += 4096) {
100
            cpu_register_physical_memory(addr, 4096, 
100
            cpu_register_physical_memory(addr, 4096,
101 101
                                         isa_page_descs[(addr - 0xa0000) >> 12]);
102 102
        }
103 103
    }
......
124 124
    }
125 125
}
126 126

  
127
static void i440fx_write_config(PCIDevice *d, 
127
static void i440fx_write_config(PCIDevice *d,
128 128
                                uint32_t address, uint32_t val, int len)
129 129
{
130 130
    /* XXX: implement SMRAM.D_LOCK */
......
175 175
    register_ioport_read(0xcfc, 4, 2, pci_host_data_readw, s);
176 176
    register_ioport_read(0xcfc, 4, 4, pci_host_data_readl, s);
177 177

  
178
    d = pci_register_device(b, "i440FX", sizeof(PCIDevice), 0, 
178
    d = pci_register_device(b, "i440FX", sizeof(PCIDevice), 0,
179 179
                            NULL, i440fx_write_config);
180 180

  
181 181
    d->config[0x00] = 0x86; // vendor_id

Also available in: Unified diff