summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1993-10-15 10:07:45 +0000
committerrgrimes <rgrimes@FreeBSD.org>1993-10-15 10:07:45 +0000
commit276a33545ed507d395c6fe135adde8b98d2d23ad (patch)
treeed717cae9db70d29291952fd658c43791e07eb26 /sys/amd64
parent1b5a6f1c95f9f7c86baaee3ccc5b39afc973387b (diff)
downloadFreeBSD-src-276a33545ed507d395c6fe135adde8b98d2d23ad.zip
FreeBSD-src-276a33545ed507d395c6fe135adde8b98d2d23ad.tar.gz
param.h:
Mark the fact that PGSHIFT and PDRSHIFT are really the same as PG_SHIFT and PD_SHIFT, these should be collapsed some day soon. Document that KERNBASE should really be KPTDPTDI << PDRSHIFT, for now leave it as the constant 0xFE000000 until I make a seperate common header file for this stuff (vmaddresses.h?) Remove NKMEMCLUSTERS define, it was only being used to define VM_KMEM_SIZE, so why have all the indirection. Besides who wants to work in CLBYTE sizes chuncks. pmap.h: Fix $Id$ and some other minor format clean ups. Remove the XXX comment about NKPDE, since it now has the correct value of 7. Remove unused LASTPTDI and move the APTD into the very end of memory to free up 4MB of kernel virtual address space. Remove unused RSVDPTDI and free up 12MB of kernel virtual address space. vmparam.h Fix $Id$. Increase SHMMAXPGS to 512 (2MB) now that there is room for it to be bigger. The XXX comment stays until the kernel moves down in memory to free up enough space to use the proper default of 4MB. VM_KMEM_SIZE is now a direct constant stating the size of the kernel malloc region. Increased the value from 3MB to 16MB.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/include/pmap.h27
-rw-r--r--sys/amd64/include/vmparam.h10
2 files changed, 14 insertions, 23 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index 3e73824..3fe1248 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -34,17 +34,15 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)pmap.h 7.4 (Berkeley) 5/12/91
- */
-
-/*
* Derived from hp300 version by Mike Hibler, this version by William
* Jolitz uses a recursive map [a pde points to the page directory] to
* map the page tables using the pagetables themselves. This is done to
* reduce the impact on kernel virtual memory for lots of sparse address
* space, and to reduce the cost of memory to each process.
*
- * from hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
+ * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
+ * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
+ * $Id$
*/
#ifndef _PMAP_MACHINE_
@@ -54,7 +52,6 @@
* 386 page table entry and page table directory
* W.Jolitz, 8/89
*/
-
struct pde
{
unsigned int
@@ -109,10 +106,10 @@ unsigned int
/* Garbage for current bastardized pager that assumes a hp300 */
#define PG_NV 0
#define PG_CI 0
+
/*
* Page Protection Exception bits
*/
-
#define PGEX_P 0x01 /* Protection violation vs. not present */
#define PGEX_W 0x02 /* during a Write cycle */
#define PGEX_U 0x04 /* access from User mode (UPL) */
@@ -123,10 +120,8 @@ typedef struct pte pt_entry_t; /* Mach page table entry */
/*
* NKPDE controls the virtual space of the kernel, what ever is left is
* given to the user (NUPDE)
- *
- * XXX NKPDE should be 8, but until locore.s is fixed it needs to be 3
*/
-#define NKPDE 3 /* number of kernel pde's */
+#define NKPDE 7 /* number of kernel pde's */
#define NUPDE (NPTEPG-NKPDE) /* number of user pde's */
/*
* The *PTDI values control the layout of virtual memory
@@ -134,10 +129,8 @@ typedef struct pte pt_entry_t; /* Mach page table entry */
* XXX This works for now, but I am not real happy with it, I'll fix it
* right after I fix locore.s and the magic 28K hole
*/
-#define LASTPTDI (NPTEPG-1) /* reserved for the future (unused) */
-#define APTDPTDI (LASTPTDI-1) /* alt ptd entry that points to APTD */
-#define RSVDPTDI (APTDPTDI-3) /* reserved for the near future */
-#define KPTDI (RSVDPTDI-NKPDE)/* start of kernel virtual pde's */
+#define APTDPTDI (NPTEPG-1) /* alt ptd entry that points to APTD */
+#define KPTDI (APTDPTDI-NKPDE)/* start of kernel virtual pde's */
#define PTDPTDI (KPTDI-1) /* ptd entry that points to ptd! */
#define UPTDI (PTDPTDI-1) /* ptd entry for u./kernel&user stack */
@@ -148,7 +141,7 @@ typedef struct pte pt_entry_t; /* Mach page table entry */
#ifdef KERNEL
extern struct pte PTmap[], APTmap[], Upte;
extern struct pde PTD[], APTD[], PTDpde, APTDpde, Upde;
-extern pt_entry_t *Sysmap;
+extern pt_entry_t *Sysmap;
extern int IdlePTD; /* physical address of "Idle" state directory */
#endif
@@ -162,12 +155,12 @@ extern int IdlePTD; /* physical address of "Idle" state directory */
#define vtopte(va) (PTmap + i386_btop(va))
#define kvtopte(va) vtopte(va)
#define ptetov(pt) (i386_ptob(pt - PTmap))
-#define vtophys(va) (i386_ptob(vtopte(va)->pg_pfnum) | ((int)(va) & PGOFSET))
+#define vtophys(va) (i386_ptob(vtopte(va)->pg_pfnum) | ((int)(va) & PGOFSET))
#define ispt(va) ((va) >= UPT_MIN_ADDRESS && (va) <= KPT_MAX_ADDRESS)
#define avtopte(va) (APTmap + i386_btop(va))
#define ptetoav(pt) (i386_ptob(pt - APTmap))
-#define avtophys(va) (i386_ptob(avtopte(va)->pg_pfnum) | ((int)(va) & PGOFSET))
+#define avtophys(va) (i386_ptob(avtopte(va)->pg_pfnum) | ((int)(va) & PGOFSET))
/*
* macros to generate page directory/table indicies
diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h
index 2285680..700b697 100644
--- a/sys/amd64/include/vmparam.h
+++ b/sys/amd64/include/vmparam.h
@@ -33,7 +33,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)vmparam.h 5.9 (Berkeley) 5/12/91
+ * from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91
+ * $Id$
*/
@@ -94,7 +95,7 @@
* Size of the Shared Memory Pages page table.
*/
#ifndef SHMMAXPGS
-#define SHMMAXPGS 64 /* XXX until we have more kmap space */
+#define SHMMAXPGS 512 /* XXX until we have more kmap space */
#endif
/*
@@ -219,12 +220,9 @@
/* virtual sizes (bytes) for various kernel submaps */
#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
-#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
+#define VM_KMEM_SIZE (16 * 1024 * 1024)
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
-/* # of kernel PT pages (initial only, can grow dynamically) */
-#define VM_KERNEL_PT_PAGES ((vm_size_t)2) /* XXX: SYSPTSIZE */
-
/* pcb base */
#define pcbb(p) ((u_int)(p)->p_addr)
OpenPOWER on IntegriCloud