This commit is contained in:
Adrien Bourmault 2019-03-22 15:42:02 +01:00
parent bc82695e26
commit 858ed26e78
1 changed files with 19 additions and 21 deletions

View File

@ -22,7 +22,6 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------//
#include <kernel/multiboot.h>
#include <kernel/term.h>
#include <kernel/panic.h>
#include <kernel/mm.h>
@ -34,8 +33,8 @@
void InitBootInfo(multiboot_info_t *mbi)
{
extern uint MB_header;
char okStr[] = "available";
char noStr[] = "unavailable";
char *okStr = "available";
char *noStr = "unavailable";
// We need the multiboot structure
KalAlwaysAssert(mbi);
@ -88,23 +87,22 @@ void InitBootInfo(multiboot_info_t *mbi)
}
//Now we check (debug)
DebugLog("\n[InitBootInfo] Flags : %b",
GetBootInfo(btldr).grubFlags);
DebugLog("\n[InitBootInfo] Boot loader %s",
GetBootInfo(btldr).valid ? &okStr : &noStr);
DebugLog("\n[InitBootInfo] Boot drive %s",
GetBootInfo(drives).drvValid ? &okStr : &noStr);
DebugLog("\n[InitBootInfo] Disk buffer %s",
GetBootInfo(drives).bufferValid ? &okStr : &noStr);
DebugLog("\n[InitBootInfo] Basic mem %s",
GetBootInfo(memory).memValid ? &okStr : &noStr);
DebugLog("\n[InitBootInfo] Memory map %s",
GetBootInfo(memory).mapValid ? &okStr : &noStr);
DebugLog("\n[InitBootInfo] ROM table %s",
GetBootInfo(firmware).romValid ? &okStr : &noStr);
DebugLog("\n[InitBootInfo] APM table %s",
GetBootInfo(firmware).apmValid ? &okStr : &noStr);
DebugLog("\n");
/*DebugLog("[InitBootInfo] Flags : %b\n\n",
GetBootInfo(btldr).grubFlags);*/
DebugLog("[InitBootInfo] Boot loader %s\n",
GetBootInfo(btldr).valid ? okStr : noStr);
DebugLog("[InitBootInfo] Boot drive %s\n",
GetBootInfo(drives).drvValid ? okStr : noStr);
DebugLog("[InitBootInfo] Disk buffer %s\n",
GetBootInfo(drives).bufferValid ? okStr : noStr);
DebugLog("[InitBootInfo] Basic mem %s\n",
GetBootInfo(memory).memValid ? okStr : noStr);
DebugLog("[InitBootInfo] Memory map %s\n",
GetBootInfo(memory).mapValid ? okStr : noStr);
DebugLog("[InitBootInfo] ROM table %s\n",
GetBootInfo(firmware).romValid ? okStr : noStr);
DebugLog("[InitBootInfo] APM table %s\n\n",
GetBootInfo(firmware).apmValid ? okStr : noStr);
}
@ -123,7 +121,7 @@ noreturn void StartKern(multiboot_info_t *mbInfo, int mbMagic)
KernLog("%c%c%c OS/K\n\n", 219, 219, 219);
KalAlwaysAssert(mbMagic == MULTIBOOT_BOOTLOADER_MAGIC);
KernLog("[Init] We have magic : %x\n", mbMagic);
KernLog("[Init] We have magic : %x\n\n", mbMagic);
//Initialize the BootInfo_t structure
InitBootInfo(mbInfo);