diff options
author | Oliver McFadden <z3ro.geek@gmail.com> | 2007-09-30 11:19:44 +0000 |
---|---|---|
committer | Oliver McFadden <z3ro.geek@gmail.com> | 2007-09-30 11:19:44 +0000 |
commit | 976ffd701956eaddca38409cdb09c833af447c99 (patch) | |
tree | 233f8d0ec960c393e138396593a3fd1c89853aa1 | |
parent | 1bfd49a68e4bb3922a65fc49dbbeece9a4e61658 (diff) |
Corrections for x86_64; AGP is probably still broken.
-rw-r--r-- | src/dump.c | 20 | ||||
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/main.h | 8 | ||||
-rw-r--r-- | src/memory.c | 2 |
4 files changed, 19 insertions, 19 deletions
@@ -88,7 +88,7 @@ dump_reg (unsigned int key, unsigned int val) static int dump_packet0 (unsigned int packet_type, unsigned int packet_cnt, unsigned int packet_bit15, unsigned int packet_reg, - unsigned int *mem_map, FILE * file) + unsigned long *mem_map, FILE * file) { int i; unsigned int reg; @@ -104,7 +104,7 @@ dump_packet0 (unsigned int packet_type, unsigned int packet_cnt, for (i = 0; i < proc; i++) { - fprintf (file, "%08x\n", mem_map[i]); + fprintf (file, "%08lx\n", mem_map[i]); reg = packet_bit15 ? packet_reg : packet_reg + (i << 2); dump_reg (reg, mem_map[i]); } @@ -115,7 +115,7 @@ dump_packet0 (unsigned int packet_type, unsigned int packet_cnt, static int dump_packet2 (unsigned int packet_type, unsigned int packet_cnt, unsigned int packet_bit15, unsigned int packet_reg, - unsigned int *mem_map, FILE * file) + unsigned long *mem_map, FILE * file) { if (option_debug) { @@ -128,7 +128,7 @@ dump_packet2 (unsigned int packet_type, unsigned int packet_cnt, static int dump_packet3 (unsigned int packet_type, unsigned int packet_cnt, - unsigned int packet_opcode, unsigned int *mem_map, FILE * file) + unsigned int packet_opcode, unsigned long *mem_map, FILE * file) { int i; unsigned int proc; @@ -143,10 +143,10 @@ dump_packet3 (unsigned int packet_type, unsigned int packet_cnt, for (i = 0; i < proc; i++) { - fprintf (file, "%08x\n", mem_map[i]); + fprintf (file, "%08lx\n", mem_map[i]); if (option_debug) { - printf ("%s: 0x%08x\n", __func__, mem_map[i]); + printf ("%s: 0x%08lx\n", __func__, mem_map[i]); } } @@ -154,7 +154,7 @@ dump_packet3 (unsigned int packet_type, unsigned int packet_cnt, } static void -dump_packets (unsigned int head, unsigned int tail, unsigned int *mem_map, +dump_packets (unsigned int head, unsigned int tail, unsigned long *mem_map, char *name) { FILE *file; @@ -194,7 +194,7 @@ dump_packets (unsigned int head, unsigned int tail, unsigned int *mem_map, packet_opcode = (mem_map[i] >> 8) & 0xff; - fprintf (file, "%08x\n", mem_map[i]); + fprintf (file, "%08lx\n", mem_map[i]); switch (packet_type) { @@ -228,7 +228,7 @@ static void dump_ib (unsigned int ib_addr, unsigned int ib_size) { char buf[BUFSIZ]; - unsigned int *ib_mem_map; + unsigned long *ib_mem_map; if (!option_disable_ib) { @@ -265,7 +265,7 @@ void dump_rb_post (void) { char buf[BUFSIZ]; - unsigned int *rb_mem_map; + unsigned long *rb_mem_map; rb_tail = register_read (RADEON_CP_RB_RPTR); @@ -105,10 +105,10 @@ static struct option long_options[] = { }; int mem_fd = -1; -unsigned int *agp_mem_map = NULL; -unsigned int *fb_mem_map = NULL; -unsigned int *pcigart_mem_map = NULL; -unsigned int *reg_mem_map = NULL; +unsigned long *agp_mem_map = NULL; +unsigned long *fb_mem_map = NULL; +unsigned long *pcigart_mem_map = NULL; +unsigned long *reg_mem_map = NULL; int main (int argc, char **argv) @@ -134,10 +134,10 @@ extern int option_disable_ib; extern int option_interface; extern int option_verbose; extern int mem_fd; -extern unsigned int *agp_mem_map; -extern unsigned int *fb_mem_map; -extern unsigned int *pcigart_mem_map; -extern unsigned int *reg_mem_map; +extern unsigned long *agp_mem_map; +extern unsigned long *fb_mem_map; +extern unsigned long *pcigart_mem_map; +extern unsigned long *reg_mem_map; int main (int argc, char **argv); #endif diff --git a/src/memory.c b/src/memory.c index c433549..d9ba652 100644 --- a/src/memory.c +++ b/src/memory.c @@ -37,7 +37,7 @@ memory_read_agp (unsigned int addr, unsigned int size) { void *tmp; -/* FIXME: void * */ + /* FIXME: void *, x86_64... */ tmp = (void *) malloc (size); memcpy (tmp, (unsigned int *) ((char *) agp_mem_map + (addr - agp_addr)), size); |