[PATCH 2/3] libc_elf_sh: specific auxiliary vector handling for SH

Kevin Cernekee cernekee at gmail.com
Mon May 2 23:41:22 UTC 2011


On Mon, May 2, 2011 at 9:44 AM, Carmelo AMOROSO <carmelo.amoroso at st.com> wrote:
> +/* Decode the cpu dcache way size from the dcache shape */
> +/* Bits 0-3 contains associativity; bits 4-7 contains log2 of line size */
> +
> +#define shape_to_waysize(__shape)	((__shape & ~0xff) / (__shape & 0xf))

It may be useful to add helper macros/functions for CACHESHAPE
decoding to a common header file, and try to establish the Alpha/SH
encoding as a de-facto standard on MIPS and other architectures.

(I guess it goes without saying that the SH D$ will never be fully
associative, and av[AT_L1D_CACHESHAPE] will never be 0?)


More information about the uClibc mailing list