Revision 7ffab4d7

b/hw/arm-misc.h
27 27
    const char *kernel_cmdline;
28 28
    const char *initrd_filename;
29 29
    target_phys_addr_t loader_start;
30
    target_phys_addr_t smp_loader_start;
30 31
    int nb_cpus;
31 32
    int board_id;
32 33
    int (*atag_board)(struct arm_boot_info *info, void *p);
b/hw/integratorcp.c
457 457
                     const char *initrd_filename, const char *cpu_model)
458 458
{
459 459
    CPUState *env;
460
    uint32_t ram_offset;
460
    ram_addr_t ram_offset;
461 461
    qemu_irq *pic;
462 462
    qemu_irq *cpu_pic;
463 463
    int sd;
b/hw/realview.c
29 29
                     const char *initrd_filename, const char *cpu_model)
30 30
{
31 31
    CPUState *env;
32
    ram_addr_t ram_offset;
32 33
    qemu_irq *pic;
33 34
    void *scsi_hba;
34 35
    PCIBus *pci_bus;
......
64 65
        }
65 66
    }
66 67

  
68
    ram_offset = qemu_ram_alloc(ram_size);
67 69
    /* ??? RAM should repeat to fill physical memory space.  */
68 70
    /* SDRAM at address zero.  */
69
    cpu_register_physical_memory(0, ram_size, IO_MEM_RAM);
71
    cpu_register_physical_memory(0, ram_size, ram_offset | IO_MEM_RAM);
70 72

  
71 73
    arm_sysctl_init(0x10000000, 0xc1400400);
72 74

  
......
182 184
    /* 0x68000000 PCI mem 1.  */
183 185
    /* 0x6c000000 PCI mem 2.  */
184 186

  
187
    /* ??? Hack to map an additional page of ram for the secondary CPU
188
       startup code.  I guess this works on real hardware because the
189
       BootROM happens to be in ROM/flash or in memory that isn't clobbered
190
       until after Linux boots the secondary CPUs.  */
191
    ram_offset = qemu_ram_alloc(0x1000);
192
    cpu_register_physical_memory(0x80000000, 0x1000, ram_offset | IO_MEM_RAM);
193

  
185 194
    realview_binfo.ram_size = ram_size;
186 195
    realview_binfo.kernel_filename = kernel_filename;
187 196
    realview_binfo.kernel_cmdline = kernel_cmdline;
188 197
    realview_binfo.initrd_filename = initrd_filename;
189 198
    realview_binfo.nb_cpus = ncpu;
190 199
    arm_load_kernel(first_cpu, &realview_binfo);
191

  
192
    /* ??? Hack to map an additional page of ram for the secondary CPU
193
       startup code.  I guess this works on real hardware because the
194
       BootROM happens to be in ROM/flash or in memory that isn't clobbered
195
       until after Linux boots the secondary CPUs.  */
196
    cpu_register_physical_memory(0x80000000, 0x1000, IO_MEM_RAM + ram_size);
197 200
}
198 201

  
199 202
QEMUMachine realview_machine = {
b/hw/versatilepb.c
160 160
                     int board_id)
161 161
{
162 162
    CPUState *env;
163
    ram_addr_t ram_offset;
163 164
    qemu_irq *pic;
164 165
    qemu_irq *sic;
165 166
    void *scsi_hba;
......
176 177
        fprintf(stderr, "Unable to find CPU definition\n");
177 178
        exit(1);
178 179
    }
180
    ram_offset = qemu_ram_alloc(ram_size);
179 181
    /* ??? RAM should repeat to fill physical memory space.  */
180 182
    /* SDRAM at address zero.  */
181
    cpu_register_physical_memory(0, ram_size, IO_MEM_RAM);
183
    cpu_register_physical_memory(0, ram_size, ram_offset | IO_MEM_RAM);
182 184

  
183 185
    arm_sysctl_init(0x10000000, 0x41007004);
184 186
    pic = arm_pic_init_cpu(env);

Also available in: Unified diff