diff options
| author | Michal Idziorek <m.i@gmx.at> | 2015-05-14 14:05:54 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2015-05-14 14:05:54 +0200 |
| commit | ce3968aa4a941e272171f8fcd389c4909a7a23a5 (patch) | |
| tree | d3fd8fca72d0fe9f9b1d7f17a37a5fd3d2d44a16 /kernel/multiboot.c | |
| parent | dc7bf2f47d6f97407e3b50ae0b8ab59fd51079e5 (diff) | |
some clenup and recover after git-crash!
Diffstat (limited to 'kernel/multiboot.c')
| -rw-r--r-- | kernel/multiboot.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/kernel/multiboot.c b/kernel/multiboot.c new file mode 100644 index 0000000..c294ee2 --- /dev/null +++ b/kernel/multiboot.c @@ -0,0 +1,33 @@ + +#define FOOLOS_MODULE_NAME "multiboot" +#include "multiboot.h" +#include "lib/logger/log.h" + +uint32_t* get_multiboot(uint32_t eax, uint32_t ebx) +{ + + if(eax!=0x2badb002)panic(FOOLOS_MODULE_NAME,"EAX was not set properly by your bootlaoder!"); + multiboot_information *info; + info=ebx; + + if(info->flags&&1<<9) + { + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"Loaded by: \"%s\"",info->boot_loader_name); + } + + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"multiboot flags: 0x%08X",info->flags); + + if(info->flags&&1<<0) + { + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"mem_lower: %d KB",info->mem_lower); + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"mem_upper: %d KB",info->mem_upper); + } + + if(info->flags&&1<<2) + { + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"cmdline: \"%s\"",info->cmdline); + } + + return info; + +} |
