From 3f2ac2db360c6687995a9e7ed14cb15007cc0a4e Mon Sep 17 00:00:00 2001 From: Curle Date: Mon, 9 Nov 2020 18:48:47 +0000 Subject: [PATCH] Add a memstart symbol to the linkerscript This replaces the old way of appending the memory bitmap to the end of the kernel, which started causing problems with expansion.. I hardcoded the value to 0x1440, which is the start of the first FREE block of memory given to SeaBIOS in QEMU. This should be changed in the future.. --- chroma/inc/kernel/system/memory.h | 2 ++ linker.ld | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chroma/inc/kernel/system/memory.h b/chroma/inc/kernel/system/memory.h index 6641705..93a1669 100644 --- a/chroma/inc/kernel/system/memory.h +++ b/chroma/inc/kernel/system/memory.h @@ -199,6 +199,8 @@ void* AlignPointer(const void* Pointer, size_t Alignment); * C h r o m a M e m o r y M a n a g e m e n t *************************************************************/ +extern size_t memstart; + extern size_t end; void ListMemoryMap(); diff --git a/linker.ld b/linker.ld index 8b4ac16..ea78291 100644 --- a/linker.ld +++ b/linker.ld @@ -1,6 +1,7 @@ -mmio = 0xfffffffff8000000; -fb = 0xfffffffffc000000; +memstart = 0x14400; +mmio = 0xfffffffff8000000; +fb = 0xfffffffffc000000; PHDRS {