diff -uhr gnumach/oskit/x86/main.c gnumach-mempatch/oskit/x86/main.c --- gnumach/oskit/x86/main.c 2002-05-28 01:01:57.000000000 +0200 +++ gnumach-mempatch/oskit/x86/main.c 2002-09-17 13:44:14.000000000 +0200 @@ -63,6 +63,8 @@ #include "assert.h" +#define PHYS_MEM_MAX_LIMIT 0x2fff0000 /* maximum physical memory */ + extern char version[]; char **kernel_argv; @@ -108,6 +110,14 @@ */ picinit(); +#ifdef PHYS_MEM_MAX_LIMIT + /* ugly memory limit patch */ + if (phys_mem_max > PHYS_MEM_MAX_LIMIT) { + printf("Too much physical memory 0x%x, using 0x%x\n", phys_mem_max, PHYS_MEM_MAX_LIMIT); + phys_mem_max = PHYS_MEM_MAX_LIMIT; + } +#endif + /* Tell the oskit base_* code what virtual addresses we are using to map the linear address space. It can't keep using the 1:1 kvtolin mapping once we flush the direct mapping below.