FreeBSD/sys/arm/arm/pmap-v6.c
/*
 * Convert TEX definition entry to TTB flags.
 */
Convert TEX definition entry to TTB flags.
Convert TEX definition entry to TTB flags .
static uint32_t
encode_ttb_flags(int idx)
{
	uint32_t inner, outer, nos, reg;
	inner = (tex_class[idx] >> TEXDEF_INNER_SHIFT) &
		TEXDEF_INNER_MASK;
	outer = (tex_class[idx] >> TEXDEF_OUTER_SHIFT) &
		TEXDEF_OUTER_MASK;
	nos = (tex_class[idx] >> TEXDEF_NOS_SHIFT) &
		TEXDEF_NOS_MASK;
	reg = nos << 5;
	reg |= outer << 3;
	if (cpuinfo.coherent_walk)
		reg |= (inner & 0x1) << 6;
	reg |= (inner & 0x2) >> 1;
#ifdef SMP
	reg |= 1 << 1;
#endif
	return reg;
}
static uint32_t encode_ttb_flags ( int idx ) { uint32_t inner , outer , nos , reg ; inner = ( tex_class [ idx ] >> TEXDEF_INNER_SHIFT ) & TEXDEF_INNER_MASK ; outer = ( tex_class [ idx ] >> TEXDEF_OUTER_SHIFT ) & TEXDEF_OUTER_MASK ; nos = ( tex_class [ idx ] >> TEXDEF_NOS_SHIFT ) & TEXDEF_NOS_MASK ; reg = nos << 5 ; reg |= outer << 3 ; if ( cpuinfo . coherent_walk ) reg |= ( inner & 0x1 ) << 6 ; reg |= ( inner & 0x2 ) >> 1 ; #ifdef SMP reg |= 1 << 1 ; #endif return reg ; }
Convert TEX definition entry to TTB flags.
Convert TEX definition entry to TTB flags .