The branch stable/12 has been updated by mhorne:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=a45328a1daa7512ee90170c1599a8aa09e391772

commit a45328a1daa7512ee90170c1599a8aa09e391772
Author:     Mitchell Horne <[email protected]>
AuthorDate: 2021-01-13 18:30:50 +0000
Commit:     Mitchell Horne <[email protected]>
CommitDate: 2021-01-18 13:41:46 +0000

    arm64: fix early devmap assertion
    
    PR:             25241
    Reported by:    gbe
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 818390ce0ca539300dd15d7a817784f1e3f7a9b8)
---
 sys/kern/subr_devmap.c      | 2 +-
 sys/riscv/include/vmparam.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/kern/subr_devmap.c b/sys/kern/subr_devmap.c
index 7dace37744e6..d94908ca010a 100644
--- a/sys/kern/subr_devmap.c
+++ b/sys/kern/subr_devmap.c
@@ -274,7 +274,7 @@ pmap_mapdev(vm_offset_t pa, vm_size_t size)
        if (early_boot) {
                akva_devmap_vaddr = trunc_page(akva_devmap_vaddr - size);
                va = akva_devmap_vaddr;
-               KASSERT(va >= VM_MAX_KERNEL_ADDRESS - L2_SIZE,
+               KASSERT(va >= VM_MAX_KERNEL_ADDRESS - PMAP_MAPDEV_EARLY_SIZE,
                    ("Too many early devmap mappings"));
        } else
 #endif
diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h
index ee03f7b09cc2..dfa3e11efbe8 100644
--- a/sys/riscv/include/vmparam.h
+++ b/sys/riscv/include/vmparam.h
@@ -236,5 +236,6 @@ extern vm_offset_t init_pt_va;
 #define        ZERO_REGION_SIZE        (64 * 1024)     /* 64KB */
 
 #define        DEVMAP_MAX_VADDR        VM_MAX_KERNEL_ADDRESS
+#define        PMAP_MAPDEV_EARLY_SIZE  (L2_SIZE * 2)
 
 #endif /* !_MACHINE_VMPARAM_H_ */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to