mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
Realview/EB procid hacks
Guess core tile ID based on CPU type. Signed-off-by: Paul Brook <paul@codesourcery.com>
This commit is contained in:
parent
dbe73d7f3b
commit
26e92f6552
4 changed files with 18 additions and 6 deletions
|
@ -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(),
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue