From 34492a4386446fc82220fe0684ff521d760e84bd Mon Sep 17 00:00:00 2001 From: Anghelo Carvajal Date: Sun, 26 Nov 2023 09:47:21 -0300 Subject: Move the system heap and the framebuffers to their own segments (#1488) * make segments for the systemheap and the framebuffers * define in the makefile * undefined syms * Make segments for the pre boot buffers too * Update spec Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com> * review * Update spec Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com> * Update Makefile Co-authored-by: Dragorn421 * comments * comment * move comment about the hardcoded address to buffers.h * rewrite SYSTEM_HEAP_END_ADDR in terms of other symbols * Use `ALIGNED` on all the buffers * Rename SYSTEM_HEAP_END_ADDR to FRAMEBUFFERS_START_ADDR * Put ALIGNED at the right like the rest of the codebase * merge * gLoBuffer * gHiBuffer * Add a static assert to ensure the address of gHiBuffer haven't shifted without the user noticing * smol include cleanup --------- Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com> Co-authored-by: Dragorn421 --- src/code/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/code/main.c') diff --git a/src/code/main.c b/src/code/main.c index 14ee841ce..83df66396 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -53,8 +53,8 @@ void Main(void* arg) { Check_RegionIsSupported(); Check_ExpansionPak(); - sysHeap = (intptr_t)gSystemHeap; - fb = 0x80780000; + sysHeap = (intptr_t)SEGMENT_START(system_heap); + fb = FRAMEBUFFERS_START_ADDR; gSystemHeapSize = fb - sysHeap; SystemHeap_Init((void*)sysHeap, gSystemHeapSize); -- cgit v1.2.3