Clean up MAXMEM routine.

Submitted by:	"K.Magara" <magara@maizuru-ct.ac.jp>
This commit is contained in:
nyan 2000-04-30 08:52:47 +00:00
parent 31accf5f5a
commit c9fb25da0a
2 changed files with 6 additions and 6 deletions

View File

@ -1442,6 +1442,7 @@ getmemsize(int first)
Maxmem_under16M = under16 * 1024 / PAGE_SIZE;
#ifndef MAXMEM
/*
* Maxmem isn't the "maximum memory", it's one larger than the
* highest page of the physical address space. It should be
@ -1460,8 +1461,7 @@ getmemsize(int first)
speculative_mprobe = TRUE;
else
speculative_mprobe = FALSE;
#ifdef MAXMEM
#else
Maxmem = MAXMEM/4;
speculative_mprobe = FALSE;
#endif
@ -1774,7 +1774,6 @@ getmemsize(int first)
pte = (pt_entry_t)vtopte(KERNBASE + (1 << PAGE_SHIFT));
*pte = (1 << PAGE_SHIFT) | PG_RW | PG_V;
extmem = (Maxmem * PAGE_SIZE - 0x100000)/1024; /* extent memory */
/*
* get memory map with INT 15:E820
*/
@ -2266,6 +2265,7 @@ init386(first)
vm86_initialize();
getmemsize(first);
/* now running on new page tables, configured,and u/iom is accessible */
/* Map the message buffer. */

View File

@ -1442,6 +1442,7 @@ getmemsize(int first)
Maxmem_under16M = under16 * 1024 / PAGE_SIZE;
#ifndef MAXMEM
/*
* Maxmem isn't the "maximum memory", it's one larger than the
* highest page of the physical address space. It should be
@ -1460,8 +1461,7 @@ getmemsize(int first)
speculative_mprobe = TRUE;
else
speculative_mprobe = FALSE;
#ifdef MAXMEM
#else
Maxmem = MAXMEM/4;
speculative_mprobe = FALSE;
#endif
@ -1774,7 +1774,6 @@ getmemsize(int first)
pte = (pt_entry_t)vtopte(KERNBASE + (1 << PAGE_SHIFT));
*pte = (1 << PAGE_SHIFT) | PG_RW | PG_V;
extmem = (Maxmem * PAGE_SIZE - 0x100000)/1024; /* extent memory */
/*
* get memory map with INT 15:E820
*/
@ -2266,6 +2265,7 @@ init386(first)
vm86_initialize();
getmemsize(first);
/* now running on new page tables, configured,and u/iom is accessible */
/* Map the message buffer. */