Author: imp Date: Thu Feb 18 19:27:00 2010 New Revision: 204055 URL: http://svn.freebsd.org/changeset/base/204055
Log: Make printfs work for both OCTEON1 and OCTEON1-32 Modified: head/sys/mips/cavium/dev/rgmii/octeon_fpa.c head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/dev/rgmii/octeon_fpa.c ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_fpa.c Thu Feb 18 19:24:23 2010 (r204054) +++ head/sys/mips/cavium/dev/rgmii/octeon_fpa.c Thu Feb 18 19:27:00 2010 (r204055) @@ -209,8 +209,9 @@ void octeon_fpa_fill_pool_mem (u_int poo 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 poo 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); Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Thu Feb 18 19:24:23 2010 (r204054) +++ head/sys/mips/cavium/octeon_machdep.c Thu Feb 18 19:27:00 2010 (r204055) @@ -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; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"