summaryrefslogtreecommitdiffhomepage
path: root/src/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/FirmwareKit/Handover.h1
-rw-r--r--src/kernel/HALKit/AMD64/HalKernelMain.cc4
-rw-r--r--src/kernel/HALKit/AMD64/Processor.h2
-rw-r--r--src/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc2
-rw-r--r--src/kernel/NeKit/ErrorOr.h2
-rw-r--r--src/kernel/NeKit/Pmm.h2
-rw-r--r--src/kernel/NetworkKit/IPC.h10
-rw-r--r--src/kernel/amd64-ci.make2
-rw-r--r--src/kernel/src/BitMapMgr.cc10
-rw-r--r--src/kernel/src/FS/OpenHeFS+FileMgr.cc2
-rw-r--r--src/kernel/src/FS/OpenHeFS+FileSystemParser.cc2
-rw-r--r--src/kernel/src/HeapMgr.cc4
-rw-r--r--src/kernel/src/Network/IPCMessage.cc4
13 files changed, 17 insertions, 30 deletions
diff --git a/src/kernel/FirmwareKit/Handover.h b/src/kernel/FirmwareKit/Handover.h
index 06e99c83..4128db2c 100644
--- a/src/kernel/FirmwareKit/Handover.h
+++ b/src/kernel/FirmwareKit/Handover.h
@@ -12,7 +12,6 @@
#define kHandoverVersion (0x0117)
/* Initial bitmap pointer location and size. */
-#define kHandoverBitMapSz (gib_cast(4))
#define kHandoverStructSz sizeof(HEL::BootInfoHeader)
namespace Kernel::HEL {
diff --git a/src/kernel/HALKit/AMD64/HalKernelMain.cc b/src/kernel/HALKit/AMD64/HalKernelMain.cc
index 4cf7d608..e54c0d84 100644
--- a/src/kernel/HALKit/AMD64/HalKernelMain.cc
+++ b/src/kernel/HALKit/AMD64/HalKernelMain.cc
@@ -142,10 +142,10 @@ EXTERN_C Kernel::Void hal_real_init(Kernel::Void) {
UserProcessScheduler::The().SwitchTeam(kRTUserTeam);
- // AMLALE: TODO: Prosan, Process sanitizer.
+ // TODO: Prosan, Process sanitizer.
rtl_create_user_process([]() -> void { while (YES); }, "ProSan");
- // AMLALE: TODO, Vet sanitizer.
+ //TODO: Vet sanitizer.
rtl_create_user_process([]() -> void { while (YES); }, "VetSan");
HAL::mp_init_cores(kHandoverHeader->f_HardwareTables.f_VendorPtr);
diff --git a/src/kernel/HALKit/AMD64/Processor.h b/src/kernel/HALKit/AMD64/Processor.h
index 7501ec63..8bd7b226 100644
--- a/src/kernel/HALKit/AMD64/Processor.h
+++ b/src/kernel/HALKit/AMD64/Processor.h
@@ -270,7 +270,7 @@ EXTERN_C ATTRIBUTE(naked) Kernel::Void hal_load_idt(Kernel::HAL::Register64 ptr)
EXTERN_C ATTRIBUTE(naked) Kernel::Void hal_load_gdt(Kernel::HAL::Register64 ptr);
inline Kernel::VoidPtr kKernelBitMpStart = nullptr;
-inline Kernel::UIntPtr kKernelBitMpSize = 0UL;
+inline Kernel::SizeT kKernelBitMpSize = 0UL;
#endif // __NE_AMD64__ */
diff --git a/src/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc b/src/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc
index 28969475..456b6a2a 100644
--- a/src/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc
+++ b/src/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc
@@ -384,7 +384,7 @@ STATIC Bool drv_init_command_structures_ahci() {
/// @param atapi reference value, tells whether we should detect ATAPI instead of SATA.
/// @return if the disk was successfully initialized or not.
STATIC Bool drv_std_init_ahci(UInt16& pi, BOOL& atapi) {
- /// AMLALE: TODO: Iterator is good enough, but we need to expand it.
+ /// TODO: Iterator is good enough, but we need to expand it.
PCI::Iterator iterator(Types::PciDeviceKind::MassStorageController, 0x00);
for (SizeT device_index = 0; device_index < NE_BUS_COUNT; ++device_index) {
diff --git a/src/kernel/NeKit/ErrorOr.h b/src/kernel/NeKit/ErrorOr.h
index b471e33e..87031b75 100644
--- a/src/kernel/NeKit/ErrorOr.h
+++ b/src/kernel/NeKit/ErrorOr.h
@@ -24,7 +24,7 @@ class ErrorOr final {
using TypePtr = T*;
explicit ErrorOr(ErrorT err) : mRef((T*) RTL_ALLOCA(sizeof(T))), mId(err) {
- // AMLALE: Invalidate the value of mRef to make computational evaluations false.
+ // TODO: Invalidate the value of mRef to make computational evaluations false.
mRef = nullptr;
}
diff --git a/src/kernel/NeKit/Pmm.h b/src/kernel/NeKit/Pmm.h
index 894e28c9..35357e60 100644
--- a/src/kernel/NeKit/Pmm.h
+++ b/src/kernel/NeKit/Pmm.h
@@ -13,7 +13,7 @@ namespace Kernel {
class Pmm;
class PTEWrapper;
-// AMLALE: A PMM stands for Page Memory Manager. Which guarantees page retrieval and free.
+// TODO: A PMM stands for Page Memory Manager. Which guarantees page retrieval and free.
class Pmm final {
public:
explicit Pmm();
diff --git a/src/kernel/NetworkKit/IPC.h b/src/kernel/NetworkKit/IPC.h
index 0d42de31..27f39079 100644
--- a/src/kernel/NetworkKit/IPC.h
+++ b/src/kernel/NetworkKit/IPC.h
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
-#ifndef INC_IPC_H
-#define INC_IPC_H
+#ifndef NETWORKKIT_IPC_H
+#define NETWORKKIT_IPC_H
#include <NeKit/Config.h>
#include <NeKit/KString.h>
@@ -47,8 +47,6 @@ enum {
kIPCMixedEndian = 2,
};
-constexpr inline auto kIPCMsgSize = 6094U;
-
enum {
kIPCLockInvalid = 0,
kIPCLockFree = 1,
@@ -65,8 +63,8 @@ typedef struct IPC_MSG final {
UInt32 IpcCRC32;
UInt32 IpcMsg;
UInt32 IpcMsgSz;
- UInt8 IpcData[kIPCMsgSize];
UInt32 IpcLock;
+ UInt8* IpcData;
/// @brief Passes the message to target, could be anything, HTTP packet, JSON or whatever.
static Bool Pass(IPC_MSG* self, IPC_MSG* target);
} PACKED ALIGN(8) IPC_MSG;
@@ -82,4 +80,4 @@ BOOL ipc_sanitize_packet(_Input IPC_MSG* pckt_in);
BOOL ipc_construct_packet(_Output _Input IPC_MSG** pckt_in);
} // namespace Kernel
-#endif // INC_IPC_H
+#endif // NETWORKKIT_IPC_H
diff --git a/src/kernel/amd64-ci.make b/src/kernel/amd64-ci.make
index 203d0dc9..ad0e96b3 100644
--- a/src/kernel/amd64-ci.make
+++ b/src/kernel/amd64-ci.make
@@ -5,7 +5,7 @@
CXX = x86_64-w64-mingw32-g++
LD = x86_64-w64-mingw32-ld
-CCFLAGS = -fshort-wchar -c -D__NE_AMD64__ -D__NEOSKRNL__ -D__NE_VEPM__ -Werror -Wall -Wpedantic -Wextra -mno-red-zone -fno-rtti -fno-exceptions -std=c++20 -D__NE_SUPPORT_NX__ -O0 -I../vendor -D__FSKIT_INCLUDES_NEFS__ -D__NEKERNEL__ -D__HAVE_NE_APIS__ -D__FREESTANDING__ -D__NE_VIRTUAL_MEMORY_SUPPORT__ -D__NE_AUTO_FORMAT__ -D__NE__ -I./ -I../ -I../boot
+CCFLAGS = -fshort-wchar -D__nekernel_max_cores=8 -c -D__NE_AMD64__ -D__NEOSKRNL__ -D__NE_VEPM__ -Werror -Wall -Wpedantic -Wextra -mno-red-zone -fno-rtti -fno-exceptions -std=c++20 -D__NE_SUPPORT_NX__ -O0 -I../vendor -D__FSKIT_INCLUDES_NEFS__ -D__NEKERNEL__ -D__HAVE_NE_APIS__ -D__FREESTANDING__ -D__NE_VIRTUAL_MEMORY_SUPPORT__ -D__NE_AUTO_FORMAT__ -D__NE__ -I./ -I../ -I../boot
ASM = nasm
diff --git a/src/kernel/src/BitMapMgr.cc b/src/kernel/src/BitMapMgr.cc
index d6541769..5cae02c1 100644
--- a/src/kernel/src/BitMapMgr.cc
+++ b/src/kernel/src/BitMapMgr.cc
@@ -78,17 +78,7 @@ namespace HAL {
auto FindBitMap(VoidPtr base_ptr, SizeT size, Bool wr, Bool user, SizeT pad) -> VoidPtr {
if (!size) return nullptr;
- if (kBitMapCursor > kKernelBitMpSize) {
- err_global_get() = kErrorOutOfBitMapMemory;
-
- (Void)(kout << "Bitmap limit reached, can't allocate more bitmaps." << kendl);
- return nullptr;
- }
-
VoidPtr base = reinterpret_cast<VoidPtr>(base_ptr);
- MUST_PASS(base);
-
- if (!base) return nullptr;
STATIC SizeT biggest = 0UL;
diff --git a/src/kernel/src/FS/OpenHeFS+FileMgr.cc b/src/kernel/src/FS/OpenHeFS+FileMgr.cc
index abe8164c..7008c491 100644
--- a/src/kernel/src/FS/OpenHeFS+FileMgr.cc
+++ b/src/kernel/src/FS/OpenHeFS+FileMgr.cc
@@ -49,7 +49,7 @@ NodePtr HeFileSystemMgr::Create(_Input const Char* path) {
return nullptr;
}
- // AMLALE: TODO, its own helper!
+ //TODO: its own helper!
SizeT len = oe_string_len<Char>(path);
#if defined(__clang__)
diff --git a/src/kernel/src/FS/OpenHeFS+FileSystemParser.cc b/src/kernel/src/FS/OpenHeFS+FileSystemParser.cc
index 8db1a01f..93cc5a63 100644
--- a/src/kernel/src/FS/OpenHeFS+FileSystemParser.cc
+++ b/src/kernel/src/FS/OpenHeFS+FileSystemParser.cc
@@ -876,7 +876,7 @@ _Output Bool HeFileSystemParser::Format(_Input _Output DriveTrait* mnt, _Input c
return NO;
}
- /// AMLALE: Better way to create default directories than before.
+ /// TODO: Better way to create default directories than before.
const Utf8Char* kFileMap[] = {u8"/", u8"/boot", u8"/system", u8"/network",
u8"/devices", u8"/media", u8"/dev", (Utf8Char*) nullptr};
diff --git a/src/kernel/src/HeapMgr.cc b/src/kernel/src/HeapMgr.cc
index be6c60bf..f549f60c 100644
--- a/src/kernel/src/HeapMgr.cc
+++ b/src/kernel/src/HeapMgr.cc
@@ -244,9 +244,9 @@ _Output Boolean mm_protect_ptr(VoidPtr heap_ptr) {
reinterpret_cast<Detail::MM_INFORMATION_BLOCK_PTR>((UIntPtr) heap_ptr -
sizeof(Detail::MM_INFORMATION_BLOCK));
- /// AMLALE: if valid, present and is heap header, then compute crc32
+ /// TODO: if valid, present and is heap header, then compute crc32
if (heap_info_ptr && heap_info_ptr->fPresent && kHeapMgrMagic == heap_info_ptr->fMagic) {
- /// AMLALE: Protect only the header, information in it may change.
+ /// TODO: Protect only the header, information in it may change.
heap_info_ptr->fCRC32 =
ke_calculate_crc32((Char*) heap_info_ptr, sizeof(Detail::MM_INFORMATION_BLOCK));
diff --git a/src/kernel/src/Network/IPCMessage.cc b/src/kernel/src/Network/IPCMessage.cc
index 6a565604..7db9f022 100644
--- a/src/kernel/src/Network/IPCMessage.cc
+++ b/src/kernel/src/Network/IPCMessage.cc
@@ -34,7 +34,7 @@ Bool ipc_int_sanitize_packet(IPC_MSG* pckt) {
goto ipc_check_failed;
}
- if (pckt->IpcFrom == pckt->IpcTo || pckt->IpcPacketSize > kIPCMsgSize) {
+ if (pckt->IpcFrom == pckt->IpcTo || pckt->IpcPacketSize < 1) {
goto ipc_check_failed;
}
@@ -115,7 +115,7 @@ Bool IPC_MSG::Pass(IPC_MSG* src, IPC_MSG* target) {
++target->IpcLock;
- rt_copy_memory_safe(src->IpcData, target->IpcData, src->IpcMsgSz, kIPCMsgSize);
+ rt_copy_memory_safe(src->IpcData, target->IpcData, src->IpcMsgSz, target->IpcMsgSz);
--target->IpcLock;