Work around dumb KASSERT in vtopte(), the PTE area can now be above the
MAIN area. I guess the KASSERT should be removed because it doesn't make a lot of sense.
This commit is contained in:
parent
76af5153c7
commit
057e22a540
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: db_disasm.c,v 1.24 2018/01/21 16:51:14 christos Exp $ */
|
||||
/* $NetBSD: db_disasm.c,v 1.25 2018/09/08 12:40:17 maxv Exp $ */
|
||||
|
||||
/*
|
||||
* Mach Operating System
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.24 2018/01/21 16:51:14 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.25 2018/09/08 12:40:17 maxv Exp $");
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <sys/types.h>
|
||||
|
@ -1207,7 +1207,11 @@ db_disasm(db_addr_t loc, bool altfmt)
|
|||
pte = kvtopte((vaddr_t)loc);
|
||||
else
|
||||
pte = vtopte((vaddr_t)loc);
|
||||
pde = vtopte((vaddr_t)pte);
|
||||
if ((vaddr_t)pte >= VM_MIN_KERNEL_ADDRESS)
|
||||
pde = kvtopte((vaddr_t)pte);
|
||||
else
|
||||
pde = vtopte((vaddr_t)pte);
|
||||
|
||||
if ((*pde & PG_V) == 0 || (*pte & PG_V) == 0) {
|
||||
db_printf("invalid address\n");
|
||||
return (loc);
|
||||
|
|
Loading…
Reference in New Issue