FreeBSD/sys/arm/arm/physmem.c
/*
 * Print the contents of the physical and excluded region tables using the
 * provided printf-like output function (which will be either printf or
 * db_printf).
 */
Print the contents of the physical and excluded region tables using the
provided printf-like output function (which will be either printf or
db_printf).
Print the contents of the physical and excluded region tables using the provided printf - like output function ( which will be either printf or db_printf ) .
static void
physmem_dump_tables(int (*prfunc)(const char *, ...))
{
	int flags, i;
	uintmax_t addr, size;
	const unsigned int mbyte = 1024 * 1024;
	prfunc("Physical memory chunk(s):\n");
	for (i = 0; i < hwcnt; ++i) {
		addr = hwregions[i].addr;
		size = hwregions[i].size;
		prfunc("  0x%08jx - 0x%08jx, %5ju MB (%7ju pages)\n", addr,
		    addr + size - 1, size / mbyte, size / PAGE_SIZE);
	}
	prfunc("Excluded memory regions:\n");
	for (i = 0; i < excnt; ++i) {
		addr  = exregions[i].addr;
		size  = exregions[i].size;
		flags = exregions[i].flags;
		prfunc("  0x%08jx - 0x%08jx, %5ju MB (%7ju pages) %s %s\n",
		    addr, addr + size - 1, size / mbyte, size / PAGE_SIZE,
		    (flags & EXFLAG_NOALLOC) ? "NoAlloc" : "",
		    (flags & EXFLAG_NODUMP)  ? "NoDump" : "");
	}
#ifdef DEBUG
	prfunc("Avail lists:\n");
	for (i = 0; phys_avail[i] != 0; ++i) {
		prfunc("  phys_avail[%d] 0x%08x\n", i, phys_avail[i]);
	}
	for (i = 0; dump_avail[i] != 0; ++i) {
		prfunc("  dump_avail[%d] 0x%08x\n", i, dump_avail[i]);
	}
#endif
}
static void physmem_dump_tables ( int ( * prfunc ) ( const char * , ... ) ) { int flags , i ; uintmax_t addr , size ; const unsigned int mbyte = 1024 * 1024 ; prfunc ( " \n " ) ; for ( i = 0 ; i < hwcnt ; ++ i ) { addr = hwregions [ i ] . addr ; size = hwregions [ i ] . size ; prfunc ( " \n " , addr , addr + size - 1 , size / mbyte , size / PAGE_SIZE ) ; } prfunc ( " \n " ) ; for ( i = 0 ; i < excnt ; ++ i ) { addr = exregions [ i ] . addr ; size = exregions [ i ] . size ; flags = exregions [ i ] . flags ; prfunc ( " \n " , addr , addr + size - 1 , size / mbyte , size / PAGE_SIZE , ( flags & EXFLAG_NOALLOC ) ? " " : " " , ( flags & EXFLAG_NODUMP ) ? " " : " " ) ; } #ifdef DEBUG prfunc ( " \n " ) ; for ( i = 0 ; phys_avail [ i ] != 0 ; ++ i ) { prfunc ( " \n " , i , phys_avail [ i ] ) ; } for ( i = 0 ; dump_avail [ i ] != 0 ; ++ i ) { prfunc ( " \n " , i , dump_avail [ i ] ) ; } #endif }
Print the contents of the physical and excluded region tables using the
 provided printf-like output function (which will be either printf or
 db_printf).
Print the contents of the physical and excluded region tables using the provided printf - like output function ( which will be either printf or db_printf ) .