blob: 85b6729102a31f1369331d1628acb01f67c3f80f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/* -------------------------------------------
Copyright (C) 2024, ELMH GROUP, all rights reserved.
------------------------------------------- */
#include <ArchKit/ArchKit.h>
#include <Modules/FB/FB.h>
#include <FirmwareKit/Handover.h>
#include <KernelKit/FileMgr.h>
#include <KernelKit/Heap.h>
#include <KernelKit/PEFCodeMgr.h>
#include <KernelKit/UserProcessScheduler.h>
#include <NewKit/Json.h>
#include <KernelKit/CodeMgr.h>
#include <Modules/ACPI/ACPIFactoryInterface.h>
#include <NetworkKit/IPC.h>
#include <CFKit/Property.h>
Kernel::Void hal_real_init(Kernel::Void) noexcept;
EXTERN_C Kernel::Void ke_dll_entrypoint(Kernel::Void);
EXTERN_C void hal_init_platform(
Kernel::HEL::BootInfoHeader* handover_hdr)
{
/************************************************** */
/* INITIALIZE AND VALIDATE HEADER. */
/************************************************** */
kHandoverHeader = handover_hdr;
if (kHandoverHeader->f_Magic != kHandoverMagic &&
kHandoverHeader->f_Version != kHandoverVersion)
{
return;
}
/************************************** */
/* INITIALIZE BIT MAP. */
/************************************** */
kKernelBitMpSize = kHandoverHeader->f_BitMapSize;
kKernelBitMpStart = reinterpret_cast<Kernel::VoidPtr>(
reinterpret_cast<Kernel::UIntPtr>(kHandoverHeader->f_BitMapStart));
/// @note do initialize the interrupts after it.
Kernel::rtl_create_process(ke_dll_entrypoint, "Kernel System");
Kernel::ke_stop(RUNTIME_CHECK_BOOTSTRAP);
}
|