Re: 256G Ram Panic

From: Alan Cox <alan.l.cox_at_gmail.com>
Date: Sun, 21 Nov 2010 13:26:55 -0600
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)
_at__at_ -125,7 +125,7 _at__at_
 #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
_at__at_ -133,7 +133,7 _at__at_
 #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)
_at__at_ -176,7 +176,7 _at__at_
 #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)
_at__at_ -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;
_at__at_ -1620,6 +1622,7 _at__at_ 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;
_at__at_ -1879,6 +1882,7 _at__at_ 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--;
Received on Sun Nov 21 2010 - 18:58:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:09 UTC