5 /* --- target physical address --- */
7 static int parse_taddr(DeviceState
*dev
, Property
*prop
, const char *str
)
9 target_phys_addr_t
*ptr
= qdev_get_prop_ptr(dev
, prop
);
11 *ptr
= strtoull(str
, NULL
, 16);
15 static int print_taddr(DeviceState
*dev
, Property
*prop
, char *dest
, size_t len
)
17 target_phys_addr_t
*ptr
= qdev_get_prop_ptr(dev
, prop
);
18 return snprintf(dest
, len
, "0x" TARGET_FMT_plx
, *ptr
);
21 PropertyInfo qdev_prop_taddr
= {
23 .type
= PROP_TYPE_TADDR
,
24 .size
= sizeof(target_phys_addr_t
),
29 void qdev_prop_set_taddr(DeviceState
*dev
, const char *name
, target_phys_addr_t value
)
31 qdev_prop_set(dev
, name
, &value
, PROP_TYPE_TADDR
);