Subject: Re: Initial diffs to make arm32 kernel core dumps work with savecore
To: Matt Thomas <>
From: Chris Gilbert <>
List: port-arm
Date: 12/15/2007 11:40:37
Matt Thomas wrote:
> On Dec 14, 2007, at 5:03 PM, Chris Gilbert wrote:
>> The main item to highlight is the cpu_kcore_hdr structure in 
>> sys/arch/arm/include/kcore.h, as it's a new kernel->userland ABI for 
>> arm, I'd like to get it right first time if possible.  Currently I've 
>> defined it as:
>> typedef struct cpu_kcore_hdr {
>>    uint32_t    version;        /* structure version */
>>    uint32_t    isArm26;        /* indicates arm26 dump */
>>    uint32_t    PAKernelL1Table;    /* PA of PMAP_kernel L1 table */
> ARMv6 will need two.  Add a PAUserL1Table please.
> Also add a UserL1TableSize variable.  If 0, everything is KernelL1Table,
> otherwise and any address < UserL1TableSize << 17 is looked up in 
> UserL1Table.
> Also, we need a flags work for determining whether we are using the
> compat or native armv6 page table (since that will effect decoding of 
> PTEs).
>     uint16_t UserL1TableSize;
>     uint16_t flags;
> #define    KCORE_ARM_APX        0x0001
>>    uint32_t    nmemsegs;        /* Number of RAM segments */
>> #if 0
>>    phys_ram_seg_t  memsegs[];        /* RAM segments */
>> #endif
>> } cpu_kcore_hdr_t;

Ok, I can add the values, is their a guide to how APX mappings work?  Or 
can I just make libkvm error when it sees the flag, and it can be fixed up?

Do we actually need to be able to decode userland VA for a kernel core 
dump?  If we do the userland L1 table is probably needed for all platforms.