diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-08 03:04:12 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-08 03:04:12 +0000 |
commit | 3371d27293dc40159069d6593da22ba77ac8513c (patch) | |
tree | 1ea59000c4beb850f0b1e36aaa66f839d226efcf /hw | |
parent | 76a66253e5e48f1744f689041c1c21cedcaff630 (diff) |
Implement --cpu for ARM.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2474 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/integratorcp.c | 38 | ||||
-rw-r--r-- | hw/realview.c | 5 | ||||
-rw-r--r-- | hw/versatilepb.c | 11 |
3 files changed, 17 insertions, 37 deletions
diff --git a/hw/integratorcp.c b/hw/integratorcp.c index fd1675b40b..5e4c636f04 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -471,7 +471,7 @@ static void icp_control_init(uint32_t base) static void integratorcp_init(int ram_size, int vga_ram_size, int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, const char *kernel_filename, const char *kernel_cmdline, - const char *initrd_filename, uint32_t cpuid) + const char *initrd_filename, const char *cpu_model) { CPUState *env; uint32_t bios_offset; @@ -479,7 +479,9 @@ static void integratorcp_init(int ram_size, int vga_ram_size, int boot_device, void *cpu_pic; env = cpu_init(); - cpu_arm_set_model(env, cpuid); + if (!cpu_model) + cpu_model = "arm926"; + cpu_arm_set_model(env, cpu_model); bios_offset = ram_size + vga_ram_size; /* ??? On a real system the first 1Mb is mapped as SSRAM or boot flash. */ /* ??? RAM shoud repeat to fill physical memory space. */ @@ -513,34 +515,8 @@ static void integratorcp_init(int ram_size, int vga_ram_size, int boot_device, initrd_filename, 0x113); } -static void integratorcp926_init(int ram_size, int vga_ram_size, - int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, - const char *kernel_filename, const char *kernel_cmdline, - const char *initrd_filename, const char *cpu_model) -{ - integratorcp_init(ram_size, vga_ram_size, boot_device, ds, fd_filename, - snapshot, kernel_filename, kernel_cmdline, - initrd_filename, ARM_CPUID_ARM926); -} - -static void integratorcp1026_init(int ram_size, int vga_ram_size, - int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, - const char *kernel_filename, const char *kernel_cmdline, - const char *initrd_filename, const char *cpu_model) -{ - integratorcp_init(ram_size, vga_ram_size, boot_device, ds, fd_filename, - snapshot, kernel_filename, kernel_cmdline, - initrd_filename, ARM_CPUID_ARM1026); -} - -QEMUMachine integratorcp926_machine = { - "integratorcp926", +QEMUMachine integratorcp_machine = { + "integratorcp", "ARM Integrator/CP (ARM926EJ-S)", - integratorcp926_init, -}; - -QEMUMachine integratorcp1026_machine = { - "integratorcp1026", - "ARM Integrator/CP (ARM1026EJ-S)", - integratorcp1026_init, + integratorcp_init, }; diff --git a/hw/realview.c b/hw/realview.c index 325b3d1ab3..619739c11c 100644 --- a/hw/realview.c +++ b/hw/realview.c @@ -26,8 +26,9 @@ static void realview_init(int ram_size, int vga_ram_size, int boot_device, int done_smc = 0; env = cpu_init(); - cpu_arm_set_model(env, ARM_CPUID_ARM926); - //cpu_arm_set_model(env, ARM_CPUID_ARM11MPCORE); + if (!cpu_model) + cpu_model = "arm926"; + cpu_arm_set_model(env, cpu_model); /* ??? RAM shoud repeat to fill physical memory space. */ /* SDRAM at address zero. */ cpu_register_physical_memory(0, ram_size, IO_MEM_RAM); diff --git a/hw/versatilepb.c b/hw/versatilepb.c index 1bcc160b33..050878d50a 100644 --- a/hw/versatilepb.c +++ b/hw/versatilepb.c @@ -154,7 +154,8 @@ static vpb_sic_state *vpb_sic_init(uint32_t base, void *parent, int irq) static void versatile_init(int ram_size, int vga_ram_size, int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, const char *kernel_filename, const char *kernel_cmdline, - const char *initrd_filename, int board_id) + const char *initrd_filename, const char *cpu_model, + int board_id) { CPUState *env; void *pic; @@ -166,7 +167,9 @@ static void versatile_init(int ram_size, int vga_ram_size, int boot_device, int done_smc = 0; env = cpu_init(); - cpu_arm_set_model(env, ARM_CPUID_ARM926); + if (!cpu_model) + cpu_model = "arm926"; + cpu_arm_set_model(env, cpu_model); /* ??? RAM shoud repeat to fill physical memory space. */ /* SDRAM at address zero. */ cpu_register_physical_memory(0, ram_size, IO_MEM_RAM); @@ -262,7 +265,7 @@ static void vpb_init(int ram_size, int vga_ram_size, int boot_device, versatile_init(ram_size, vga_ram_size, boot_device, ds, fd_filename, snapshot, kernel_filename, kernel_cmdline, - initrd_filename, 0x183); + initrd_filename, cpu_model, 0x183); } static void vab_init(int ram_size, int vga_ram_size, int boot_device, @@ -273,7 +276,7 @@ static void vab_init(int ram_size, int vga_ram_size, int boot_device, versatile_init(ram_size, vga_ram_size, boot_device, ds, fd_filename, snapshot, kernel_filename, kernel_cmdline, - initrd_filename, 0x25e); + initrd_filename, cpu_model, 0x25e); } QEMUMachine versatilepb_machine = { |