[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 21/22] petalogix-ml605: Create the CPU with objec
From: |
edgar . iglesias |
Subject: |
[Qemu-devel] [PATCH v1 21/22] petalogix-ml605: Create the CPU with object_new() |
Date: |
Mon, 16 Dec 2013 18:06:09 +1000 |
From: "Edgar E. Iglesias" <address@hidden>
This is to allow future patches to set properties before cpu::realize().
Signed-off-by: Edgar E. Iglesias <address@hidden>
---
hw/microblaze/petalogix_ml605_mmu.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/microblaze/petalogix_ml605_mmu.c
b/hw/microblaze/petalogix_ml605_mmu.c
index 10970e0..4009ff5 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -76,7 +76,7 @@ static void
petalogix_ml605_init(QEMUMachineInitArgs *args)
{
ram_addr_t ram_size = args->ram_size;
- const char *cpu_model = args->cpu_model;
+ Error *err = NULL;
MemoryRegion *address_space_mem = get_system_memory();
DeviceState *dev, *dma, *eth0;
Object *ds, *cs;
@@ -91,10 +91,13 @@ petalogix_ml605_init(QEMUMachineInitArgs *args)
qemu_irq irq[32], *cpu_irq;
/* init CPUs */
- if (cpu_model == NULL) {
- cpu_model = "microblaze";
+ cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
+ object_property_set_bool(OBJECT(cpu), true, "realized", &err);
+ if (err) {
+ error_report("%s", error_get_pretty(err));
+ exit(EXIT_FAILURE);
}
- cpu = cpu_mb_init(cpu_model);
+
env = &cpu->env;
/* Attach emulated BRAM through the LMB. */
--
1.7.10.4
- [Qemu-devel] [PATCH v1 13/22] exec: Make lduw_*_phys input an AddressSpace, (continued)
- [Qemu-devel] [PATCH v1 13/22] exec: Make lduw_*_phys input an AddressSpace, edgar . iglesias, 2013/12/16
- [Qemu-devel] [PATCH v1 14/22] exec: Make stq_*_phys input an AddressSpace, edgar . iglesias, 2013/12/16
- [Qemu-devel] [PATCH v1 15/22] exec: Make stl_*_phys input an AddressSpace, edgar . iglesias, 2013/12/16
- [Qemu-devel] [PATCH v1 16/22] exec: Make stl_phys_notdirty input an AddressSpace, edgar . iglesias, 2013/12/16
- [Qemu-devel] [PATCH v1 17/22] exec: Make stw_*_phys input an AddressSpace, edgar . iglesias, 2013/12/16
- [Qemu-devel] [PATCH v1 18/22] exec: Make stb_phys input an AddressSpace, edgar . iglesias, 2013/12/16
- [Qemu-devel] [PATCH v1 19/22] exec: Make cpu_physical_memory_write_rom input an AS, edgar . iglesias, 2013/12/16
- [Qemu-devel] [PATCH v1 20/22] exec: Make cpu_memory_rw_debug use the CPUs AS, edgar . iglesias, 2013/12/16
- [Qemu-devel] [PATCH v1 21/22] petalogix-ml605: Create the CPU with object_new(),
edgar . iglesias <=
- [Qemu-devel] [PATCH v1 22/22] petalogix-ml605: Make the LMB visible only to the CPU, edgar . iglesias, 2013/12/16
- Re: [Qemu-devel] [PATCH v1 22/22] petalogix-ml605: Make the LMB visible only to the CPU, Edgar E. Iglesias, 2013/12/16
- Re: [Qemu-devel] [PATCH v1 22/22] petalogix-ml605: Make the LMB visible only to the CPU, Edgar E. Iglesias, 2013/12/16