Init clean-up
This commit is contained in:
parent
fd9f87ddd4
commit
5cfc5997dc
|
@ -109,6 +109,8 @@ void InitBootInfo(multiboot_info_t *mbi)
|
|||
//
|
||||
noreturn void StartKern(multiboot_info_t *mbInfo, int mbMagic)
|
||||
{
|
||||
error_t mapBad;
|
||||
|
||||
// We're not ready to deal with interrupts
|
||||
DisableIRQs();
|
||||
|
||||
|
@ -128,9 +130,10 @@ noreturn void StartKern(multiboot_info_t *mbInfo, int mbMagic)
|
|||
);
|
||||
|
||||
//Memory mapping
|
||||
error_t mapBad = InitMemoryMap();
|
||||
if (mapBad)
|
||||
StartPanic("[Init] The memory map failed to initialize. Error : %d", mapBad);
|
||||
if ((mapBad = InitMemoryMap()))
|
||||
StartPanic("[Init] The memory map failed to initialize. Error : %d",
|
||||
mapBad
|
||||
);
|
||||
|
||||
// We're out
|
||||
KernLog("\n[Init] Evil never dies !\n");
|
||||
|
|
|
@ -32,7 +32,7 @@ error_t InitMemoryMap(void)
|
|||
DebugLog("[InitMemoryMap] Memory map address : %p, length : %d\n",
|
||||
GetBootInfo(memory).mapAddr, GetBootInfo(memory).mapLength);
|
||||
|
||||
if ((GetBootInfo(memory).upMemory / (MB/KB)) <= MINIMUM_RAM_SIZE) //XXX before loading kernel...
|
||||
if ((GetBootInfo(memory).upMemory / (MB/KB)) <= MINIMUM_RAM_SIZE)
|
||||
return ENOMEM;
|
||||
DebugLog("[InitMemoryMap] Low memory : %d Kio, Up memory : %d Mio\n",
|
||||
GetBootInfo(memory).lowMemory, GetBootInfo(memory).upMemory / (MB/KB));
|
||||
|
|
Loading…
Reference in New Issue