summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2026-04-03 01:22:10 +0200
committerAmlal <amlalelmahrouss@icloud.com>2026-04-03 01:22:10 +0200
commit2067144d65049a99a81e8a3c89a7d930d8210ceb (patch)
tree63187d830e0080884a4f087c8bf6a0f728cbf547
parenta8de34d56d3da98ff151f7b237d86b6460bc04fc (diff)
[FEAT] src: Introducing HAL.DLL for next NeKernel release.
Signed-off-by: Amlal <amlalelmahrouss@icloud.com>
-rw-r--r--doc/requirements/HAL.dll.md10
-rw-r--r--src/boot/amd64-desktop.make2
-rw-r--r--src/boot/arm64-desktop.make3
-rw-r--r--src/hal/HAL/HAL.h11
-rw-r--r--src/hal/hal.dll.arm64.json21
-rw-r--r--src/hal/hal.dll.x64.json21
-rw-r--r--src/hal/src/AMD64/HalCoreSystemCalls+DDK.cpp (renamed from src/kernel/HALKit/AMD64/HalCoreSystemCalls+DDK.cpp)2
-rw-r--r--src/hal/src/AMD64/HalCoreSystemCalls+LibSystem.cpp8
-rw-r--r--src/hal/src/AMD64/HalCoreSystemCalls+NeLaunch.cpp (renamed from src/kernel/HALKit/AMD64/HalCoreSystemCalls+NeLaunch.cpp)2
-rw-r--r--src/hal/src/ARM64/.keep0
10 files changed, 78 insertions, 2 deletions
diff --git a/doc/requirements/HAL.dll.md b/doc/requirements/HAL.dll.md
new file mode 100644
index 00000000..2e211e51
--- /dev/null
+++ b/doc/requirements/HAL.dll.md
@@ -0,0 +1,10 @@
+# HAL.DLL Requirements:
+
+## Abstract:
+
+The `HAL.DLL` is the dynamic library providing hardware abstracted system calls and kernel calls for the operating system.
+It is a critical component that allows applications to interact with hardware without needing to manage hardware-specific details.
+
+## Notes:
+
+`HAL.dll` is a ring-0/privileged image. \ No newline at end of file
diff --git a/src/boot/amd64-desktop.make b/src/boot/amd64-desktop.make
index e842742f..228a8f49 100644
--- a/src/boot/amd64-desktop.make
+++ b/src/boot/amd64-desktop.make
@@ -80,6 +80,7 @@ SCIKIT=libSystem.dll
DDK=libDDK.dll
POSIXWRAPPER=libPOSIXWrapper.dll
PTHREAD=libPThread.dll
+HAL=hal.x64.dll
.PHONY: invalid-recipe
invalid-recipe:
@@ -99,6 +100,7 @@ all: compile-amd64
$(COPY) ../libSystem/$(SCIKIT) src/root/$(SCIKIT)
$(COPY) ../libPOSIXWrapper/$(POSIXWRAPPER) src/root/$(POSIXWRAPPER)
# $(COPY) ../libPThread/$(PTHREAD) src/root/$(PTHREAD)
+ # $(COPY) ../hal/$(HAL) src/root/$(HAL)
$(COPY) src/$(BOOTLOADER) src/root/$(BOOTLOADER)
$(COPY) ../libDDK/$(DDK) src/root/$(DDK)
diff --git a/src/boot/arm64-desktop.make b/src/boot/arm64-desktop.make
index d74f775c..01282950 100644
--- a/src/boot/arm64-desktop.make
+++ b/src/boot/arm64-desktop.make
@@ -51,6 +51,7 @@ BOOT_LOADER=bootzldr.exe
KERNEL_IMG=neoskrnl.exe
SYSCHK=chk.efi
STARTUP=startup.efi
+HAL=hal.arm64.dll
.PHONY: invalid-recipe
invalid-recipe:
@@ -65,6 +66,8 @@ all: compile
$(COPY) ../kernel/$(KERNEL_IMG) src/root/$(KERNEL_IMG)
$(COPY) ./modules/SysChk/$(SYSCHK) src/root/$(SYSCHK)
$(COPY) src/$(BOOT_LOADER) src/root/$(BOOT_LOADER)
+ # $(COPY) ../libPThread/$(PTHREAD) src/root/$(PTHREAD)
+ # $(COPY) ../hal/$(HAL) src/root/$(HAL)
ifneq ($(DEBUG_SUPPORT), )
DEBUG = -D__DEBUG__
diff --git a/src/hal/HAL/HAL.h b/src/hal/HAL/HAL.h
new file mode 100644
index 00000000..485eb5d6
--- /dev/null
+++ b/src/hal/HAL/HAL.h
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (see LICENSE file)
+// Official repository: https://github.com/ne-foss-org/ne-kernel
+
+#ifndef HAL_HAL_H
+#define HAL_HAL_H
+
+#include <ArchKit/ArchKit.h>
+
+#endif \ No newline at end of file
diff --git a/src/hal/hal.dll.arm64.json b/src/hal/hal.dll.arm64.json
new file mode 100644
index 00000000..2d36e240
--- /dev/null
+++ b/src/hal/hal.dll.arm64.json
@@ -0,0 +1,21 @@
+{
+ "compiler_path": "x86_64-w64-mingw32-g++",
+ "compiler_std": "c++20",
+ "headers_path": [ "../", "./" ],
+ "sources_path": [ "AMD64/*.cpp" ],
+ "output_name": "hal.arm64.dll",
+ "compiler_flags": [
+ "-ffreestanding",
+ "-shared",
+ "-fPIC",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-Wl,--subsystem=17"
+ ],
+ "cpp_macros": [
+ "kHALVersion=0x0100",
+ "kHALVersionHighest=0x0100",
+ "kHALVersionLowest=0x0100"
+ ],
+ "description": "The NeSystem Hardware Abstraction Layer."
+}
diff --git a/src/hal/hal.dll.x64.json b/src/hal/hal.dll.x64.json
new file mode 100644
index 00000000..be49a29c
--- /dev/null
+++ b/src/hal/hal.dll.x64.json
@@ -0,0 +1,21 @@
+{
+ "compiler_path": "x86_64-w64-mingw32-g++",
+ "compiler_std": "c++20",
+ "headers_path": [ "../", "./" ],
+ "sources_path": [ "AMD64/*.cpp" ],
+ "output_name": "hal.x64.dll",
+ "compiler_flags": [
+ "-ffreestanding",
+ "-shared",
+ "-fPIC",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-Wl,--subsystem=17"
+ ],
+ "cpp_macros": [
+ "kHALVersion=0x0100",
+ "kHALVersionHighest=0x0100",
+ "kHALVersionLowest=0x0100"
+ ],
+ "description": "The NeSystem Hardware Abstraction Layer."
+}
diff --git a/src/kernel/HALKit/AMD64/HalCoreSystemCalls+DDK.cpp b/src/hal/src/AMD64/HalCoreSystemCalls+DDK.cpp
index a0632ff0..8942c4db 100644
--- a/src/kernel/HALKit/AMD64/HalCoreSystemCalls+DDK.cpp
+++ b/src/hal/src/AMD64/HalCoreSystemCalls+DDK.cpp
@@ -3,6 +3,6 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/ne-foss-org/nekernel
-#include <ArchKit/ArchKit.h>
+#include <hal/HAL/HAL.h>
namespace Kernel {} \ No newline at end of file
diff --git a/src/hal/src/AMD64/HalCoreSystemCalls+LibSystem.cpp b/src/hal/src/AMD64/HalCoreSystemCalls+LibSystem.cpp
new file mode 100644
index 00000000..61eebcc7
--- /dev/null
+++ b/src/hal/src/AMD64/HalCoreSystemCalls+LibSystem.cpp
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (see LICENSE file)
+// Official repository: https://github.com/ne-foss-org/nekernel
+
+#include <hal/HAL/HAL.h>
+
+namespace Kernel {}
diff --git a/src/kernel/HALKit/AMD64/HalCoreSystemCalls+NeLaunch.cpp b/src/hal/src/AMD64/HalCoreSystemCalls+NeLaunch.cpp
index 2a770052..61eebcc7 100644
--- a/src/kernel/HALKit/AMD64/HalCoreSystemCalls+NeLaunch.cpp
+++ b/src/hal/src/AMD64/HalCoreSystemCalls+NeLaunch.cpp
@@ -3,6 +3,6 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/ne-foss-org/nekernel
-#include <ArchKit/ArchKit.h>
+#include <hal/HAL/HAL.h>
namespace Kernel {}
diff --git a/src/hal/src/ARM64/.keep b/src/hal/src/ARM64/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/hal/src/ARM64/.keep