diff options
author | Paul Brook <paul@codesourcery.com> | 2009-11-13 03:30:33 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-11-13 04:04:18 +0000 |
commit | 26e92f65525ef4446a500d85e185cf78835922aa (patch) | |
tree | 4297dd3341245566647126edbd5fee80a5ef24af /hw/arm_sysctl.c | |
parent | dbe73d7f3b85b9c1473d1400bc29ff495d8c1322 (diff) | |
download | qemu-26e92f65525ef4446a500d85e185cf78835922aa.tar.gz qemu-26e92f65525ef4446a500d85e185cf78835922aa.tar.bz2 qemu-26e92f65525ef4446a500d85e185cf78835922aa.zip |
Realview/EB procid hacks
Guess core tile ID based on CPU type.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/arm_sysctl.c')
-rw-r--r-- | hw/arm_sysctl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c index 856e770921..0cb2ffc505 100644 --- a/hw/arm_sysctl.c +++ b/hw/arm_sysctl.c @@ -25,6 +25,7 @@ typedef struct { uint32_t flags; uint32_t nvflags; uint32_t resetlevel; + uint32_t proc_id; } arm_sysctl_state; static void arm_sysctl_reset(DeviceState *d) @@ -89,8 +90,7 @@ static uint32_t arm_sysctl_read(void *opaque, target_phys_addr_t offset) case 0x60: /* MISC */ return 0; case 0x84: /* PROCID0 */ - /* ??? Don't know what the proper value for the core tile ID is. */ - return 0x02000000; + return s->proc_id; case 0x88: /* PROCID1 */ return 0xff000000; case 0x64: /* DMAPSR0 */ @@ -215,13 +215,14 @@ static int arm_sysctl_init1(SysBusDevice *dev) } /* Legacy helper function. */ -void arm_sysctl_init(uint32_t base, uint32_t sys_id) +void arm_sysctl_init(uint32_t base, uint32_t sys_id, uint32_t proc_id) { DeviceState *dev; dev = qdev_create(NULL, "realview_sysctl"); qdev_prop_set_uint32(dev, "sys_id", sys_id); qdev_init_nofail(dev); + qdev_prop_set_uint32(dev, "proc_id", proc_id); sysbus_mmio_map(sysbus_from_qdev(dev), 0, base); } @@ -232,6 +233,7 @@ static SysBusDeviceInfo arm_sysctl_info = { .qdev.reset = arm_sysctl_reset, .qdev.props = (Property[]) { DEFINE_PROP_UINT32("sys_id", arm_sysctl_state, sys_id, 0), + DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0), DEFINE_PROP_END_OF_LIST(), } }; |