summaryrefslogtreecommitdiffstats
path: root/arch/i386/boot/compressed
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-06 23:51:34 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-06 23:51:34 +0000
commit230e5ab6a084ed50470f101934782dbf54b0d06b (patch)
tree5dd821c8d33f450470588e7a543f74bf74306e9e /arch/i386/boot/compressed
parentc9b1c8a64c6444d189856f1e26bdcb8b4cd0113a (diff)
Merge with Linux 2.1.67.
Diffstat (limited to 'arch/i386/boot/compressed')
-rw-r--r--arch/i386/boot/compressed/misc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/i386/boot/compressed/misc.c b/arch/i386/boot/compressed/misc.c
index fd835f5c0..9a556baf4 100644
--- a/arch/i386/boot/compressed/misc.c
+++ b/arch/i386/boot/compressed/misc.c
@@ -75,6 +75,9 @@ static void gzip_release(void **);
* This is set up by the setup-routine at boot-time
*/
#define EXT_MEM_K (*(unsigned short *)0x90002)
+#ifndef STANDARD_MEMORY_BIOS_CALL
+#define ALT_MEM_K (*(unsigned long *) 0x901e0)
+#endif
#define SCREEN_INFO (*(struct screen_info *)0x90000)
extern char input_data[];
@@ -287,9 +290,9 @@ struct {
void setup_normal_output_buffer()
{
#ifdef STANDARD_MEMORY_BIOS_CALL
- if (EXT_MEM_K < 1024) error("<2M of mem\n");
+ if (EXT_MEM_K < 1024) error("Less than 2MB of memory.\n");
#else
- if (EXT_MEM_K*64 < 1024) error("<2M of mem\n");
+ if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < 1024) error("Less than 2MB of memory.\n");
#endif
output_data = (char *)0x100000; /* Points to 1M */
}
@@ -305,7 +308,7 @@ void setup_output_buffer_if_we_run_high(struct moveparams *mv)
#ifdef STANDARD_MEMORY_BIOS_CALL
if (EXT_MEM_K < (3*1024)) error("Less than 4MB of memory.\n");
#else
- if (EXT_MEM_K*64 < (3*1024)) error("Less than 4MB of memory.\n");
+ if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory.\n");
#endif
mv->low_buffer_start = output_data = (char *)LOW_BUFFER_START;
high_loaded = 1;