From 2067144d65049a99a81e8a3c89a7d930d8210ceb Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 3 Apr 2026 01:22:10 +0200 Subject: [FEAT] src: Introducing HAL.DLL for next NeKernel release. Signed-off-by: Amlal --- src/boot/amd64-desktop.make | 2 ++ src/boot/arm64-desktop.make | 3 +++ src/hal/HAL/HAL.h | 11 +++++++++++ src/hal/hal.dll.arm64.json | 21 +++++++++++++++++++++ src/hal/hal.dll.x64.json | 21 +++++++++++++++++++++ src/hal/src/AMD64/HalCoreSystemCalls+DDK.cpp | 8 ++++++++ src/hal/src/AMD64/HalCoreSystemCalls+LibSystem.cpp | 8 ++++++++ src/hal/src/AMD64/HalCoreSystemCalls+NeLaunch.cpp | 8 ++++++++ src/hal/src/ARM64/.keep | 0 src/kernel/HALKit/AMD64/HalCoreSystemCalls+DDK.cpp | 8 -------- .../HALKit/AMD64/HalCoreSystemCalls+NeLaunch.cpp | 8 -------- 11 files changed, 82 insertions(+), 16 deletions(-) create mode 100644 src/hal/HAL/HAL.h create mode 100644 src/hal/hal.dll.arm64.json create mode 100644 src/hal/hal.dll.x64.json create mode 100644 src/hal/src/AMD64/HalCoreSystemCalls+DDK.cpp create mode 100644 src/hal/src/AMD64/HalCoreSystemCalls+LibSystem.cpp create mode 100644 src/hal/src/AMD64/HalCoreSystemCalls+NeLaunch.cpp create mode 100644 src/hal/src/ARM64/.keep delete mode 100644 src/kernel/HALKit/AMD64/HalCoreSystemCalls+DDK.cpp delete mode 100644 src/kernel/HALKit/AMD64/HalCoreSystemCalls+NeLaunch.cpp (limited to 'src') 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 + +#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/hal/src/AMD64/HalCoreSystemCalls+DDK.cpp b/src/hal/src/AMD64/HalCoreSystemCalls+DDK.cpp new file mode 100644 index 00000000..8942c4db --- /dev/null +++ b/src/hal/src/AMD64/HalCoreSystemCalls+DDK.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 + +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 + +namespace Kernel {} diff --git a/src/hal/src/AMD64/HalCoreSystemCalls+NeLaunch.cpp b/src/hal/src/AMD64/HalCoreSystemCalls+NeLaunch.cpp new file mode 100644 index 00000000..61eebcc7 --- /dev/null +++ b/src/hal/src/AMD64/HalCoreSystemCalls+NeLaunch.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 + +namespace Kernel {} diff --git a/src/hal/src/ARM64/.keep b/src/hal/src/ARM64/.keep new file mode 100644 index 00000000..e69de29b diff --git a/src/kernel/HALKit/AMD64/HalCoreSystemCalls+DDK.cpp b/src/kernel/HALKit/AMD64/HalCoreSystemCalls+DDK.cpp deleted file mode 100644 index a0632ff0..00000000 --- a/src/kernel/HALKit/AMD64/HalCoreSystemCalls+DDK.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// 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 - -namespace Kernel {} \ No newline at end of file diff --git a/src/kernel/HALKit/AMD64/HalCoreSystemCalls+NeLaunch.cpp b/src/kernel/HALKit/AMD64/HalCoreSystemCalls+NeLaunch.cpp deleted file mode 100644 index 2a770052..00000000 --- a/src/kernel/HALKit/AMD64/HalCoreSystemCalls+NeLaunch.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// 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 - -namespace Kernel {} -- cgit v1.2.3