summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-27 15:09:30 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-27 15:09:30 +0200
commitcba3d0b854a1a9fbb0b0c82efb858fa9086b7284 (patch)
tree941b67d61941783f15875e63ebe9d2ff17585775 /dev/kernel
parent5fdab4a1c9c3df049e8e31a42784c05799ef44cd (diff)
fix: DBG_TRAP being called before IDT is setup.
refactor: rename HalSyscallEntry to HAL_DISPATCH_ENTRY. also: - Better hashing function in ArchKit: Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel')
-rw-r--r--dev/kernel/ArchKit/ArchKit.h10
-rw-r--r--dev/kernel/HALKit/AMD64/HalKernelMain.cc10
2 files changed, 7 insertions, 13 deletions
diff --git a/dev/kernel/ArchKit/ArchKit.h b/dev/kernel/ArchKit/ArchKit.h
index b6637ec1..09839d98 100644
--- a/dev/kernel/ArchKit/ArchKit.h
+++ b/dev/kernel/ArchKit/ArchKit.h
@@ -29,8 +29,8 @@
#define kMaxDispatchCallCount (512U)
namespace Kernel {
-inline SSizeT rt_hash_seed(const Char* seed, int mul) {
- SSizeT hash = 0;
+inline SizeT rt_hash_seed(const Char* seed, UInt32 mul) {
+ SizeT hash = 0;
for (SSizeT idx = 0; seed[idx] != 0; ++idx) {
hash += seed[idx];
@@ -69,7 +69,7 @@ namespace HAL {
typedef Kernel::Void (*rt_syscall_proc)(Kernel::VoidPtr);
-struct HalSyscallEntry final {
+struct HAL_DISPATCH_ENTRY final {
Kernel::Int64 fHash;
Kernel::Bool fHooked;
rt_syscall_proc fProc;
@@ -77,9 +77,9 @@ struct HalSyscallEntry final {
operator bool() { return fHooked; }
};
-inline Kernel::Array<HalSyscallEntry, kMaxDispatchCallCount> kSysCalls;
+inline Kernel::Array<HAL_DISPATCH_ENTRY, kMaxDispatchCallCount> kSysCalls;
-inline Kernel::Array<HalSyscallEntry, kMaxDispatchCallCount> kKernCalls;
+inline Kernel::Array<HAL_DISPATCH_ENTRY, kMaxDispatchCallCount> kKernCalls;
#ifdef __NE_VIRTUAL_MEMORY_SUPPORT__
diff --git a/dev/kernel/HALKit/AMD64/HalKernelMain.cc b/dev/kernel/HALKit/AMD64/HalKernelMain.cc
index edbe058a..97043227 100644
--- a/dev/kernel/HALKit/AMD64/HalKernelMain.cc
+++ b/dev/kernel/HALKit/AMD64/HalKernelMain.cc
@@ -146,17 +146,11 @@ EXTERN_C Kernel::Void hal_real_init(Kernel::Void) noexcept {
HAL::mp_init_cores(kHandoverHeader->f_HardwareTables.f_VendorPtr);
#ifdef __FSKIT_INCLUDES_HEFS__
- if (!HeFS::fs_init_hefs()) {
- kout << "HeFS cannot be formated on disk. Aborting\r";
- DBG_TRAP();
- }
+ HeFS::fs_init_hefs();
#endif
#ifdef __FSKIT_INCLUDES_NEFS__
- if (!NeFS::fs_init_nefs()) {
- kout << "NeFS cannot be formated on disk. Aborting\r";
- DBG_TRAP();
- }
+ NeFS::fs_init_nefs();
#endif
HAL::Register64 idt_reg;