aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sim/ppc/device.c16
-rw-r--r--sim/ppc/emul_chirp.c84
-rw-r--r--sim/ppc/events.c68
-rw-r--r--sim/ppc/gdb-sim.c8
-rw-r--r--sim/ppc/hw_init.c14
-rw-r--r--sim/ppc/psim.c9
-rw-r--r--sim/ppc/sim_calls.c12
-rw-r--r--sim/ppc/tree.c6
-rw-r--r--sim/ppc/vm.c16
9 files changed, 116 insertions, 117 deletions
diff --git a/sim/ppc/device.c b/sim/ppc/device.c
index aa97e0b..47fa751 100644
--- a/sim/ppc/device.c
+++ b/sim/ppc/device.c
@@ -1034,8 +1034,8 @@ device_find_ihandle_runtime_property(device *me,
{
device_property_entry *entry = find_property_entry(me, property);
TRACE(trace_devices,
- ("device_find_ihandle_runtime_property(me=0x%lx, property=%s)\n",
- (long)me, property));
+ ("device_find_ihandle_runtime_property(me=%p, property=%s)\n",
+ me, property));
if (entry == NULL
|| entry->value->type != ihandle_property
|| entry->value->disposition != permenant_object)
@@ -1104,8 +1104,8 @@ device_find_integer_property(device *me,
const device_property *node;
signed_cell integer;
TRACE(trace_devices,
- ("device_find_integer(me=0x%lx, property=%s)\n",
- (long)me, property));
+ ("device_find_integer(me=%p, property=%s)\n",
+ me, property));
node = device_find_property(me, property);
if (node == (device_property*)0
|| node->type != integer_property)
@@ -1126,8 +1126,8 @@ device_find_integer_array_property(device *me,
int sizeof_integer = sizeof(*integer);
signed_cell *cell;
TRACE(trace_devices,
- ("device_find_integer(me=0x%lx, property=%s)\n",
- (long)me, property));
+ ("device_find_integer(me=%p, property=%s)\n",
+ me, property));
/* check things sane */
node = device_find_property(me, property);
@@ -1495,8 +1495,8 @@ device_add_duplicate_property(device *me,
{
device_property_entry *master;
TRACE(trace_devices,
- ("device_add_duplicate_property(me=0x%lx, property=%s, ...)\n",
- (long)me, property));
+ ("device_add_duplicate_property(me=%p, property=%s, ...)\n",
+ me, property));
if (original->disposition != permenant_object)
device_error(me, "Can only duplicate permenant objects");
/* find the original's master */
diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c
index ed49169..2c9316c 100644
--- a/sim/ppc/emul_chirp.c
+++ b/sim/ppc/emul_chirp.c
@@ -260,9 +260,9 @@ chirp_emul_peer(os_emul_data *data,
if (chirp_read_t2h_args(&args, sizeof(args), 1, 1, data, processor, cia))
return -1;
phandle = external_to_device(data->root, args.phandle);
- TRACE(trace_os_emul, ("peer - in - phandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("peer - in - phandle=0x%lx(%p`%s')\n",
(unsigned long)args.phandle,
- (unsigned long)phandle,
+ phandle,
(phandle == NULL ? "" : device_name(phandle))));
/* find the peer */
if (args.phandle == 0) {
@@ -281,9 +281,9 @@ chirp_emul_peer(os_emul_data *data,
args.sibling_phandle = device_to_external(sibling_phandle);
}
/* write the arguments back out */
- TRACE(trace_os_emul, ("peer - out - sibling_phandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("peer - out - sibling_phandle=0x%lx(%p`%s')\n",
(unsigned long)args.sibling_phandle,
- (unsigned long)sibling_phandle,
+ sibling_phandle,
(sibling_phandle == NULL ? "" : device_name(sibling_phandle))));
chirp_write_h2t_args(&args,
sizeof(args),
@@ -309,9 +309,9 @@ chirp_emul_child(os_emul_data *data,
if (chirp_read_t2h_args(&args, sizeof(args), 1, 1, data, processor, cia))
return -1;
phandle = external_to_device(data->root, args.phandle);
- TRACE(trace_os_emul, ("child - in - phandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("child - in - phandle=0x%lx(%p`%s')\n",
(unsigned long)args.phandle,
- (unsigned long)phandle,
+ phandle,
(phandle == NULL ? "" : device_name(phandle))));
/* find a child */
if (args.phandle == 0
@@ -327,9 +327,9 @@ chirp_emul_child(os_emul_data *data,
args.child_phandle = device_to_external(child_phandle);
}
/* write the result out */
- TRACE(trace_os_emul, ("child - out - child_phandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("child - out - child_phandle=0x%lx(%p`%s')\n",
(unsigned long)args.child_phandle,
- (unsigned long)child_phandle,
+ child_phandle,
(child_phandle == NULL ? "" : device_name(child_phandle))));
chirp_write_h2t_args(&args,
sizeof(args),
@@ -355,9 +355,9 @@ chirp_emul_parent(os_emul_data *data,
if (chirp_read_t2h_args(&args, sizeof(args), 1, 1, data, processor, cia))
return -1;
phandle = external_to_device(data->root, args.phandle);
- TRACE(trace_os_emul, ("parent - in - phandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("parent - in - phandle=0x%lx(%p`%s')\n",
(unsigned long)args.phandle,
- (unsigned long)phandle,
+ phandle,
(phandle == NULL ? "" : device_name(phandle))));
/* find a parent */
if (args.phandle == 0
@@ -373,9 +373,9 @@ chirp_emul_parent(os_emul_data *data,
args.parent_phandle = device_to_external(parent_phandle);
}
/* return the result */
- TRACE(trace_os_emul, ("parent - out - parent_phandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("parent - out - parent_phandle=0x%lx(%p`%s')\n",
(unsigned long)args.parent_phandle,
- (unsigned long)parent_phandle,
+ parent_phandle,
(parent_phandle == NULL ? "" : device_name(parent_phandle))));
chirp_write_h2t_args(&args,
sizeof(args),
@@ -401,9 +401,9 @@ chirp_emul_instance_to_package(os_emul_data *data,
if (chirp_read_t2h_args(&args, sizeof(args), 1, 1, data, processor, cia))
return -1;
ihandle = external_to_device_instance(data->root, args.ihandle);
- TRACE(trace_os_emul, ("instance-to-package - in - ihandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("instance-to-package - in - ihandle=0x%lx(%p`%s')\n",
(unsigned long)args.ihandle,
- (unsigned long)ihandle,
+ ihandle,
ihandle_name(ihandle)));
/* find the corresponding phandle */
if (ihandle == NULL) {
@@ -415,9 +415,9 @@ chirp_emul_instance_to_package(os_emul_data *data,
args.phandle = device_to_external(phandle);
}
/* return the result */
- TRACE(trace_os_emul, ("instance-to-package - out - phandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("instance-to-package - out - phandle=0x%lx(%p`%s')\n",
(unsigned long)args.phandle,
- (unsigned long)phandle,
+ phandle,
(phandle == NULL ? "" : device_name(phandle))));
chirp_write_h2t_args(&args,
sizeof(args),
@@ -448,9 +448,9 @@ chirp_emul_getproplen(os_emul_data *data,
args.name,
sizeof(name),
processor, cia);
- TRACE(trace_os_emul, ("getproplen - in - phandle=0x%lx(0x%lx`%s') name=`%s'\n",
+ TRACE(trace_os_emul, ("getproplen - in - phandle=0x%lx(%p`%s') name=`%s'\n",
(unsigned long)args.phandle,
- (unsigned long)phandle,
+ phandle,
(phandle == NULL ? "" : device_name(phandle)),
name));
/* find our prop and get its length */
@@ -501,9 +501,9 @@ chirp_emul_getprop(os_emul_data *data,
args.name,
sizeof(name),
processor, cia);
- TRACE(trace_os_emul, ("getprop - in - phandle=0x%lx(0x%lx`%s') name=`%s' buf=0x%lx buflen=%ld\n",
+ TRACE(trace_os_emul, ("getprop - in - phandle=0x%lx(%p`%s') name=`%s' buf=0x%lx buflen=%ld\n",
(unsigned long)args.phandle,
- (unsigned long)phandle,
+ phandle,
(phandle == NULL ? "" : device_name(phandle)),
name,
(unsigned long)args.buf,
@@ -532,9 +532,9 @@ chirp_emul_getprop(os_emul_data *data,
device_find_string_property(phandle, name)));
break;
case ihandle_property:
- TRACE(trace_os_emul, ("getprop - ihandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("getprop - ihandle=0x%lx(%p`%s')\n",
(unsigned long)BE2H_cell(*(unsigned_cell*)prop->array),
- (unsigned long)device_find_ihandle_property(phandle, name),
+ device_find_ihandle_property(phandle, name),
ihandle_name(device_find_ihandle_property(phandle, name))));
break;
default:
@@ -585,9 +585,9 @@ chirp_emul_nextprop(os_emul_data *data,
/* If previous is NULL, make it look like the empty string. The
next property after the empty string is the first property. */
strcpy (previous, "");
- TRACE(trace_os_emul, ("nextprop - in - phandle=0x%lx(0x%lx`%s') previous=`%s' buf=0x%lx\n",
+ TRACE(trace_os_emul, ("nextprop - in - phandle=0x%lx(%p`%s') previous=`%s' buf=0x%lx\n",
(unsigned long)args.phandle,
- (unsigned long)phandle,
+ phandle,
(phandle == NULL ? "" : device_name(phandle)),
previous,
(unsigned long)args.buf));
@@ -728,9 +728,9 @@ chirp_emul_finddevice(os_emul_data *data,
else
args.phandle = device_to_external(phandle);
/* return its phandle */
- TRACE(trace_os_emul, ("finddevice - out - phandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("finddevice - out - phandle=0x%lx(%p`%s')\n",
(unsigned long)args.phandle,
- (unsigned long)phandle,
+ phandle,
(phandle == NULL ? "" : device_name(phandle))));
chirp_write_h2t_args(&args,
sizeof(args),
@@ -759,9 +759,9 @@ chirp_emul_instance_to_path(os_emul_data *data,
if (chirp_read_t2h_args(&args, sizeof(args), 3, 1, data, processor, cia))
return -1;
ihandle = external_to_device_instance(data->root, args.ihandle);
- TRACE(trace_os_emul, ("instance-to-path - in - ihandle=0x%lx(0x%lx`%s') buf=0x%lx buflen=%ld\n",
+ TRACE(trace_os_emul, ("instance-to-path - in - ihandle=0x%lx(%p`%s') buf=0x%lx buflen=%ld\n",
(unsigned long)args.ihandle,
- (unsigned long)ihandle,
+ ihandle,
ihandle_name(ihandle),
(unsigned long)args.buf,
(unsigned long)args.buflen));
@@ -809,9 +809,9 @@ chirp_emul_package_to_path(os_emul_data *data,
if (chirp_read_t2h_args(&args, sizeof(args), 3, 1, data, processor, cia))
return -1;
phandle = external_to_device(data->root, args.phandle);
- TRACE(trace_os_emul, ("package-to-path - in - phandle=0x%lx(0x%lx`%s') buf=0x%lx buflen=%ld\n",
+ TRACE(trace_os_emul, ("package-to-path - in - phandle=0x%lx(%p`%s') buf=0x%lx buflen=%ld\n",
(unsigned long)args.phandle,
- (unsigned long)phandle,
+ phandle,
(phandle == NULL ? "" : device_name(phandle)),
(unsigned long)args.buf,
(unsigned long)args.buflen));
@@ -872,12 +872,12 @@ chirp_emul_call_method(os_emul_data *data,
n_stack_returns = data->n_returns - 1;
stack_catch_result = n_stack_args;
stack_returns = stack_catch_result + 1;
- TRACE(trace_os_emul, ("call-method - in - n_args=%ld n_returns=%ld method=`%s' ihandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("call-method - in - n_args=%ld n_returns=%ld method=`%s' ihandle=0x%lx(%p`%s')\n",
(unsigned long)data->n_args,
(unsigned long)data->n_returns,
method,
(unsigned long)args.ihandle,
- (unsigned long)ihandle,
+ ihandle,
ihandle_name(ihandle)));
/* see if we can emulate this method */
if (ihandle == NULL) {
@@ -935,9 +935,9 @@ chirp_emul_open(os_emul_data *data,
else
args.ihandle = device_instance_to_external(ihandle);
/* return the ihandle result */
- TRACE(trace_os_emul, ("open - out - ihandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("open - out - ihandle=0x%lx(%p`%s')\n",
(unsigned long)args.ihandle,
- (unsigned long)ihandle,
+ ihandle,
ihandle_name(ihandle)));
chirp_write_h2t_args(&args,
sizeof(args),
@@ -961,9 +961,9 @@ chirp_emul_close(os_emul_data *data,
if (chirp_read_t2h_args(&args, sizeof(args), 1, 0, data, processor, cia))
return -1;
ihandle = external_to_device_instance(data->root, args.ihandle);
- TRACE(trace_os_emul, ("close - in - ihandle=0x%lx(0x%lx`%s')\n",
+ TRACE(trace_os_emul, ("close - in - ihandle=0x%lx(%p`%s')\n",
(unsigned long)args.ihandle,
- (unsigned long)ihandle,
+ ihandle,
ihandle_name(ihandle)));
/* close the device */
if (ihandle == NULL) {
@@ -1001,9 +1001,9 @@ chirp_emul_read(os_emul_data *data,
if (chirp_read_t2h_args(&args, sizeof(args), 3, 1, data, processor, cia))
return -1;
ihandle = external_to_device_instance(data->root, args.ihandle);
- TRACE(trace_os_emul, ("read - in - ihandle=0x%lx(0x%lx`%s') addr=0x%lx len=%ld\n",
+ TRACE(trace_os_emul, ("read - in - ihandle=0x%lx(%p`%s') addr=0x%lx len=%ld\n",
(unsigned long)args.ihandle,
- (unsigned long)ihandle,
+ ihandle,
ihandle_name(ihandle),
(unsigned long)args.addr,
(unsigned long)args.len));
@@ -1093,9 +1093,9 @@ chirp_emul_write(os_emul_data *data,
processor, cia);
buf[actual] = '\0';
ihandle = external_to_device_instance(data->root, args.ihandle);
- TRACE(trace_os_emul, ("write - in - ihandle=0x%lx(0x%lx`%s') `%s' (%ld)\n",
+ TRACE(trace_os_emul, ("write - in - ihandle=0x%lx(%p`%s') `%s' (%ld)\n",
(unsigned long)args.ihandle,
- (unsigned long)ihandle,
+ ihandle,
ihandle_name(ihandle),
buf, (long)actual));
if (ihandle == NULL) {
@@ -1139,9 +1139,9 @@ chirp_emul_seek(os_emul_data *data,
if (chirp_read_t2h_args(&args, sizeof(args), 3, 1, data, processor, cia))
return -1;
ihandle = external_to_device_instance(data->root, args.ihandle);
- TRACE(trace_os_emul, ("seek - in - ihandle=0x%lx(0x%lx`%s') pos.hi=0x%lx pos.lo=0x%lx\n",
+ TRACE(trace_os_emul, ("seek - in - ihandle=0x%lx(%p`%s') pos.hi=0x%lx pos.lo=0x%lx\n",
(unsigned long)args.ihandle,
- (unsigned long)ihandle,
+ ihandle,
ihandle_name(ihandle),
(unsigned long)args.pos_hi,
(unsigned long)args.pos_lo));
diff --git a/sim/ppc/events.c b/sim/ppc/events.c
index 130b28b..e40e1b4 100644
--- a/sim/ppc/events.c
+++ b/sim/ppc/events.c
@@ -169,14 +169,14 @@ update_time_from_event(event_queue *events)
event != NULL;
event = event->next, i++)
{
- TRACE(trace_events, ("event time-from-event - time %ld, delta %ld - event %d, tag 0x%lx, time %ld, handler 0x%lx, data 0x%lx\n",
- (long)current_time,
- (long)events->time_from_event,
+ TRACE(trace_events, ("event time-from-event - time %" PRIi64 ", delta %ld - event %d, tag %p, time %" PRIi64 ", handler %p, data %p\n",
+ current_time,
+ events->time_from_event,
i,
- (long)event,
- (long)event->time_of_event,
- (long)event->handler,
- (long)event->data));
+ event,
+ event->time_of_event,
+ event->handler,
+ event->data));
}
}
ASSERT(current_time == event_queue_time(events));
@@ -229,12 +229,12 @@ event_queue_schedule(event_queue *events,
new_event->data = data;
new_event->handler = handler;
insert_event_entry(events, new_event, delta_time);
- TRACE(trace_events, ("event scheduled at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx\n",
- (long)event_queue_time(events),
- (long)new_event,
- (long)new_event->time_of_event,
- (long)new_event->handler,
- (long)new_event->data));
+ TRACE(trace_events, ("event scheduled at %" PRIi64 " - tag %p - time %" PRIi64 ", handler %p, data %p\n",
+ event_queue_time(events),
+ new_event,
+ new_event->time_of_event,
+ new_event->handler,
+ new_event->data));
return (event_entry_tag)new_event;
}
@@ -272,12 +272,12 @@ event_queue_schedule_after_signal(event_queue *events,
#endif
}
- TRACE(trace_events, ("event scheduled at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx\n",
- (long)event_queue_time(events),
- (long)new_event,
- (long)new_event->time_of_event,
- (long)new_event->handler,
- (long)new_event->data));
+ TRACE(trace_events, ("event scheduled at %" PRIi64 " - tag %p - time %" PRIi64 ", handler %p, data %p\n",
+ event_queue_time(events),
+ new_event,
+ new_event->time_of_event,
+ new_event->handler,
+ new_event->data));
return (event_entry_tag)new_event;
}
@@ -298,19 +298,19 @@ event_queue_deschedule(event_queue *events,
ptr_to_current = &current->next, current = *ptr_to_current);
if (current == to_remove) {
*ptr_to_current = current->next;
- TRACE(trace_events, ("event descheduled at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx\n",
- (long)event_queue_time(events),
- (long)event_to_remove,
- (long)current->time_of_event,
- (long)current->handler,
- (long)current->data));
+ TRACE(trace_events, ("event descheduled at %" PRIi64 " - tag %p - time %" PRIi64 ", handler %p, data %p\n",
+ event_queue_time(events),
+ event_to_remove,
+ current->time_of_event,
+ current->handler,
+ current->data));
free(current);
update_time_from_event(events);
}
else {
- TRACE(trace_events, ("event descheduled at %ld - tag 0x%lx - not found\n",
- (long)event_queue_time(events),
- (long)event_to_remove));
+ TRACE(trace_events, ("event descheduled at %" PRIi64 " - tag %p - not found\n",
+ event_queue_time(events),
+ event_to_remove));
}
}
ASSERT((events->time_from_event >= 0) == (events->queue != NULL));
@@ -386,12 +386,12 @@ event_queue_process(event_queue *events)
event_handler *handler = to_do->handler;
void *data = to_do->data;
events->queue = to_do->next;
- TRACE(trace_events, ("event issued at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx\n",
- (long)event_time,
- (long)to_do,
- (long)to_do->time_of_event,
- (long)handler,
- (long)data));
+ TRACE(trace_events, ("event issued at %" PRIi64 " - tag %p - time %" PRIi64 ", handler %p, data %p\n",
+ event_time,
+ to_do,
+ to_do->time_of_event,
+ handler,
+ data));
free(to_do);
/* Always re-compute the time to the next event so that HANDLER()
can safely insert new events into the queue. */
diff --git a/sim/ppc/gdb-sim.c b/sim/ppc/gdb-sim.c
index 7217d9c..0025024 100644
--- a/sim/ppc/gdb-sim.c
+++ b/sim/ppc/gdb-sim.c
@@ -1276,8 +1276,8 @@ sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
if (simulator == NULL || regname == NULL)
return -1;
- TRACE(trace_gdb, ("sim_fetch_register(regno=%d(%s), buf=0x%lx)\n",
- regno, regname, (long)buf));
+ TRACE(trace_gdb, ("sim_fetch_register(regno=%d(%s), buf=%p)\n",
+ regno, regname, buf));
return psim_read_register(simulator, MAX_NR_PROCESSORS,
buf, regname, raw_transfer);
}
@@ -1291,8 +1291,8 @@ sim_store_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
if (simulator == NULL || regname == NULL)
return 0;
- TRACE(trace_gdb, ("sim_store_register(regno=%d(%s), buf=0x%lx)\n",
- regno, regname, (long)buf));
+ TRACE(trace_gdb, ("sim_store_register(regno=%d(%s), buf=%p)\n",
+ regno, regname, buf));
return psim_write_register(simulator, MAX_NR_PROCESSORS,
buf, regname, raw_transfer);
}
diff --git a/sim/ppc/hw_init.c b/sim/ppc/hw_init.c
index e46643c..3d58833 100644
--- a/sim/ppc/hw_init.c
+++ b/sim/ppc/hw_init.c
@@ -517,8 +517,8 @@ write_stack_arguments(device *me,
unsigned_word end_arg)
{
DTRACE(stack,
- ("write_stack_arguments(device=%s, arg=0x%lx, start_block=0x%lx, end_block=0x%lx, start_arg=0x%lx, end_arg=0x%lx)\n",
- device_name(me), (long)arg, (long)start_block, (long)end_block, (long)start_arg, (long)end_arg));
+ ("write_stack_arguments(device=%s, arg=%p, start_block=0x%lx, end_block=0x%lx, start_arg=0x%lx, end_arg=0x%lx)\n",
+ device_name(me), arg, (long)start_block, (long)end_block, (long)start_arg, (long)end_arg));
if (arg == NULL)
device_error(me, "Attempt to write a null array onto the stack\n");
/* only copy in arguments, memory is already zero */
@@ -671,12 +671,12 @@ hw_stack_ioctl(device *me,
char **envp = va_arg(ap, char **);
const char *stack_type;
DTRACE(stack,
- ("stack_ioctl_callback(me=0x%lx:%s processor=0x%lx cia=0x%lx argv=0x%lx envp=0x%lx)\n",
- (long)me, device_name(me),
- (long)processor,
+ ("stack_ioctl_callback(me=%p:%s processor=%p cia=0x%lx argv=%p envp=%p)\n",
+ me, device_name(me),
+ processor,
(long)cia,
- (long)argv,
- (long)envp));
+ argv,
+ envp));
stack_type = device_find_string_property(me, "stack-type");
if (strcmp(stack_type, "ppc-elf") == 0)
create_ppc_elf_stack_frame(me, stack_pointer, argv, envp);
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index e8c29ff..34291b4 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -882,9 +882,8 @@ psim_read_register(psim *system,
#endif
default:
- printf_filtered("psim_read_register(processor=0x%lx,buf=0x%lx,reg=%s) %s\n",
- (unsigned long)processor, (unsigned long)buf, reg,
- "read of this register unimplemented");
+ printf_filtered("psim_read_register(processor=%p,buf=%p,reg=%s) %s\n",
+ processor, buf, reg, "read of this register unimplemented");
break;
}
@@ -1070,8 +1069,8 @@ psim_write_register(psim *system,
#endif
default:
- printf_filtered("psim_write_register(processor=0x%lx,cooked_buf=0x%lx,reg=%s) %s\n",
- (unsigned long)processor, (unsigned long)cooked_buf, reg,
+ printf_filtered("psim_write_register(processor=%p,cooked_buf=%p,reg=%s) %s\n",
+ processor, cooked_buf, reg,
"read of this register unimplemented");
break;
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index ee9d123..fbc327c 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -129,8 +129,8 @@ sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
{
int result = psim_read_memory(simulator, MAX_NR_PROCESSORS,
buf, mem, length);
- TRACE(trace_gdb, ("sim_read(mem=0x%lx, buf=0x%lx, length=%d) = %d\n",
- (long)mem, (long)buf, length, result));
+ TRACE(trace_gdb, ("sim_read(mem=0x%lx, buf=%p, length=%d) = %d\n",
+ (long)mem, buf, length, result));
return result;
}
@@ -141,8 +141,8 @@ sim_write (SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length)
int result = psim_write_memory(simulator, MAX_NR_PROCESSORS,
buf, mem, length,
1/*violate_ro*/);
- TRACE(trace_gdb, ("sim_write(mem=0x%lx, buf=0x%lx, length=%d) = %d\n",
- (long)mem, (long)buf, length, result));
+ TRACE(trace_gdb, ("sim_write(mem=0x%lx, buf=%p, length=%d) = %d\n",
+ (long)mem, buf, length, result));
return result;
}
@@ -208,8 +208,8 @@ sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc)
break;
}
- TRACE(trace_gdb, ("sim_stop_reason(reason=0x%lx(%ld), sigrc=0x%lx(%ld))\n",
- (long)reason, (long)*reason, (long)sigrc, (long)*sigrc));
+ TRACE(trace_gdb, ("sim_stop_reason(reason=%p(%ld), sigrc=%p(%ld))\n",
+ reason, (long)*reason, sigrc, (long)*sigrc));
}
diff --git a/sim/ppc/tree.c b/sim/ppc/tree.c
index 5c35d32..4df862b 100644
--- a/sim/ppc/tree.c
+++ b/sim/ppc/tree.c
@@ -392,9 +392,9 @@ INLINE_TREE\
tree_init(device *root,
psim *system)
{
- TRACE(trace_device_tree, ("tree_init(root=0x%lx, system=0x%lx)\n",
- (long)root,
- (long)system));
+ TRACE(trace_device_tree, ("tree_init(root=%p, system=%p)\n",
+ root,
+ system));
/* remove the old, rebuild the new */
tree_traverse(root, device_clean, NULL, system);
tree_traverse(root, device_init_static_properties, NULL, system);
diff --git a/sim/ppc/vm.c b/sim/ppc/vm.c
index 00f5f55..b5ef758 100644
--- a/sim/ppc/vm.c
+++ b/sim/ppc/vm.c
@@ -610,8 +610,8 @@ om_virtual_to_real(om_map *map,
== segment_tlb_entry->masked_virtual_segment_id)
&& (page_tlb_entry->masked_page
== om_ea_masked_page(ea))) {
- TRACE(trace_vm, ("ea=0x%lx - tlb hit - tlb=0x%lx\n",
- (long)ea, (long)page_tlb_entry));
+ TRACE(trace_vm, ("ea=0x%lx - tlb hit - tlb=%p\n",
+ (long)ea, page_tlb_entry));
return page_tlb_entry;
}
@@ -662,13 +662,13 @@ om_virtual_to_real(om_map *map,
pte_1 | BIT(55),
processor, cia);
TRACE(trace_vm,
- ("ea=0x%lx - htab hit - set ref - tlb=0x%lx &pte1=0x%lx\n",
- (long)ea, (long)page_tlb_entry, (long)real_address_of_pte_1));
+ ("ea=0x%lx - htab hit - set ref - tlb=%p &pte1=0x%lx\n",
+ (long)ea, page_tlb_entry, (long)real_address_of_pte_1));
}
else {
TRACE(trace_vm,
- ("ea=0x%lx - htab hit - tlb=0x%lx &pte1=0x%lx\n",
- (long)ea, (long)page_tlb_entry, (long)real_address_of_pte_1));
+ ("ea=0x%lx - htab hit - tlb=%p &pte1=0x%lx\n",
+ (long)ea, page_tlb_entry, (long)real_address_of_pte_1));
}
return page_tlb_entry;
}
@@ -798,8 +798,8 @@ om_translate_effective_to_real(om_map *map,
page_tlb_entry->real_address_of_pte_1,
pte_1 | BIT(56),
processor, cia);
- TRACE(trace_vm, ("ea=0x%lx - set change bit - tlb=0x%lx &pte1=0x%lx\n",
- (long)ea, (long)page_tlb_entry,
+ TRACE(trace_vm, ("ea=0x%lx - set change bit - tlb=%p &pte1=0x%lx\n",
+ (long)ea, page_tlb_entry,
(long)page_tlb_entry->real_address_of_pte_1));
}