mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
riscv: add an assert to pmap_remove_pages()
Similar checks exist for both arm64 and amd64, but note that for amd64 it is a bare panic(). Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36564
This commit is contained in:
parent
9d1aef8402
commit
99fe523778
1 changed files with 4 additions and 0 deletions
|
|
@ -3908,6 +3908,10 @@ pmap_remove_pages(pmap_t pmap)
|
|||
ptepde = pmap_load(pte);
|
||||
pte = pmap_l1_to_l2(pte, pv->pv_va);
|
||||
tpte = pmap_load(pte);
|
||||
|
||||
KASSERT((tpte & PTE_V) != 0,
|
||||
("L2 PTE is invalid... bogus PV entry? "
|
||||
"va=%#lx, pte=%#lx", pv->pv_va, tpte));
|
||||
if ((tpte & PTE_RWX) != 0) {
|
||||
superpage = true;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue