2018-12-20 18:03:39 +01:00
|
|
|
//----------------------------------------------------------------------------//
|
|
|
|
// GNU GPL OS/K //
|
|
|
|
// //
|
2019-03-08 09:00:55 +01:00
|
|
|
// Desc: Kernel entry point //
|
2018-12-20 18:03:39 +01:00
|
|
|
// //
|
2019-02-16 23:36:33 +01:00
|
|
|
// //
|
|
|
|
// Copyright © 2018-2019 The OS/K Team //
|
|
|
|
// //
|
|
|
|
// This file is part of OS/K. //
|
|
|
|
// //
|
|
|
|
// OS/K is free software: you can redistribute it and/or modify //
|
|
|
|
// it under the terms of the GNU General Public License as published by //
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or //
|
|
|
|
// any later version. //
|
|
|
|
// //
|
|
|
|
// OS/K is distributed in the hope that it will be useful, //
|
|
|
|
// but WITHOUT ANY WARRANTY//without even the implied warranty of //
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
|
|
|
// GNU General Public License for more details. //
|
|
|
|
// //
|
|
|
|
// You should have received a copy of the GNU General Public License //
|
|
|
|
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
2018-12-20 18:03:39 +01:00
|
|
|
//----------------------------------------------------------------------------//
|
2019-03-18 17:25:44 +01:00
|
|
|
|
2019-03-08 21:56:01 +01:00
|
|
|
#include <multiboot/multiboot.h>
|
2019-02-16 23:36:33 +01:00
|
|
|
#include <kernel/term.h>
|
|
|
|
#include <kernel/panic.h>
|
2018-12-20 18:03:39 +01:00
|
|
|
|
2018-12-25 19:09:58 +01:00
|
|
|
//
|
2019-02-16 23:36:33 +01:00
|
|
|
// Entry point of the Kaleid kernel
|
2018-12-25 19:09:58 +01:00
|
|
|
//
|
2019-03-12 23:25:30 +01:00
|
|
|
noreturn void StartKern(multiboot_info_t *mbInfo, int mbMagic)
|
2018-12-29 23:51:00 +01:00
|
|
|
{
|
2019-02-16 23:36:33 +01:00
|
|
|
// We're not ready to deal with interrupts
|
2019-01-14 14:31:49 +01:00
|
|
|
DisableIRQs();
|
|
|
|
|
2019-02-16 23:36:33 +01:00
|
|
|
// Kernel terminals
|
2019-01-01 13:09:57 +01:00
|
|
|
InitTerms();
|
2019-01-14 14:31:49 +01:00
|
|
|
|
2019-03-18 17:25:44 +01:00
|
|
|
KernLog( "We were loaded by : %s\n\n"
|
2019-03-13 09:19:43 +01:00
|
|
|
"We get\n"
|
2019-03-13 17:03:52 +01:00
|
|
|
" *mbInfo : %p\n"
|
2019-03-13 09:19:43 +01:00
|
|
|
" mbMagic : %x\n"
|
|
|
|
" mbBootdrv : %x\n"
|
2019-03-13 17:03:52 +01:00
|
|
|
" *mbMmap : %p\n"
|
|
|
|
" `-length : %d\n"
|
2019-03-13 09:19:43 +01:00
|
|
|
"\nGoodbye World :(",
|
|
|
|
|
|
|
|
mbInfo->boot_loader_name,
|
|
|
|
mbInfo,
|
|
|
|
mbMagic,
|
2019-03-13 17:03:52 +01:00
|
|
|
mbInfo->boot_device,
|
|
|
|
mbInfo->mmap_addr,
|
|
|
|
mbInfo->mmap_length
|
2019-03-13 09:19:43 +01:00
|
|
|
);
|
2019-03-18 17:25:44 +01:00
|
|
|
|
|
|
|
// Get out
|
|
|
|
CrashSystem();
|
2019-03-18 13:09:34 +01:00
|
|
|
}
|