aboutsummaryrefslogtreecommitdiff
path: root/hw/integratorcp.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-24 17:59:27 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-24 17:59:27 +0000
commit7fb4fdcffeb199c1a742c45ac2413be8a9a33354 (patch)
tree39c795fed9ae5e8d59afde1ca6031702cdd3224e /hw/integratorcp.c
parentc73f96fddc0f5ec7c708290f159b04cfa09ef713 (diff)
RAM usage information in machine definition.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4246 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/integratorcp.c')
-rw-r--r--hw/integratorcp.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/hw/integratorcp.c b/hw/integratorcp.c
index f6e636441a..8a757546ae 100644
--- a/hw/integratorcp.c
+++ b/hw/integratorcp.c
@@ -231,7 +231,7 @@ static CPUWriteMemoryFunc *integratorcm_writefn[] = {
integratorcm_write
};
-static void integratorcm_init(int memsz, uint32_t flash_offset)
+static void integratorcm_init(int memsz)
{
int iomemtype;
integratorcm_state *s;
@@ -258,7 +258,7 @@ static void integratorcm_init(int memsz, uint32_t flash_offset)
}
memcpy(integrator_spd + 73, "QEMU-MEMORY", 11);
s->cm_init = 0x00000112;
- s->flash_offset = flash_offset;
+ s->flash_offset = qemu_ram_alloc(0x100000);
iomemtype = cpu_register_io_memory(0, integratorcm_readfn,
integratorcm_writefn, s);
@@ -480,7 +480,7 @@ static void integratorcp_init(int ram_size, int vga_ram_size,
const char *initrd_filename, const char *cpu_model)
{
CPUState *env;
- uint32_t bios_offset;
+ uint32_t ram_offset;
qemu_irq *pic;
qemu_irq *cpu_pic;
int sd;
@@ -492,15 +492,15 @@ static void integratorcp_init(int ram_size, int vga_ram_size,
fprintf(stderr, "Unable to find CPU definition\n");
exit(1);
}
- bios_offset = ram_size + vga_ram_size;
+ ram_offset = qemu_ram_alloc(ram_size);
/* ??? On a real system the first 1Mb is mapped as SSRAM or boot flash. */
/* ??? RAM shoud repeat to fill physical memory space. */
/* SDRAM at address zero*/
- cpu_register_physical_memory(0, ram_size, IO_MEM_RAM);
+ cpu_register_physical_memory(0, ram_size, ram_offset | IO_MEM_RAM);
/* And again at address 0x80000000 */
- cpu_register_physical_memory(0x80000000, ram_size, IO_MEM_RAM);
+ cpu_register_physical_memory(0x80000000, ram_size, ram_offset | IO_MEM_RAM);
- integratorcm_init(ram_size >> 20, bios_offset);
+ integratorcm_init(ram_size >> 20);
cpu_pic = arm_pic_init_cpu(env);
pic = icp_pic_init(0x14000000, cpu_pic[ARM_PIC_CPU_IRQ],
cpu_pic[ARM_PIC_CPU_FIQ]);
@@ -543,4 +543,5 @@ QEMUMachine integratorcp_machine = {
"integratorcp",
"ARM Integrator/CP (ARM926EJ-S)",
integratorcp_init,
+ 0x100000,
};