diff --git a/include/util/arena_alloc.nasm b/include/util/arena_alloc.nasm index 52910ef..8ebbf38 100644 --- a/include/util/arena_alloc.nasm +++ b/include/util/arena_alloc.nasm @@ -68,6 +68,7 @@ arena_alloc: .func: ; remove bytes from pool and increment mark to the new cursor location ; return a pointer to the begining of allocated segment + ERROR STEVIA_DEBUG_UNIMPLEMENTED .endp: __CDECL16_EXIT ret @@ -76,6 +77,7 @@ arena_mark: __CDECL16_ENTRY .func: ; return the current location of the 'cursor' in the allocator + ERROR STEVIA_DEBUG_UNIMPLEMENTED .endp: __CDECL16_EXIT ret @@ -84,6 +86,7 @@ arena_reset_to: __CDECL16_ENTRY .func: ; rewind the arena to a previously marked point + ERROR STEVIA_DEBUG_UNIMPLEMENTED .endp: __CDECL16_EXIT ret @@ -92,6 +95,7 @@ arena_reset: __CDECL16_ENTRY .func: ; reset the entire heap to a fresh state + ERROR STEVIA_DEBUG_UNIMPLEMENTED .endp: __CDECL16_EXIT ret diff --git a/src/stage2/stage2.nasm b/src/stage2/stage2.nasm index 1b87fac..da800bb 100755 --- a/src/stage2/stage2.nasm +++ b/src/stage2/stage2.nasm @@ -88,7 +88,7 @@ init: jmp word __STAGE2_SEGMENT:main ; ############### -; Functions +; Core Functions ; ############### %include "util/kmem_func.nasm" @@ -96,6 +96,11 @@ init: %include "util/kmemset4_func.nasm" %include "util/error_func.nasm" +; ############### +; Functions +; ############### +%include "util/arena_alloc.nasm" + ; ############### ; FAT32 Driver ; ############### @@ -152,6 +157,10 @@ main: call disable_cursor_bios print_string HelloPrompt_info + ; setup the early heap + push area + call arena_init + ; enable A20 gate call EnableA20 print_string A20_Enabled_OK_info @@ -413,6 +422,10 @@ fat32_state: align 16, resb 1 SteviaInfo: resd 4 + +align 16, resb 1 +early_heap_state: + resb ArenaStateStruc_t_size ; ; post-bss init globals ;