tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: arm/arm32/pmap.c assert
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.
Frank
> On Jan 20, 2016, at 1:39 AM, Nick Hudson <skrll%netbsd.org@localhost> wrote:
>
> On 01/19/16 17:45, Frank Zerangue wrote:
>> Can anyone help me with this?
>
> Maybe :)
>
>>
>> This is a private arm port for the IMX31 application processor. I began development with NetBSD-5.0.1 and have been able to migrate through out the generations of NetBSD with ease up until NetBSD-7.0 from 6.1.5.
>>
>> I now get as for as "init: copying out path `/sbin/init’ 11” but fail an assert in pmap.c:
>> "panic: kernel diagnostic assertion "*pdep == 0" failed:
>> file “/.../NetBSD-7.0/usr/src/sys/arch/arm/arm32/pmap.c”.
>>
>> My configuration define ARM_MMU_V6N, ARM_MMU_EXTENDED and using EABI.
>
> Can you share more details?
>
> Your CPU option should define the options you state above, cf.
>
> http://nxr.netbsd.org/xref/src/sys/arch/evbarm/conf/RPI#12
>
> I have RPI working with ARM11_COMPAT_MMU removed, but I've not switched as
> it breaks an emulator package that seems to rely on XN=0.
>
> What's the backtrace of the panic?
>
> Changing that KASSERT to
>
> KASSERTMSG(*pdep == 0, "va %lx pdep %p *pdep %x npde %x\n", va, pdep, *pdep, npde);
>
> will also help
>
>
>>
>> Thank you,
>> Frank Zerangue
>>
>
> Nick
Home |
Main Index |
Thread Index |
Old Index