Sean Bruno wrote:
http://people.freebsd.org/~sbruno/256G_SMAP.png
http://people.freebsd.org/~sbruno/256G_panic1.png
http://people.freebsd.org/~sbruno/256G_panic2.png


Trying to get the HP DL980 online today and I see the following panic on
startup from the installer CD that I created from -CURRENT.

Try the attached patch.



Index: amd64/include/pmap.h
===================================================================
--- amd64/include/pmap.h        (revision 215639)
+++ amd64/include/pmap.h        (working copy)
@@ -125,7 +125,7 @@
 #define        NUPDPE          (NUPML4E*NPDPEPG)/* number of userland PDP 
pages */
 #define        NUPDE           (NUPDPE*NPDEPG) /* number of userland PD 
entries */
 
-#define        NDMPML4E        1               /* number of dmap PML4 slots */
+#define        NDMPML4E        2               /* number of dmap PML4 slots */
 
 /*
  * The *PDI values control the layout of virtual memory
@@ -133,7 +133,7 @@
 #define        PML4PML4I       (NPML4EPG/2)    /* Index of recursive pml4 
mapping */
 
 #define        KPML4I          (NPML4EPG-1)    /* Top 512GB for KVM */
-#define        DMPML4I         (KPML4I-1)      /* Next 512GB down for direct 
map */
+#define        DMPML4I         (KPML4I-3)      /* Next 512GB down for direct 
map */
 
 #define        KPDPI           (NPDPEPG-2)     /* kernbase at -2GB */
 
Index: amd64/include/vmparam.h
===================================================================
--- amd64/include/vmparam.h     (revision 215639)
+++ amd64/include/vmparam.h     (working copy)
@@ -176,7 +176,7 @@
 #define        VM_MIN_KERNEL_ADDRESS   KVADDR(KPML4I, NPDPEPG-512, 0, 0)
 
 #define        DMAP_MIN_ADDRESS        KVADDR(DMPML4I, 0, 0, 0)
-#define        DMAP_MAX_ADDRESS        KVADDR(DMPML4I+1, 0, 0, 0)
+#define        DMAP_MAX_ADDRESS        KVADDR(DMPML4I+2, 0, 0, 0)
 
 #define        KERNBASE                KVADDR(KPML4I, KPDPI, 0, 0)
 
Index: amd64/amd64/pmap.c
===================================================================
--- amd64/amd64/pmap.c  (revision 215639)
+++ amd64/amd64/pmap.c  (working copy)
@@ -530,6 +530,8 @@ create_pagetables(vm_paddr_t *firstaddr)
        /* Connect the Direct Map slot up to the PML4 */
        ((pdp_entry_t *)KPML4phys)[DMPML4I] = DMPDPphys;
        ((pdp_entry_t *)KPML4phys)[DMPML4I] |= PG_RW | PG_V | PG_U;
+       ((pdp_entry_t *)KPML4phys)[DMPML4I + 1] = DMPDPphys + PAGE_SIZE;
+       ((pdp_entry_t *)KPML4phys)[DMPML4I + 1] |= PG_RW | PG_V | PG_U;
 
        /* Connect the KVA slot up to the PML4 */
        ((pdp_entry_t *)KPML4phys)[KPML4I] = KPDPphys;
@@ -1620,6 +1622,7 @@ pmap_pinit(pmap_t pmap)
        /* Wire in kernel global address entries. */
        pmap->pm_pml4[KPML4I] = KPDPphys | PG_RW | PG_V | PG_U;
        pmap->pm_pml4[DMPML4I] = DMPDPphys | PG_RW | PG_V | PG_U;
+       pmap->pm_pml4[DMPML4I + 1] = (DMPDPphys + PAGE_SIZE) | PG_RW | PG_V | 
PG_U;
 
        /* install self-referential address mapping entry(s) */
        pmap->pm_pml4[PML4PML4I] = VM_PAGE_TO_PHYS(pml4pg) | PG_V | PG_RW | 
PG_A | PG_M;
@@ -1879,6 +1882,7 @@ pmap_release(pmap_t pmap)
 
        pmap->pm_pml4[KPML4I] = 0;      /* KVA */
        pmap->pm_pml4[DMPML4I] = 0;     /* Direct Map */
+       pmap->pm_pml4[DMPML4I + 1] = 0; /* Direct Map */
        pmap->pm_pml4[PML4PML4I] = 0;   /* Recursive Mapping */
 
        m->wire_count--;
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to