mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 01:34:12 +00:00
heapblock: Remove payload_end logic for heap start
This no longer applies ever since we started doing in-place chainloads. Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
9e63fe2400
commit
92aca22119
2 changed files with 1 additions and 9 deletions
|
@ -2,8 +2,6 @@ ENTRY(_start)
|
|||
|
||||
_stack_size = 0x20000;
|
||||
|
||||
_max_payload_size = 64*1024*1024;
|
||||
|
||||
/* We are actually relocatable */
|
||||
. = 0;
|
||||
|
||||
|
@ -81,7 +79,6 @@ SECTIONS {
|
|||
_data_size = . - _data_start;
|
||||
_end = .;
|
||||
_payload_start = .;
|
||||
_payload_end = . + _max_payload_size;
|
||||
|
||||
.symtab 0 : { *(.symtab) }
|
||||
.strtab 0 : { *(.strtab) }
|
||||
|
|
|
@ -20,13 +20,8 @@ static void *heap_base;
|
|||
void heapblock_init(void)
|
||||
{
|
||||
void *top_of_kernel_data = (void *)cur_boot_args.top_of_kernel_data;
|
||||
void *payload_end = _payload_end;
|
||||
|
||||
if (payload_end > top_of_kernel_data)
|
||||
heap_base = payload_end; // Chainloaded, we are last in RAM
|
||||
else
|
||||
heap_base = top_of_kernel_data; // Loaded by iBoot, there is data after us in RAM
|
||||
|
||||
heap_base = top_of_kernel_data;
|
||||
heapblock_alloc(0); // align base
|
||||
|
||||
printf("Heap base: %p\n", heap_base);
|
||||
|
|
Loading…
Reference in a new issue