diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-04 20:47:46 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-04 20:47:46 +0200 |
commit | a9bb8d1be024730fc4687aab78a8e5cb54b4f05e (patch) | |
tree | e10940a39e9864430b584cd84700b8d49aebd62a /src/kernel/core | |
parent | 35857cb36ae65779a7cab773040c0fc91387a989 (diff) | |
download | TCE-a9bb8d1be024730fc4687aab78a8e5cb54b4f05e.tar.gz TCE-a9bb8d1be024730fc4687aab78a8e5cb54b4f05e.zip |
More OOP;
Diffstat (limited to 'src/kernel/core')
-rw-r--r-- | src/kernel/core/loader_.asm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/kernel/core/loader_.asm b/src/kernel/core/loader_.asm index 07de52c..28d1d2f 100644 --- a/src/kernel/core/loader_.asm +++ b/src/kernel/core/loader_.asm @@ -2,6 +2,7 @@ [GLOBAL loader] ; making entry point visible to linker [EXTERN kmain] ; kmain is defined in kmain.c [EXTERN tasking_tmpStack] ; a temporary 4k stack used by tasking, and used when setting up kernel stuff +EXTERN start_ctors, end_ctors, start_dtors, end_dtors ; setting up the Multiboot header - see GRUB docs for details MODULEALIGN equ 1<<0 ; align loaded modules on page boundaries @@ -36,9 +37,30 @@ higherhalf: ; now we're running in higher half add ebx, k_highhalf_addr ; update the MB info structure so that it is in the new seg push ebx ; pass Multiboot info structure +static_ctors_loop: + mov ebx, start_ctors + jmp .test +.body: + call [ebx] + add ebx,4 +.test: + cmp ebx, end_ctors + jb .body + call kmain ; call kernel proper cli ; disable interupts + +static_dtors_loop: + mov ebx, start_dtors + jmp .test +.body: + call [ebx] + add ebx,4 +.test: + cmp ebx, end_dtors + jb .body + hang: hlt ; halt machine should kernel return jmp hang |