blob: 07dda5445a8cefaead39eff15cb75d60a1dec01f (
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
/*
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Singleton.h>
#include <AK/Types.h>
#include <Kernel/Arch/aarch64/InterruptManagement.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/KString.h>
#include <Kernel/Locking/SpinlockProtected.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Panic.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <Kernel/UserOrKernelBuffer.h>
// Scheduler
namespace Kernel {
READONLY_AFTER_INIT Thread* g_finalizer;
}
// Random
namespace Kernel {
void get_fast_random_bytes(Bytes)
{
VERIFY_NOT_REACHED();
}
}
// Inode
namespace Kernel {
static Singleton<SpinlockProtected<Inode::AllInstancesList>> s_all_instances;
SpinlockProtected<Inode::AllInstancesList>& Inode::all_instances()
{
VERIFY_NOT_REACHED();
return s_all_instances;
}
RefPtr<Memory::SharedInodeVMObject> Inode::shared_vmobject() const
{
VERIFY_NOT_REACHED();
return RefPtr<Memory::SharedInodeVMObject>(nullptr);
}
void Inode::will_be_destroyed()
{
VERIFY_NOT_REACHED();
}
ErrorOr<void> Inode::set_shared_vmobject(Memory::SharedInodeVMObject&)
{
VERIFY_NOT_REACHED();
return {};
}
}
// UserOrKernelBuffer.cpp
namespace Kernel {
ErrorOr<void> UserOrKernelBuffer::write(void const*, size_t, size_t)
{
VERIFY_NOT_REACHED();
return {};
}
ErrorOr<void> UserOrKernelBuffer::read(void*, size_t, size_t) const
{
VERIFY_NOT_REACHED();
return {};
}
}
// x86 init
multiboot_module_entry_t multiboot_copy_boot_modules_array[16];
size_t multiboot_copy_boot_modules_count;
extern "C" {
READONLY_AFTER_INIT PhysicalAddress start_of_prekernel_image;
READONLY_AFTER_INIT PhysicalAddress end_of_prekernel_image;
READONLY_AFTER_INIT size_t physical_to_virtual_offset;
// READONLY_AFTER_INIT FlatPtr kernel_mapping_base;
READONLY_AFTER_INIT FlatPtr kernel_load_base;
#if ARCH(X86_64)
READONLY_AFTER_INIT PhysicalAddress boot_pml4t;
#endif
READONLY_AFTER_INIT PhysicalAddress boot_pdpt;
READONLY_AFTER_INIT PhysicalAddress boot_pd0;
READONLY_AFTER_INIT PhysicalAddress boot_pd_kernel;
READONLY_AFTER_INIT Kernel::PageTableEntry* boot_pd_kernel_pt1023;
READONLY_AFTER_INIT char const* kernel_cmdline;
READONLY_AFTER_INIT u32 multiboot_flags;
READONLY_AFTER_INIT multiboot_memory_map_t* multiboot_memory_map;
READONLY_AFTER_INIT size_t multiboot_memory_map_count;
READONLY_AFTER_INIT multiboot_module_entry_t* multiboot_modules;
READONLY_AFTER_INIT size_t multiboot_modules_count;
READONLY_AFTER_INIT PhysicalAddress multiboot_framebuffer_addr;
READONLY_AFTER_INIT u32 multiboot_framebuffer_pitch;
READONLY_AFTER_INIT u32 multiboot_framebuffer_width;
READONLY_AFTER_INIT u32 multiboot_framebuffer_height;
READONLY_AFTER_INIT u8 multiboot_framebuffer_bpp;
READONLY_AFTER_INIT u8 multiboot_framebuffer_type;
}
namespace Kernel {
// KString.cpp
ErrorOr<NonnullOwnPtr<KString>> KString::try_create_uninitialized(size_t, char*&)
{
VERIFY_NOT_REACHED();
return ENOMEM;
}
ErrorOr<NonnullOwnPtr<KString>> KString::try_create(StringView)
{
VERIFY_NOT_REACHED();
return ENOMEM;
}
void KString::operator delete(void*)
{
VERIFY_NOT_REACHED();
}
}
extern "C" {
FlatPtr kernel_mapping_base;
}
// InterruptManagement.cpp
namespace Kernel {
u8 InterruptManagement::acquire_mapped_interrupt_number(u8)
{
VERIFY_NOT_REACHED();
}
InterruptManagement& InterruptManagement::the()
{
VERIFY_NOT_REACHED();
}
RefPtr<IRQController> InterruptManagement::get_responsible_irq_controller(u8)
{
VERIFY_NOT_REACHED();
}
}
|