Revision 4e46dcdb
b/hw/ppc/mac_newworld.c | ||
---|---|---|
87 | 87 |
unsigned size) |
88 | 88 |
{ |
89 | 89 |
UNIN_DPRINTF("write addr " TARGET_FMT_plx " val %"PRIx64"\n", addr, value); |
90 |
if (addr == 0x0) { |
|
91 |
*(int*)opaque = value; |
|
92 |
} |
|
90 | 93 |
} |
91 | 94 |
|
92 | 95 |
static uint64_t unin_read(void *opaque, hwaddr addr, unsigned size) |
... | ... | |
94 | 97 |
uint32_t value; |
95 | 98 |
|
96 | 99 |
value = 0; |
100 |
switch (addr) { |
|
101 |
case 0: |
|
102 |
value = *(int*)opaque; |
|
103 |
} |
|
104 |
|
|
97 | 105 |
UNIN_DPRINTF("readl addr " TARGET_FMT_plx " val %x\n", addr, value); |
98 | 106 |
|
99 | 107 |
return value; |
... | ... | |
162 | 170 |
int machine_arch; |
163 | 171 |
SysBusDevice *s; |
164 | 172 |
DeviceState *dev; |
173 |
int *token = g_new(int, 1); |
|
165 | 174 |
|
166 | 175 |
linux_boot = (kernel_filename != NULL); |
167 | 176 |
|
... | ... | |
279 | 288 |
/* Register 8 MB of ISA IO space */ |
280 | 289 |
isa_mmio_init(0xf2000000, 0x00800000); |
281 | 290 |
|
282 |
/* UniN init */ |
|
283 |
memory_region_init_io(unin_memory, &unin_ops, NULL, "unin", 0x1000);
|
|
291 |
/* UniN init: XXX should be a real device */
|
|
292 |
memory_region_init_io(unin_memory, &unin_ops, token, "unin", 0x1000);
|
|
284 | 293 |
memory_region_add_subregion(get_system_memory(), 0xf8000000, unin_memory); |
285 | 294 |
|
286 | 295 |
openpic_irqs = g_malloc0(smp_cpus * sizeof(qemu_irq *)); |
Also available in: Unified diff