To: arch@_ERASE_freebsd.org cc: jhs@ Subject: src/sys/i386/i386/machdep.c if (MAXMEM/4 < Maxmem) Maxmem = MAXMEM/4; In src/sys/i386/i386/machdep.c 1.1.5 code was #ifdef MAXMEM if (MAXMEM/4 < Maxmem) Maxmem = MAXMEM/4; #endif 2.current code is: Maxmem = MAXMEM/4; 1.1.5 seems safer though ! If we asert options "MAXMEM=16384" & then borrow the kernel to run on an 8M system, wont this now screw up badly ? I offer this patch: -------- *** old/src/sys/i386/i386/machdep.c Tue Nov 15 19:09:00 1994 --- new/src/sys/i386/i386/machdep.c Mon Nov 21 02:38:03 1994 *************** *** 287,292 **** --- 287,296 ---- #ifdef BOUNCE_BUFFERS /* * If there is more than 16MB of memory, allocate some bounce buffers + * (because ISA bus with just 24 address bits prevents addresses + * above 16M being used to access either ISA cards such as disc + * controllers, (or even EISA disc controllers running in ISA + * compatibility mode)). */ if (Maxmem > 4096) { if (bouncepages == 0) *************** *** 1307,1313 **** Maxmem = pagesinext + 0x100000/PAGE_SIZE; #ifdef MAXMEM ! Maxmem = MAXMEM/4; #endif /* * Calculate number of physical pages, but account for Maxmem --- 1311,1338 ---- Maxmem = pagesinext + 0x100000/PAGE_SIZE; #ifdef MAXMEM ! /* In /sys/i386/conf/GENERIC, using ! * options "MAXMEM=16384" ! * gets kernel here to use just first 16M, ! * (useful for such as when testing ISA systems where one ! * suspects the 16 to 32M area of RAM is not cached ! * (eg Gigagbyte ISA-486 Taiwan motherboard owned by ! * jhs@ ! */ ! #define K_PER_PAGE ( PAGE_SIZE / 1024 ) ! if ( Maxmem > ( MAXMEM / K_PER_PAGE ) ) ! { ! printf("%s %d to %d pages of %d bytes,\n(%ld %s %ld).\n", ! "Reducing memory from", ! Maxmem, ! MAXMEM / K_PER_PAGE, ! PAGE_SIZE, ! (long)Maxmem * (PAGE_SIZE), ! "reducing to", ! ((long)(MAXMEM/K_PER_PAGE )) * (PAGE_SIZE) ! ); ! Maxmem = MAXMEM / K_PER_PAGE; ! } #endif /* * Calculate number of physical pages, but account for Maxmem -------- PS It seems there's rather too many manifest constants such 4096, 4, 1024, floating around in machdep.c, hence K_PER_PAGE. Julian Stacey