diff options
author | imp <imp@FreeBSD.org> | 2010-02-18 19:27:00 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2010-02-18 19:27:00 +0000 |
commit | e0d8c3f88bdab67a1ce8141101772f3b7a25e17c (patch) | |
tree | 3213279c4b7ee44749c91d8a25534fe6476f4136 /sys/mips | |
parent | 76db043a740c19d0222ce1cd890c87f6a38bc2e4 (diff) | |
download | FreeBSD-src-e0d8c3f88bdab67a1ce8141101772f3b7a25e17c.zip FreeBSD-src-e0d8c3f88bdab67a1ce8141101772f3b7a25e17c.tar.gz |
Make printfs work for both OCTEON1 and OCTEON1-32
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/cavium/dev/rgmii/octeon_fpa.c | 8 | ||||
-rw-r--r-- | sys/mips/cavium/octeon_machdep.c | 16 |
2 files changed, 13 insertions, 11 deletions
diff --git a/sys/mips/cavium/dev/rgmii/octeon_fpa.c b/sys/mips/cavium/dev/rgmii/octeon_fpa.c index f247d2b..3e43a88 100644 --- a/sys/mips/cavium/dev/rgmii/octeon_fpa.c +++ b/sys/mips/cavium/dev/rgmii/octeon_fpa.c @@ -209,8 +209,9 @@ void octeon_fpa_fill_pool_mem (u_int pool, u_int elem_size_words, u_int elem_num memory = (void *) OCTEON_ALIGN(memory); #ifdef FPA_DEBUG_TERSE - printf("FPA fill: %u Count: %u SizeBytes: %u SizeBytesAligned: %u 1st: %p = 0x%X\n", - pool, elem_num, elem_size_bytes, block_size, memory, (void *)OCTEON_PTR2PHYS(memory)); + printf("FPA fill: %u Count: %u SizeBytes: %u SizeBytesAligned: %u 1st: %p = %p\n", + pool, elem_num, elem_size_bytes, block_size, memory, + (void *)(intptr_t)OCTEON_PTR2PHYS(memory)); #endif // memory = (void *) ((((u_int) memory / OCTEON_FPA_POOL_ALIGNMENT) + 1) * OCTEON_FPA_POOL_ALIGNMENT); @@ -218,7 +219,8 @@ void octeon_fpa_fill_pool_mem (u_int pool, u_int elem_size_words, u_int elem_num while (elem_num--) { #ifdef FPA_DEBUG if (((elems - elem_num) < 4) || (elem_num < 4)) - printf(" %% Block %d: %p Phys 0x%X Bytes %u\n", block, memory, OCTEON_PTR2PHYS(memory), elem_size_bytes); + printf(" %% Block %d: %p Phys %p Bytes %u\n", block, memory, + (void *)(intptr_t)OCTEON_PTR2PHYS(memory), elem_size_bytes); block++; #endif octeon_fpa_free(memory, pool, 0); diff --git a/sys/mips/cavium/octeon_machdep.c b/sys/mips/cavium/octeon_machdep.c index e4d77f3..e3f2fbd 100644 --- a/sys/mips/cavium/octeon_machdep.c +++ b/sys/mips/cavium/octeon_machdep.c @@ -659,8 +659,8 @@ octeon_memory_init(void) uint32_t realmem_bytes; if (octeon_board_real()) { - printf("octeon_dram == %llx\n", octeon_dram); - printf("reduced to ram: %u MB", (uint32_t) octeon_dram >> 20); + printf("octeon_dram == %jx\n", (intmax_t)octeon_dram); + printf("reduced to ram: %u MB", (uint32_t)octeon_dram >> 20); realmem_bytes = (octeon_dram - PAGE_SIZE); realmem_bytes &= ~(PAGE_SIZE - 1); @@ -678,8 +678,8 @@ octeon_memory_init(void) phys_avail[1] = realmem_bytes; realmem_bytes -= OCTEON_DRAM_FIRST_256_END; realmem_bytes &= ~(PAGE_SIZE - 1); - printf("phys_avail[0] = %x phys_avail[1] = %x\n", - phys_avail[0], phys_avail[1]); + printf("phys_avail[0] = %#lx phys_avail[1] = %#lx\n", + (long)phys_avail[0], (long)phys_avail[1]); } else { /* Simulator gets 96Meg period. */ phys_avail[1] = (96 << 20); @@ -707,8 +707,8 @@ octeon_memory_init(void) phys_avail[2] = 0x20000000; printf("realmem_bytes is now at %x\n", realmem_bytes); phys_avail[3] = ((uint32_t) 0x20000000 + realmem_bytes); - printf("Next block of memory goes from %x to %x\n", - phys_avail[2], phys_avail[3]); + printf("Next block of memory goes from %#lx to %#lx\n", + (long)phys_avail[2], (long)phys_avail[3]); physmem += btoc(phys_avail[3] - phys_avail[2]); } else { printf("realmem_bytes is %d\n", realmem_bytes); @@ -716,8 +716,8 @@ octeon_memory_init(void) realmem = physmem; printf("Total DRAM Size %#X\n", (uint32_t) octeon_dram); - printf("Bank 0 = %#08X -> %#08X\n", phys_avail[0], phys_avail[1]); - printf("Bank 1 = %#08X -> %#08X\n", phys_avail[2], phys_avail[3]); + printf("Bank 0 = %#08lX -> %#08lX\n", (long)phys_avail[0], (long)phys_avail[1]); + printf("Bank 1 = %#08lX -> %#08lX\n", (long)phys_avail[2], (long)phys_avail[3]); printf("physmem: %#lx\n", physmem); Maxmem = physmem; |