Port-arm archive

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

Re: When to initialize pvh_attrs?

> I'm getting assertion failures on a VIPT, non-page colored CPU.

You mean your CPU has VIPT cache but size of cache index
(cachesize / nways) is smaller than page size?
In that case we can simply treat it as PIPT
because there is no aliases.

> A page is
> allocated via uvm_pglistalloc() (via bus_dmamem_alloc()), then wired by
> pmap_enter() (via bus_dmamem_map()).  Then the following assertion fails,
> because no one has initialize PVF_WRITE in pvh_attrs:
>    3047                 KASSERT(((pg->mdpage.pvh_attrs & PVF_WRITE) == 0) == \
>                           (pg->mdpage.urw_mappings + pg->mdpage.krw_mappings 
> == 0));
> (pvh_attrs & PVF_WRITE == 0, krw_mappings == 1)
> This leads to a question: when should pvh_attrs be initialized and how?

It looks the assertion is wrong because pmap.h says:

>> * The PVF_MOD and PVF_REF flags are stored in the mdpage for each
>> * page.  PVF_WIRED, PVF_WRITE, and PVF_NC are kept in individual
>> * pv_entry's for each page.  They live in the same "namespace" so
>> * that we can clear multiple attributes at a time.

Izumi Tsutsui

Home | Main Index | Thread Index | Old Index