diff --git a/relocator/src/link.ld b/relocator/src/link.ld index be924df..c6da198 100644 --- a/relocator/src/link.ld +++ b/relocator/src/link.ld @@ -3,7 +3,7 @@ OUTPUT(loader.elf); ENTRY(_start); SECTIONS { - . = 0x00800000; + . = 0x00809000; .text : { *(.kernel_code*); *(.text*); @@ -30,4 +30,4 @@ SECTIONS { } } -ASSERT((SIZEOF(.text) + SIZEOF(.data) + SIZEOF(.sdata) + SIZEOF(.rodata) + SIZEOF(.sbss) + SIZEOF(.bss)) < 0x80000, "Memory overlapping with modules."); +ASSERT((SIZEOF(.text) + SIZEOF(.data) + SIZEOF(.sdata) + SIZEOF(.rodata) + SIZEOF(.sbss) + SIZEOF(.bss)) < 0x77000, "Memory overlapping with modules."); diff --git a/source/globals.h b/source/globals.h index f468494..24f5e8d 100644 --- a/source/globals.h +++ b/source/globals.h @@ -6,10 +6,10 @@ #define MEMORY_REGION_START 0x00800000 #define MEMORY_REGION_SIZE 0x00800000 -#define MEMORY_REGION_USABLE_HEAP_START (MEMORY_REGION_START + 0x00080000) -#define MEMORY_REGION_USABLE_HEAP_END (MEMORY_REGION_USABLE_HEAP_START + 0x00100000) +#define MEMORY_REGION_USABLE_HEAP_START (MEMORY_REGION_START + 0x00080000) // We don't want to override the relocator +#define MEMORY_REGION_USABLE_HEAP_END (MEMORY_REGION_USABLE_HEAP_START + 0x00080000) // heap size is 512 KiB for now #define MEMORY_REGION_USABLE_START MEMORY_REGION_USABLE_HEAP_END -#define MEMORY_REGION_USABLE_END 0x00FFF000 +#define MEMORY_REGION_USABLE_END 0x00FFF000 // The last 0x1000 bytes are reserved kernel hook #define gModuleData ((module_information_t *) (MEMORY_REGION_USABLE_START)) \ No newline at end of file