32
32
#define BUS_FREQ_HZ 100000000
33
33
34
34
#define INITRD_MIN_ADDR 0x600000
35
+ #define INIT_RAM_ADDR 0x40000000
36
+
37
+ #define PCI_HIGH_ADDR 0x80000000
38
+ #define PCI_HIGH_SIZE 0x7d000000
39
+ #define PCI_LOW_ADDR 0xfd000000
40
+ #define PCI_LOW_SIZE 0xe0000
41
+
42
+ #define ARTICIA_ADDR 0xfe000000
35
43
36
44
/*
37
45
* Firmware binary available at
@@ -287,7 +295,7 @@ static void amigaone_init(MachineState *machine)
287
295
/* Firmware uses this area for startup */
288
296
mr = g_new (MemoryRegion , 1 );
289
297
memory_region_init_ram (mr , NULL , "init-cache" , 32 * KiB , & error_fatal );
290
- memory_region_add_subregion (get_system_memory (), 0x40000000 , mr );
298
+ memory_region_add_subregion (get_system_memory (), INIT_RAM_ADDR , mr );
291
299
}
292
300
293
301
/* nvram */
@@ -322,7 +330,7 @@ static void amigaone_init(MachineState *machine)
322
330
}
323
331
324
332
/* Articia S */
325
- dev = sysbus_create_simple (TYPE_ARTICIA , 0xfe000000 , NULL );
333
+ dev = sysbus_create_simple (TYPE_ARTICIA , ARTICIA_ADDR , NULL );
326
334
327
335
i2c_bus = I2C_BUS (qdev_get_child_bus (dev , "smbus" ));
328
336
if (machine -> ram_size > 512 * MiB ) {
@@ -339,12 +347,12 @@ static void amigaone_init(MachineState *machine)
339
347
pci_mem = sysbus_mmio_get_region (SYS_BUS_DEVICE (dev ), 1 );
340
348
mr = g_new (MemoryRegion , 1 );
341
349
memory_region_init_alias (mr , OBJECT (dev ), "pci-mem-low" , pci_mem ,
342
- 0 , 0xe0000 );
343
- memory_region_add_subregion (get_system_memory (), 0xfd000000 , mr );
350
+ 0 , PCI_LOW_SIZE );
351
+ memory_region_add_subregion (get_system_memory (), PCI_LOW_ADDR , mr );
344
352
mr = g_new (MemoryRegion , 1 );
345
353
memory_region_init_alias (mr , OBJECT (dev ), "pci-mem-high" , pci_mem ,
346
- 0x80000000 , 0x7d000000 );
347
- memory_region_add_subregion (get_system_memory (), 0x80000000 , mr );
354
+ PCI_HIGH_ADDR , PCI_HIGH_SIZE );
355
+ memory_region_add_subregion (get_system_memory (), PCI_HIGH_ADDR , mr );
348
356
pci_bus = PCI_BUS (qdev_get_child_bus (dev , "pci.0" ));
349
357
350
358
/* VIA VT82c686B South Bridge (multifunction PCI device) */
0 commit comments