Make printfs work for both OCTEON1 and OCTEON1-32

This commit is contained in:
Warner Losh 2010-02-18 19:27:00 +00:00
parent f976477f81
commit a62e05a4e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204055
2 changed files with 13 additions and 11 deletions

View File

@ -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);

View File

@ -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;