tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: arm/arm32/pmap.c assert



On 01/20/16 16:16, Frank Zerangue wrote:
Thanks Nick,

Here are the pertinent options in my kernel config:
	options 	CPU_ARM1136		# Support the ARM1136 core
	options 	CPU_ARM11			# Support the ARM11 core
	options	FPU_VFP			# Support the ARM1136 vfp

Build options are:
	makeoptions	CPUFLAGS= "-march=armv6 -mtune=arm1136j-s -mfpu=vfp -mfloat-abi=hard”

The IMX31 has an ARM11 r0p4 core which does not support  armv6k extensions, i.e. LDREX(B,H,D), STREX(B,H,D), CLREX. To proceed I implemented atomic ops for 1 byte, 2 byte, and 4 byte operations using LDREX and STREX and do not support 8 byte atomic ops.

I’ve discovered so far that pmap.c assumes PAGE_SIZE = 8096 in pmap_alloc_l1(), pmap_delete_l1(), as they use PAGE_SIZE to allocate L1 half table for user space. Since I specify PAGE_SIZE = 4096, what happens is that L1[0..1023] = 0 and L1[1024..2047] = 0xffffffff thus the failed assert. When I change the allocation and deallocation to L1_TABLE_SIZE/2 pmap_enter() succeeds but I get data aborts.

Why did you change PAGE_SIZE to 4096?

The code is written assuming the PAGE_SIZE is L1PT size which is 8KB.

Nick


Home | Main Index | Thread Index | Old Index