Fix for 8 Mb memory limit
pwb at trwrba.UUCP
pwb at trwrba.UUCP
Thu Jun 28 06:00:24 AEST 1984
1984-0074 TRW/UNIX Modification 1984-0074
NAME
memory - only 8 megabytes of physical memory supported
DATE ENACTED
June 22, 1984
KEYWORDS
kernel, memory
PROBLEM DESCRIPTION
The new MS780E memory controller will support a maximum of
16 megabytes of physical memory but the kernel will only
support at most 8 megabytes.
RESOLUTION
The 8 megabyte restriction appears in two places. First,
the bit field sizes in the cmap structure are tuned to an 8
megabyte maximum (exactly 13 bits). Secondly, that portion
of the assembly code support which discovers the total
amount of available physical memory contains a hard coded 8
megabyte limit.
In cmap.h the bit fields c_next, c_prev and c_hlink must be
increased in size from 13 to 14 bits and order of elements
in the cmap structure must be rearranged to avoid crossing a
word boundary in the middle of a field. The new structure
is:
/*
* core map entry
*/
struct cmap
{
unsigned int c_next:14, /* index of next free list entry */
c_prev:14, /* index of previous free list entry */
c_mdev:4, /* which mounted dev this is from */
c_page:16, /* virtual page number in segment */
c_hlink:14, /* hash link for <blkno,mdev> */
c_type:2, /* type CSYS or CTEXT or CSTACK or CDATA */
c_blkno:20, /* disk block this is a copy of */
c_ndx:10, /* index of owner proc or text */
c_lock:1, /* locked for raw i/o or pagein */
c_want:1, /* wanted */
c_intrans:1, /* intransit bit */
c_free:1, /* on the free list */
c_gone:1; /* associated page has been released */
};
In locore.s change the code
/* count up memory */
4.1bsd TRW (6/27/84) 1
1984-0074 TRW/UNIX Modification 1984-0074
clrl r7
1: pushl $4; pushl r7; calls $2,_badaddr; tstl r0; bneq 9f
acbl $8096*1024-1,$64*1024,r7,1b
to
/* count up memory */
clrl r7
1: pushl $4; pushl r7; calls $2,_badaddr; tstl r0; bneq 9f
acbl $8096*1024*2-1,$64*1024,r7,1b
allowing the kernel to count up to 16 megabytes of physical
memory.
FILES
/usr/src/sys/h/cmap.h 1.2
/usr/include/sys/cmap.h 1.2
/usr/src/sys/sys/locore.s 1.3
REQUESTOR
Michael Gorlick
AUTHOR
Michael Gorlick
REMARKS
Similar changes must be made to go from 16 to 32 megabytes.
However, for efficiency reasons, the constants of
.../h/vmparam.h should also be resized. Since a VAX 11/780
or 785 doesn't have the raw speed to make good use of 32
megabytes of memory it isn't worth the trouble now to
accomodate the maximum memory configuration.
Thanks to Lou Nelson, Aerospace who brought the problem to
my attention and provided the definitive solution.
4.1bsd TRW (6/27/84) 2
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list