x86: cleanup boot-heap usage
The kernel decompressor wrapper uses memory located beyond the end of the image. This might lead to hard to debug problems, but even if it can be proven to be safe, it is at the very least unclean. I don't see any advantages either, unless you count it not being zeroed out as an advantage. This patch moves the boot-heap area to the bss segment. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Ingo Molnar
parent
4c8337ac42
commit
7c53976404
@@ -217,12 +217,6 @@ static void putstr(const char *);
|
||||
static memptr free_mem_ptr;
|
||||
static memptr free_mem_end_ptr;
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
#define HEAP_SIZE 0x7000
|
||||
#else
|
||||
#define HEAP_SIZE 0x4000
|
||||
#endif
|
||||
|
||||
static char *vidmem;
|
||||
static int vidport;
|
||||
static int lines, cols;
|
||||
@@ -449,7 +443,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
|
||||
|
||||
window = output; /* Output buffer (Normally at 1M) */
|
||||
free_mem_ptr = heap; /* Heap */
|
||||
free_mem_end_ptr = heap + HEAP_SIZE;
|
||||
free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
|
||||
inbuf = input_data; /* Input buffer */
|
||||
insize = input_len;
|
||||
inptr = 0;
|
||||
|
Reference in New Issue
Block a user