61 lines
2.5 KiB
Diff
61 lines
2.5 KiB
Diff
|
--- a/arch/i386/boot/compressed/misc.c
|
||
|
+++ b/arch/i386/boot/compressed/misc.c
|
||
|
@@ -309,7 +309,7 @@ static void setup_normal_output_buffer(v
|
||
|
#else
|
||
|
if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < 1024) error("Less than 2MB of memory");
|
||
|
#endif
|
||
|
+ output_data = (char *)__PHYSICAL_START; /* Normally Points to 1M */
|
||
|
- output_data = (char *)PHYSICAL_START; /* Normally Points to 1M */
|
||
|
free_mem_end_ptr = (long)real_mode;
|
||
|
}
|
||
|
|
||
|
@@ -334,8 +334,8 @@ static void setup_output_buffer_if_we_ru
|
||
|
low_buffer_size = low_buffer_end - LOW_BUFFER_START;
|
||
|
high_loaded = 1;
|
||
|
free_mem_end_ptr = (long)high_buffer_start;
|
||
|
+ if ( (__PHYSICAL_START + low_buffer_size) > ((ulg)high_buffer_start)) {
|
||
|
+ high_buffer_start = (uch *)(__PHYSICAL_START + low_buffer_size);
|
||
|
- if ((PHYSICAL_START + low_buffer_size) > ((ulg)high_buffer_start)) {
|
||
|
- high_buffer_start = (uch *)(PHYSICAL_START + low_buffer_size);
|
||
|
mv->hcount = 0; /* say: we need not to move high_buffer */
|
||
|
}
|
||
|
else mv->hcount = -1;
|
||
|
--- a/arch/i386/kernel/setup.c
|
||
|
+++ b/arch/i386/kernel/setup.c
|
||
|
@@ -1192,8 +1192,8 @@ void __init setup_bootmem_allocator(void
|
||
|
* the (very unlikely) case of us accidentally initializing the
|
||
|
* bootmem allocator with an invalid RAM area.
|
||
|
*/
|
||
|
+ reserve_bootmem(__PHYSICAL_START, (PFN_PHYS(min_low_pfn) +
|
||
|
+ bootmap_size + PAGE_SIZE-1) - (__PHYSICAL_START));
|
||
|
- reserve_bootmem(PHYSICAL_START, (PFN_PHYS(min_low_pfn) +
|
||
|
- bootmap_size + PAGE_SIZE-1) - (PHYSICAL_START));
|
||
|
|
||
|
/*
|
||
|
* reserve physical page 0 - it's a special BIOS page on many boxes,
|
||
|
--- a/include/asm-i386/page.h
|
||
|
+++ b/include/asm-i386/page.h
|
||
|
@@ -109,15 +109,19 @@ extern int page_is_ram(unsigned long pag
|
||
|
|
||
|
#endif /* __ASSEMBLY__ */
|
||
|
|
||
|
+#ifdef __ASSEMBLY__
|
||
|
#define __PAGE_OFFSET CONFIG_PAGE_OFFSET
|
||
|
#define __PHYSICAL_START CONFIG_PHYSICAL_START
|
||
|
+#else
|
||
|
+#define __PAGE_OFFSET ((unsigned long)CONFIG_PAGE_OFFSET)
|
||
|
+#define __PHYSICAL_START ((unsigned long)CONFIG_PHYSICAL_START)
|
||
|
+#endif
|
||
|
#define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START)
|
||
|
+
|
||
|
-#define __MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE)
|
||
|
|
||
|
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
|
||
|
-#define PHYSICAL_START ((unsigned long)__PHYSICAL_START)
|
||
|
#define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE)
|
||
|
+#define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE)
|
||
|
-#define MAXMEM ((unsigned long)__MAXMEM)
|
||
|
#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
|
||
|
#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
|
||
|
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
|