git: 9front

Download patch

ref: 0bb2b8e5749cf7331fd8629fc688d5aaab8042ba
parent: 688b9aa266159b5f79ef9ac1bea1b19897c6bb6e
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu May 1 13:24:50 EDT 2014

pc64: increase sizes of physical memory bank maps

number of bank slots in Conf.mem[4] was too small
for kenjis machine, set it to maximum 16 (the
size of the RAM map in pc64/memory.c).

also increasing the UPA memory map to 64. the
e820 map on my x200s has 31 entries and many
holes. this gets rid of the "mapfree: ... losing"
messages on boot.

--- a/sys/src/9/pc64/dat.h
+++ b/sys/src/9/pc64/dat.h
@@ -102,7 +102,7 @@
 	ulong	nmach;		/* processors */
 	ulong	nproc;		/* processes */
 	ulong	monitor;	/* has monitor? */
-	Confmem	mem[4];		/* physical memory */
+	Confmem	mem[16];	/* physical memory */
 	ulong	npage;		/* total physical pages of memory */
 	ulong	upages;		/* user page pool */
 	ulong	nimage;		/* number of page cache image headers */
--- a/sys/src/9/pc64/memory.c
+++ b/sys/src/9/pc64/memory.c
@@ -44,7 +44,7 @@
 /* 
  * Memory allocation tracking.
  */
-static Map mapupa[16];
+static Map mapupa[64];
 static RMap rmapupa = {
 	"unallocated unbacked physical memory",
 	mapupa,
--