summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-17 10:05:07 +0100
committerGitHub <noreply@github.com>2025-11-17 10:05:07 +0100
commit062c4bb508bf6ec7334d374fef2e0e10623b2df9 (patch)
tree137a91eb22d1a9207fd4322ced08c3b6388c5eb5
parent36269e57831e560df6a0da9c9d02c00671b0163d (diff)
parent791fcd646503f05617f22e6006c115095746da26 (diff)
Merge pull request #69 from nekernel-org/dev
release: NeKernel v0.0.7
-rw-r--r--.gitignore1
-rw-r--r--CITATION.cff6
-rw-r--r--LICENSE876
-rw-r--r--README.md6
-rw-r--r--compile_flags.txt4
-rw-r--r--dev/boot/BootKit/BitManip.h2
-rw-r--r--dev/boot/BootKit/BootKit.h2
-rw-r--r--dev/boot/BootKit/BootThread.h2
-rw-r--r--dev/boot/BootKit/Device.h2
-rw-r--r--dev/boot/BootKit/EPM.h2
-rw-r--r--dev/boot/BootKit/HW/ATA.h2
-rw-r--r--dev/boot/BootKit/HW/SATA.h2
-rw-r--r--dev/boot/BootKit/Platform.h2
-rw-r--r--dev/boot/BootKit/Protocol.h2
-rw-r--r--dev/boot/BootKit/Qr.h4
-rw-r--r--dev/boot/BootKit/Support.h2
-rw-r--r--dev/boot/amd64-ci.make2
-rw-r--r--dev/boot/amd64-desktop.make4
-rw-r--r--dev/boot/arm64-desktop.make2
-rw-r--r--dev/boot/modules/BootNet/BootNet.cc2
-rw-r--r--dev/boot/modules/BootNet/BootNet.h2
-rw-r--r--dev/boot/modules/BootNet/BootNetStartup.S2
-rw-r--r--dev/boot/modules/SysChk/SysChk.cc2
-rw-r--r--dev/boot/modules/SysChk/SysChkStartup.S2
-rw-r--r--dev/boot/src/BootFileReader.cc4
-rw-r--r--dev/boot/src/BootString.cc2
-rw-r--r--dev/boot/src/BootSupport.cc2
-rw-r--r--dev/boot/src/BootTextWriter.cc2
-rw-r--r--dev/boot/src/BootThread.cc2
-rw-r--r--dev/boot/src/HEL/64X000/BootCB.S2
-rw-r--r--dev/boot/src/HEL/AMD64/BootATA.cc2
-rw-r--r--dev/boot/src/HEL/AMD64/BootEFI.cc4
-rw-r--r--dev/boot/src/HEL/AMD64/BootPlatform.cc2
-rw-r--r--dev/boot/src/HEL/AMD64/BootSATA.cc8
-rw-r--r--dev/boot/src/HEL/ARM64/BootEFI.cc2
-rw-r--r--dev/boot/src/HEL/ARM64/BootNB.S2
-rw-r--r--dev/boot/src/HEL/ARM64/BootPlatform.cc2
-rw-r--r--dev/boot/src/HEL/POWER/BootNB.S2
-rw-r--r--dev/boot/src/New+Delete.cc2
-rw-r--r--dev/boot/src/boot_rsrc.rsrc2
-rw-r--r--dev/boot/src/docs/KERN_VER.md2
-rw-r--r--dev/boot/src/docs/MKFS_HEFS.md2
-rw-r--r--dev/hint/CompilerHint.h2
-rw-r--r--dev/kernel/ArchKit/ArchKit.h2
-rw-r--r--dev/kernel/CFKit/GUIDWizard.h2
-rw-r--r--dev/kernel/CFKit/GUIDWrapper.h2
-rw-r--r--dev/kernel/CFKit/Property.h2
-rw-r--r--dev/kernel/CompilerKit/CompilerKit.h2
-rw-r--r--dev/kernel/CompilerKit/Detail.h2
-rw-r--r--dev/kernel/DmaKit/DmaPool.h8
-rw-r--r--dev/kernel/FSKit/Defines.h2
-rw-r--r--dev/kernel/FSKit/Ext2+IFS.h2
-rw-r--r--dev/kernel/FSKit/Ext2.h2
-rw-r--r--dev/kernel/FSKit/IndexableProperty.h2
-rw-r--r--dev/kernel/FSKit/NeFS.h2
-rw-r--r--dev/kernel/FSKit/OpenHeFS.h4
-rw-r--r--dev/kernel/FirmwareKit/EFI.h2
-rw-r--r--dev/kernel/FirmwareKit/EFI/API.h2
-rw-r--r--dev/kernel/FirmwareKit/EFI/EFI.h2
-rw-r--r--dev/kernel/FirmwareKit/EFI/NS.h2
-rw-r--r--dev/kernel/FirmwareKit/EPM.h4
-rw-r--r--dev/kernel/FirmwareKit/GPT.h2
-rw-r--r--dev/kernel/FirmwareKit/Handover.h2
-rw-r--r--dev/kernel/FirmwareKit/NeBoot/BootNet.h2
-rw-r--r--dev/kernel/FirmwareKit/NeBoot/NS.h2
-rw-r--r--dev/kernel/FirmwareKit/NeBoot/NeBoot.h2
-rw-r--r--dev/kernel/FirmwareKit/VEPM.h2
-rw-r--r--dev/kernel/GfxKit/FB.h2
-rw-r--r--dev/kernel/HALKit/AMD64/CPUID.h2
-rw-r--r--dev/kernel/HALKit/AMD64/CxxAbi.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalACPIFactoryInterface.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalAPICDmaWrapper.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalCommonAPI.asm2
-rw-r--r--dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s2
-rw-r--r--dev/kernel/HALKit/AMD64/HalCoreInterruptHandler.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalCoreSystemCalls.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalDebugOutput.cc10
-rw-r--r--dev/kernel/HALKit/AMD64/HalDebugProtocol.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalHandoverStub.asm2
-rw-r--r--dev/kernel/HALKit/AMD64/HalInterruptAPI.asm2
-rw-r--r--dev/kernel/HALKit/AMD64/HalKernelMain.cc8
-rw-r--r--dev/kernel/HALKit/AMD64/HalKernelPanic.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalPagingMgr.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalProcessor.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitives.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalTimer.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/HalUtilsAPI.asm2
-rw-r--r--dev/kernel/HALKit/AMD64/Hypervisor.h2
-rw-r--r--dev/kernel/HALKit/AMD64/Network/Generic+Basic+RTL8139.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/PCI/DMA.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/PCI/Database.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/PCI/Device.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/PCI/Express.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/PCI/IO.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/PCI/Iterator.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/PCI/PCI.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/Paging.h24
-rw-r--r--dev/kernel/HALKit/AMD64/Processor.h2
-rw-r--r--dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc23
-rw-r--r--dev/kernel/HALKit/AMD64/Storage/DMA+Generic.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/Storage/NVME+Generic.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/Storage/SCSI+Generic.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/APM/APM+IO.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/ApplicationProcessor.h2
-rw-r--r--dev/kernel/HALKit/ARM64/CxxAbi.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/HalACPIFactoryInterface.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/HalApplicationProcessor.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/HalCoreInterruptHandler.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/HalDebugOutput.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/HalHandoverStub.s2
-rw-r--r--dev/kernel/HALKit/ARM64/HalKernelMain.cc4
-rw-r--r--dev/kernel/HALKit/ARM64/HalKernelPanic.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/HalPagingMgr.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/HalSchedulerCore.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/HalSchedulerCorePrimitives.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/HalTimer.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/Paging.h2
-rw-r--r--dev/kernel/HALKit/ARM64/Processor.h2
-rw-r--r--dev/kernel/HALKit/ARM64/Storage/SCSI+Generic.cc2
-rw-r--r--dev/kernel/HALKit/ARM64/Storage/UFS+Generic.cc2
-rw-r--r--dev/kernel/HALKit/POWER/AP.h2
-rw-r--r--dev/kernel/HALKit/POWER/HalApplicationProcessor.cc2
-rw-r--r--dev/kernel/HALKit/POWER/HalDebugOutput.cc2
-rw-r--r--dev/kernel/HALKit/POWER/HalHardwareThread.cc2
-rw-r--r--dev/kernel/HALKit/POWER/HalStartSequence.s2
-rw-r--r--dev/kernel/HALKit/POWER/HalVirtualMemory.cc2
-rw-r--r--dev/kernel/HALKit/POWER/Processor.h2
-rw-r--r--dev/kernel/HALKit/RISCV/AP.h2
-rw-r--r--dev/kernel/HALKit/RISCV/HalApplicationProcessor.cc2
-rw-r--r--dev/kernel/KernelKit/BinaryMutex.h2
-rw-r--r--dev/kernel/KernelKit/CodeMgr.h6
-rw-r--r--dev/kernel/KernelKit/CoreProcessScheduler.h2
-rw-r--r--dev/kernel/KernelKit/DebugOutput.h4
-rw-r--r--dev/kernel/KernelKit/Defines.h2
-rw-r--r--dev/kernel/KernelKit/DeviceMgr.h2
-rw-r--r--dev/kernel/KernelKit/DriveMgr.h4
-rw-r--r--dev/kernel/KernelKit/FileMgr.h6
-rw-r--r--dev/kernel/KernelKit/HardwareThreadScheduler.h2
-rw-r--r--dev/kernel/KernelKit/HeapMgr.h2
-rw-r--r--dev/kernel/KernelKit/HeapMgr.inl2
-rw-r--r--dev/kernel/KernelKit/IDylibObject.h2
-rw-r--r--dev/kernel/KernelKit/IFS.h2
-rw-r--r--dev/kernel/KernelKit/ILoader.h2
-rw-r--r--dev/kernel/KernelKit/IPEFDylibObject.h2
-rw-r--r--dev/kernel/KernelKit/KPC.h2
-rw-r--r--dev/kernel/KernelKit/KernelTaskScheduler.h4
-rw-r--r--dev/kernel/KernelKit/LockDelegate.h2
-rw-r--r--dev/kernel/KernelKit/MSDOS.h2
-rw-r--r--dev/kernel/KernelKit/PCI/DMA.h2
-rw-r--r--dev/kernel/KernelKit/PCI/DMA.inl2
-rw-r--r--dev/kernel/KernelKit/PCI/Database.h2
-rw-r--r--dev/kernel/KernelKit/PCI/Device.h2
-rw-r--r--dev/kernel/KernelKit/PCI/Express.h2
-rw-r--r--dev/kernel/KernelKit/PCI/IO.h2
-rw-r--r--dev/kernel/KernelKit/PCI/IOArray+AMD64.inl2
-rw-r--r--dev/kernel/KernelKit/PCI/Iterator.h2
-rw-r--r--dev/kernel/KernelKit/PCI/PCI.h2
-rw-r--r--dev/kernel/KernelKit/PE.h2
-rw-r--r--dev/kernel/KernelKit/PE32CodeMgr.h91
-rw-r--r--dev/kernel/KernelKit/PEF.h2
-rw-r--r--dev/kernel/KernelKit/PEFCodeMgr.h4
-rw-r--r--dev/kernel/KernelKit/ProcessScheduler.h2
-rw-r--r--dev/kernel/KernelKit/Semaphore.h2
-rw-r--r--dev/kernel/KernelKit/ThreadLocalStorage.h2
-rw-r--r--dev/kernel/KernelKit/ThreadLocalStorage.inl2
-rw-r--r--dev/kernel/KernelKit/Timer.h2
-rw-r--r--dev/kernel/KernelKit/TraceSrv.h22
-rw-r--r--dev/kernel/KernelKit/UserMgr.h4
-rw-r--r--dev/kernel/KernelKit/UserProcessScheduler.h2
-rw-r--r--dev/kernel/KernelKit/UserProcessScheduler.inl2
-rw-r--r--dev/kernel/KernelKit/XCOFF.h2
-rw-r--r--dev/kernel/KernelKit/ZXD.h2
-rw-r--r--dev/kernel/NeKit/Array.h2
-rw-r--r--dev/kernel/NeKit/ArrayList.h2
-rw-r--r--dev/kernel/NeKit/Atom.h2
-rw-r--r--dev/kernel/NeKit/Crc32.h2
-rw-r--r--dev/kernel/NeKit/CxxAbi.h2
-rw-r--r--dev/kernel/NeKit/Defines.h2
-rw-r--r--dev/kernel/NeKit/ErrorOr.h9
-rw-r--r--dev/kernel/NeKit/Function.h2
-rw-r--r--dev/kernel/NeKit/Json.h2
-rw-r--r--dev/kernel/NeKit/KString.h2
-rw-r--r--dev/kernel/NeKit/KString.inl2
-rw-r--r--dev/kernel/NeKit/KernelPanic.h2
-rw-r--r--dev/kernel/NeKit/Macros.h2
-rw-r--r--dev/kernel/NeKit/MutableArray.h2
-rw-r--r--dev/kernel/NeKit/NeKit.h2
-rw-r--r--dev/kernel/NeKit/New.h2
-rw-r--r--dev/kernel/NeKit/OwnPtr.h2
-rw-r--r--dev/kernel/NeKit/PageMgr.h2
-rw-r--r--dev/kernel/NeKit/Pair.h2
-rw-r--r--dev/kernel/NeKit/Pmm.h2
-rw-r--r--dev/kernel/NeKit/Ref.h2
-rw-r--r--dev/kernel/NeKit/Stream.h2
-rw-r--r--dev/kernel/NeKit/Utils.h2
-rw-r--r--dev/kernel/NeKit/Variant.h2
-rw-r--r--dev/kernel/NetworkKit/IP.h2
-rw-r--r--dev/kernel/NetworkKit/IPC.h2
-rw-r--r--dev/kernel/NetworkKit/LTE.h2
-rw-r--r--dev/kernel/NetworkKit/MAC.h2
-rw-r--r--dev/kernel/NetworkKit/NetworkDevice.h2
-rw-r--r--dev/kernel/NetworkKit/NetworkDevice.inl2
-rw-r--r--dev/kernel/SignalKit/Signals.h2
-rw-r--r--dev/kernel/StorageKit/AHCI.h2
-rw-r--r--dev/kernel/StorageKit/ATA.h2
-rw-r--r--dev/kernel/StorageKit/NVME.h2
-rw-r--r--dev/kernel/StorageKit/PRDT.h2
-rw-r--r--dev/kernel/StorageKit/SCSI.h2
-rw-r--r--dev/kernel/StorageKit/StorageKit.h2
-rw-r--r--dev/kernel/SwapKit/DiskSwap.h2
-rw-r--r--dev/kernel/amd64-ci.make2
-rw-r--r--dev/kernel/amd64-desktop.make4
-rw-r--r--dev/kernel/arm64-desktop.make2
-rw-r--r--dev/kernel/kernel_rsrc.rsrc2
-rw-r--r--dev/kernel/power64-cb.make2
-rw-r--r--dev/kernel/src/ACPIFactoryInterface.cc2
-rw-r--r--dev/kernel/src/Array.cc2
-rw-r--r--dev/kernel/src/ArrayList.cc2
-rw-r--r--dev/kernel/src/AsciiUtils.cc2
-rw-r--r--dev/kernel/src/Atom.cc2
-rw-r--r--dev/kernel/src/BinaryMutex.cc2
-rw-r--r--dev/kernel/src/BitMapMgr.cc2
-rw-r--r--dev/kernel/src/CodeMgr.cc2
-rw-r--r--dev/kernel/src/Crc32.cc2
-rw-r--r--dev/kernel/src/Defines.cc2
-rw-r--r--dev/kernel/src/DeviceMgr.cc2
-rw-r--r--dev/kernel/src/DriveMgr.cc19
-rw-r--r--dev/kernel/src/ErrorOr.cc2
-rw-r--r--dev/kernel/src/FS/Ext2+IFS.cc2
-rw-r--r--dev/kernel/src/FS/NeFS+FileMgr.cc2
-rw-r--r--dev/kernel/src/FS/NeFS+FileSystemParser.cc2
-rw-r--r--dev/kernel/src/FS/OpenHeFS+FileMgr.cc6
-rw-r--r--dev/kernel/src/FS/OpenHeFS+FileSystemParser.cc14
-rw-r--r--dev/kernel/src/FileMgr.cc2
-rw-r--r--dev/kernel/src/GUIDWizard.cc2
-rw-r--r--dev/kernel/src/GUIDWrapper.cc2
-rw-r--r--dev/kernel/src/Gfx/FBDeviceInterface.cc2
-rw-r--r--dev/kernel/src/HardwareThreadScheduler.cc2
-rw-r--r--dev/kernel/src/HeapMgr.cc2
-rw-r--r--dev/kernel/src/IDylibObject.cc2
-rw-r--r--dev/kernel/src/IFS.cc4
-rw-r--r--dev/kernel/src/IPEFDylibObject.cc2
-rw-r--r--dev/kernel/src/IndexableProperty.cc2
-rw-r--r--dev/kernel/src/Json.cc2
-rw-r--r--dev/kernel/src/KPC.cc2
-rw-r--r--dev/kernel/src/KernelTaskScheduler.cc2
-rw-r--r--dev/kernel/src/LockDelegate.cc2
-rw-r--r--dev/kernel/src/MutableArray.cc2
-rw-r--r--dev/kernel/src/Network/IPAddress.cc2
-rw-r--r--dev/kernel/src/Network/IPCAddress.cc2
-rw-r--r--dev/kernel/src/Network/IPCMessage.cc2
-rw-r--r--dev/kernel/src/Network/MACAddressGetter.cc2
-rw-r--r--dev/kernel/src/Network/NetworkDevice.cc2
-rw-r--r--dev/kernel/src/New+Delete.cc2
-rw-r--r--dev/kernel/src/OwnPtr.cc2
-rw-r--r--dev/kernel/src/PE32CodeMgr.cc258
-rw-r--r--dev/kernel/src/PEFCodeMgr.cc8
-rw-r--r--dev/kernel/src/PRDT.cc2
-rw-r--r--dev/kernel/src/PageMgr.cc2
-rw-r--r--dev/kernel/src/Pmm.cc2
-rw-r--r--dev/kernel/src/Property.cc2
-rw-r--r--dev/kernel/src/Ref.cc2
-rw-r--r--dev/kernel/src/Semaphore.cc2
-rw-r--r--dev/kernel/src/SoftwareTimer.cc2
-rw-r--r--dev/kernel/src/Storage/AHCIDeviceInterface.cc2
-rw-r--r--dev/kernel/src/Storage/ATADeviceInterface.cc2
-rw-r--r--dev/kernel/src/Storage/NVMEDeviceInterface.cc2
-rw-r--r--dev/kernel/src/Storage/SCSIDeviceInterface.cc2
-rw-r--r--dev/kernel/src/Stream.cc2
-rw-r--r--dev/kernel/src/Swap/DiskSwap.cc2
-rw-r--r--dev/kernel/src/ThreadLocalStorage.cc2
-rw-r--r--dev/kernel/src/Timer.cc2
-rw-r--r--dev/kernel/src/UserMgr.cc13
-rw-r--r--dev/kernel/src/UserProcessScheduler.cc8
-rw-r--r--dev/kernel/src/UserProcessTeam.cc2
-rw-r--r--dev/kernel/src/UtfUtils.cc2
-rw-r--r--dev/kernel/src/Variant.cc2
-rw-r--r--dev/kernel/src/ZXD.cc2
-rw-r--r--dev/launch/LaunchKit/Foundation.h2
-rw-r--r--dev/launch/src/AppMain.cc4
-rw-r--r--dev/launch/src/CRuntimeZero.S2
-rw-r--r--dev/libDDK/DriverKit/ddk.h2
-rw-r--r--dev/libDDK/DriverKit/dki/contract.h4
-rw-r--r--dev/libDDK/DriverKit/macros.h8
-rw-r--r--dev/libDDK/docs/SPECIFICATION_DDK.md2
-rw-r--r--dev/libMsg/MsgKit/Network.h2
-rw-r--r--dev/libMsg/MsgKit/Server.h4
-rw-r--r--dev/libSystem/SystemKit/Err.h2
-rw-r--r--dev/libSystem/SystemKit/Jail.h2
-rw-r--r--dev/libSystem/SystemKit/Macros.h2
-rw-r--r--dev/libSystem/SystemKit/Syscall.h2
-rw-r--r--dev/libSystem/SystemKit/System.h2
-rw-r--r--dev/libSystem/SystemKit/Verify.h2
-rw-r--r--dev/libSystem/src/JailCalls.cc2
-rw-r--r--dev/libSystem/src/Makefile2
-rw-r--r--dev/libSystem/src/SystemCalls.cc19
-rw-r--r--dev/libSystem/src/SystemCallsABI+AMD64.asm2
-rw-r--r--dev/libSystem/src/Utils.cc29
-rw-r--r--dev/libSystem/src/VerifyCalls.cc2
-rw-r--r--dev/misc/BenchKit/Chronometer.h2
-rw-r--r--dev/misc/BenchKit/HWChronometer.h2
-rw-r--r--dev/modules/ACPI/ACPI.h2
-rw-r--r--dev/modules/ACPI/ACPIFactoryInterface.h2
-rw-r--r--dev/modules/AHCI/AHCI.h2
-rw-r--r--dev/modules/APM/APM.h6
-rw-r--r--dev/modules/ATA/ATA.h2
-rw-r--r--dev/modules/CoreGfx/CoreAccess.h8
-rw-r--r--dev/modules/CoreGfx/CoreGfx.h16
-rw-r--r--dev/modules/CoreGfx/MathGfx.h6
-rw-r--r--dev/modules/CoreGfx/TextGfx.h8
-rw-r--r--dev/modules/HPET/Defines.h2
-rw-r--r--dev/modules/LTE/LTE.h2
-rw-r--r--dev/modules/MBCI/MBCI.h2
-rw-r--r--dev/modules/NVME/NVME.h4
-rw-r--r--dev/modules/Power/PowerFactory.h8
-rw-r--r--dev/modules/SCSI/SCSI.h7
-rw-r--r--dev/modules/XHCI/XHCI.h6
-rw-r--r--docs/STANDARD_FWRK.md283
-rw-r--r--docs/drawio/GUI_DESIGN.drawio6
-rw-r--r--docs/drawio/LAUNCH_DESIGN.drawio22
-rw-r--r--docs/tex/binary_mutex.tex6
-rw-r--r--docs/tex/core_process_scheduler.tex2
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Array.h2
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Atom.h2
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h2
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Foundation.h2
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Object.h2
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Property.h2
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Ref.h2
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/String.h2
-rw-r--r--public/frameworks/CoreFoundation.fwrk/src/Foundation.cc2
-rw-r--r--public/frameworks/DiskImage.fwrk/headers/DiskImage.h2
-rw-r--r--public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc2
-rw-r--r--public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc2
-rw-r--r--public/frameworks/DiskImage.fwrk/src/DiskImage+NeFS.cc2
-rw-r--r--public/frameworks/KernelTest.fwrk/headers/KernelTest.h2
-rw-r--r--public/frameworks/KernelTest.fwrk/src/UnitTests.cc2
-rw-r--r--public/tools/diutil/src/CommandLine.cc2
-rw-r--r--public/tools/ld.dyn/src/CommandLine.cc2
-rw-r--r--public/tools/ld.fwrk/src/CommandLine.cc2
-rw-r--r--public/tools/mgmt.oe/src/CommandLine.cc2
-rw-r--r--public/tools/mk.fwrk/src/CommandLine.cc2
-rw-r--r--public/tools/open/src/CommandLine.cc2
-rw-r--r--public/vendor/.keep (renamed from dev/modules/HPET/.gitkeep)0
-rw-r--r--tools/chk.hefs.cc (renamed from tools/fsck.hefs.cc)10
-rw-r--r--tools/chk.hefs.json (renamed from tools/fsck.hefs.json)4
-rw-r--r--tools/libmkfs/mkfs.h7
-rw-r--r--tools/libmkfs/openhefs.h2
-rw-r--r--tools/mkfs.hefs.cc49
352 files changed, 1399 insertions, 1197 deletions
diff --git a/.gitignore b/.gitignore
index 329688e2..fcd84d09 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,7 @@ neoskrnl/neoskrnl.xcodeproj/project.xcworkspace/xcshareddata/
tools/dist/mkfs.*
tools/dist/fsck.*
+tools/dist/chk.*
html/
latex/
diff --git a/CITATION.cff b/CITATION.cff
index 5725fd6a..c52e8dde 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -2,7 +2,7 @@
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
-title: NeKernel.org Operating System Kernel
+title: NeKernel.org Operating System Kernel in C++
message: The Operating System Kernel of NeKernel.org
type: software
authors:
@@ -12,7 +12,7 @@ authors:
identifiers:
- type: url
value: 'https://nekernel.org'
- description: NeKernel's website.
+ description: NeKernel Website.
repository-code: 'https://github.com/nekernel-org/nekernel'
url: 'https://nekernel.org'
abstract: >-
@@ -22,4 +22,4 @@ keywords:
- kernel
- operating-system
- cpp
-license: GPL-3.0
+license: Apache-2.0
diff --git a/LICENSE b/LICENSE
index f288702d..7a4a3ea2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,674 +1,202 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<https://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<https://www.gnu.org/licenses/why-not-lgpl.html>.
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. \ No newline at end of file
diff --git a/README.md b/README.md
index 30495c8b..70a1ab27 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
<p>
<a href="https://github.com/nekernel-org/nekernel/actions/workflows/boot-pio.yml"><img src="https://github.com/amlel-el-mahrouss/nekernel/actions/workflows/boot-pio.yml/badge.svg" alt="CI"></a>
<a href="https://github.com/nekernel-org/nekernel/actions/workflows/kernel-ahci.yml"><img src="https://github.com/amlel-el-mahrouss/nekernel/actions/workflows/kernel-ahci.yml/badge.svg" alt="CI"></a>
- <a href="LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-blue.svg" alt="License"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License"></a>
<img src="https://img.shields.io/badge/QEMU-Tested-success" alt="QEMU Tested">
</p>
</div>
@@ -109,12 +109,12 @@ cd nekernel
## License
-This project is licensed under the [GPL-3.0 License](LICENSE).
+This project is licensed under the [Apache-2.0 License](LICENSE).
---
<div align="center">
<sub>
- &copy; 2024-2025 Amlal El Mahrouss & NeKernel contributors. All rights reserved.
+ &copy; 2024-2025 Amlal El Mahrouss & NeKernel contributors. Licensed under the Apache 2.0 license.
</sub>
</div>
diff --git a/compile_flags.txt b/compile_flags.txt
index 384cd84e..426c43f7 100644
--- a/compile_flags.txt
+++ b/compile_flags.txt
@@ -4,7 +4,7 @@
-Idev/boot
-Idev/launch
-Idev/misc
--Idev/ddk
+-Idev/libDDK
-Ipublic/tools
-Ipublic/tools/mk.app
-Ipublic/tools/mk.fwrk
@@ -30,7 +30,7 @@
-Wall
-Wpedantic
-Wextra
--D__FSKIT_INCLUDES_HEFS__
+-D__FSKIT_INCLUDES_OPENHEFS__
-D__FSKIT_INCLUDES_NEFS__
-D__FSKIT_INCLUDES_EXT2__
-D__NE_VIRTUAL_MEMORY_SUPPORT__
diff --git a/dev/boot/BootKit/BitManip.h b/dev/boot/BootKit/BitManip.h
index 196953b3..ad7eb46b 100644
--- a/dev/boot/BootKit/BitManip.h
+++ b/dev/boot/BootKit/BitManip.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/BootKit/BootKit.h b/dev/boot/BootKit/BootKit.h
index 68e4b484..12ce305e 100644
--- a/dev/boot/BootKit/BootKit.h
+++ b/dev/boot/BootKit/BootKit.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/BootKit/BootThread.h b/dev/boot/BootKit/BootThread.h
index b1b801d5..51b9d06c 100644
--- a/dev/boot/BootKit/BootThread.h
+++ b/dev/boot/BootKit/BootThread.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/BootKit/Device.h b/dev/boot/BootKit/Device.h
index 9a80e3c9..be56ba08 100644
--- a/dev/boot/BootKit/Device.h
+++ b/dev/boot/BootKit/Device.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/BootKit/EPM.h b/dev/boot/BootKit/EPM.h
index 907f36e3..b1ce4c7c 100644
--- a/dev/boot/BootKit/EPM.h
+++ b/dev/boot/BootKit/EPM.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/BootKit/HW/ATA.h b/dev/boot/BootKit/HW/ATA.h
index adb5c899..9bb11818 100644
--- a/dev/boot/BootKit/HW/ATA.h
+++ b/dev/boot/BootKit/HW/ATA.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/BootKit/HW/SATA.h b/dev/boot/BootKit/HW/SATA.h
index d880c3af..57040857 100644
--- a/dev/boot/BootKit/HW/SATA.h
+++ b/dev/boot/BootKit/HW/SATA.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/BootKit/Platform.h b/dev/boot/BootKit/Platform.h
index fdef85cb..614e5976 100644
--- a/dev/boot/BootKit/Platform.h
+++ b/dev/boot/BootKit/Platform.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/BootKit/Protocol.h b/dev/boot/BootKit/Protocol.h
index 4341a347..673d0c3c 100644
--- a/dev/boot/BootKit/Protocol.h
+++ b/dev/boot/BootKit/Protocol.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/BootKit/Qr.h b/dev/boot/BootKit/Qr.h
index 2dcfc5fe..f537aa5e 100644
--- a/dev/boot/BootKit/Qr.h
+++ b/dev/boot/BootKit/Qr.h
@@ -306,7 +306,7 @@ template <int V>
bool Qr<V>::draw(int whereX, int whereY) noexcept {
if (!this->status) return false; // it may be invalid.
- fb_init();
+ cg_init();
for (int y = 0; y < (this->side_size()); ++y) {
for (int x = 0; x < (this->side_size()); ++x) {
@@ -315,7 +315,7 @@ bool Qr<V>::draw(int whereX, int whereY) noexcept {
}
}
- fb_clear();
+ cg_clear();
return false;
}
diff --git a/dev/boot/BootKit/Support.h b/dev/boot/BootKit/Support.h
index b4129abc..28f090a8 100644
--- a/dev/boot/BootKit/Support.h
+++ b/dev/boot/BootKit/Support.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/amd64-ci.make b/dev/boot/amd64-ci.make
index 12e6407b..229e3359 100644
--- a/dev/boot/amd64-ci.make
+++ b/dev/boot/amd64-ci.make
@@ -1,5 +1,5 @@
##################################################
-# (c) Amlal El Mahrouss, all rights reserved.
+# (c) Amlal El Mahrouss, licensed under the Apache 2.0 license.
# This is the bootloader makefile.
##################################################
diff --git a/dev/boot/amd64-desktop.make b/dev/boot/amd64-desktop.make
index d8c3fd86..25878092 100644
--- a/dev/boot/amd64-desktop.make
+++ b/dev/boot/amd64-desktop.make
@@ -1,5 +1,5 @@
##################################################
-# (c) Amlal El Mahrouss, all rights reserved.
+# (c) Amlal El Mahrouss, licensed under the Apache 2.0 license.
# This is the bootloader makefile.
##################################################
@@ -76,7 +76,7 @@ KERNEL=ne_kernel
SYSCHK=chk.efi
BOOTNET=net.efi
SCIKIT=libSystem.dll
-DDK=ddk.sys
+DDK=libDDK.dll
.PHONY: invalid-recipe
invalid-recipe:
diff --git a/dev/boot/arm64-desktop.make b/dev/boot/arm64-desktop.make
index 409975a4..989b37ed 100644
--- a/dev/boot/arm64-desktop.make
+++ b/dev/boot/arm64-desktop.make
@@ -1,5 +1,5 @@
##################################################
-# (c) Amlal El Mahrouss, all rights reserved.
+# (c) Amlal El Mahrouss, licensed under the Apache 2.0 license.
# This is the bootloader makefile.
##################################################
diff --git a/dev/boot/modules/BootNet/BootNet.cc b/dev/boot/modules/BootNet/BootNet.cc
index 8236dd0d..20d1a6c9 100644
--- a/dev/boot/modules/BootNet/BootNet.cc
+++ b/dev/boot/modules/BootNet/BootNet.cc
@@ -2,7 +2,7 @@
* ========================================================
*
* BootNet
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* ========================================================
*/
diff --git a/dev/boot/modules/BootNet/BootNet.h b/dev/boot/modules/BootNet/BootNet.h
index 3e876d09..9fe1a186 100644
--- a/dev/boot/modules/BootNet/BootNet.h
+++ b/dev/boot/modules/BootNet/BootNet.h
@@ -2,7 +2,7 @@
* ========================================================
*
* BootNet
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* ========================================================
*/
diff --git a/dev/boot/modules/BootNet/BootNetStartup.S b/dev/boot/modules/BootNet/BootNetStartup.S
index d8113bd7..a5832ee6 100644
--- a/dev/boot/modules/BootNet/BootNetStartup.S
+++ b/dev/boot/modules/BootNet/BootNetStartup.S
@@ -2,7 +2,7 @@
;; * ========================================================
;; *
;; * BootZ
-;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+;; * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
;; *
;; * ========================================================
;; */
diff --git a/dev/boot/modules/SysChk/SysChk.cc b/dev/boot/modules/SysChk/SysChk.cc
index ea3b1d6f..0706d457 100644
--- a/dev/boot/modules/SysChk/SysChk.cc
+++ b/dev/boot/modules/SysChk/SysChk.cc
@@ -2,7 +2,7 @@
* ========================================================
*
* SysChk
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* ========================================================
*/
diff --git a/dev/boot/modules/SysChk/SysChkStartup.S b/dev/boot/modules/SysChk/SysChkStartup.S
index d8113bd7..a5832ee6 100644
--- a/dev/boot/modules/SysChk/SysChkStartup.S
+++ b/dev/boot/modules/SysChk/SysChkStartup.S
@@ -2,7 +2,7 @@
;; * ========================================================
;; *
;; * BootZ
-;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+;; * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
;; *
;; * ========================================================
;; */
diff --git a/dev/boot/src/BootFileReader.cc b/dev/boot/src/BootFileReader.cc
index 5aadd608..c921d960 100644
--- a/dev/boot/src/BootFileReader.cc
+++ b/dev/boot/src/BootFileReader.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: FileReader.cc
Purpose: New Boot FileReader,
@@ -75,7 +75,7 @@ Boot::BootFileReader::BootFileReader(const CharacterTypeUTF16* path, EfiHandlePt
mWriter.Write(L"BootZ: Fetch-Protocol: No-Such-Path: ").Write(mPath).Write(L"\r");
this->mErrorCode = kNotSupported;
- fb_render_string("BootZ: PLEASE RECOVER YOUR MINKRNL INSTALL.", 40, 10, RGB(0xFF, 0xFF, 0xFF));
+ cg_render_string("BootZ: PLEASE RECOVER YOUR NEKERNEL INSTALL.", 40, 10, RGB(0xFF, 0xFF, 0xFF));
mRootFs->Close(mRootFs);
diff --git a/dev/boot/src/BootString.cc b/dev/boot/src/BootString.cc
index 277f3273..140f8109 100644
--- a/dev/boot/src/BootString.cc
+++ b/dev/boot/src/BootString.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: BootString.cc
Purpose: BootZ string library
diff --git a/dev/boot/src/BootSupport.cc b/dev/boot/src/BootSupport.cc
index 4bf3e68a..93dd1e30 100644
--- a/dev/boot/src/BootSupport.cc
+++ b/dev/boot/src/BootSupport.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/src/BootTextWriter.cc b/dev/boot/src/BootTextWriter.cc
index 6ffb7de6..fb50b60c 100644
--- a/dev/boot/src/BootTextWriter.cc
+++ b/dev/boot/src/BootTextWriter.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: BootTextWriter.cc
Purpose: BootZ string library
diff --git a/dev/boot/src/BootThread.cc b/dev/boot/src/BootThread.cc
index 377e6e3a..6db32e11 100644
--- a/dev/boot/src/BootThread.cc
+++ b/dev/boot/src/BootThread.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/src/HEL/64X000/BootCB.S b/dev/boot/src/HEL/64X000/BootCB.S
index 2984efeb..601e7e36 100644
--- a/dev/boot/src/HEL/64X000/BootCB.S
+++ b/dev/boot/src/HEL/64X000/BootCB.S
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/src/HEL/AMD64/BootATA.cc b/dev/boot/src/HEL/AMD64/BootATA.cc
index 25810222..1a40d8a2 100644
--- a/dev/boot/src/HEL/AMD64/BootATA.cc
+++ b/dev/boot/src/HEL/AMD64/BootATA.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss/Symphony Corp, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss/Symphony Corp, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/src/HEL/AMD64/BootEFI.cc b/dev/boot/src/HEL/AMD64/BootEFI.cc
index 24bee2dd..a107879e 100644
--- a/dev/boot/src/HEL/AMD64/BootEFI.cc
+++ b/dev/boot/src/HEL/AMD64/BootEFI.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -111,7 +111,7 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle, EfiSystemTa
kHandoverHeader = handover_hdr;
- FB::fb_clear_video();
+ FB::cg_clear_video();
UInt32 cnt_enabled = 0;
UInt32 cnt_disabled = 0;
diff --git a/dev/boot/src/HEL/AMD64/BootPlatform.cc b/dev/boot/src/HEL/AMD64/BootPlatform.cc
index 4cc783d6..0c3236de 100644
--- a/dev/boot/src/HEL/AMD64/BootPlatform.cc
+++ b/dev/boot/src/HEL/AMD64/BootPlatform.cc
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/src/HEL/AMD64/BootSATA.cc b/dev/boot/src/HEL/AMD64/BootSATA.cc
index b0b0b52f..57d310b1 100644
--- a/dev/boot/src/HEL/AMD64/BootSATA.cc
+++ b/dev/boot/src/HEL/AMD64/BootSATA.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -49,9 +49,6 @@ BootDeviceSATA::BootDeviceSATA() noexcept {
@param Buf buffer
*/
BootDeviceSATA& BootDeviceSATA::Read(CharacterTypeASCII* Buf, SizeT SectorSz) {
- NE_UNUSED(Buf);
- NE_UNUSED(SectorSz);
-
drv_std_read(mTrait.mBase / SectorSz, Buf, SectorSz, mTrait.mSize);
return *this;
@@ -63,9 +60,6 @@ BootDeviceSATA& BootDeviceSATA::Read(CharacterTypeASCII* Buf, SizeT SectorSz) {
@param Buf buffer
*/
BootDeviceSATA& BootDeviceSATA::Write(CharacterTypeASCII* Buf, SizeT SectorSz) {
- NE_UNUSED(Buf);
- NE_UNUSED(SectorSz);
-
drv_std_write(mTrait.mBase / SectorSz, Buf, SectorSz, mTrait.mSize);
return *this;
diff --git a/dev/boot/src/HEL/ARM64/BootEFI.cc b/dev/boot/src/HEL/ARM64/BootEFI.cc
index 467cae23..b7a53aeb 100644
--- a/dev/boot/src/HEL/ARM64/BootEFI.cc
+++ b/dev/boot/src/HEL/ARM64/BootEFI.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/src/HEL/ARM64/BootNB.S b/dev/boot/src/HEL/ARM64/BootNB.S
index d52c1dcf..d9eba77e 100644
--- a/dev/boot/src/HEL/ARM64/BootNB.S
+++ b/dev/boot/src/HEL/ARM64/BootNB.S
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/src/HEL/ARM64/BootPlatform.cc b/dev/boot/src/HEL/ARM64/BootPlatform.cc
index 9dd03afe..debce6bb 100644
--- a/dev/boot/src/HEL/ARM64/BootPlatform.cc
+++ b/dev/boot/src/HEL/ARM64/BootPlatform.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/src/HEL/POWER/BootNB.S b/dev/boot/src/HEL/POWER/BootNB.S
index 3887ff10..0b807b21 100644
--- a/dev/boot/src/HEL/POWER/BootNB.S
+++ b/dev/boot/src/HEL/POWER/BootNB.S
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/src/New+Delete.cc b/dev/boot/src/New+Delete.cc
index d4d5dfed..fe55f6f5 100644
--- a/dev/boot/src/New+Delete.cc
+++ b/dev/boot/src/New+Delete.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/boot/src/boot_rsrc.rsrc b/dev/boot/src/boot_rsrc.rsrc
index fedbdee0..e875fa24 100644
--- a/dev/boot/src/boot_rsrc.rsrc
+++ b/dev/boot/src/boot_rsrc.rsrc
@@ -12,7 +12,7 @@ BEGIN
VALUE "FileDescription", "NeKernel OS Loader."
VALUE "FileVersion", BOOTLOADER_VERSION
VALUE "InternalName", "bootz"
- VALUE "LegalCopyright", "Copyright (C) 2024-2025, Amlal El Mahrouss all rights reserved."
+ VALUE "LegalCopyright", "Copyright (C) 2024-2025, Amlal El Mahrouss licensed under the Apache 2.0 license."
VALUE "OriginalFilename", "ne_bootz"
VALUE "ProductName", "bootz"
VALUE "ProductVersion", BOOTLOADER_VERSION
diff --git a/dev/boot/src/docs/KERN_VER.md b/dev/boot/src/docs/KERN_VER.md
index 0659431b..c47c3d5b 100644
--- a/dev/boot/src/docs/KERN_VER.md
+++ b/dev/boot/src/docs/KERN_VER.md
@@ -15,4 +15,4 @@ N/A
## © License
Copyright (C) 2025,
- Amlal El Mahrouss – All rights reserved. \ No newline at end of file
+ Amlal El Mahrouss – Licensed under the Apache 2.0 license. \ No newline at end of file
diff --git a/dev/boot/src/docs/MKFS_HEFS.md b/dev/boot/src/docs/MKFS_HEFS.md
index ac84d132..fd2a099e 100644
--- a/dev/boot/src/docs/MKFS_HEFS.md
+++ b/dev/boot/src/docs/MKFS_HEFS.md
@@ -103,4 +103,4 @@ Part of the [OpenHeFS Tooling module](https://github.com/nekernel-org/nekernel)
## © License
Copyright (C) 2025,
- Amlal El Mahrouss – All rights reserved. \ No newline at end of file
+ Amlal El Mahrouss – Licensed under the Apache 2.0 license. \ No newline at end of file
diff --git a/dev/hint/CompilerHint.h b/dev/hint/CompilerHint.h
index fed805e3..21e40760 100644
--- a/dev/hint/CompilerHint.h
+++ b/dev/hint/CompilerHint.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/ArchKit/ArchKit.h b/dev/kernel/ArchKit/ArchKit.h
index 9c45b6bb..733014c8 100644
--- a/dev/kernel/ArchKit/ArchKit.h
+++ b/dev/kernel/ArchKit/ArchKit.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/CFKit/GUIDWizard.h b/dev/kernel/CFKit/GUIDWizard.h
index e2d9bcb1..9dffbf4e 100644
--- a/dev/kernel/CFKit/GUIDWizard.h
+++ b/dev/kernel/CFKit/GUIDWizard.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/CFKit/GUIDWrapper.h b/dev/kernel/CFKit/GUIDWrapper.h
index 14a96fde..17bfb170 100644
--- a/dev/kernel/CFKit/GUIDWrapper.h
+++ b/dev/kernel/CFKit/GUIDWrapper.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/CFKit/Property.h b/dev/kernel/CFKit/Property.h
index e8f2f713..da7eae1c 100644
--- a/dev/kernel/CFKit/Property.h
+++ b/dev/kernel/CFKit/Property.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/CompilerKit/CompilerKit.h b/dev/kernel/CompilerKit/CompilerKit.h
index 83910ee0..2f0b6aea 100644
--- a/dev/kernel/CompilerKit/CompilerKit.h
+++ b/dev/kernel/CompilerKit/CompilerKit.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/CompilerKit/Detail.h b/dev/kernel/CompilerKit/Detail.h
index a86f4dd3..af620b78 100644
--- a/dev/kernel/CompilerKit/Detail.h
+++ b/dev/kernel/CompilerKit/Detail.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/DmaKit/DmaPool.h b/dev/kernel/DmaKit/DmaPool.h
index 99f43725..aca6641b 100644
--- a/dev/kernel/DmaKit/DmaPool.h
+++ b/dev/kernel/DmaKit/DmaPool.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss , all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss , licensed under the Apache 2.0 license.
File: DmaPool.h
Purpose: Dma Pool Manager.
@@ -23,11 +23,7 @@
#define kNeDMAPoolSize (0x1000000)
#endif
-#ifdef __GNUC__
-#define kNeDMABestAlign __BIGGEST_ALIGNMENT__
-#else
#define kNeDMABestAlign (8)
-#endif
namespace Kernel {
/// @brief DMA pool base pointer, here we're sure that AHCI or whatever tricky standard sees it.
@@ -41,7 +37,7 @@ inline const UInt8* kDmaPoolEnd = (UInt8*) (kNeDMAPoolStart + kNeDMAPoolSize);
/***********************************************************************************/
inline VoidPtr rtl_dma_alloc(SizeT size, SizeT align) {
if (!size) {
- ++size;
+ return nullptr;
}
/// Check alignement according to architecture.
diff --git a/dev/kernel/FSKit/Defines.h b/dev/kernel/FSKit/Defines.h
index 9e22a638..ac561d4f 100644
--- a/dev/kernel/FSKit/Defines.h
+++ b/dev/kernel/FSKit/Defines.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FSKit/Ext2+IFS.h b/dev/kernel/FSKit/Ext2+IFS.h
index 44435a29..7cc2671e 100644
--- a/dev/kernel/FSKit/Ext2+IFS.h
+++ b/dev/kernel/FSKit/Ext2+IFS.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FSKit/Ext2.h b/dev/kernel/FSKit/Ext2.h
index be2e34a6..86fc70a9 100644
--- a/dev/kernel/FSKit/Ext2.h
+++ b/dev/kernel/FSKit/Ext2.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FSKit/IndexableProperty.h b/dev/kernel/FSKit/IndexableProperty.h
index d6b89d35..d36ad128 100644
--- a/dev/kernel/FSKit/IndexableProperty.h
+++ b/dev/kernel/FSKit/IndexableProperty.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FSKit/NeFS.h b/dev/kernel/FSKit/NeFS.h
index f265c4a6..92d4b233 100644
--- a/dev/kernel/FSKit/NeFS.h
+++ b/dev/kernel/FSKit/NeFS.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
FILE: NeFS.h
PURPOSE: NeFS (New extended File System) support.
diff --git a/dev/kernel/FSKit/OpenHeFS.h b/dev/kernel/FSKit/OpenHeFS.h
index 1361da9c..51d68afc 100644
--- a/dev/kernel/FSKit/OpenHeFS.h
+++ b/dev/kernel/FSKit/OpenHeFS.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -429,6 +429,6 @@ namespace OpenHeFS {
/// @brief Initialize OpenHeFS inside the main disk.
/// @return Whether it successfuly formated it or not.
- Boolean fs_init_hefs(Void) noexcept;
+ Boolean fs_init_openhefs(Void) noexcept;
} // namespace OpenHeFS
} // namespace Kernel
diff --git a/dev/kernel/FirmwareKit/EFI.h b/dev/kernel/FirmwareKit/EFI.h
index 96c4ad98..36630e24 100644
--- a/dev/kernel/FirmwareKit/EFI.h
+++ b/dev/kernel/FirmwareKit/EFI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FirmwareKit/EFI/API.h b/dev/kernel/FirmwareKit/EFI/API.h
index 7c9ad93d..8fbbbfeb 100644
--- a/dev/kernel/FirmwareKit/EFI/API.h
+++ b/dev/kernel/FirmwareKit/EFI/API.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FirmwareKit/EFI/EFI.h b/dev/kernel/FirmwareKit/EFI/EFI.h
index 97e3ad01..ef559b14 100644
--- a/dev/kernel/FirmwareKit/EFI/EFI.h
+++ b/dev/kernel/FirmwareKit/EFI/EFI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FirmwareKit/EFI/NS.h b/dev/kernel/FirmwareKit/EFI/NS.h
index 910b2c36..c810151c 100644
--- a/dev/kernel/FirmwareKit/EFI/NS.h
+++ b/dev/kernel/FirmwareKit/EFI/NS.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FirmwareKit/EPM.h b/dev/kernel/FirmwareKit/EPM.h
index 20c966e4..1921ae71 100644
--- a/dev/kernel/FirmwareKit/EPM.h
+++ b/dev/kernel/FirmwareKit/EPM.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -102,7 +102,7 @@ enum {
kEPMLinux = 0x8f, /// @brief Linux on EPM.
kEPMBSD = 0x9f, /// @brief BSD on EPM.
kEPMNeKernel = 0x1f, /// @brief NeKernel.
- kEPMVMKernel = 0x2f, /// @brief VMKernel.
+ kEPMLegacy = 0x2f, /// @brief Legacy VMKernel.
/// @note ... the rest is reserved for future OSes.
kEPMInvalidOS = 0xff,
};
diff --git a/dev/kernel/FirmwareKit/GPT.h b/dev/kernel/FirmwareKit/GPT.h
index f361c4a2..fb736560 100644
--- a/dev/kernel/FirmwareKit/GPT.h
+++ b/dev/kernel/FirmwareKit/GPT.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FirmwareKit/Handover.h b/dev/kernel/FirmwareKit/Handover.h
index d74194ed..67cd66d6 100644
--- a/dev/kernel/FirmwareKit/Handover.h
+++ b/dev/kernel/FirmwareKit/Handover.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FirmwareKit/NeBoot/BootNet.h b/dev/kernel/FirmwareKit/NeBoot/BootNet.h
index 0f406b57..ab032808 100644
--- a/dev/kernel/FirmwareKit/NeBoot/BootNet.h
+++ b/dev/kernel/FirmwareKit/NeBoot/BootNet.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FirmwareKit/NeBoot/NS.h b/dev/kernel/FirmwareKit/NeBoot/NS.h
index a4d6a251..4c8a468a 100644
--- a/dev/kernel/FirmwareKit/NeBoot/NS.h
+++ b/dev/kernel/FirmwareKit/NeBoot/NS.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FirmwareKit/NeBoot/NeBoot.h b/dev/kernel/FirmwareKit/NeBoot/NeBoot.h
index 621b3b64..84110de1 100644
--- a/dev/kernel/FirmwareKit/NeBoot/NeBoot.h
+++ b/dev/kernel/FirmwareKit/NeBoot/NeBoot.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/FirmwareKit/VEPM.h b/dev/kernel/FirmwareKit/VEPM.h
index 30f6c04d..49b6335e 100644
--- a/dev/kernel/FirmwareKit/VEPM.h
+++ b/dev/kernel/FirmwareKit/VEPM.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/GfxKit/FB.h b/dev/kernel/GfxKit/FB.h
index 28f3a20c..7ae66581 100644
--- a/dev/kernel/GfxKit/FB.h
+++ b/dev/kernel/GfxKit/FB.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/CPUID.h b/dev/kernel/HALKit/AMD64/CPUID.h
index cc3bd25e..19f6ba42 100644
--- a/dev/kernel/HALKit/AMD64/CPUID.h
+++ b/dev/kernel/HALKit/AMD64/CPUID.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: CPUID.h
Purpose: CPUID flags.
diff --git a/dev/kernel/HALKit/AMD64/CxxAbi.cc b/dev/kernel/HALKit/AMD64/CxxAbi.cc
index 84a00449..e10c081e 100644
--- a/dev/kernel/HALKit/AMD64/CxxAbi.cc
+++ b/dev/kernel/HALKit/AMD64/CxxAbi.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalACPIFactoryInterface.cc b/dev/kernel/HALKit/AMD64/HalACPIFactoryInterface.cc
index 1d289db8..17c314fc 100644
--- a/dev/kernel/HALKit/AMD64/HalACPIFactoryInterface.cc
+++ b/dev/kernel/HALKit/AMD64/HalACPIFactoryInterface.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalAPICDmaWrapper.cc b/dev/kernel/HALKit/AMD64/HalAPICDmaWrapper.cc
index 6aba5b0e..f7fe87e0 100644
--- a/dev/kernel/HALKit/AMD64/HalAPICDmaWrapper.cc
+++ b/dev/kernel/HALKit/AMD64/HalAPICDmaWrapper.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc
index e3e08830..d3ce679f 100644
--- a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc
+++ b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalCommonAPI.asm b/dev/kernel/HALKit/AMD64/HalCommonAPI.asm
index be150dde..9f3652bc 100644
--- a/dev/kernel/HALKit/AMD64/HalCommonAPI.asm
+++ b/dev/kernel/HALKit/AMD64/HalCommonAPI.asm
@@ -2,7 +2,7 @@
;; * ========================================================
;; *
;; * NeKernel
-;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+;; * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
;; *
;; * ========================================================
;; */
diff --git a/dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s b/dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s
index 631d1d55..b832aba6 100644
--- a/dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s
+++ b/dev/kernel/HALKit/AMD64/HalControlRegisterAPI.s
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalCoreInterruptHandler.cc b/dev/kernel/HALKit/AMD64/HalCoreInterruptHandler.cc
index 0cb991f9..5ad4acde 100644
--- a/dev/kernel/HALKit/AMD64/HalCoreInterruptHandler.cc
+++ b/dev/kernel/HALKit/AMD64/HalCoreInterruptHandler.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalCoreSystemCalls.cc b/dev/kernel/HALKit/AMD64/HalCoreSystemCalls.cc
index 11e773a8..0fda022e 100644
--- a/dev/kernel/HALKit/AMD64/HalCoreSystemCalls.cc
+++ b/dev/kernel/HALKit/AMD64/HalCoreSystemCalls.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalDebugOutput.cc b/dev/kernel/HALKit/AMD64/HalDebugOutput.cc
index 789c1067..44db0d05 100644
--- a/dev/kernel/HALKit/AMD64/HalDebugOutput.cc
+++ b/dev/kernel/HALKit/AMD64/HalDebugOutput.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -90,7 +90,7 @@ EXTERN_C void ke_utf_io_write(DeviceInterface<const Utf8Char*>* obj, const Utf8C
tmp_str[0] = (bytes[index] > 127) ? '?' : bytes[index];
tmp_str[1] = 0;
- fb_render_string(tmp_str, kY, kX, RGB(0xff, 0xff, 0xff));
+ cg_render_string(tmp_str, kY, kX, RGB(0xff, 0xff, 0xff));
if (bytes[index] == '\r') {
kY += kFontSizeY;
@@ -106,7 +106,7 @@ EXTERN_C void ke_utf_io_write(DeviceInterface<const Utf8Char*>* obj, const Utf8C
if (kY > kHandoverHeader->f_GOP.f_Height) {
kY = kFontSizeY;
- FBDrawInRegion(fb_get_clear_clr(), FB::FBAccessibilty::Height(), FB::FBAccessibilty::Width(),
+ FBDrawInRegion(cg_get_clear_clr(), FB::CGAccessibilty::Height(), FB::CGAccessibilty::Width(),
0, 0);
}
@@ -146,7 +146,7 @@ EXTERN_C void ke_io_write(DeviceInterface<const Char*>* obj, const Char* bytes)
tmp_str[0] = bytes[index];
tmp_str[1] = 0;
- fb_render_string(tmp_str, kY, kX, RGB(0xff, 0xff, 0xff));
+ cg_render_string(tmp_str, kY, kX, RGB(0xff, 0xff, 0xff));
if (bytes[index] == '\r') {
kY += kFontSizeY;
@@ -162,7 +162,7 @@ EXTERN_C void ke_io_write(DeviceInterface<const Char*>* obj, const Char* bytes)
if (kY > kHandoverHeader->f_GOP.f_Height) {
kY = kFontSizeY;
- FBDrawInRegion(fb_get_clear_clr(), FB::FBAccessibilty::Height(), FB::FBAccessibilty::Width(),
+ FBDrawInRegion(cg_get_clear_clr(), FB::CGAccessibilty::Height(), FB::CGAccessibilty::Width(),
0, 0);
}
diff --git a/dev/kernel/HALKit/AMD64/HalDebugProtocol.cc b/dev/kernel/HALKit/AMD64/HalDebugProtocol.cc
index 8a1249ea..d849be07 100644
--- a/dev/kernel/HALKit/AMD64/HalDebugProtocol.cc
+++ b/dev/kernel/HALKit/AMD64/HalDebugProtocol.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc b/dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc
index 56d46a15..dfa08287 100644
--- a/dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc
+++ b/dev/kernel/HALKit/AMD64/HalDescriptorLoader.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalHandoverStub.asm b/dev/kernel/HALKit/AMD64/HalHandoverStub.asm
index a337a223..c9cabd1c 100644
--- a/dev/kernel/HALKit/AMD64/HalHandoverStub.asm
+++ b/dev/kernel/HALKit/AMD64/HalHandoverStub.asm
@@ -2,7 +2,7 @@
;; * ========================================================
;; *
;; * NeKernel
-;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+;; * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
;; *
;; * ========================================================
;; */
diff --git a/dev/kernel/HALKit/AMD64/HalInterruptAPI.asm b/dev/kernel/HALKit/AMD64/HalInterruptAPI.asm
index a0ff40dc..3b3ad849 100644
--- a/dev/kernel/HALKit/AMD64/HalInterruptAPI.asm
+++ b/dev/kernel/HALKit/AMD64/HalInterruptAPI.asm
@@ -1,7 +1,7 @@
;; /*
;; * ---------------------------------------------------
;; *
-;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+;; * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
;; *
;; * File: HalInterruptAPI.asm
;; * Purpose: Interrupt API, redirect raw interrupts into their handlers.
diff --git a/dev/kernel/HALKit/AMD64/HalKernelMain.cc b/dev/kernel/HALKit/AMD64/HalKernelMain.cc
index 2b478dd6..50d022e9 100644
--- a/dev/kernel/HALKit/AMD64/HalKernelMain.cc
+++ b/dev/kernel/HALKit/AMD64/HalKernelMain.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -118,7 +118,7 @@ EXTERN_C Int32 hal_init_platform(Kernel::HEL::BootInfoHeader* handover_hdr) {
kGDTArray[4].fFlags = 0;
kGDTArray[4].fBaseHigh = 0;
- FB::fb_clear_video();
+ FB::cg_clear_video();
// Load memory descriptors.
HAL::Register64 gdt_reg;
@@ -144,8 +144,8 @@ EXTERN_C Kernel::Void hal_real_init(Kernel::Void) {
HAL::mp_init_cores(kHandoverHeader->f_HardwareTables.f_VendorPtr);
-#ifdef __FSKIT_INCLUDES_HEFS__
- OpenHeFS::fs_init_hefs();
+#ifdef __FSKIT_INCLUDES_OPENHEFS__
+ OpenHeFS::fs_init_openhefs();
#endif
#ifdef __FSKIT_INCLUDES_NEFS__
diff --git a/dev/kernel/HALKit/AMD64/HalKernelPanic.cc b/dev/kernel/HALKit/AMD64/HalKernelPanic.cc
index 374c7302..39d55b43 100644
--- a/dev/kernel/HALKit/AMD64/HalKernelPanic.cc
+++ b/dev/kernel/HALKit/AMD64/HalKernelPanic.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalPagingMgr.cc b/dev/kernel/HALKit/AMD64/HalPagingMgr.cc
index ced4f268..0a70113f 100644
--- a/dev/kernel/HALKit/AMD64/HalPagingMgr.cc
+++ b/dev/kernel/HALKit/AMD64/HalPagingMgr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: HalPagingMgr.cc
Purpose: Platform Paging Manager.
diff --git a/dev/kernel/HALKit/AMD64/HalProcessor.cc b/dev/kernel/HALKit/AMD64/HalProcessor.cc
index 6ebbea08..c27111e2 100644
--- a/dev/kernel/HALKit/AMD64/HalProcessor.cc
+++ b/dev/kernel/HALKit/AMD64/HalProcessor.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: HalCPU.cc
Purpose: Platform processor routines.
diff --git a/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitives.cc b/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitives.cc
index c8f53aa9..ea643662 100644
--- a/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitives.cc
+++ b/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitives.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/HalTimer.cc b/dev/kernel/HALKit/AMD64/HalTimer.cc
index 22876a96..b605df6c 100644
--- a/dev/kernel/HALKit/AMD64/HalTimer.cc
+++ b/dev/kernel/HALKit/AMD64/HalTimer.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: HalTimer.cc
Purpose: HAL timer
diff --git a/dev/kernel/HALKit/AMD64/HalUtilsAPI.asm b/dev/kernel/HALKit/AMD64/HalUtilsAPI.asm
index 11336229..2a0a5eff 100644
--- a/dev/kernel/HALKit/AMD64/HalUtilsAPI.asm
+++ b/dev/kernel/HALKit/AMD64/HalUtilsAPI.asm
@@ -2,7 +2,7 @@
;; * ========================================================
;; *
;; * NeKernel
-;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+;; * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
;; *
;; * ========================================================
;; */
diff --git a/dev/kernel/HALKit/AMD64/Hypervisor.h b/dev/kernel/HALKit/AMD64/Hypervisor.h
index 5702c8e2..4294b00a 100644
--- a/dev/kernel/HALKit/AMD64/Hypervisor.h
+++ b/dev/kernel/HALKit/AMD64/Hypervisor.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/Network/Generic+Basic+RTL8139.cc b/dev/kernel/HALKit/AMD64/Network/Generic+Basic+RTL8139.cc
index be27915a..1c7f554e 100644
--- a/dev/kernel/HALKit/AMD64/Network/Generic+Basic+RTL8139.cc
+++ b/dev/kernel/HALKit/AMD64/Network/Generic+Basic+RTL8139.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
-Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/PCI/DMA.cc b/dev/kernel/HALKit/AMD64/PCI/DMA.cc
index 38533448..adb3124e 100644
--- a/dev/kernel/HALKit/AMD64/PCI/DMA.cc
+++ b/dev/kernel/HALKit/AMD64/PCI/DMA.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/PCI/Database.cc b/dev/kernel/HALKit/AMD64/PCI/Database.cc
index 9e6c349b..056aa109 100644
--- a/dev/kernel/HALKit/AMD64/PCI/Database.cc
+++ b/dev/kernel/HALKit/AMD64/PCI/Database.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/PCI/Device.cc b/dev/kernel/HALKit/AMD64/PCI/Device.cc
index f11f7777..63acb790 100644
--- a/dev/kernel/HALKit/AMD64/PCI/Device.cc
+++ b/dev/kernel/HALKit/AMD64/PCI/Device.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/PCI/Express.cc b/dev/kernel/HALKit/AMD64/PCI/Express.cc
index 6031e792..4153e1ef 100644
--- a/dev/kernel/HALKit/AMD64/PCI/Express.cc
+++ b/dev/kernel/HALKit/AMD64/PCI/Express.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/PCI/IO.cc b/dev/kernel/HALKit/AMD64/PCI/IO.cc
index 1d72316a..c0faf1a7 100644
--- a/dev/kernel/HALKit/AMD64/PCI/IO.cc
+++ b/dev/kernel/HALKit/AMD64/PCI/IO.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/PCI/Iterator.cc b/dev/kernel/HALKit/AMD64/PCI/Iterator.cc
index 2590aa94..9d12c0d6 100644
--- a/dev/kernel/HALKit/AMD64/PCI/Iterator.cc
+++ b/dev/kernel/HALKit/AMD64/PCI/Iterator.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/PCI/PCI.cc b/dev/kernel/HALKit/AMD64/PCI/PCI.cc
index 616b3eea..31a9711c 100644
--- a/dev/kernel/HALKit/AMD64/PCI/PCI.cc
+++ b/dev/kernel/HALKit/AMD64/PCI/PCI.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/Paging.h b/dev/kernel/HALKit/AMD64/Paging.h
index 079acde4..e0ff5a0e 100644
--- a/dev/kernel/HALKit/AMD64/Paging.h
+++ b/dev/kernel/HALKit/AMD64/Paging.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -44,17 +44,17 @@ EXTERN_C Kernel::VoidPtr hal_read_cr3(); // @brief Page directory inside cr3 re
namespace Kernel::HAL {
namespace Detail {
enum class ControlRegisterBits {
- ProtectedModeEnable = 0,
- MonitorCoProcessor = 1,
- Emulation = 2,
- TaskSwitched = 3,
- ExtensionType = 4,
- NumericError = 5,
- WriteProtect = 16,
- AlignementMask = 18,
- NotWriteThrough = 29,
- CacheDisable = 30,
- PageEnable = 31,
+ kProtectedModeEnable = 0,
+ kMonitorCoProcessor = 1,
+ kEmulation = 2,
+ kTaskSwitched = 3,
+ kExtensionType = 4,
+ kNumericError = 5,
+ kWriteProtect = 16,
+ kAlignementMask = 18,
+ kNotWriteThrough = 29,
+ kCacheDisable = 30,
+ kPageEnable = 31,
};
inline UInt8 control_register_cast(ControlRegisterBits reg) { return static_cast<UInt8>(reg); }
diff --git a/dev/kernel/HALKit/AMD64/Processor.h b/dev/kernel/HALKit/AMD64/Processor.h
index 99f857b1..c2af8575 100644
--- a/dev/kernel/HALKit/AMD64/Processor.h
+++ b/dev/kernel/HALKit/AMD64/Processor.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: Prcoessor.h
Purpose: AMD64 processor abstraction.
diff --git a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc
index 1acfac0e..0bd9455d 100644
--- a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc
+++ b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -11,7 +11,7 @@
* @version 0.1
* @date 2024-02-02
*
- * @copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * @copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
*/
@@ -294,8 +294,7 @@ STATIC Void drv_std_input_output_ahci(UInt64 lba, UInt8* buffer, SizeT sector_sz
goto ahci_io_end;
} else {
kout << "ahci: Disk still busy after command completion!\r";
- while (kSATAHba->Ports[kSATAIndex].Tfd & (kSATASRBsy | kSATASRDrq))
- ;
+ while (kSATAHba->Ports[kSATAIndex].Tfd & (kSATASRBsy | kSATASRDrq));
}
ahci_io_end:
@@ -308,13 +307,15 @@ STATIC Void drv_std_input_output_ahci(UInt64 lba, UInt8* buffer, SizeT sector_sz
@brief Gets the number of sectors inside the drive.
@return Sector size in bytes.
*/
-STATIC ATTRIBUTE(unused) SizeT drv_get_sector_count_ahci() {
+STATIC ATTRIBUTE(unused)
+SizeT drv_get_sector_count_ahci() {
return kSATASectorCount;
}
/// @brief Get the drive size.
/// @return Disk size in bytes.
-STATIC ATTRIBUTE(unused) SizeT drv_get_size_ahci() {
+STATIC ATTRIBUTE(unused)
+SizeT drv_get_size_ahci() {
return drv_std_get_sector_count() * kAHCISectorSize;
}
@@ -456,11 +457,9 @@ STATIC Bool drv_std_init_ahci(UInt16& pi, BOOL& atapi) {
success_hba_fetch:
if (ahci_enable_and_probe()) {
err_global_get() = kErrorSuccess;
-
- return YES;
}
- return NO;
+ return err_global_get() == kErrorSuccess;
}
/// @brief Checks if an AHCI device is detected.
@@ -546,8 +545,7 @@ namespace Detail {
/// @brief Read AHCI device.
/// @param self device
/// @param mnt mounted disk.
- STATIC Void sk_io_read_ahci(DeviceInterface<IMountpoint*>* self,
- IMountpoint* mnt) {
+ STATIC Void sk_io_read_ahci(DeviceInterface<IMountpoint*>* self, IMountpoint* mnt) {
AHCIDeviceInterface* dev = (AHCIDeviceInterface*) self;
err_global_get() = kErrorDisk;
@@ -568,8 +566,7 @@ namespace Detail {
/// @brief Write AHCI device.
/// @param self device
/// @param mnt mounted disk.
- STATIC Void sk_io_write_ahci(DeviceInterface<IMountpoint*>* self,
- IMountpoint* mnt) {
+ STATIC Void sk_io_write_ahci(DeviceInterface<IMountpoint*>* self, IMountpoint* mnt) {
AHCIDeviceInterface* dev = (AHCIDeviceInterface*) self;
err_global_get() = kErrorDisk;
diff --git a/dev/kernel/HALKit/AMD64/Storage/DMA+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/DMA+Generic.cc
index 39efb7d3..95355e9f 100644
--- a/dev/kernel/HALKit/AMD64/Storage/DMA+Generic.cc
+++ b/dev/kernel/HALKit/AMD64/Storage/DMA+Generic.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/Storage/NVME+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/NVME+Generic.cc
index 67b59813..9e5f766f 100644
--- a/dev/kernel/HALKit/AMD64/Storage/NVME+Generic.cc
+++ b/dev/kernel/HALKit/AMD64/Storage/NVME+Generic.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc
index 5b768fbb..dc5149da 100644
--- a/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc
+++ b/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/AMD64/Storage/SCSI+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/SCSI+Generic.cc
index 1cc97cba..f677b783 100644
--- a/dev/kernel/HALKit/AMD64/Storage/SCSI+Generic.cc
+++ b/dev/kernel/HALKit/AMD64/Storage/SCSI+Generic.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/APM/APM+IO.cc b/dev/kernel/HALKit/ARM64/APM/APM+IO.cc
index 17a60515..8960eb63 100644
--- a/dev/kernel/HALKit/ARM64/APM/APM+IO.cc
+++ b/dev/kernel/HALKit/ARM64/APM/APM+IO.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/ApplicationProcessor.h b/dev/kernel/HALKit/ARM64/ApplicationProcessor.h
index 3d472bf0..3712ec39 100644
--- a/dev/kernel/HALKit/ARM64/ApplicationProcessor.h
+++ b/dev/kernel/HALKit/ARM64/ApplicationProcessor.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/CxxAbi.cc b/dev/kernel/HALKit/ARM64/CxxAbi.cc
index 964fc2f4..5a6a987d 100644
--- a/dev/kernel/HALKit/ARM64/CxxAbi.cc
+++ b/dev/kernel/HALKit/ARM64/CxxAbi.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/HalACPIFactoryInterface.cc b/dev/kernel/HALKit/ARM64/HalACPIFactoryInterface.cc
index fa678494..ffb09795 100644
--- a/dev/kernel/HALKit/ARM64/HalACPIFactoryInterface.cc
+++ b/dev/kernel/HALKit/ARM64/HalACPIFactoryInterface.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/HalApplicationProcessor.cc b/dev/kernel/HALKit/ARM64/HalApplicationProcessor.cc
index 02f09e23..16f3c78c 100644
--- a/dev/kernel/HALKit/ARM64/HalApplicationProcessor.cc
+++ b/dev/kernel/HALKit/ARM64/HalApplicationProcessor.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/HalCoreInterruptHandler.cc b/dev/kernel/HALKit/ARM64/HalCoreInterruptHandler.cc
index 0c26f4cb..9d4b97c2 100644
--- a/dev/kernel/HALKit/ARM64/HalCoreInterruptHandler.cc
+++ b/dev/kernel/HALKit/ARM64/HalCoreInterruptHandler.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/HalDebugOutput.cc b/dev/kernel/HALKit/ARM64/HalDebugOutput.cc
index 64004ac3..326fd8a6 100644
--- a/dev/kernel/HALKit/ARM64/HalDebugOutput.cc
+++ b/dev/kernel/HALKit/ARM64/HalDebugOutput.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/HalHandoverStub.s b/dev/kernel/HALKit/ARM64/HalHandoverStub.s
index c0e7cb2b..5d5647c4 100644
--- a/dev/kernel/HALKit/ARM64/HalHandoverStub.s
+++ b/dev/kernel/HALKit/ARM64/HalHandoverStub.s
@@ -2,7 +2,7 @@
;; * ========================================================
;; *
;; * NeKernel
-;; * Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+;; * Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
;; *
;; * ========================================================
;; */
diff --git a/dev/kernel/HALKit/ARM64/HalKernelMain.cc b/dev/kernel/HALKit/ARM64/HalKernelMain.cc
index b711b833..e19f0452 100644
--- a/dev/kernel/HALKit/ARM64/HalKernelMain.cc
+++ b/dev/kernel/HALKit/ARM64/HalKernelMain.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -42,7 +42,7 @@ EXTERN_C void hal_init_platform(Kernel::HEL::BootInfoHeader* handover_hdr) {
handover_hdr->f_HardwareTables.f_ImageHandle);
#endif
- FB::fb_clear_video();
+ FB::cg_clear_video();
/************************************** */
/* INITIALIZE BIT MAP. */
diff --git a/dev/kernel/HALKit/ARM64/HalKernelPanic.cc b/dev/kernel/HALKit/ARM64/HalKernelPanic.cc
index 91b2fe8a..12027342 100644
--- a/dev/kernel/HALKit/ARM64/HalKernelPanic.cc
+++ b/dev/kernel/HALKit/ARM64/HalKernelPanic.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/HalPagingMgr.cc b/dev/kernel/HALKit/ARM64/HalPagingMgr.cc
index b7b0c10e..106e40ec 100644
--- a/dev/kernel/HALKit/ARM64/HalPagingMgr.cc
+++ b/dev/kernel/HALKit/ARM64/HalPagingMgr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: HalPagingMgr.cc
Purpose: Platform Paging Manager.
diff --git a/dev/kernel/HALKit/ARM64/HalSchedulerCore.cc b/dev/kernel/HALKit/ARM64/HalSchedulerCore.cc
index b3f1b62a..fde62e52 100644
--- a/dev/kernel/HALKit/ARM64/HalSchedulerCore.cc
+++ b/dev/kernel/HALKit/ARM64/HalSchedulerCore.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/HalSchedulerCorePrimitives.cc b/dev/kernel/HALKit/ARM64/HalSchedulerCorePrimitives.cc
index 2d10fa89..5b179ca1 100644
--- a/dev/kernel/HALKit/ARM64/HalSchedulerCorePrimitives.cc
+++ b/dev/kernel/HALKit/ARM64/HalSchedulerCorePrimitives.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/HalTimer.cc b/dev/kernel/HALKit/ARM64/HalTimer.cc
index 2a595f11..cc04abc7 100644
--- a/dev/kernel/HALKit/ARM64/HalTimer.cc
+++ b/dev/kernel/HALKit/ARM64/HalTimer.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: HalTimer.cc
Purpose: HAL timer
diff --git a/dev/kernel/HALKit/ARM64/Paging.h b/dev/kernel/HALKit/ARM64/Paging.h
index 7a022141..8df99e88 100644
--- a/dev/kernel/HALKit/ARM64/Paging.h
+++ b/dev/kernel/HALKit/ARM64/Paging.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/Processor.h b/dev/kernel/HALKit/ARM64/Processor.h
index 68fe736c..69711806 100644
--- a/dev/kernel/HALKit/ARM64/Processor.h
+++ b/dev/kernel/HALKit/ARM64/Processor.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/Storage/SCSI+Generic.cc b/dev/kernel/HALKit/ARM64/Storage/SCSI+Generic.cc
index 1cc97cba..f677b783 100644
--- a/dev/kernel/HALKit/ARM64/Storage/SCSI+Generic.cc
+++ b/dev/kernel/HALKit/ARM64/Storage/SCSI+Generic.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/ARM64/Storage/UFS+Generic.cc b/dev/kernel/HALKit/ARM64/Storage/UFS+Generic.cc
index e5ef7b91..32b7487d 100644
--- a/dev/kernel/HALKit/ARM64/Storage/UFS+Generic.cc
+++ b/dev/kernel/HALKit/ARM64/Storage/UFS+Generic.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/POWER/AP.h b/dev/kernel/HALKit/POWER/AP.h
index 92007da3..4ba54802 100644
--- a/dev/kernel/HALKit/POWER/AP.h
+++ b/dev/kernel/HALKit/POWER/AP.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: AP.h
Purpose: POWER hardware threads.
diff --git a/dev/kernel/HALKit/POWER/HalApplicationProcessor.cc b/dev/kernel/HALKit/POWER/HalApplicationProcessor.cc
index c2703af6..b803f8ec 100644
--- a/dev/kernel/HALKit/POWER/HalApplicationProcessor.cc
+++ b/dev/kernel/HALKit/POWER/HalApplicationProcessor.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/POWER/HalDebugOutput.cc b/dev/kernel/HALKit/POWER/HalDebugOutput.cc
index bcc6922c..6be766cc 100644
--- a/dev/kernel/HALKit/POWER/HalDebugOutput.cc
+++ b/dev/kernel/HALKit/POWER/HalDebugOutput.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/POWER/HalHardwareThread.cc b/dev/kernel/HALKit/POWER/HalHardwareThread.cc
index 2c7c69ba..34b7b609 100644
--- a/dev/kernel/HALKit/POWER/HalHardwareThread.cc
+++ b/dev/kernel/HALKit/POWER/HalHardwareThread.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/POWER/HalStartSequence.s b/dev/kernel/HALKit/POWER/HalStartSequence.s
index 349344f1..ba110937 100644
--- a/dev/kernel/HALKit/POWER/HalStartSequence.s
+++ b/dev/kernel/HALKit/POWER/HalStartSequence.s
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/POWER/HalVirtualMemory.cc b/dev/kernel/HALKit/POWER/HalVirtualMemory.cc
index 07c40134..b97a4e91 100644
--- a/dev/kernel/HALKit/POWER/HalVirtualMemory.cc
+++ b/dev/kernel/HALKit/POWER/HalVirtualMemory.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/HALKit/POWER/Processor.h b/dev/kernel/HALKit/POWER/Processor.h
index 8b75bcc8..0208978a 100644
--- a/dev/kernel/HALKit/POWER/Processor.h
+++ b/dev/kernel/HALKit/POWER/Processor.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
Purpose: POWER processor header.
diff --git a/dev/kernel/HALKit/RISCV/AP.h b/dev/kernel/HALKit/RISCV/AP.h
index 79b0d038..d0b00212 100644
--- a/dev/kernel/HALKit/RISCV/AP.h
+++ b/dev/kernel/HALKit/RISCV/AP.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: AP.h
Purpose: RISC-V hardware threads.
diff --git a/dev/kernel/HALKit/RISCV/HalApplicationProcessor.cc b/dev/kernel/HALKit/RISCV/HalApplicationProcessor.cc
index 31d4a62e..0acc98da 100644
--- a/dev/kernel/HALKit/RISCV/HalApplicationProcessor.cc
+++ b/dev/kernel/HALKit/RISCV/HalApplicationProcessor.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/BinaryMutex.h b/dev/kernel/KernelKit/BinaryMutex.h
index abe8d517..2cec84c8 100644
--- a/dev/kernel/KernelKit/BinaryMutex.h
+++ b/dev/kernel/KernelKit/BinaryMutex.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/CodeMgr.h b/dev/kernel/KernelKit/CodeMgr.h
index fc737a90..2569b064 100644
--- a/dev/kernel/KernelKit/CodeMgr.h
+++ b/dev/kernel/KernelKit/CodeMgr.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: CodeMgr.h
Purpose: Code Mgr.
@@ -14,10 +14,10 @@
#pragma once
-#ifdef __NE_USE_PEF__
#include <KernelKit/IPEFDylibObject.h>
#include <KernelKit/PEFCodeMgr.h>
-#endif
+#include <KernelKit/PE32CodeMgr.h>
+#include <KernelKit/CoreProcessScheduler.h>
/// @file CodeMgr.h
/// @brief Code Manager header file.
diff --git a/dev/kernel/KernelKit/CoreProcessScheduler.h b/dev/kernel/KernelKit/CoreProcessScheduler.h
index 49e9363e..8a129af2 100644
--- a/dev/kernel/KernelKit/CoreProcessScheduler.h
+++ b/dev/kernel/KernelKit/CoreProcessScheduler.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/DebugOutput.h b/dev/kernel/KernelKit/DebugOutput.h
index d2839341..9d2a7767 100644
--- a/dev/kernel/KernelKit/DebugOutput.h
+++ b/dev/kernel/KernelKit/DebugOutput.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -15,7 +15,7 @@
namespace Kernel {
class TerminalDevice;
class DTraceDevice;
-class NeDebugDevice;
+class NeTraceDevice;
class Utf8TerminalDevice;
inline TerminalDevice end_line();
diff --git a/dev/kernel/KernelKit/Defines.h b/dev/kernel/KernelKit/Defines.h
index 975520b6..9d46f081 100644
--- a/dev/kernel/KernelKit/Defines.h
+++ b/dev/kernel/KernelKit/Defines.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/DeviceMgr.h b/dev/kernel/KernelKit/DeviceMgr.h
index c6467190..869ab143 100644
--- a/dev/kernel/KernelKit/DeviceMgr.h
+++ b/dev/kernel/KernelKit/DeviceMgr.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/DriveMgr.h b/dev/kernel/KernelKit/DriveMgr.h
index 6340d966..dd3f9614 100644
--- a/dev/kernel/KernelKit/DriveMgr.h
+++ b/dev/kernel/KernelKit/DriveMgr.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -77,7 +77,7 @@ struct DriveTrait final {
const Char* (*fProtocol)(Void){};
};
-namespace Detail {
+namespace Probe {
Void io_detect_drive(DriveTrait& trait);
}
diff --git a/dev/kernel/KernelKit/FileMgr.h b/dev/kernel/KernelKit/FileMgr.h
index ff290780..d2a50c9e 100644
--- a/dev/kernel/KernelKit/FileMgr.h
+++ b/dev/kernel/KernelKit/FileMgr.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss , all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss , licensed under the Apache 2.0 license.
File: FileMgr.h
Purpose: Kernel file manager.
@@ -223,7 +223,7 @@ class Ext2FileSystemMgr final : public IFilesystemMgr {
#endif // ifdef __FSKIT_INCLUDES_EXT2__
-#ifdef __FSKIT_INCLUDES_HEFS__
+#ifdef __FSKIT_INCLUDES_OPENHEFS__
/**
* @brief Based of IFilesystemMgr, takes care of managing NeFS
* disks.
@@ -267,7 +267,7 @@ class HeFileSystemMgr final : public IFilesystemMgr {
HeFileSystemParser* mParser{nullptr};
};
-#endif // ifdef __FSKIT_INCLUDES_HEFS__
+#endif // ifdef __FSKIT_INCLUDES_OPENHEFS__
/**
* FileStream class.
diff --git a/dev/kernel/KernelKit/HardwareThreadScheduler.h b/dev/kernel/KernelKit/HardwareThreadScheduler.h
index e26a353a..56401596 100644
--- a/dev/kernel/KernelKit/HardwareThreadScheduler.h
+++ b/dev/kernel/KernelKit/HardwareThreadScheduler.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/HeapMgr.h b/dev/kernel/KernelKit/HeapMgr.h
index dacdfa5d..c71ca098 100644
--- a/dev/kernel/KernelKit/HeapMgr.h
+++ b/dev/kernel/KernelKit/HeapMgr.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/HeapMgr.inl b/dev/kernel/KernelKit/HeapMgr.inl
index 6371012e..f4074636 100644
--- a/dev/kernel/KernelKit/HeapMgr.inl
+++ b/dev/kernel/KernelKit/HeapMgr.inl
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/IDylibObject.h b/dev/kernel/KernelKit/IDylibObject.h
index 3727e938..ef6b96db 100644
--- a/dev/kernel/KernelKit/IDylibObject.h
+++ b/dev/kernel/KernelKit/IDylibObject.h
@@ -2,7 +2,7 @@
* ========================================================
*
* Kernel
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* ========================================================
*/
diff --git a/dev/kernel/KernelKit/IFS.h b/dev/kernel/KernelKit/IFS.h
index b1dd2001..422e531c 100644
--- a/dev/kernel/KernelKit/IFS.h
+++ b/dev/kernel/KernelKit/IFS.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/ILoader.h b/dev/kernel/KernelKit/ILoader.h
index ec8ee1bc..2fd2dd48 100644
--- a/dev/kernel/KernelKit/ILoader.h
+++ b/dev/kernel/KernelKit/ILoader.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/IPEFDylibObject.h b/dev/kernel/KernelKit/IPEFDylibObject.h
index 5788138d..17ef02d5 100644
--- a/dev/kernel/KernelKit/IPEFDylibObject.h
+++ b/dev/kernel/KernelKit/IPEFDylibObject.h
@@ -2,7 +2,7 @@
* ========================================================
*
* Kernel
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* ========================================================
*/
diff --git a/dev/kernel/KernelKit/KPC.h b/dev/kernel/KernelKit/KPC.h
index 794197e2..48d0561b 100644
--- a/dev/kernel/KernelKit/KPC.h
+++ b/dev/kernel/KernelKit/KPC.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/KernelTaskScheduler.h b/dev/kernel/KernelKit/KernelTaskScheduler.h
index 2029ae7b..6fd626b4 100644
--- a/dev/kernel/KernelKit/KernelTaskScheduler.h
+++ b/dev/kernel/KernelKit/KernelTaskScheduler.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -29,7 +29,7 @@ class KERNEL_TASK final {
UInt8* StackReserve{nullptr};
SizeT StackSize{kSchedMaxStackSz};
ProcessImage Image{};
- /// @brief a KID is a Kernel Identification Descriptor, it is used to find a task running within
+ /// @brief a KID is a Kernel ID, it is used to find a task running within
/// the kernel.
KID Kid{0};
};
diff --git a/dev/kernel/KernelKit/LockDelegate.h b/dev/kernel/KernelKit/LockDelegate.h
index a8c36de7..745abaf0 100644
--- a/dev/kernel/KernelKit/LockDelegate.h
+++ b/dev/kernel/KernelKit/LockDelegate.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/MSDOS.h b/dev/kernel/KernelKit/MSDOS.h
index b4ffeff2..2fd94296 100644
--- a/dev/kernel/KernelKit/MSDOS.h
+++ b/dev/kernel/KernelKit/MSDOS.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: MSDOS.h
Purpose: MS-DOS header for Kernel.
diff --git a/dev/kernel/KernelKit/PCI/DMA.h b/dev/kernel/KernelKit/PCI/DMA.h
index 7e7d3f0c..fc04f07c 100644
--- a/dev/kernel/KernelKit/PCI/DMA.h
+++ b/dev/kernel/KernelKit/PCI/DMA.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/PCI/DMA.inl b/dev/kernel/KernelKit/PCI/DMA.inl
index 4df24371..934019f0 100644
--- a/dev/kernel/KernelKit/PCI/DMA.inl
+++ b/dev/kernel/KernelKit/PCI/DMA.inl
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/PCI/Database.h b/dev/kernel/KernelKit/PCI/Database.h
index 093338da..03c60dee 100644
--- a/dev/kernel/KernelKit/PCI/Database.h
+++ b/dev/kernel/KernelKit/PCI/Database.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
#pragma once
diff --git a/dev/kernel/KernelKit/PCI/Device.h b/dev/kernel/KernelKit/PCI/Device.h
index f41e0575..9547f57b 100644
--- a/dev/kernel/KernelKit/PCI/Device.h
+++ b/dev/kernel/KernelKit/PCI/Device.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
#pragma once
diff --git a/dev/kernel/KernelKit/PCI/Express.h b/dev/kernel/KernelKit/PCI/Express.h
index c9d65da7..65db6daf 100644
--- a/dev/kernel/KernelKit/PCI/Express.h
+++ b/dev/kernel/KernelKit/PCI/Express.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/PCI/IO.h b/dev/kernel/KernelKit/PCI/IO.h
index 8ddba334..3d513bea 100644
--- a/dev/kernel/KernelKit/PCI/IO.h
+++ b/dev/kernel/KernelKit/PCI/IO.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/PCI/IOArray+AMD64.inl b/dev/kernel/KernelKit/PCI/IOArray+AMD64.inl
index 842062e3..de2e94f9 100644
--- a/dev/kernel/KernelKit/PCI/IOArray+AMD64.inl
+++ b/dev/kernel/KernelKit/PCI/IOArray+AMD64.inl
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: IO-Impl-AMD64.h
Purpose: I/O for AMD64.
diff --git a/dev/kernel/KernelKit/PCI/Iterator.h b/dev/kernel/KernelKit/PCI/Iterator.h
index d4c89404..9ab746d9 100644
--- a/dev/kernel/KernelKit/PCI/Iterator.h
+++ b/dev/kernel/KernelKit/PCI/Iterator.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/PCI/PCI.h b/dev/kernel/KernelKit/PCI/PCI.h
index d8805a0c..a95861ba 100644
--- a/dev/kernel/KernelKit/PCI/PCI.h
+++ b/dev/kernel/KernelKit/PCI/PCI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/PE.h b/dev/kernel/KernelKit/PE.h
index 3aa8fbf2..57309b3f 100644
--- a/dev/kernel/KernelKit/PE.h
+++ b/dev/kernel/KernelKit/PE.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: PE.h
Purpose: Portable Executable for Kernel.
diff --git a/dev/kernel/KernelKit/PE32CodeMgr.h b/dev/kernel/KernelKit/PE32CodeMgr.h
new file mode 100644
index 00000000..c374fee6
--- /dev/null
+++ b/dev/kernel/KernelKit/PE32CodeMgr.h
@@ -0,0 +1,91 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
+
+ File: PE32CodeMgr.h
+ Purpose: PE32+ Code Mgr and Dylib mgr.
+
+ Revision History:
+
+ 12/02/24: Added file (amlel)
+
+------------------------------------------- */
+
+#pragma once
+
+////////////////////////////////////////////////////
+
+// LAST REV: Mon Feb 12 13:52:01 CET 2024
+
+////////////////////////////////////////////////////
+
+#include <KernelKit/FileMgr.h>
+#include <KernelKit/ILoader.h>
+#include <KernelKit/PE.h>
+#include <NeKit/ErrorOr.h>
+#include <NeKit/KString.h>
+
+#ifndef INC_PROCESS_SCHEDULER_H
+#include <KernelKit/ProcessScheduler.h>
+#endif
+
+#define kPeStackSizeSymbol "__NESizeOfReserveStack"
+#define kPeHeapSizeSymbol "__NESizeOfReserveHeap"
+#define kPeNameSymbol "__NEProgramName"
+
+#define kPeApplicationMime "application/vnd-portable-executable"
+
+#define kPeImageStart "__ImageStart"
+
+namespace Kernel {
+///
+/// \name PE32Loader
+/// \brief PE32+ loader class.
+///
+class PE32Loader : public ILoader {
+ private:
+ explicit PE32Loader() = delete;
+
+ public:
+ explicit PE32Loader(const VoidPtr blob);
+ explicit PE32Loader(const Char* path);
+ ~PE32Loader() override;
+
+ public:
+ NE_COPY_DEFAULT(PE32Loader)
+
+ public:
+ const Char* Path() override;
+ const Char* AsString() override;
+ const Char* MIME() override;
+
+ public:
+ ErrorOr<VoidPtr> FindStart() override;
+ ErrorOr<VoidPtr> FindSectionByName(const Char* name);
+ ErrorOr<VoidPtr> FindSymbol(const Char* name, Int32 kind) override;
+ ErrorOr<VoidPtr> GetBlob() override;
+
+ public:
+ bool IsLoaded() noexcept;
+
+ private:
+#ifdef __FSKIT_INCLUDES_NEFS__
+ OwnPtr<FileStream<Char, NeFileSystemMgr>> fFile;
+#elif defined(__FSKIT_INCLUDES_OPENHEFS__)
+ OwnPtr<FileStream<Char, HeFileSystemMgr>> fFile;
+#else
+ OwnPtr<FileStream<Char>> fFile;
+#endif // __FSKIT_INCLUDES_NEFS__
+
+ Ref<KString> fPath;
+ VoidPtr fCachedBlob;
+ BOOL fBad;
+};
+
+enum { kPEPlatformInvalid, kPEPlatformAMD64 = 100, kPEPlatformARM64 };
+enum { kPETypeInvalid, kPETypeText = 100, kPETypeData, kPETypeBSS };
+
+typedef LDR_SECTION_HEADER PE_SECTION_INFO;
+
+ProcessID rtl_create_user_process(PE32Loader& exec, const Int32& process_kind) noexcept;
+} // namespace NeKernel \ No newline at end of file
diff --git a/dev/kernel/KernelKit/PEF.h b/dev/kernel/KernelKit/PEF.h
index 0410c63a..ff37aad4 100644
--- a/dev/kernel/KernelKit/PEF.h
+++ b/dev/kernel/KernelKit/PEF.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: PEF.h
Purpose: Preferred Executable Format for Kernel.
diff --git a/dev/kernel/KernelKit/PEFCodeMgr.h b/dev/kernel/KernelKit/PEFCodeMgr.h
index 3ed9c097..fc2cfb24 100644
--- a/dev/kernel/KernelKit/PEFCodeMgr.h
+++ b/dev/kernel/KernelKit/PEFCodeMgr.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -55,7 +55,7 @@ class PEFLoader : public ILoader {
private:
#ifdef __FSKIT_INCLUDES_NEFS__
OwnPtr<FileStream<Char, NeFileSystemMgr>> fFile;
-#elif defined(__FSKIT_INCLUDES_HEFS__)
+#elif defined(__FSKIT_INCLUDES_OPENHEFS__)
OwnPtr<FileStream<Char, HeFileSystemMgr>> fFile;
#else
OwnPtr<FileStream<Char>> fFile;
diff --git a/dev/kernel/KernelKit/ProcessScheduler.h b/dev/kernel/KernelKit/ProcessScheduler.h
index 6bdc8b1c..0ce4b606 100644
--- a/dev/kernel/KernelKit/ProcessScheduler.h
+++ b/dev/kernel/KernelKit/ProcessScheduler.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/Semaphore.h b/dev/kernel/KernelKit/Semaphore.h
index f73f36ed..39cd3b7e 100644
--- a/dev/kernel/KernelKit/Semaphore.h
+++ b/dev/kernel/KernelKit/Semaphore.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/ThreadLocalStorage.h b/dev/kernel/KernelKit/ThreadLocalStorage.h
index 47ff526c..831b4c33 100644
--- a/dev/kernel/KernelKit/ThreadLocalStorage.h
+++ b/dev/kernel/KernelKit/ThreadLocalStorage.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/ThreadLocalStorage.inl b/dev/kernel/KernelKit/ThreadLocalStorage.inl
index 7c7a0b7f..d7fa55ce 100644
--- a/dev/kernel/KernelKit/ThreadLocalStorage.inl
+++ b/dev/kernel/KernelKit/ThreadLocalStorage.inl
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/Timer.h b/dev/kernel/KernelKit/Timer.h
index 2d040535..1483d591 100644
--- a/dev/kernel/KernelKit/Timer.h
+++ b/dev/kernel/KernelKit/Timer.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/TraceSrv.h b/dev/kernel/KernelKit/TraceSrv.h
new file mode 100644
index 00000000..67271a22
--- /dev/null
+++ b/dev/kernel/KernelKit/TraceSrv.h
@@ -0,0 +1,22 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
+ NeKernel is licensed under the Apache License 2.0 license.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <CompilerKit/CompilerKit.h>
+
+namespace Kernel {
+namespace Detail {
+ inline constexpr auto kDebugCmdLen = 256U;
+ inline constexpr auto kDebugPort = 51820;
+ inline constexpr auto kDebugMagic = "NE1.0.0;";
+ inline constexpr auto kDebugVersion = 0x0100;
+ inline constexpr auto kDebugDelim = ';';
+ inline constexpr auto kDebugEnd = '\r';
+ typedef UInt64 dk_socket_type;
+} // namespace Detail
+} // namespace Kernel \ No newline at end of file
diff --git a/dev/kernel/KernelKit/UserMgr.h b/dev/kernel/KernelKit/UserMgr.h
index c660025b..e05c9568 100644
--- a/dev/kernel/KernelKit/UserMgr.h
+++ b/dev/kernel/KernelKit/UserMgr.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -22,7 +22,7 @@
///! We got the MGMT, STD (%s format) and GUEST users,
///! all are used to make authorized operations.
-#define kSuperUser "NEKERNEL/MGMT/%s"
+#define kMgmtUser "NEKERNEL/MGMT/%s"
#define kGuestUser "NEKERNEL/GUEST/%s"
#define kStdUser "NEKERNEL/STD/%s"
diff --git a/dev/kernel/KernelKit/UserProcessScheduler.h b/dev/kernel/KernelKit/UserProcessScheduler.h
index 2cf65fe0..9c3d365b 100644
--- a/dev/kernel/KernelKit/UserProcessScheduler.h
+++ b/dev/kernel/KernelKit/UserProcessScheduler.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/KernelKit/UserProcessScheduler.inl b/dev/kernel/KernelKit/UserProcessScheduler.inl
index 0605a5e0..8995c8e5 100644
--- a/dev/kernel/KernelKit/UserProcessScheduler.inl
+++ b/dev/kernel/KernelKit/UserProcessScheduler.inl
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
FILE: UserProcessScheduler.inl
PURPOSE: Low level/Ring-3 process scheduler.
diff --git a/dev/kernel/KernelKit/XCOFF.h b/dev/kernel/KernelKit/XCOFF.h
index 9cfe8ded..8c7a99be 100644
--- a/dev/kernel/KernelKit/XCOFF.h
+++ b/dev/kernel/KernelKit/XCOFF.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: XCOFF.h
Purpose: XCOFF for Kernel.
diff --git a/dev/kernel/KernelKit/ZXD.h b/dev/kernel/KernelKit/ZXD.h
index bae47258..30e9f1c9 100644
--- a/dev/kernel/KernelKit/ZXD.h
+++ b/dev/kernel/KernelKit/ZXD.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/Array.h b/dev/kernel/NeKit/Array.h
index 12c062cb..c78bcf1b 100644
--- a/dev/kernel/NeKit/Array.h
+++ b/dev/kernel/NeKit/Array.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/ArrayList.h b/dev/kernel/NeKit/ArrayList.h
index ee1a4b40..e5341bea 100644
--- a/dev/kernel/NeKit/ArrayList.h
+++ b/dev/kernel/NeKit/ArrayList.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/Atom.h b/dev/kernel/NeKit/Atom.h
index fce5e93d..f6830b81 100644
--- a/dev/kernel/NeKit/Atom.h
+++ b/dev/kernel/NeKit/Atom.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
#pragma once
diff --git a/dev/kernel/NeKit/Crc32.h b/dev/kernel/NeKit/Crc32.h
index f6b04641..3c6a904f 100644
--- a/dev/kernel/NeKit/Crc32.h
+++ b/dev/kernel/NeKit/Crc32.h
@@ -3,7 +3,7 @@
*
* NeKernel
* Date Added: 13/02/2023
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* ========================================================
*/
diff --git a/dev/kernel/NeKit/CxxAbi.h b/dev/kernel/NeKit/CxxAbi.h
index 4b7bf002..7f214dd5 100644
--- a/dev/kernel/NeKit/CxxAbi.h
+++ b/dev/kernel/NeKit/CxxAbi.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
#pragma once
diff --git a/dev/kernel/NeKit/Defines.h b/dev/kernel/NeKit/Defines.h
index ed979e03..c6f7d478 100644
--- a/dev/kernel/NeKit/Defines.h
+++ b/dev/kernel/NeKit/Defines.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/ErrorOr.h b/dev/kernel/NeKit/ErrorOr.h
index 3351c65d..2e3afb46 100644
--- a/dev/kernel/NeKit/ErrorOr.h
+++ b/dev/kernel/NeKit/ErrorOr.h
@@ -2,7 +2,7 @@
* ========================================================
*
* NeKernel
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* ========================================================
*/
@@ -13,7 +13,7 @@
#include <NeKit/Ref.h>
namespace Kernel {
-using ErrorT = UInt32;
+using ErrorT = Int32;
template <typename T>
class ErrorOr final {
@@ -22,7 +22,7 @@ class ErrorOr final {
~ErrorOr() = default;
public:
- explicit ErrorOr(Int32 err) : mRef((T*) RTL_ALLOCA(sizeof(T))), mId(err) {}
+ explicit ErrorOr(ErrorT err) : mRef((T*) RTL_ALLOCA(sizeof(T))), mId(err) {}
explicit ErrorOr(nullPtr) {}
@@ -42,8 +42,9 @@ class ErrorOr final {
Ref<T>& Leak() { return mRef; }
- Int32 Error() { return mId; }
+ ErrorT Error() { return mId; }
+ /// @note DO NOT MAKE THIS EXPLICIT! IT WILL BREAK THE COMPILATION.
operator bool() { return mRef; }
BOOL HasError() { return this->mId > 0; }
diff --git a/dev/kernel/NeKit/Function.h b/dev/kernel/NeKit/Function.h
index cddcc215..05cb44d5 100644
--- a/dev/kernel/NeKit/Function.h
+++ b/dev/kernel/NeKit/Function.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/Json.h b/dev/kernel/NeKit/Json.h
index 35f53b57..1cfa5a8a 100644
--- a/dev/kernel/NeKit/Json.h
+++ b/dev/kernel/NeKit/Json.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/KString.h b/dev/kernel/NeKit/KString.h
index 6a1b04d2..9ff793fa 100644
--- a/dev/kernel/NeKit/KString.h
+++ b/dev/kernel/NeKit/KString.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/KString.inl b/dev/kernel/NeKit/KString.inl
index d238818c..2ee5afba 100644
--- a/dev/kernel/NeKit/KString.inl
+++ b/dev/kernel/NeKit/KString.inl
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/KernelPanic.h b/dev/kernel/NeKit/KernelPanic.h
index 753b18de..f53e88a0 100644
--- a/dev/kernel/NeKit/KernelPanic.h
+++ b/dev/kernel/NeKit/KernelPanic.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/Macros.h b/dev/kernel/NeKit/Macros.h
index b46ffaa8..666a37ac 100644
--- a/dev/kernel/NeKit/Macros.h
+++ b/dev/kernel/NeKit/Macros.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/MutableArray.h b/dev/kernel/NeKit/MutableArray.h
index 02c8dc2d..1e2d8a78 100644
--- a/dev/kernel/NeKit/MutableArray.h
+++ b/dev/kernel/NeKit/MutableArray.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
#pragma once
diff --git a/dev/kernel/NeKit/NeKit.h b/dev/kernel/NeKit/NeKit.h
index 909e1311..59949068 100644
--- a/dev/kernel/NeKit/NeKit.h
+++ b/dev/kernel/NeKit/NeKit.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/New.h b/dev/kernel/NeKit/New.h
index 8ddd88de..58668891 100644
--- a/dev/kernel/NeKit/New.h
+++ b/dev/kernel/NeKit/New.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/OwnPtr.h b/dev/kernel/NeKit/OwnPtr.h
index 22435118..97a6b9c7 100644
--- a/dev/kernel/NeKit/OwnPtr.h
+++ b/dev/kernel/NeKit/OwnPtr.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/PageMgr.h b/dev/kernel/NeKit/PageMgr.h
index ae74a6b6..b94fac4e 100644
--- a/dev/kernel/NeKit/PageMgr.h
+++ b/dev/kernel/NeKit/PageMgr.h
@@ -3,7 +3,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/Pair.h b/dev/kernel/NeKit/Pair.h
index 61668f5a..7ad201ac 100644
--- a/dev/kernel/NeKit/Pair.h
+++ b/dev/kernel/NeKit/Pair.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/Pmm.h b/dev/kernel/NeKit/Pmm.h
index f84bd9f2..40d2b2b6 100644
--- a/dev/kernel/NeKit/Pmm.h
+++ b/dev/kernel/NeKit/Pmm.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/Ref.h b/dev/kernel/NeKit/Ref.h
index 566f7486..08b1538d 100644
--- a/dev/kernel/NeKit/Ref.h
+++ b/dev/kernel/NeKit/Ref.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/Stream.h b/dev/kernel/NeKit/Stream.h
index 26fc46fc..dabf0f19 100644
--- a/dev/kernel/NeKit/Stream.h
+++ b/dev/kernel/NeKit/Stream.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/Utils.h b/dev/kernel/NeKit/Utils.h
index ee18d04c..f2cffd8c 100644
--- a/dev/kernel/NeKit/Utils.h
+++ b/dev/kernel/NeKit/Utils.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NeKit/Variant.h b/dev/kernel/NeKit/Variant.h
index 700c9d9a..de18fbfe 100644
--- a/dev/kernel/NeKit/Variant.h
+++ b/dev/kernel/NeKit/Variant.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NetworkKit/IP.h b/dev/kernel/NetworkKit/IP.h
index 0468d579..230aa47e 100644
--- a/dev/kernel/NetworkKit/IP.h
+++ b/dev/kernel/NetworkKit/IP.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NetworkKit/IPC.h b/dev/kernel/NetworkKit/IPC.h
index c65ec6fb..b18547c0 100644
--- a/dev/kernel/NetworkKit/IPC.h
+++ b/dev/kernel/NetworkKit/IPC.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved..
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license..
File: IPC.h.
Purpose: IPC protocol.
diff --git a/dev/kernel/NetworkKit/LTE.h b/dev/kernel/NetworkKit/LTE.h
index 030f9955..b6cab08e 100644
--- a/dev/kernel/NetworkKit/LTE.h
+++ b/dev/kernel/NetworkKit/LTE.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved..
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license..
File: LTE.h.
Purpose: LTE protocol classes.
diff --git a/dev/kernel/NetworkKit/MAC.h b/dev/kernel/NetworkKit/MAC.h
index 9cfd93c2..25033e70 100644
--- a/dev/kernel/NetworkKit/MAC.h
+++ b/dev/kernel/NetworkKit/MAC.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NetworkKit/NetworkDevice.h b/dev/kernel/NetworkKit/NetworkDevice.h
index 04d208c5..d0ad0221 100644
--- a/dev/kernel/NetworkKit/NetworkDevice.h
+++ b/dev/kernel/NetworkKit/NetworkDevice.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/NetworkKit/NetworkDevice.inl b/dev/kernel/NetworkKit/NetworkDevice.inl
index 6ef480a9..44d1ff16 100644
--- a/dev/kernel/NetworkKit/NetworkDevice.inl
+++ b/dev/kernel/NetworkKit/NetworkDevice.inl
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/SignalKit/Signals.h b/dev/kernel/SignalKit/Signals.h
index fdc27161..36363229 100644
--- a/dev/kernel/SignalKit/Signals.h
+++ b/dev/kernel/SignalKit/Signals.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/StorageKit/AHCI.h b/dev/kernel/StorageKit/AHCI.h
index d4f7cc55..ae69d55c 100644
--- a/dev/kernel/StorageKit/AHCI.h
+++ b/dev/kernel/StorageKit/AHCI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/StorageKit/ATA.h b/dev/kernel/StorageKit/ATA.h
index 49ab3e4e..ec94cfbe 100644
--- a/dev/kernel/StorageKit/ATA.h
+++ b/dev/kernel/StorageKit/ATA.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/StorageKit/NVME.h b/dev/kernel/StorageKit/NVME.h
index 9852c5eb..1acc06aa 100644
--- a/dev/kernel/StorageKit/NVME.h
+++ b/dev/kernel/StorageKit/NVME.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/StorageKit/PRDT.h b/dev/kernel/StorageKit/PRDT.h
index f277897f..4590821a 100644
--- a/dev/kernel/StorageKit/PRDT.h
+++ b/dev/kernel/StorageKit/PRDT.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/StorageKit/SCSI.h b/dev/kernel/StorageKit/SCSI.h
index 25e11716..04943346 100644
--- a/dev/kernel/StorageKit/SCSI.h
+++ b/dev/kernel/StorageKit/SCSI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/StorageKit/StorageKit.h b/dev/kernel/StorageKit/StorageKit.h
index 411aa6ae..3d939304 100644
--- a/dev/kernel/StorageKit/StorageKit.h
+++ b/dev/kernel/StorageKit/StorageKit.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/SwapKit/DiskSwap.h b/dev/kernel/SwapKit/DiskSwap.h
index 674524c8..a45a6035 100644
--- a/dev/kernel/SwapKit/DiskSwap.h
+++ b/dev/kernel/SwapKit/DiskSwap.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025 Amlal El Mahrouss , all rights reserved.
+ Copyright (C) 2024-2025 Amlal El Mahrouss , licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/amd64-ci.make b/dev/kernel/amd64-ci.make
index f21efca4..bd9741b3 100644
--- a/dev/kernel/amd64-ci.make
+++ b/dev/kernel/amd64-ci.make
@@ -1,5 +1,5 @@
##################################################
-# (c) Amlal El Mahrouss, all rights reserved.
+# (c) Amlal El Mahrouss, licensed under the Apache 2.0 license.
# This is the NeKernel's makefile.
##################################################
diff --git a/dev/kernel/amd64-desktop.make b/dev/kernel/amd64-desktop.make
index a3040c89..61e77a4c 100644
--- a/dev/kernel/amd64-desktop.make
+++ b/dev/kernel/amd64-desktop.make
@@ -1,11 +1,11 @@
##################################################
-# (c) Amlal El Mahrouss, all rights reserved.
+# (c) Amlal El Mahrouss, licensed under the Apache 2.0 license.
# This is the NeKernel's makefile.
##################################################
CXX = x86_64-w64-mingw32-g++
LD = x86_64-w64-mingw32-ld
-CCFLAGS = -fshort-wchar -c -D__NE_AMD64__ -D__NE_USE_PEF__ -D__NE_VEPM__ -Wall -Wpedantic -Wextra -mno-red-zone -fno-rtti -fno-exceptions -std=c++20 -D__FSKIT_INCLUDES_HEFS__ -D__FSKIT_INCLUDES_EXT2__ -D__NE_SUPPORT_NX__ -O0 -I../vendor -D__NEOSKRNL__ -D__HAVE_NE_APIS__ -D__FREESTANDING__ -D__NE_VIRTUAL_MEMORY_SUPPORT__ -D__NE_AUTO_FORMAT__ -D__NE__ -I./ -I../ -I../boot
+CCFLAGS = -fshort-wchar -c -D__NE_AMD64__ -D__NE_USE_PEF__ -D__NE_VEPM__ -Wall -Wpedantic -Wextra -mno-red-zone -fno-rtti -fno-exceptions -std=c++20 -D__FSKIT_INCLUDES_OPENHEFS__ -D__FSKIT_INCLUDES_EXT2__ -D__NE_SUPPORT_NX__ -O0 -I../vendor -D__NEOSKRNL__ -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/dev/kernel/arm64-desktop.make b/dev/kernel/arm64-desktop.make
index da629254..08260525 100644
--- a/dev/kernel/arm64-desktop.make
+++ b/dev/kernel/arm64-desktop.make
@@ -1,5 +1,5 @@
##################################################
-# (c) Amlal El Mahrouss, all rights reserved.
+# (c) Amlal El Mahrouss, licensed under the Apache 2.0 license.
# This is the microKernel makefile.
##################################################
diff --git a/dev/kernel/kernel_rsrc.rsrc b/dev/kernel/kernel_rsrc.rsrc
index a785a311..0a43086e 100644
--- a/dev/kernel/kernel_rsrc.rsrc
+++ b/dev/kernel/kernel_rsrc.rsrc
@@ -12,7 +12,7 @@ BEGIN
VALUE "FileDescription", "NeKernel"
VALUE "FileVersion", KERNEL_VERSION
VALUE "InternalName", "ne_kernel"
- VALUE "LegalCopyright", "(c) 2024-2025 Amlal El Mahrouss, all rights reserved."
+ VALUE "LegalCopyright", "(c) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license."
VALUE "OriginalFilename", "ne_kernel"
VALUE "ProductName", "NeKernel"
VALUE "ProductVersion", KERNEL_VERSION
diff --git a/dev/kernel/power64-cb.make b/dev/kernel/power64-cb.make
index 4b6adb96..c46a00d0 100644
--- a/dev/kernel/power64-cb.make
+++ b/dev/kernel/power64-cb.make
@@ -1,4 +1,4 @@
##################################################
-# (c) Amlal El Mahrouss, all rights reserved.
+# (c) Amlal El Mahrouss, licensed under the Apache 2.0 license.
# This is the microKernel makefile.
##################################################
diff --git a/dev/kernel/src/ACPIFactoryInterface.cc b/dev/kernel/src/ACPIFactoryInterface.cc
index 6cebf26c..c0efe73d 100644
--- a/dev/kernel/src/ACPIFactoryInterface.cc
+++ b/dev/kernel/src/ACPIFactoryInterface.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Array.cc b/dev/kernel/src/Array.cc
index 36a8e744..57c77652 100644
--- a/dev/kernel/src/Array.cc
+++ b/dev/kernel/src/Array.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/ArrayList.cc b/dev/kernel/src/ArrayList.cc
index 39291935..c028086f 100644
--- a/dev/kernel/src/ArrayList.cc
+++ b/dev/kernel/src/ArrayList.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/AsciiUtils.cc b/dev/kernel/src/AsciiUtils.cc
index 8d2f9dc5..aed11e94 100644
--- a/dev/kernel/src/AsciiUtils.cc
+++ b/dev/kernel/src/AsciiUtils.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Atom.cc b/dev/kernel/src/Atom.cc
index a0e45468..ba8a6088 100644
--- a/dev/kernel/src/Atom.cc
+++ b/dev/kernel/src/Atom.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/BinaryMutex.cc b/dev/kernel/src/BinaryMutex.cc
index 3fef477c..e91051f2 100644
--- a/dev/kernel/src/BinaryMutex.cc
+++ b/dev/kernel/src/BinaryMutex.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/BitMapMgr.cc b/dev/kernel/src/BitMapMgr.cc
index a7ca12ce..c3d3c05d 100644
--- a/dev/kernel/src/BitMapMgr.cc
+++ b/dev/kernel/src/BitMapMgr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/CodeMgr.cc b/dev/kernel/src/CodeMgr.cc
index 6146682a..7f85d547 100644
--- a/dev/kernel/src/CodeMgr.cc
+++ b/dev/kernel/src/CodeMgr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Crc32.cc b/dev/kernel/src/Crc32.cc
index df0b34e3..49bd3d10 100644
--- a/dev/kernel/src/Crc32.cc
+++ b/dev/kernel/src/Crc32.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Defines.cc b/dev/kernel/src/Defines.cc
index a06b4dd2..1cc5280e 100644
--- a/dev/kernel/src/Defines.cc
+++ b/dev/kernel/src/Defines.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/DeviceMgr.cc b/dev/kernel/src/DeviceMgr.cc
index b12470a9..198cd7ef 100644
--- a/dev/kernel/src/DeviceMgr.cc
+++ b/dev/kernel/src/DeviceMgr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/DriveMgr.cc b/dev/kernel/src/DriveMgr.cc
index 9f107e97..a0f7bb77 100644
--- a/dev/kernel/src/DriveMgr.cc
+++ b/dev/kernel/src/DriveMgr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -152,10 +152,8 @@ DriveTrait io_construct_blank_drive() noexcept {
return trait;
}
-namespace Detail {
+namespace Probe {
Void io_detect_drive(DriveTrait& trait) {
- trait.fInit(trait.fPacket);
-
EPM_PART_BLOCK block_struct;
trait.fPacket.fPacketLba = kEPMBootBlockLba;
@@ -165,6 +163,8 @@ namespace Detail {
rt_copy_memory((VoidPtr) "fs/detect-packet", trait.fPacket.fPacketMime,
rt_string_len("fs/detect-packet"));
+ trait.fInit(trait.fPacket);
+
trait.fInput(trait.fPacket);
if (rt_string_cmp(block_struct.Magic, kEPMMagic, kEPMMagicLength) == 0) {
@@ -220,12 +220,11 @@ namespace Detail {
/// @brief Fetches the main drive.
/// @return the new drive. (returns kEPMDrive if EPM formatted)
DriveTrait io_construct_main_drive() noexcept {
- DriveTrait trait;
-
constexpr auto kMainDrive = "/media/main/";
- rt_copy_memory((VoidPtr) kMainDrive, trait.fName, rt_string_len(kMainDrive));
+ DriveTrait trait{};
+ rt_copy_memory((VoidPtr) kMainDrive, trait.fName, rt_string_len(kMainDrive));
MUST_PASS(trait.fName[0] != 0);
trait.fVerify = io_drv_unimplemented;
@@ -233,10 +232,8 @@ DriveTrait io_construct_main_drive() noexcept {
trait.fInput = io_drv_input;
trait.fInit = io_drv_init;
trait.fProtocol = io_drv_kind;
-
- kout << "DriveMgr: Detecting partition scheme of: " << trait.fName << ".\r";
-
- Detail::io_detect_drive(trait);
+
+ Probe::io_detect_drive(trait);
return trait;
}
diff --git a/dev/kernel/src/ErrorOr.cc b/dev/kernel/src/ErrorOr.cc
index a872164c..fedfe3b3 100644
--- a/dev/kernel/src/ErrorOr.cc
+++ b/dev/kernel/src/ErrorOr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/FS/Ext2+IFS.cc b/dev/kernel/src/FS/Ext2+IFS.cc
index 2c359197..51e2cde3 100644
--- a/dev/kernel/src/FS/Ext2+IFS.cc
+++ b/dev/kernel/src/FS/Ext2+IFS.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/FS/NeFS+FileMgr.cc b/dev/kernel/src/FS/NeFS+FileMgr.cc
index 2fcfa2bb..7d663397 100644
--- a/dev/kernel/src/FS/NeFS+FileMgr.cc
+++ b/dev/kernel/src/FS/NeFS+FileMgr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/FS/NeFS+FileSystemParser.cc b/dev/kernel/src/FS/NeFS+FileSystemParser.cc
index b50841a4..848a1cc4 100644
--- a/dev/kernel/src/FS/NeFS+FileSystemParser.cc
+++ b/dev/kernel/src/FS/NeFS+FileSystemParser.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/FS/OpenHeFS+FileMgr.cc b/dev/kernel/src/FS/OpenHeFS+FileMgr.cc
index bb87fd67..8a3c7968 100644
--- a/dev/kernel/src/FS/OpenHeFS+FileMgr.cc
+++ b/dev/kernel/src/FS/OpenHeFS+FileMgr.cc
@@ -1,11 +1,11 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
#ifndef __NE_MINIMAL_OS__
-#ifdef __FSKIT_INCLUDES_HEFS__
+#ifdef __FSKIT_INCLUDES_OPENHEFS__
#include <KernelKit/FileMgr.h>
#include <KernelKit/HeapMgr.h>
@@ -187,5 +187,5 @@ _Output HeFileSystemParser* HeFileSystemMgr::GetParser() noexcept {
}
} // namespace Kernel
-#endif // ifdef __FSKIT_INCLUDES_HEFS__
+#endif // ifdef __FSKIT_INCLUDES_OPENHEFS__
#endif // ifndef __NE_MINIMAL_OS__
diff --git a/dev/kernel/src/FS/OpenHeFS+FileSystemParser.cc b/dev/kernel/src/FS/OpenHeFS+FileSystemParser.cc
index 3746ebc1..8bfbf7fb 100644
--- a/dev/kernel/src/FS/OpenHeFS+FileSystemParser.cc
+++ b/dev/kernel/src/FS/OpenHeFS+FileSystemParser.cc
@@ -1,10 +1,10 @@
/* -------------------------------------------
- Copyright (C) 2024-2025 Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
-#ifdef __FSKIT_INCLUDES_HEFS__
+#ifdef __FSKIT_INCLUDES_OPENHEFS__
#include <FSKit/OpenHeFS.h>
#include <FirmwareKit/EPM.h>
@@ -1149,13 +1149,15 @@ STATIC DriveTrait kMountPoint;
/// @brief Initialize the OpenHeFS filesystem.
/// @return To check its status, see err_local_get().
-Boolean OpenHeFS::fs_init_hefs(Void) noexcept {
+Boolean OpenHeFS::fs_init_openhefs(Void) noexcept {
kout << "Verifying disk...\r";
kMountPoint = io_construct_main_drive();
- if (kMountPoint.fPacket.fPacketReadOnly == YES)
- ke_panic(RUNTIME_CHECK_FILESYSTEM, "Main disk cannot be mounted (read-only media).");
+ if (kMountPoint.fPacket.fPacketReadOnly == YES) {
+ kout << "Main disk cannot be mounted (read-only media).\r";
+ return NO;
+ }
HeFileSystemParser parser;
@@ -1163,4 +1165,4 @@ Boolean OpenHeFS::fs_init_hefs(Void) noexcept {
}
} // namespace Kernel
-#endif // ifdef __FSKIT_INCLUDES_HEFS__
+#endif // ifdef __FSKIT_INCLUDES_OPENHEFS__
diff --git a/dev/kernel/src/FileMgr.cc b/dev/kernel/src/FileMgr.cc
index faed9ae1..bb6b27d0 100644
--- a/dev/kernel/src/FileMgr.cc
+++ b/dev/kernel/src/FileMgr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/GUIDWizard.cc b/dev/kernel/src/GUIDWizard.cc
index b36fffc2..81bf3293 100644
--- a/dev/kernel/src/GUIDWizard.cc
+++ b/dev/kernel/src/GUIDWizard.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: GUIDWizard.cc
Purpose: GUID helper code
diff --git a/dev/kernel/src/GUIDWrapper.cc b/dev/kernel/src/GUIDWrapper.cc
index d5ab6bb8..de773a74 100644
--- a/dev/kernel/src/GUIDWrapper.cc
+++ b/dev/kernel/src/GUIDWrapper.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Gfx/FBDeviceInterface.cc b/dev/kernel/src/Gfx/FBDeviceInterface.cc
index f1867b45..422aaf53 100644
--- a/dev/kernel/src/Gfx/FBDeviceInterface.cc
+++ b/dev/kernel/src/Gfx/FBDeviceInterface.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/HardwareThreadScheduler.cc b/dev/kernel/src/HardwareThreadScheduler.cc
index a4b6b4b8..2600c4cb 100644
--- a/dev/kernel/src/HardwareThreadScheduler.cc
+++ b/dev/kernel/src/HardwareThreadScheduler.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/HeapMgr.cc b/dev/kernel/src/HeapMgr.cc
index eb86f378..1e5b460e 100644
--- a/dev/kernel/src/HeapMgr.cc
+++ b/dev/kernel/src/HeapMgr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/IDylibObject.cc b/dev/kernel/src/IDylibObject.cc
index 6def3fcf..61191af1 100644
--- a/dev/kernel/src/IDylibObject.cc
+++ b/dev/kernel/src/IDylibObject.cc
@@ -2,7 +2,7 @@
* ========================================================
*
* NeKernel
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* ========================================================
*/
diff --git a/dev/kernel/src/IFS.cc b/dev/kernel/src/IFS.cc
index ffb8ef8e..e975750a 100644
--- a/dev/kernel/src/IFS.cc
+++ b/dev/kernel/src/IFS.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -13,7 +13,7 @@
* Purpose: Filesystem to mountpoint interface.
* Date: 05/26/2025
*
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
*************************************************************/
diff --git a/dev/kernel/src/IPEFDylibObject.cc b/dev/kernel/src/IPEFDylibObject.cc
index 91f8c88a..bca09efe 100644
--- a/dev/kernel/src/IPEFDylibObject.cc
+++ b/dev/kernel/src/IPEFDylibObject.cc
@@ -2,7 +2,7 @@
* ========================================================
*
* NeKernel
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* ========================================================
*/
diff --git a/dev/kernel/src/IndexableProperty.cc b/dev/kernel/src/IndexableProperty.cc
index 56143607..7ed6f708 100644
--- a/dev/kernel/src/IndexableProperty.cc
+++ b/dev/kernel/src/IndexableProperty.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Json.cc b/dev/kernel/src/Json.cc
index d156c0ce..79f16cfb 100644
--- a/dev/kernel/src/Json.cc
+++ b/dev/kernel/src/Json.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/KPC.cc b/dev/kernel/src/KPC.cc
index 1693fbd3..94e86399 100644
--- a/dev/kernel/src/KPC.cc
+++ b/dev/kernel/src/KPC.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/KernelTaskScheduler.cc b/dev/kernel/src/KernelTaskScheduler.cc
index 8bbe5601..b6cea3bc 100644
--- a/dev/kernel/src/KernelTaskScheduler.cc
+++ b/dev/kernel/src/KernelTaskScheduler.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
FILE: KernelTaskScheduler.cc
PURPOSE: Kernel Task scheduler.
diff --git a/dev/kernel/src/LockDelegate.cc b/dev/kernel/src/LockDelegate.cc
index d02de3e4..759fad73 100644
--- a/dev/kernel/src/LockDelegate.cc
+++ b/dev/kernel/src/LockDelegate.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/MutableArray.cc b/dev/kernel/src/MutableArray.cc
index b7aaee1c..c2e98851 100644
--- a/dev/kernel/src/MutableArray.cc
+++ b/dev/kernel/src/MutableArray.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Network/IPAddress.cc b/dev/kernel/src/Network/IPAddress.cc
index bc46292b..7834cfa8 100644
--- a/dev/kernel/src/Network/IPAddress.cc
+++ b/dev/kernel/src/Network/IPAddress.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Network/IPCAddress.cc b/dev/kernel/src/Network/IPCAddress.cc
index 4c1dd500..9af46ad1 100644
--- a/dev/kernel/src/Network/IPCAddress.cc
+++ b/dev/kernel/src/Network/IPCAddress.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Network/IPCMessage.cc b/dev/kernel/src/Network/IPCMessage.cc
index 6f8223f7..16d5ed80 100644
--- a/dev/kernel/src/Network/IPCMessage.cc
+++ b/dev/kernel/src/Network/IPCMessage.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Network/MACAddressGetter.cc b/dev/kernel/src/Network/MACAddressGetter.cc
index 736e1e27..8356cd7d 100644
--- a/dev/kernel/src/Network/MACAddressGetter.cc
+++ b/dev/kernel/src/Network/MACAddressGetter.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Network/NetworkDevice.cc b/dev/kernel/src/Network/NetworkDevice.cc
index ffdfa53b..b1ecf841 100644
--- a/dev/kernel/src/Network/NetworkDevice.cc
+++ b/dev/kernel/src/Network/NetworkDevice.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/New+Delete.cc b/dev/kernel/src/New+Delete.cc
index da705f26..aab963aa 100644
--- a/dev/kernel/src/New+Delete.cc
+++ b/dev/kernel/src/New+Delete.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/OwnPtr.cc b/dev/kernel/src/OwnPtr.cc
index c716c2f4..f07c9393 100644
--- a/dev/kernel/src/OwnPtr.cc
+++ b/dev/kernel/src/OwnPtr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/PE32CodeMgr.cc b/dev/kernel/src/PE32CodeMgr.cc
new file mode 100644
index 00000000..ec8c6e1b
--- /dev/null
+++ b/dev/kernel/src/PE32CodeMgr.cc
@@ -0,0 +1,258 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
+
+------------------------------------------- */
+
+#include <CFKit/Utils.h>
+#include <KernelKit/DebugOutput.h>
+#include <KernelKit/HeapMgr.h>
+#include <KernelKit/PE32CodeMgr.h>
+#include <KernelKit/ProcessScheduler.h>
+#include <NeKit/Defines.h>
+#include <NeKit/KString.h>
+#include <NeKit/OwnPtr.h>
+#include <NeKit/KernelPanic.h>
+
+namespace Kernel {
+namespace Detail {
+ /***********************************************************************************/
+ /// @brief Get the PE32+ platform signature according to the compiled architecture.
+ /***********************************************************************************/
+
+ UInt32 ldr_get_platform_pe(void) noexcept {
+#if defined(__NE_AMD64__)
+ return kPEPlatformAMD64;
+#elif defined(__NE_ARM64__)
+ return kPEPlatformARM64;
+#else
+ return kPEPlatformInvalid;
+#endif // __32x0__ || __64x0__ || __x86_64__
+ }
+} // namespace Detail
+
+/***********************************************************************************/
+/// @brief PE32+ loader constructor w/ blob.
+/// @param blob file blob.
+/***********************************************************************************/
+
+PE32Loader::PE32Loader(const VoidPtr blob) : fCachedBlob(blob) {
+ MUST_PASS(fCachedBlob);
+ fBad = false;
+}
+
+/***********************************************************************************/
+/// @brief PE32+ loader constructor.
+/// @param path the filesystem path.
+/***********************************************************************************/
+
+PE32Loader::PE32Loader(const Char* path) : fCachedBlob(nullptr), fBad(false) {
+ fFile.New(const_cast<Char*>(path), kRestrictRB);
+ fPath = KStringBuilder::Construct(path).Leak();
+
+ auto kPefHeader = "PE32_BLOB";
+ fCachedBlob = fFile->Read(kPefHeader, 0);
+
+ if (!fCachedBlob) fBad = YES;
+}
+
+/***********************************************************************************/
+/// @brief PE32+ destructor.
+/***********************************************************************************/
+
+PE32Loader::~PE32Loader() {
+ if (fCachedBlob) mm_free_ptr(fCachedBlob);
+
+ fFile.Delete();
+}
+
+/***********************************************************************************/
+/// @brief Finds the section according to its name.
+/// @param name name of section.
+/***********************************************************************************/
+
+ErrorOr<VoidPtr> PE32Loader::FindSectionByName(const Char* name) {
+ if (!fCachedBlob || fBad || !name) return ErrorOr<VoidPtr>{kErrorInvalidData};
+
+ LDR_EXEC_HEADER_PTR header_ptr = CF::ldr_find_exec_header((const Char*) fCachedBlob);
+ LDR_OPTIONAL_HEADER_PTR opt_header_ptr = CF::ldr_find_opt_exec_header((const Char*) fCachedBlob);
+
+ if (!header_ptr || !opt_header_ptr) return ErrorOr<VoidPtr>{kErrorInvalidData};
+
+#ifdef __NE_AMD64__
+ if (header_ptr->Machine != kPeMachineAMD64 || header_ptr->Signature != kPeSignature) {
+ return ErrorOr<VoidPtr>{kErrorInvalidData};
+ }
+
+#elif defined(__NE_ARM64__)
+ if (header_ptr->Machine != kPeMachineARM64 || header_ptr->Signature != kPeSignature) {
+ return ErrorOr<VoidPtr>{kErrorInvalidData};
+ }
+#endif // __NE_AMD64__ || __NE_ARM64__
+
+ if (header_ptr->NumberOfSections < 1) {
+ return ErrorOr<VoidPtr>{kErrorInvalidData};
+ }
+
+ LDR_SECTION_HEADER_PTR secs =
+ (LDR_SECTION_HEADER_PTR) (((Char*) opt_header_ptr) + header_ptr->SizeOfOptionalHeader);
+
+ for (SizeT sectIndex = 0; sectIndex < header_ptr->NumberOfSections; ++sectIndex) {
+ LDR_SECTION_HEADER_PTR sect = &secs[sectIndex];
+
+ if (KStringBuilder::Equals(name, sect->Name)) {
+ return ErrorOr<VoidPtr>(sect);
+ }
+ }
+
+ return ErrorOr<VoidPtr>{kErrorInvalidData};
+}
+
+/***********************************************************************************/
+/// @brief Finds the symbol according to it's name.
+/// @param name name of symbol.
+/// @param kind kind of symbol we want.
+/***********************************************************************************/
+
+ErrorOr<VoidPtr> PE32Loader::FindSymbol(const Char* name, Int32 kind) {
+ if (!name || *name == 0) return ErrorOr<VoidPtr>{kErrorInvalidData};
+
+ auto section_name = "\0";
+
+ switch (kind) {
+ case kPETypeData:
+ section_name = ".data";
+ break;
+ case kPETypeBSS:
+ section_name = ".bss";
+ break;
+ case kPETypeText:
+ section_name = ".text";
+ break;
+ default:
+ return ErrorOr<VoidPtr>{kErrorInvalidData};
+ }
+
+ auto sec = this->FindSectionByName(section_name);
+ LDR_SECTION_HEADER_PTR* sec_ptr = (LDR_SECTION_HEADER_PTR*) sec.Leak().Leak();
+
+ if (!sec_ptr || !*sec_ptr) return ErrorOr<VoidPtr>{kErrorInvalidData};
+
+ LDR_OPTIONAL_HEADER_PTR opt_header_ptr = CF::ldr_find_opt_exec_header((const Char*) fCachedBlob);
+
+ if (opt_header_ptr) {
+ LDR_DATA_DIRECTORY_PTR data_dirs =
+ (LDR_DATA_DIRECTORY_PTR) ((UInt8*) opt_header_ptr + sizeof(LDR_OPTIONAL_HEADER));
+
+ LDR_DATA_DIRECTORY_PTR export_dir_entry = &data_dirs[0];
+
+ if (export_dir_entry->VirtualAddress == 0 || export_dir_entry->Size == 0)
+ return ErrorOr<VoidPtr>{kErrorInvalidData};
+
+ LDR_EXPORT_DIRECTORY* export_dir =
+ (LDR_EXPORT_DIRECTORY*) ((UIntPtr) fCachedBlob + export_dir_entry->VirtualAddress);
+
+ UInt32* name_table = (UInt32*) ((UIntPtr) fCachedBlob + export_dir->AddressOfNames);
+ UInt16* ordinal_table = (UInt16*) ((UIntPtr) fCachedBlob + export_dir->AddressOfNameOrdinal);
+ UInt32* function_table = (UInt32*) ((UIntPtr) fCachedBlob + export_dir->AddressOfFunctions);
+
+ for (UInt32 i = 0; i < export_dir->NumberOfNames; ++i) {
+ const char* exported_name = (const char*) ((UIntPtr) fCachedBlob + name_table[i]);
+
+ if (KStringBuilder::Equals(exported_name, name)) {
+ UInt16 ordinal = ordinal_table[i];
+ UInt32 rva = function_table[ordinal];
+
+ VoidPtr symbol_addr = (VoidPtr) ((UIntPtr) fCachedBlob + rva);
+
+ return ErrorOr<VoidPtr>{symbol_addr};
+ }
+ }
+ }
+
+ return ErrorOr<VoidPtr>{kErrorInvalidData};
+}
+
+/// @brief Finds the executable entrypoint.
+/// @return
+ErrorOr<VoidPtr> PE32Loader::FindStart() {
+ if (auto sym = this->FindSymbol(kPeImageStart, 0); sym) return sym;
+
+ return ErrorOr<VoidPtr>(kErrorExecutable);
+}
+
+/// @brief Tells if the executable is loaded or not.
+/// @return Whether it's not bad and is cached.
+bool PE32Loader::IsLoaded() noexcept {
+ return !fBad && fCachedBlob;
+}
+
+const Char* PE32Loader::Path() {
+ return fPath.Leak().CData();
+}
+
+const Char* PE32Loader::AsString() {
+#ifdef __32x0__
+ return "32x0 PE";
+#elif defined(__64x0__)
+ return "64x0 PE";
+#elif defined(__x86_64__)
+ return "x86_64 PE";
+#elif defined(__aarch64__)
+ return "AARCH64 PE";
+#elif defined(__powerpc64__)
+ return "POWER64 PE";
+#else
+ return "???? PE";
+#endif // __32x0__ || __64x0__ || __x86_64__ || __powerpc64__
+}
+
+const Char* PE32Loader::MIME() {
+ return kPeApplicationMime;
+}
+
+ErrorOr<VoidPtr> PE32Loader::GetBlob() {
+ return ErrorOr<VoidPtr>{this->fCachedBlob};
+}
+
+namespace Utils {
+ ProcessID rtl_create_user_process(PE32Loader& exec, const Int32& process_kind) noexcept {
+ auto errOrStart = exec.FindStart();
+
+ if (errOrStart.Error() != kErrorSuccess) return kSchedInvalidPID;
+
+ auto symname = exec.FindSymbol(kPeImageStart, 0);
+
+ if (!symname) {
+ symname = ErrorOr<VoidPtr>{(VoidPtr) rt_alloc_string("USER_PROCESS_PE32+")};
+ }
+
+ auto id =
+ UserProcessScheduler::The().Spawn(reinterpret_cast<const Char*>(symname.Leak().Leak()),
+ errOrStart.Leak().Leak(), exec.GetBlob().Leak().Leak());
+
+ mm_free_ptr(symname.Leak().Leak());
+
+ if (id != kSchedInvalidPID) {
+ auto stacksym = exec.FindSymbol(kPeStackSizeSymbol, 0);
+
+ if (!stacksym) {
+ stacksym = ErrorOr<VoidPtr>{(VoidPtr) new UIntPtr(kSchedMaxStackSz)};
+ }
+
+ if ((*(volatile UIntPtr*) stacksym.Leak().Leak()) > kSchedMaxStackSz) {
+ *(volatile UIntPtr*) stacksym.Leak().Leak() = kSchedMaxStackSz;
+ }
+
+ UserProcessScheduler::The().TheCurrentTeam().AsArray()[id].Kind = process_kind;
+ UserProcessScheduler::The().TheCurrentTeam().AsArray()[id].StackSize =
+ *(UIntPtr*) stacksym.Leak().Leak();
+
+ mm_free_ptr(stacksym.Leak().Leak());
+ stacksym.Leak().Leak() = nullptr;
+ }
+
+ return id;
+ }
+} // namespace Utils
+} // namespace NeKernel \ No newline at end of file
diff --git a/dev/kernel/src/PEFCodeMgr.cc b/dev/kernel/src/PEFCodeMgr.cc
index a0d0a6af..3175d815 100644
--- a/dev/kernel/src/PEFCodeMgr.cc
+++ b/dev/kernel/src/PEFCodeMgr.cc
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
- Copyright (C) 2025, Amlal El Mahrouss & NeKernel contributors, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
+ Copyright (C) 2025, Amlal El Mahrouss & NeKernel contributors, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -192,7 +192,7 @@ ErrorOr<VoidPtr> PEFLoader::FindSymbol(const Char* name, Int32 kind) {
Char* unconst_symbol = const_cast<Char*>(name);
for (SizeT i = 0UL; i < rt_string_len(unconst_symbol, kPefNameLen); ++i) {
- if (unconst_symbol[i] == ' ') {
+ if (rt_is_space(unconst_symbol[i])) {
unconst_symbol[i] = kMangleCharacter;
}
}
@@ -301,7 +301,7 @@ namespace Utils {
auto symname = exec.FindSymbol(kPefNameSymbol, kPefData);
if (!symname) {
- symname = ErrorOr<VoidPtr>{(VoidPtr) rt_alloc_string("USER_PROCESS")};
+ symname = ErrorOr<VoidPtr>{(VoidPtr) rt_alloc_string("USER_PROCESS_PEF")};
}
ProcessID id =
diff --git a/dev/kernel/src/PRDT.cc b/dev/kernel/src/PRDT.cc
index 0c84fd29..8feb96dc 100644
--- a/dev/kernel/src/PRDT.cc
+++ b/dev/kernel/src/PRDT.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/PageMgr.cc b/dev/kernel/src/PageMgr.cc
index 2aa2a79c..ffc88bca 100644
--- a/dev/kernel/src/PageMgr.cc
+++ b/dev/kernel/src/PageMgr.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Pmm.cc b/dev/kernel/src/Pmm.cc
index 7f5050f9..ac0c629b 100644
--- a/dev/kernel/src/Pmm.cc
+++ b/dev/kernel/src/Pmm.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Property.cc b/dev/kernel/src/Property.cc
index 714fb2a4..87ffec18 100644
--- a/dev/kernel/src/Property.cc
+++ b/dev/kernel/src/Property.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Ref.cc b/dev/kernel/src/Ref.cc
index db584d9c..ff66e882 100644
--- a/dev/kernel/src/Ref.cc
+++ b/dev/kernel/src/Ref.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Semaphore.cc b/dev/kernel/src/Semaphore.cc
index acbbb57f..52965ceb 100644
--- a/dev/kernel/src/Semaphore.cc
+++ b/dev/kernel/src/Semaphore.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/SoftwareTimer.cc b/dev/kernel/src/SoftwareTimer.cc
index 52087931..66a4c94f 100644
--- a/dev/kernel/src/SoftwareTimer.cc
+++ b/dev/kernel/src/SoftwareTimer.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Storage/AHCIDeviceInterface.cc b/dev/kernel/src/Storage/AHCIDeviceInterface.cc
index 6dcfed69..e392bca3 100644
--- a/dev/kernel/src/Storage/AHCIDeviceInterface.cc
+++ b/dev/kernel/src/Storage/AHCIDeviceInterface.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Storage/ATADeviceInterface.cc b/dev/kernel/src/Storage/ATADeviceInterface.cc
index 70d6e9ae..faf5bcad 100644
--- a/dev/kernel/src/Storage/ATADeviceInterface.cc
+++ b/dev/kernel/src/Storage/ATADeviceInterface.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Storage/NVMEDeviceInterface.cc b/dev/kernel/src/Storage/NVMEDeviceInterface.cc
index 0b8043b7..ead294f9 100644
--- a/dev/kernel/src/Storage/NVMEDeviceInterface.cc
+++ b/dev/kernel/src/Storage/NVMEDeviceInterface.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Storage/SCSIDeviceInterface.cc b/dev/kernel/src/Storage/SCSIDeviceInterface.cc
index 6f26f486..d223ca9c 100644
--- a/dev/kernel/src/Storage/SCSIDeviceInterface.cc
+++ b/dev/kernel/src/Storage/SCSIDeviceInterface.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Stream.cc b/dev/kernel/src/Stream.cc
index e05f6e6d..e9b66c8c 100644
--- a/dev/kernel/src/Stream.cc
+++ b/dev/kernel/src/Stream.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: Stream.cc
Purpose: Stream object
diff --git a/dev/kernel/src/Swap/DiskSwap.cc b/dev/kernel/src/Swap/DiskSwap.cc
index 99efb2c0..ce265102 100644
--- a/dev/kernel/src/Swap/DiskSwap.cc
+++ b/dev/kernel/src/Swap/DiskSwap.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025 Amlal El Mahrouss , all rights reserved.
+ Copyright (C) 2024-2025 Amlal El Mahrouss , licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/ThreadLocalStorage.cc b/dev/kernel/src/ThreadLocalStorage.cc
index f54eeaab..fa445d84 100644
--- a/dev/kernel/src/ThreadLocalStorage.cc
+++ b/dev/kernel/src/ThreadLocalStorage.cc
@@ -2,7 +2,7 @@
* ========================================================
*
* NeKernel
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* ========================================================
*/
diff --git a/dev/kernel/src/Timer.cc b/dev/kernel/src/Timer.cc
index 6539f1a9..45b0d929 100644
--- a/dev/kernel/src/Timer.cc
+++ b/dev/kernel/src/Timer.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/UserMgr.cc b/dev/kernel/src/UserMgr.cc
index 5ee2aa33..103e8ec9 100644
--- a/dev/kernel/src/UserMgr.cc
+++ b/dev/kernel/src/UserMgr.cc
@@ -2,7 +2,7 @@
* ========================================================
*
* NeKernel
- * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
*
* File: UserMgr.cc
* Purpose: User Manager, used to provide authentication and security.
@@ -89,14 +89,11 @@ Bool User::Save(const UserPublicKey password) noexcept {
Bool User::Login(const UserPublicKey password) noexcept {
if (!password || !*password) return No;
- // now check if the password matches.
- if (this->mUserFNV == Detail::user_fnv_generator(password, this)) {
- kout << "User::Login: Password matches.\r";
- return Yes;
- }
+ auto ret = this->mUserFNV == Detail::user_fnv_generator(password, this);
- kout << "User::Login: Password doesn't match.\r";
- return No;
+ // now check if the password matches.
+ kout << (ret ? "User::Login: Password matches.\r" : "User::Login: Password doesn't match.\r");
+ return ret;
}
Bool User::operator==(const User& lhs) {
diff --git a/dev/kernel/src/UserProcessScheduler.cc b/dev/kernel/src/UserProcessScheduler.cc
index ac25c3d8..aafa71f6 100644
--- a/dev/kernel/src/UserProcessScheduler.cc
+++ b/dev/kernel/src/UserProcessScheduler.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
FILE: UserProcessScheduler.cc
PURPOSE: Low-Privilege/Ring-3 process scheduler.
@@ -678,11 +678,13 @@ UserProcessScheduler::operator bool() {
/// @brief this checks if no process is on the team.
////////////////////////////////////////////////////////////
Bool UserProcessScheduler::operator!() {
+ SInt64 cnt = 0UL;
+
for (auto process_index = 0UL; process_index < mTeam.AsArray().Count(); ++process_index) {
auto& process = mTeam.AsArray()[process_index];
- if (UserProcessHelper::CanBeScheduled(process)) return false;
+ if (UserProcessHelper::CanBeScheduled(process)) ++cnt;
}
- return true;
+ return cnt == 0L;
}
} // namespace Kernel
diff --git a/dev/kernel/src/UserProcessTeam.cc b/dev/kernel/src/UserProcessTeam.cc
index 23536242..ba675209 100644
--- a/dev/kernel/src/UserProcessTeam.cc
+++ b/dev/kernel/src/UserProcessTeam.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/UtfUtils.cc b/dev/kernel/src/UtfUtils.cc
index d0523b96..df634735 100644
--- a/dev/kernel/src/UtfUtils.cc
+++ b/dev/kernel/src/UtfUtils.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/Variant.cc b/dev/kernel/src/Variant.cc
index 51e5f5b8..b1cc5485 100644
--- a/dev/kernel/src/Variant.cc
+++ b/dev/kernel/src/Variant.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/kernel/src/ZXD.cc b/dev/kernel/src/ZXD.cc
index 8ca6bbf7..7cbeac8b 100644
--- a/dev/kernel/src/ZXD.cc
+++ b/dev/kernel/src/ZXD.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/launch/LaunchKit/Foundation.h b/dev/launch/LaunchKit/Foundation.h
index 24df46f6..65bc3312 100644
--- a/dev/launch/LaunchKit/Foundation.h
+++ b/dev/launch/LaunchKit/Foundation.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/launch/src/AppMain.cc b/dev/launch/src/AppMain.cc
index eef95fba..94b0ba35 100644
--- a/dev/launch/src/AppMain.cc
+++ b/dev/launch/src/AppMain.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -10,7 +10,7 @@
/// @note This called by _NeMain from its own runtime.
extern "C" SInt32 nelaunch_startup_fn(Void) {
- /// @todo Start LaunchServices.fwrk services, make the launcher manageable too (via mgmt.launch)
+ /// @todo Start LaunchHelpers.fwrk services, make the launcher manageable too (via mgmt.launch)
NELAUNCH_INFO("Turning on launcher...");
diff --git a/dev/launch/src/CRuntimeZero.S b/dev/launch/src/CRuntimeZero.S
index 73fa5352..f24edeaa 100644
--- a/dev/launch/src/CRuntimeZero.S
+++ b/dev/launch/src/CRuntimeZero.S
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/libDDK/DriverKit/ddk.h b/dev/libDDK/DriverKit/ddk.h
index 2e2dddf0..af0cc829 100644
--- a/dev/libDDK/DriverKit/ddk.h
+++ b/dev/libDDK/DriverKit/ddk.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright Amlal El Mahrouss 2025, all rights reserved.
+ Copyright Amlal El Mahrouss 2025, licensed under the Apache 2.0 license.
FILE: ddk.h
PURPOSE: DDK Driver model base header.
diff --git a/dev/libDDK/DriverKit/dki/contract.h b/dev/libDDK/DriverKit/dki/contract.h
index 23884e02..99acbf8c 100644
--- a/dev/libDDK/DriverKit/dki/contract.h
+++ b/dev/libDDK/DriverKit/dki/contract.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright Amlal El Mahrouss 2025, all rights reserved.
+ Copyright Amlal El Mahrouss 2025, licensed under the Apache 2.0 license.
FILE: ddk.h
PURPOSE: Driver Kernel Interface Model base header.
@@ -10,7 +10,7 @@
#pragma once
#include <CompilerKit/CompilerKit.h>
-#include <DriverKit/macros.h>
+#include <libDDK/DriverKit/macros.h>
#define DKI_CONTRACT_IMPL : public ::Kernel::DKIContract
diff --git a/dev/libDDK/DriverKit/macros.h b/dev/libDDK/DriverKit/macros.h
index 9b7b3d50..e5aa4b96 100644
--- a/dev/libDDK/DriverKit/macros.h
+++ b/dev/libDDK/DriverKit/macros.h
@@ -16,7 +16,7 @@
#define BOOL bool
#define YES true
#define NO false
-#define DDK_EXTERN extern "C" __declspec(dllexport)
+#define DDK_EXTERN extern "C"
#define nil nullptr
#undef NULL
#define NULL 0
@@ -25,7 +25,7 @@
#define BOOL char
#define YES 1
#define NO 0
-#define DDK_EXTERN extern __declspec(dllexport)
+#define DDK_EXTERN extern
#define nil ((void*) 0)
#undef NULL
#define NULL ((void*) 0)
@@ -35,9 +35,9 @@
#ifndef __DDK__
#undef DDK_EXTERN
#if defined(__cplusplus)
-#define DDK_EXTERN extern "C" __declspec(dllimport)
+#define DDK_EXTERN extern "C"
#else
-#define DDK_EXTERN __declspec(dllimport)
+#define DDK_EXTERN
#endif
#endif
diff --git a/dev/libDDK/docs/SPECIFICATION_DDK.md b/dev/libDDK/docs/SPECIFICATION_DDK.md
index d7d333d3..d59b6e77 100644
--- a/dev/libDDK/docs/SPECIFICATION_DDK.md
+++ b/dev/libDDK/docs/SPECIFICATION_DDK.md
@@ -6,7 +6,7 @@
- Programming Language: C/C++
- Build System: Make/NeBuild
-- Purpose: Driver Tool Kit, which you link against ddk.sys
+- Purpose: Driver Tool Kit, which you link against libDDK.dll
===================================
diff --git a/dev/libMsg/MsgKit/Network.h b/dev/libMsg/MsgKit/Network.h
index 7dd56877..8367c4ff 100644
--- a/dev/libMsg/MsgKit/Network.h
+++ b/dev/libMsg/MsgKit/Network.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/libMsg/MsgKit/Server.h b/dev/libMsg/MsgKit/Server.h
index 5bc9617d..8b1e2ed5 100644
--- a/dev/libMsg/MsgKit/Server.h
+++ b/dev/libMsg/MsgKit/Server.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -24,7 +24,7 @@ struct LIBMSG_EXPR final {
CF::CFString* l_key{nullptr};
CF::CFString* l_value{nullptr};
#else
- // if we use C< we won't know about CF, so let's make those private.
+ // if we use C, we won't know about CF, so let's make those private.
VoidPtr l_private_data[2]{nullptr};
#endif
diff --git a/dev/libSystem/SystemKit/Err.h b/dev/libSystem/SystemKit/Err.h
index c0a2282b..5274d78c 100644
--- a/dev/libSystem/SystemKit/Err.h
+++ b/dev/libSystem/SystemKit/Err.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/libSystem/SystemKit/Jail.h b/dev/libSystem/SystemKit/Jail.h
index c23942c5..e033c25f 100644
--- a/dev/libSystem/SystemKit/Jail.h
+++ b/dev/libSystem/SystemKit/Jail.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/libSystem/SystemKit/Macros.h b/dev/libSystem/SystemKit/Macros.h
index 2bdeff9d..f8eac16a 100644
--- a/dev/libSystem/SystemKit/Macros.h
+++ b/dev/libSystem/SystemKit/Macros.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
-Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: Macros.h
Purpose: libsci Macros header.
diff --git a/dev/libSystem/SystemKit/Syscall.h b/dev/libSystem/SystemKit/Syscall.h
index 35bfc6f8..45da1ba5 100644
--- a/dev/libSystem/SystemKit/Syscall.h
+++ b/dev/libSystem/SystemKit/Syscall.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/libSystem/SystemKit/System.h b/dev/libSystem/SystemKit/System.h
index 88472513..807c543c 100644
--- a/dev/libSystem/SystemKit/System.h
+++ b/dev/libSystem/SystemKit/System.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
-Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: System.h
Purpose: System Call Interface.
diff --git a/dev/libSystem/SystemKit/Verify.h b/dev/libSystem/SystemKit/Verify.h
index bc0c8be3..7130847e 100644
--- a/dev/libSystem/SystemKit/Verify.h
+++ b/dev/libSystem/SystemKit/Verify.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: Verify.h
Purpose: System Call Interface Verification Layer.
diff --git a/dev/libSystem/src/JailCalls.cc b/dev/libSystem/src/JailCalls.cc
index 5cb47bb5..71fe2e93 100644
--- a/dev/libSystem/src/JailCalls.cc
+++ b/dev/libSystem/src/JailCalls.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/libSystem/src/Makefile b/dev/libSystem/src/Makefile
index ea8e9905..622223b4 100644
--- a/dev/libSystem/src/Makefile
+++ b/dev/libSystem/src/Makefile
@@ -1,5 +1,5 @@
##################################################
-# (c) Amlal El Mahrouss and NeKernel contributors, all rights reserved.
+# (c) Amlal El Mahrouss and NeKernel contributors, licensed under the Apache 2.0 license.
# This file is for libSystem.dll's syscall stubs.
##################################################
diff --git a/dev/libSystem/src/SystemCalls.cc b/dev/libSystem/src/SystemCalls.cc
index 3db9368d..07c86ff9 100644
--- a/dev/libSystem/src/SystemCalls.cc
+++ b/dev/libSystem/src/SystemCalls.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -11,23 +11,6 @@
using namespace LibSystem;
-/// @note this uses the FNV 64-bit variant.
-IMPORT_C UInt64 libsys_hash_64(const Char* path) {
- if (!path || *path == 0) return 0;
-
- const UInt64 kFNVSeed = 0xcbf29ce484222325ULL;
- const UInt64 kFNVPrime = 0x100000001b3ULL;
-
- UInt64 hash = kFNVSeed;
-
- while (*path) {
- hash ^= (Char) (*path++);
- hash *= kFNVPrime;
- }
-
- return hash;
-}
-
IMPORT_C Char* StrFmt(const Char* fmt, ...) {
if (!fmt || *fmt == 0) return const_cast<Char*>("(null)");
diff --git a/dev/libSystem/src/SystemCallsABI+AMD64.asm b/dev/libSystem/src/SystemCallsABI+AMD64.asm
index da19f41f..dd8fc9e8 100644
--- a/dev/libSystem/src/SystemCallsABI+AMD64.asm
+++ b/dev/libSystem/src/SystemCallsABI+AMD64.asm
@@ -2,7 +2,7 @@
;; * ========================================================
;; *
;; * libSystem/src/SystemCallsABI+AMD64.asm
-;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+;; * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
;; *
;; * ========================================================
;; */
diff --git a/dev/libSystem/src/Utils.cc b/dev/libSystem/src/Utils.cc
new file mode 100644
index 00000000..cf4f41e7
--- /dev/null
+++ b/dev/libSystem/src/Utils.cc
@@ -0,0 +1,29 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
+
+------------------------------------------- */
+
+#include <libSystem/SystemKit/Err.h>
+#include <libSystem/SystemKit/Syscall.h>
+#include <libSystem/SystemKit/System.h>
+#include <libSystem/SystemKit/Verify.h>
+
+using namespace LibSystem;
+
+/// @note This uses the FNV 64-bit variant.
+IMPORT_C UInt64 libsys_hash_64(const Char* path) {
+ if (!path || *path == 0) return 0;
+
+ const UInt64 kFNVSeed = 0xcbf29ce484222325ULL;
+ const UInt64 kFNVPrime = 0x100000001b3ULL;
+
+ UInt64 hash = kFNVSeed;
+
+ while (*path) {
+ hash ^= (Char) (*path++);
+ hash *= kFNVPrime;
+ }
+
+ return hash;
+}
diff --git a/dev/libSystem/src/VerifyCalls.cc b/dev/libSystem/src/VerifyCalls.cc
index 078f921b..0beb760b 100644
--- a/dev/libSystem/src/VerifyCalls.cc
+++ b/dev/libSystem/src/VerifyCalls.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/misc/BenchKit/Chronometer.h b/dev/misc/BenchKit/Chronometer.h
index 3a82a94e..1ed687aa 100644
--- a/dev/misc/BenchKit/Chronometer.h
+++ b/dev/misc/BenchKit/Chronometer.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
-Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/misc/BenchKit/HWChronometer.h b/dev/misc/BenchKit/HWChronometer.h
index 56e4f2af..328cf9ed 100644
--- a/dev/misc/BenchKit/HWChronometer.h
+++ b/dev/misc/BenchKit/HWChronometer.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
-Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/modules/ACPI/ACPI.h b/dev/modules/ACPI/ACPI.h
index cfa78ecc..34edbc9a 100644
--- a/dev/modules/ACPI/ACPI.h
+++ b/dev/modules/ACPI/ACPI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/modules/ACPI/ACPIFactoryInterface.h b/dev/modules/ACPI/ACPIFactoryInterface.h
index 3ff53535..f4c903f0 100644
--- a/dev/modules/ACPI/ACPIFactoryInterface.h
+++ b/dev/modules/ACPI/ACPIFactoryInterface.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/modules/AHCI/AHCI.h b/dev/modules/AHCI/AHCI.h
index dcdc5faa..085c8b7a 100644
--- a/dev/modules/AHCI/AHCI.h
+++ b/dev/modules/AHCI/AHCI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: AHCI.h
Purpose: AHCI protocol defines.
diff --git a/dev/modules/APM/APM.h b/dev/modules/APM/APM.h
index 29de5114..f282e141 100644
--- a/dev/modules/APM/APM.h
+++ b/dev/modules/APM/APM.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -21,9 +21,9 @@ enum {
kAPMPowerCommandReboot = 0x08,
};
-/// @brief Send a APM command into it's own IO space.
+/// @brief Send a APM command into it's controller. (Shutdown, Reboot, Sleep...)
/// @param base_dma the IO base port.
/// @param cmd the command.
-/// @return status code.
+/// @return status code of the APM command.
EXTERN_C Int32 apm_send_io_command(UInt16 cmd);
} // namespace Kernel
diff --git a/dev/modules/ATA/ATA.h b/dev/modules/ATA/ATA.h
index 34091a36..fa4356a7 100644
--- a/dev/modules/ATA/ATA.h
+++ b/dev/modules/ATA/ATA.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: Defines.h
Purpose: ATA header.
diff --git a/dev/modules/CoreGfx/CoreAccess.h b/dev/modules/CoreGfx/CoreAccess.h
index f092b5a6..246b386a 100644
--- a/dev/modules/CoreGfx/CoreAccess.h
+++ b/dev/modules/CoreGfx/CoreAccess.h
@@ -17,12 +17,12 @@ namespace FB {
using namespace Kernel;
/// @brief common User interface class.
-class FBAccessibilty final {
- explicit FBAccessibilty() = default;
- ~FBAccessibilty() = default;
+class CGAccessibilty final {
+ explicit CGAccessibilty() = default;
+ ~CGAccessibilty() = default;
public:
- NE_COPY_DELETE(FBAccessibilty)
+ NE_COPY_DELETE(CGAccessibilty)
static UInt64 Width() noexcept { return kHandoverHeader->f_GOP.f_Width; }
diff --git a/dev/modules/CoreGfx/CoreGfx.h b/dev/modules/CoreGfx/CoreGfx.h
index 7d23c17e..b4f513ef 100644
--- a/dev/modules/CoreGfx/CoreGfx.h
+++ b/dev/modules/CoreGfx/CoreGfx.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -8,13 +8,13 @@
#include <NeKit/Defines.h>
-#define fb_init() Kernel::UInt32 kCGCursor = 0
+#define cg_init() Kernel::UInt32 kCGCursor = 0
-#define fb_color(R, G, B) RGB(R, G, B)
+#define cg_color(R, G, B) RGB(R, G, B)
-#define fb_get_clear_clr() RGB(0x20, 0x20, 0x20)
+#define cg_get_clear_clr() RGB(0, 0, 0x80)
-#define fb_clear() kCGCursor = 0UL
+#define cg_clear() kCGCursor = 0UL
#ifdef __NE_AMD64__
/// @brief Performs Alpha drawing on the framebuffer.
@@ -57,7 +57,7 @@
for (Kernel::UInt32 u = base_y; u < (height + base_y); ++u) { \
*(((volatile Kernel::UInt32*) (kHandoverHeader->f_GOP.f_The + \
4 * kHandoverHeader->f_GOP.f_PixelPerLine * i + 4 * u))) = \
- fb_get_clear_clr(); \
+ cg_get_clear_clr(); \
} \
}
@@ -111,8 +111,8 @@
#endif // ifndef CORE_GFX_ACCESSIBILITY_H
namespace FB {
-inline Void fb_clear_video() noexcept {
- FBDrawInRegion(fb_get_clear_clr(), FB::FBAccessibilty::Height(), FB::FBAccessibilty::Width(), 0,
+inline Void cg_clear_video() noexcept {
+ FBDrawInRegion(cg_get_clear_clr(), FB::CGAccessibilty::Height(), FB::CGAccessibilty::Width(), 0,
0);
}
} // namespace FB \ No newline at end of file
diff --git a/dev/modules/CoreGfx/MathGfx.h b/dev/modules/CoreGfx/MathGfx.h
index 0b483fad..523f4b31 100644
--- a/dev/modules/CoreGfx/MathGfx.h
+++ b/dev/modules/CoreGfx/MathGfx.h
@@ -11,9 +11,9 @@
namespace UI {
#ifdef NE_CORE_GFX_USE_DOUBLE
-typedef double fb_real_t;
+typedef double cg_real_t;
#else
-typedef float fb_real_t;
+typedef float cg_real_t;
#endif
/// @brief Linear interpolation equation solver.
@@ -21,7 +21,7 @@ typedef float fb_real_t;
/// @param to to which value.
/// @param stat
/// @return Linear interop value.
-inline fb_real_t fb_math_lerp(fb_real_t to, fb_real_t from, fb_real_t stat) {
+inline cg_real_t cg_math_lerp(cg_real_t to, cg_real_t from, cg_real_t stat) {
return (from) + (to - from) * stat;
}
} // namespace UI \ No newline at end of file
diff --git a/dev/modules/CoreGfx/TextGfx.h b/dev/modules/CoreGfx/TextGfx.h
index 1bcc1397..b0545fcc 100644
--- a/dev/modules/CoreGfx/TextGfx.h
+++ b/dev/modules/CoreGfx/TextGfx.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -145,7 +145,7 @@ inline const Kernel::UInt8 kFontBitmap[kFontNOFChars][kFontSizeX] = {
};
-inline Kernel::Void fb_render_string_for_bitmap(const Kernel::UInt8* bitmap,
+inline Kernel::Void cg_render_string_for_bitmap(const Kernel::UInt8* bitmap,
const Kernel::SizeT x_sz, const Kernel::SizeT y_sz,
Kernel::Int32& x_dst, Kernel::Int32& y_dst,
Kernel::Int32& color) {
@@ -167,7 +167,7 @@ inline Kernel::Void fb_render_string_for_bitmap(const Kernel::UInt8* bitmap,
}
}
-inline Kernel::Void fb_render_string(const Kernel::Char* text, Kernel::Int32 x_dst,
+inline Kernel::Void cg_render_string(const Kernel::Char* text, Kernel::Int32 x_dst,
Kernel::Int32 y_dst, Kernel::Int32 color) {
#ifndef __BOOTZ__
auto len = Kernel::rt_string_len(text);
@@ -176,7 +176,7 @@ inline Kernel::Void fb_render_string(const Kernel::Char* text, Kernel::Int32 x_d
#endif
for (Kernel::SizeT i = 0; i < len; ++i) {
- fb_render_string_for_bitmap(&kFontBitmap[(Kernel::UInt8) text[i]][0], kFontSizeX, kFontSizeY,
+ cg_render_string_for_bitmap(&kFontBitmap[(Kernel::UInt8) text[i]][0], kFontSizeX, kFontSizeY,
x_dst, y_dst, color);
y_dst += kFontSizeY;
}
diff --git a/dev/modules/HPET/Defines.h b/dev/modules/HPET/Defines.h
index 5317c11f..78eb9280 100644
--- a/dev/modules/HPET/Defines.h
+++ b/dev/modules/HPET/Defines.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: HPET.h
Purpose: HPET builtin.
diff --git a/dev/modules/LTE/LTE.h b/dev/modules/LTE/LTE.h
index 5eb09f8e..2080f571 100644
--- a/dev/modules/LTE/LTE.h
+++ b/dev/modules/LTE/LTE.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
-Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved..
+Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license..
File: LTE\LTE.h.
Purpose: LTE Standard Library.
diff --git a/dev/modules/MBCI/MBCI.h b/dev/modules/MBCI/MBCI.h
index aa1eb959..b877cae7 100644
--- a/dev/modules/MBCI/MBCI.h
+++ b/dev/modules/MBCI/MBCI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/dev/modules/NVME/NVME.h b/dev/modules/NVME/NVME.h
index c0894194..1e82b10f 100644
--- a/dev/modules/NVME/NVME.h
+++ b/dev/modules/NVME/NVME.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
Revision History:
@@ -93,7 +93,7 @@ inline Bool nvme_create_io_command(HAL_NVME_QUEUE* entry, UInt64 baseAddress,
entry->CommandSpecific[9] = identify;
if (namespaceIdentify) {
- entry->CommandSpecific[0] = 1;
+ entry->CommandSpecific[0] = YES;
}
}
diff --git a/dev/modules/Power/PowerFactory.h b/dev/modules/Power/PowerFactory.h
index b7c13280..b3a663e2 100644
--- a/dev/modules/Power/PowerFactory.h
+++ b/dev/modules/Power/PowerFactory.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -15,8 +15,6 @@
#define NE_POWER_FACTORY : public PowerFactory
namespace Kernel {
-class PowerFactory;
-
class PowerFactory {
public:
explicit PowerFactory() = default;
@@ -26,7 +24,7 @@ class PowerFactory {
PowerFactory(const PowerFactory&) = default;
public:
- Bool Shutdown() { return NO; }; // shutdown
- Void Reboot(){}; // soft-reboot
+ virtual Bool Shutdown() { return NO; } // shutdown
+ virtual Void Reboot() {} // soft-reboot
};
} // namespace Kernel \ No newline at end of file
diff --git a/dev/modules/SCSI/SCSI.h b/dev/modules/SCSI/SCSI.h
index d9ede8b4..80a5b052 100644
--- a/dev/modules/SCSI/SCSI.h
+++ b/dev/modules/SCSI/SCSI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -12,9 +12,10 @@
/// @brief Small Computer System Interface device.
namespace Kernel {
-template <int PacketBitLen>
+template <Int32 PacketBitLen>
using scsi_packet_type = Kernel::UInt16[PacketBitLen];
+
using scsi_packet_type_12 = scsi_packet_type<12>;
-extern const scsi_packet_type<12> kCDRomPacketTemplate;
+extern const scsi_packet_type_12 kCDRomPacketTemplate;
} // namespace Kernel \ No newline at end of file
diff --git a/dev/modules/XHCI/XHCI.h b/dev/modules/XHCI/XHCI.h
index 8829d29b..3efdf90c 100644
--- a/dev/modules/XHCI/XHCI.h
+++ b/dev/modules/XHCI/XHCI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
File: Defines.h
Purpose: XHCI (and backwards) header.
@@ -16,8 +16,6 @@
#include <NeKit/Defines.h>
-using namespace Kernel;
-
#define kUSBCommand (UInt16) 0x0
#define kUSBStatus (UInt16) 0x2
#define kUSBInterruptEnable (UInt16) 0x4
@@ -27,6 +25,7 @@ using namespace Kernel;
#define kUSBPort1StatusCtrl (UInt16) 0x10
#define kUSBPort2StatusCtrl (UInt16) 0x12
+namespace Kernel {
typedef struct USBCommandRegister final {
UInt8 mReserved[8]; // Reserved
UInt8 mMaxPacket; // 0 = Max packet size 32 bits 1 = Max packet size 64 bits
@@ -64,3 +63,4 @@ typedef struct USBInterruptEnableRegister final {
32-bit physical adress of Frame List. Remember that first 12 bytes are
always 0. The Frame List must contain 1024 entries.
*/
+} // namespace Kernel \ No newline at end of file
diff --git a/docs/STANDARD_FWRK.md b/docs/STANDARD_FWRK.md
new file mode 100644
index 00000000..1411fe5e
--- /dev/null
+++ b/docs/STANDARD_FWRK.md
@@ -0,0 +1,283 @@
+# STANDARD NEKERNEL FRAMEWORK SPECIFICATION
+
+## Overview
+
+The NeKernel framework system (`.fwrk`) provides a standardized structure for creating modular, reusable libraries and components. Frameworks are self-contained packages that include headers, source code, metadata, and configuration for compilation and deployment within the NeKernel ecosystem.
+
+## Framework Directory Structure
+
+Each framework follows the standardized directory layout below:
+
+```
+<FrameworkName>.fwrk/
+├── <FrameworkName>.json # Framework manifest and build configuration
+├── headers/ # Public API headers
+│ ├── *.h # Public header files (C++ headers)
+│ └── ...
+├── src/ # Implementation source files
+│ ├── *.cc # C++ implementation files
+│ ├── DylibMain.cc # Dynamic library entry point (optional)
+│ └── ...
+├── xml/ # Framework metadata and properties
+│ └── app.xml # Framework property list
+├── dist/ # Build output directory
+│ └── lib<FrameworkName>.fwrk.dylib # Compiled dynamic library
+└── .keep # Placeholder file
+```
+
+## Component Specifications
+
+### 1. Framework Manifest (`<FrameworkName>.json`)
+
+The JSON manifest file defines the build configuration, compilation flags, and metadata for the framework.
+
+**Required Fields:**
+
+- **`compiler_path`** (string): Path to the C++ compiler executable
+ - Example: `"clang++"`, `"x86_64-w64-mingw32-g++"`
+
+- **`compiler_std`** (string): C++ standard version
+ - Example: `"c++20"`, `"c++17"`
+
+- **`headers_path`** (array): Array of header search paths (relative to framework)
+ - Include paths for finding dependencies and kernel interfaces
+ - Example: `["./", "../../../dev/kernel", "../../../public/frameworks/", "../../../dev/"]`
+
+- **`sources_path`** (array): Array of source file globs to compile
+ - Example: `["src/*.cc"]`
+
+- **`output_name`** (string): Path and filename for compiled library output
+ - Example: `"./dist/libCoreFoundation.fwrk.dylib"`
+
+**Optional Fields:**
+
+- **`compiler_flags`** (array): Custom compilation flags
+ - Example: `["-ffreestanding", "-shared", "-fno-rtti", "-fno-exceptions"]`
+
+- **`cpp_macros`** (array): C++ preprocessor macro definitions
+ - Example: `["kCFVersion=0x0100", "__NE_AMD64__", "__CF_64BIT__"]`
+
+**Example Manifest:**
+```json
+{
+ "compiler_path": "x86_64-w64-mingw32-g++",
+ "compiler_std": "c++20",
+ "headers_path": ["../", "./", "../../../dev", "../../../dev/kernel"],
+ "sources_path": ["src/*.cc"],
+ "output_name": "./dist/libCoreFoundation.fwrk.dylib",
+ "compiler_flags": [
+ "-ffreestanding",
+ "-shared",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-Wl,--subsystem=17"
+ ],
+ "cpp_macros": [
+ "kCFVersion=0x0100",
+ "kCFVersionHighest=0x0100",
+ "kCFVersionLowest=0x0100",
+ "__NE_AMD64__",
+ "__CF_64BIT__"
+ ]
+}
+```
+
+### 2. Public Headers Directory (`headers/`)
+
+Contains all public-facing C++ header files that define the framework's API.
+
+**Conventions:**
+- File extension: `.h` (not `.hpp`)
+- Namespace: Typically matches framework name (e.g., `CF::` for CoreFoundation)
+- Include guards: Use `#pragma once` for header protection
+- Copyright headers: Include NeKernel copyright notice at the top
+
+**Typical Headers:**
+- Main header providing overall framework interface
+- Specialized headers for different components
+- Type definitions and class declarations
+- Exception/error definitions
+
+### 3. Source Implementation Directory (`src/`)
+
+Contains C++ implementation files for the framework.
+
+**Key Files:**
+
+- **`DylibMain.cc`** (Optional):
+ - Entry point for dynamic library initialization
+ - Contains `_DylibAttach(SInt32 argc, Char* argv[])` function
+ - Returns status code (0 for success, EXIT_FAILURE otherwise)
+
+ **Example:**
+ ```cpp
+ #include <libSystem/SystemKit/System.h>
+
+ SInt32 _DylibAttach(SInt32 argc, Char* argv[]) {
+ // Initialization code here
+ return EXIT_FAILURE; // Change based on initialization result
+ }
+ ```
+
+- **Implementation Files** (`*.cc`):
+ - Correspond to public headers
+ - Contain class definitions and function implementations
+ - Include necessary system and framework headers
+
+### 4. Metadata Directory (`xml/`)
+
+Contains XML-based property list files for framework metadata.
+
+**`app.xml` Structure:**
+- PropertyList format for framework configuration
+- Typically includes:
+ - `LibraryName`: Framework name (string)
+ - `CacheLibs`: Whether to cache library (boolean)
+ - Other framework-specific properties
+
+**Example:**
+```xml
+<PropertyList/>
+<PLEntry Type="CFString" Name="LibraryName" Len="255" Value="CoreFoundation" />
+<PLEntry Type="BOOL" Name="CacheLibs" Value="YES" />
+```
+
+### 5. Build Output Directory (`dist/`)
+
+Auto-generated directory containing compiled framework binaries.
+
+- **Output file**: `lib<FrameworkName>.fwrk.dylib`
+- Created during build process via `mk_fwrk.py`
+- Not committed to version control
+
+## Built-in Frameworks
+
+The NeKernel project includes the following standard frameworks:
+
+### CoreFoundation.fwrk
+**Purpose:** Core data structures and utilities foundation
+**Provides:**
+- Reference types (CFRef)
+- String handling (CFString)
+- Collections (Arrays, Dictionaries)
+- Geometric types (CFPoint, CFRect, CFColor)
+- Object system (CFObject, CFProperty)
+
+### DiskImage.fwrk
+**Purpose:** Disk image management and handling
+
+### KernelTest.fwrk
+**Purpose:** Testing framework for kernel components
+
+### LaunchHelpers.fwrk
+**Purpose:** Helper functions for system launch and initialization
+
+## Framework Creation
+
+### Using mk_fwrk.py
+
+The `mk_fwrk.py` tool automates framework creation:
+
+```bash
+python3 tools/mk_fwrk.py <framework_name>
+```
+
+This generates:
+1. Complete directory structure
+2. Template `<framework_name>.json` manifest
+3. Skeleton `DylibMain.cc` entry point
+4. Template `xml/app.xml` metadata
+
+**Generated Structure:**
+```
+<framework_name>.fwrk/
+├── <framework_name>.json
+├── headers/
+│ └── .keep
+├── src/
+│ ├── .keep
+│ └── DylibMain.cc
+├── xml/
+│ └── app.xml
+└── .keep
+```
+
+## Compilation and Linking
+
+### Build Process
+
+1. **Configuration Phase**: Read and parse `<framework_name>.json`
+2. **Compilation Phase**: Compile source files with specified compiler and flags
+3. **Linking Phase**: Link object files into dynamic library
+4. **Output Phase**: Place compiled binary in `dist/` directory
+
+### Dependencies
+
+- Frameworks can depend on:
+ - System libraries (via SystemKit)
+ - Other frameworks (via headers_path)
+ - Kernel components (via kernel paths in headers_path)
+
+### Linking Order
+
+When building applications that use frameworks:
+1. Frameworks are linked in dependency order
+2. CoreFoundation is typically a base dependency
+3. Framework paths and library names must match manifest output names
+
+## Naming Conventions
+
+- **Framework directories**: `<Name>.fwrk` (PascalCase + .fwrk suffix)
+- **JSON manifest**: `<Name>.json` (matches framework directory name)
+- **Output library**: `lib<Name>.fwrk.dylib`
+- **Namespaces**: Two-letter abbreviations (e.g., `CF`, `DI`, `KT`, `LH`)
+- **Macros**: `k<ComponentName>` prefix (e.g., `kCFVersion`)
+
+## Version Specification
+
+Frameworks should include version information via preprocessor macros:
+
+- **`k<Framework>Version`**: Current framework version (e.g., `0x0100` for v1.0)
+- **`k<Framework>VersionHighest`**: Highest compatible version
+- **`k<Framework>VersionLowest`**: Lowest compatible version
+
+**Version Format**: Hexadecimal (e.g., `0x0100` = 1.0, `0x0201` = 2.1)
+
+## Architecture Support
+
+Frameworks can be compiled for multiple architectures:
+
+- **x86_64** (amd64): 64-bit x86/AMD64 architecture
+- **ARM64**: 64-bit ARM architecture
+- **RISC-V 64**: RISC-V 64-bit architecture
+- **PowerPC 64**: PowerPC 64-bit architecture
+
+Architecture is typically controlled via:
+- Compiler selection in manifest
+- C++ macros (`__NE_AMD64__`, `__NE_ARM64__`, etc.)
+
+## Best Practices
+
+1. **Header Organization**: Keep headers minimal; place implementation in `.cc` files
+2. **Namespace Usage**: Encapsulate all public APIs in framework namespace
+3. **Dependencies**: Minimize external dependencies; prefer kernel APIs
+4. **Configuration**: Use `.json` manifest for all build-time configuration
+5. **Documentation**: Include copyright headers and documentation comments in code
+6. **Error Handling**: Define framework-specific error codes and status returns
+7. **Testing**: Provide test cases using KernelTest.fwrk when applicable
+
+## Integration with Applications
+
+Applications that use frameworks:
+
+1. **Include Headers**: `#include <Framework/Header.h>`
+2. **Link Framework**: Add framework library to linker flags
+3. **Initialize**: Call framework initialization if provided
+4. **Handle Errors**: Check return codes and handle framework exceptions
+
+## File Permissions
+
+- Framework files: Standard text (`.h`, `.cc`, `.json`, `.xml`)
+- Build artifacts: Auto-generated and read-only during runtime
+- Framework package: Should be distributable as single `.fwrk` directory
+
diff --git a/docs/drawio/GUI_DESIGN.drawio b/docs/drawio/GUI_DESIGN.drawio
index 31fc11cf..bdf977af 100644
--- a/docs/drawio/GUI_DESIGN.drawio
+++ b/docs/drawio/GUI_DESIGN.drawio
@@ -1,16 +1,16 @@
<mxfile host="65bd71144e">
<diagram name="Page-1" id="yf45V2V4Ppj0j8o4dQoi">
- <mxGraphModel dx="1144" dy="442" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+ <mxGraphModel dx="1149" dy="361" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
- <mxCell id="mspNsT0Gx7HsNPX6GqQO-2" value="libsci" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxCell id="mspNsT0Gx7HsNPX6GqQO-2" value="libSystem" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="50" y="500" width="450" height="140" as="geometry"/>
</mxCell>
<mxCell id="2" style="edgeStyle=none;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="mspNsT0Gx7HsNPX6GqQO-3" target="mspNsT0Gx7HsNPX6GqQO-13" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
- <mxCell id="mspNsT0Gx7HsNPX6GqQO-3" value="LibGUI" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxCell id="mspNsT0Gx7HsNPX6GqQO-3" value="libGUI" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="250" y="210" width="270" height="160" as="geometry"/>
</mxCell>
<mxCell id="mspNsT0Gx7HsNPX6GqQO-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.093;entryY=1.019;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="mspNsT0Gx7HsNPX6GqQO-2" target="mspNsT0Gx7HsNPX6GqQO-3" edge="1">
diff --git a/docs/drawio/LAUNCH_DESIGN.drawio b/docs/drawio/LAUNCH_DESIGN.drawio
index e69de29b..32fe8eda 100644
--- a/docs/drawio/LAUNCH_DESIGN.drawio
+++ b/docs/drawio/LAUNCH_DESIGN.drawio
@@ -0,0 +1,22 @@
+<mxfile host="65bd71144e">
+ <diagram id="WN9xM0SvnG1OFdIgUV1P" name="Page-1">
+ <mxGraphModel dx="1149" dy="361" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
+ <root>
+ <mxCell id="0"/>
+ <mxCell id="1" parent="0"/>
+ <mxCell id="2" value="LaunchHelpers" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="250" y="100" width="255" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="3" value="ne_launch" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+ <mxGeometry x="250" y="170" width="255" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="4" value="ne_kernel" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+ <mxGeometry x="250" y="240" width="540" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="5" value="libSystem" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+ <mxGeometry x="520" y="170" width="270" height="60" as="geometry"/>
+ </mxCell>
+ </root>
+ </mxGraphModel>
+ </diagram>
+</mxfile> \ No newline at end of file
diff --git a/docs/tex/binary_mutex.tex b/docs/tex/binary_mutex.tex
index 1b5a59c2..0f6a6663 100644
--- a/docs/tex/binary_mutex.tex
+++ b/docs/tex/binary_mutex.tex
@@ -12,7 +12,7 @@
\section{Abstract}
-{The BinaryMutex is a core component of NeKernel (NeKernel/VMKernel) based systems. The pattern excludes other acquirers to own the USER\_PROCESS that is currently being hold. Thus the acquiree is the USER\_PROCESS itself}
+{The BinaryMutex is a core component of NeKernel (NeKernel/Legacy VMKernel) based systems. The pattern excludes other acquirers to own the USER\_PROCESS that is currently being hold. Thus the acquiree is the USER\_PROCESS itself}
\section{Overview}
@@ -64,13 +64,13 @@ class BinaryMutex final {
\section{Conclusion}
{This design pattern is useful for systems that need to make sure that a process isn't tampered by concurrent usages.
-Thus its existence in VMKernel and NeKernel.}
+Thus its existence in Legacy VMKernel and NeKernel.}
\section{References}
{NeKernel}: \href{https://github.com/nekernel-org/nekernel}{NeKernel}
-{VMKernel}: \href{https://snu.systems/specs/vmkernel}{VMKernel}
+{Legacy VMKernel}: \href{https://snu.systems/specs/vmkernel}{Legacy VMKernel}
{BinaryMutex}: \href{https://github.com/nekernel-org/nekernel/blob/dev/dev/kernel/KernelKit/BinaryMutex.h}{BinaryMutex}
diff --git a/docs/tex/core_process_scheduler.tex b/docs/tex/core_process_scheduler.tex
index ab5636f6..41bad465 100644
--- a/docs/tex/core_process_scheduler.tex
+++ b/docs/tex/core_process_scheduler.tex
@@ -123,7 +123,7 @@ struct ProcessImage final {
{NeKernel}: \href{https://github.com/nekernel-org/nekernel}{NeKernel}
-{VMKernel}: \href{https://snu.systems/specs/vmkernel}{VMKernel}
+{Legacy VMKernel}: \href{https://snu.systems/specs/vmkernel}{Legacy VMKernel}
{CoreProcessScheduler C++ Header}: \href{https://github.com/nekernel-org/nekernel/blob/dev/dev/kernel/KernelKit/CoreProcessScheduler.h}{CoreProcessScheduler}
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Array.h b/public/frameworks/CoreFoundation.fwrk/headers/Array.h
index 81f5f064..160f90bb 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Array.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Array.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Atom.h b/public/frameworks/CoreFoundation.fwrk/headers/Atom.h
index f279f0b1..5d556179 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Atom.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Atom.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
#pragma once
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h b/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h
index 87496c73..5eac262e 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h b/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h
index 8396a3e8..054e09fd 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
FILE: Foundation.h
PURPOSE: Foundation header of the CF framework.
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Object.h b/public/frameworks/CoreFoundation.fwrk/headers/Object.h
index 59ff8ff1..194f150f 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Object.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Object.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Property.h b/public/frameworks/CoreFoundation.fwrk/headers/Property.h
index 5210bd95..ada2e2dd 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Property.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Property.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Ref.h b/public/frameworks/CoreFoundation.fwrk/headers/Ref.h
index c8d1ba69..4b2d22ad 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Ref.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Ref.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/String.h b/public/frameworks/CoreFoundation.fwrk/headers/String.h
index 82c73ddf..f9793a32 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/String.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/String.h
@@ -1,7 +1,7 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/public/frameworks/CoreFoundation.fwrk/src/Foundation.cc b/public/frameworks/CoreFoundation.fwrk/src/Foundation.cc
index a4b84abf..4f4cc2c2 100644
--- a/public/frameworks/CoreFoundation.fwrk/src/Foundation.cc
+++ b/public/frameworks/CoreFoundation.fwrk/src/Foundation.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024 Amlal El Mahrouss, all rights reserved
+ Copyright (C) 2024 Amlal El Mahrouss, licensed under the Apache 2.0 license
------------------------------------------- */
diff --git a/public/frameworks/DiskImage.fwrk/headers/DiskImage.h b/public/frameworks/DiskImage.fwrk/headers/DiskImage.h
index 198d64a1..9cdbf57e 100644
--- a/public/frameworks/DiskImage.fwrk/headers/DiskImage.h
+++ b/public/frameworks/DiskImage.fwrk/headers/DiskImage.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
FILE: DiskImage.h
PURPOSE: Disk Imaging framework.
diff --git a/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc b/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc
index 83b52905..5823d99c 100644
--- a/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc
+++ b/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
FILE: DiskImage+EPM.cc
PURPOSE: Disk Imaging framework.
diff --git a/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc b/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc
index aa7abdf4..3d661f57 100644
--- a/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc
+++ b/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
FILE: DiskImage+OpenHeFS.cc
PURPOSE: Disk Imaging framework.
diff --git a/public/frameworks/DiskImage.fwrk/src/DiskImage+NeFS.cc b/public/frameworks/DiskImage.fwrk/src/DiskImage+NeFS.cc
index c4f32c95..6a3533a8 100644
--- a/public/frameworks/DiskImage.fwrk/src/DiskImage+NeFS.cc
+++ b/public/frameworks/DiskImage.fwrk/src/DiskImage+NeFS.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
FILE: DiskImage+NeFS.cc
PURPOSE: Disk Imaging framework.
diff --git a/public/frameworks/KernelTest.fwrk/headers/KernelTest.h b/public/frameworks/KernelTest.fwrk/headers/KernelTest.h
index 9ddf65fb..0e4e688e 100644
--- a/public/frameworks/KernelTest.fwrk/headers/KernelTest.h
+++ b/public/frameworks/KernelTest.fwrk/headers/KernelTest.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/public/frameworks/KernelTest.fwrk/src/UnitTests.cc b/public/frameworks/KernelTest.fwrk/src/UnitTests.cc
index 07e7b129..77626dc6 100644
--- a/public/frameworks/KernelTest.fwrk/src/UnitTests.cc
+++ b/public/frameworks/KernelTest.fwrk/src/UnitTests.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/public/tools/diutil/src/CommandLine.cc b/public/tools/diutil/src/CommandLine.cc
index dd23f532..9bcc0c68 100644
--- a/public/tools/diutil/src/CommandLine.cc
+++ b/public/tools/diutil/src/CommandLine.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
FILE: CommandLine.cc
PURPOSE: DIUTIL CLI.
diff --git a/public/tools/ld.dyn/src/CommandLine.cc b/public/tools/ld.dyn/src/CommandLine.cc
index e64e7837..3ee808c4 100644
--- a/public/tools/ld.dyn/src/CommandLine.cc
+++ b/public/tools/ld.dyn/src/CommandLine.cc
@@ -15,7 +15,7 @@ SInt32 _NeMain(SInt32 argc, Char* argv[]) {
LIBSYS_UNUSED(argv);
PrintOut(nullptr, "%s", "ld.dyn: Dynamic Loader.\n");
- PrintOut(nullptr, "%s", "ld.dyn: © 2024-2025 Amlal El Mahrouss, All rights reserved.\n");
+ PrintOut(nullptr, "%s", "ld.dyn: © 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license.\n");
for (SInt32 i = 1U; i < argc; ++i) {
if (MmStrCmp(argv[i], DYNLIB_FLAG) == 0) {
diff --git a/public/tools/ld.fwrk/src/CommandLine.cc b/public/tools/ld.fwrk/src/CommandLine.cc
index 323e58c7..b02361fe 100644
--- a/public/tools/ld.fwrk/src/CommandLine.cc
+++ b/public/tools/ld.fwrk/src/CommandLine.cc
@@ -13,7 +13,7 @@ SInt32 _NeMain(SInt32 argc, Char* argv[]) {
LIBSYS_UNUSED(argv);
PrintOut(nullptr, "%s", "ld.fwrk: Framework Loader.\n");
- PrintOut(nullptr, "%s", "ld.fwrk: © 2024-2025 Amlal El Mahrouss, All rights reserved.\n");
+ PrintOut(nullptr, "%s", "ld.fwrk: © 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license.\n");
return EXIT_FAILURE;
}
diff --git a/public/tools/mgmt.oe/src/CommandLine.cc b/public/tools/mgmt.oe/src/CommandLine.cc
index 3a0c192d..908b72a5 100644
--- a/public/tools/mgmt.oe/src/CommandLine.cc
+++ b/public/tools/mgmt.oe/src/CommandLine.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/public/tools/mk.fwrk/src/CommandLine.cc b/public/tools/mk.fwrk/src/CommandLine.cc
index 87945ddc..65655da4 100644
--- a/public/tools/mk.fwrk/src/CommandLine.cc
+++ b/public/tools/mk.fwrk/src/CommandLine.cc
@@ -25,7 +25,7 @@ SInt32 _NeMain(SInt32 argc, Char* argv[]) {
for (SInt32 i = 2UL; i < argc; ++i) {
if (MmStrCmp(argv[i], "-h") == 0) {
PrintOut(nullptr, "%s", "make_app: Framework/Application Creation Tool.\n");
- PrintOut(nullptr, "%s", "make_app: © 2024-2025 Amlal El Mahrouss, All rights reserved.\n");
+ PrintOut(nullptr, "%s", "make_app: © 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license.\n");
PrintOut(nullptr, "%s", "make_app: -a: Application Directory.\n");
PrintOut(nullptr, "%s", "make_app: -s: Steps (Setup pages) Directory.\n");
diff --git a/public/tools/open/src/CommandLine.cc b/public/tools/open/src/CommandLine.cc
index e02fcebc..130545d2 100644
--- a/public/tools/open/src/CommandLine.cc
+++ b/public/tools/open/src/CommandLine.cc
@@ -17,7 +17,7 @@ SInt32 _NeMain(SInt32 argc, Char* argv[]) {
if (argc == 1) return EXIT_FAILURE;
PrintOut(nullptr, "open: Open Loader.\n");
- PrintOut(nullptr, "open: © 2024-2025 Amlal El Mahrouss, All rights reserved.\n");
+ PrintOut(nullptr, "open: © 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license.\n");
for (SInt32 i = 1U; i < argc; ++i) {
if (MmStrCmp(argv[i], OPEN_APP_HELP_FLAG) == 0) {
diff --git a/dev/modules/HPET/.gitkeep b/public/vendor/.keep
index e69de29b..e69de29b 100644
--- a/dev/modules/HPET/.gitkeep
+++ b/public/vendor/.keep
diff --git a/tools/fsck.hefs.cc b/tools/chk.hefs.cc
index a2162a4f..931fdc02 100644
--- a/tools/fsck.hefs.cc
+++ b/tools/chk.hefs.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -14,16 +14,16 @@ static uint16_t kNumericalBase = 10;
int main(int argc, char** argv) {
if (argc < 2) {
- mkfs::console_out() << "fsck: hefs: usage: fsck.hefs -in=<input_device> -org=<origin>"
+ mkfs::console_out() << "fsck: hefs: usage: chk.hefs -in=<input_device> -b=<origin>"
<< "\n";
return EXIT_FAILURE;
}
auto args = mkfs::detail::build_args(argc, argv);
- auto opt_disk = mkfs::get_option<char>(args, "-in");
+ auto opt_disk = mkfs::get_option<char>(args, "in");
- auto origin = mkfs::get_option<char>(args, "-org");
+ auto origin = mkfs::get_option<char>(args, "b");
if (opt_disk.empty()) {
mkfs::console_out() << "fsck: hefs: error: OpenHeFS partition is empty! Exiting..."
@@ -68,7 +68,7 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
- mkfs::console_out() << "hefs: OpenHeFS partition is healthy, exiting...\n";
+ mkfs::console_out() << "hefs: OpenHeFS partition is healthy. Exiting...\n";
output_device.close();
diff --git a/tools/fsck.hefs.json b/tools/chk.hefs.json
index 970665aa..58918613 100644
--- a/tools/fsck.hefs.json
+++ b/tools/chk.hefs.json
@@ -5,9 +5,9 @@
"../"
],
"sources_path": [
- "fsck.hefs.cc"
+ "chk.hefs.cc"
],
- "output_name": "./dist/fsck.hefs",
+ "output_name": "./dist/chk.hefs",
"cpp_macros": [
"kFsckHeFSVersion=0x0100",
"kFsckHeFSVersionHighest=0x0100",
diff --git a/tools/libmkfs/mkfs.h b/tools/libmkfs/mkfs.h
index 6e242293..3124d1f8 100644
--- a/tools/libmkfs/mkfs.h
+++ b/tools/libmkfs/mkfs.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -8,7 +8,6 @@
#include <tools/rang.h>
#include <iostream>
-#include <sstream>
#include <string>
#define kMkFsSectorSz (512U)
@@ -63,10 +62,10 @@ namespace detail {
template <typename CharType>
inline std::basic_string<CharType> get_option(const std::basic_string<CharType>& args,
const std::basic_string<CharType>& option) {
- size_t pos = args.find(option + CharType('='));
+ size_t pos = args.find(CharType('-') + option + CharType('='));
if (pos != std::string::npos) {
- size_t start = pos + option.length() + 1;
+ size_t start = pos + option.length() + 2;
size_t end = args.find(' ', start);
return args.substr(start, end - start);
}
diff --git a/tools/libmkfs/openhefs.h b/tools/libmkfs/openhefs.h
index 3bba79e8..7ebd92e6 100644
--- a/tools/libmkfs/openhefs.h
+++ b/tools/libmkfs/openhefs.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
diff --git a/tools/mkfs.hefs.cc b/tools/mkfs.hefs.cc
index d1139e10..692e58f0 100644
--- a/tools/mkfs.hefs.cc
+++ b/tools/mkfs.hefs.cc
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
------------------------------------------- */
@@ -12,12 +12,13 @@
#include <fstream>
#include <limits>
-static size_t kDiskSize = mkfs::detail::gib_cast(4UL);
static uint16_t kVersion = kHeFSVersion;
-static std::u8string kLabel;
-static size_t kSectorSize = 512;
static uint16_t kNumericalBase = 10;
+static size_t kDiskSize = mkfs::detail::gib_cast(4UL);
+static std::u8string kDiskLabel;
+static size_t kDiskSectorSz = 512;
+
int main(int argc, char** argv) {
if (argc < 2) {
mkfs::console_out()
@@ -30,13 +31,13 @@ int main(int argc, char** argv) {
std::string args = mkfs::detail::build_args(argc, argv);
- auto output_path = mkfs::get_option<char>(args, "-o");
+ auto output_path = mkfs::get_option<char>(args, "o");
if (output_path.empty()) {
mkfs::console_out() << "hefs: error: Missing -o <output_device> argument.\n";
return EXIT_FAILURE;
}
- auto opt_s = mkfs::get_option<char>(args, "-s");
+ auto opt_s = mkfs::get_option<char>(args, "s");
long parsed_s = 0;
if (!mkfs::detail::parse_signed(opt_s, parsed_s, kNumericalBase) || parsed_s == 0) {
mkfs::console_out() << "hefs: error: Invalid sector size \"" << opt_s
@@ -49,20 +50,20 @@ int main(int argc, char** argv) {
<< "\" is not a power of two.\n";
return EXIT_FAILURE;
}
- kSectorSize = static_cast<size_t>(parsed_s);
+ kDiskSectorSz = static_cast<size_t>(parsed_s);
- auto opt_L = mkfs::get_option<char>(args, "-L");
+ auto opt_L = mkfs::get_option<char>(args, "L");
if (!opt_L.empty()) {
- kLabel.clear();
- for (char c : opt_L) kLabel.push_back(static_cast<char8_t>(c));
+ kDiskLabel.clear();
+ for (char c : opt_L) kDiskLabel.push_back(static_cast<char8_t>(c));
} else {
- kLabel.clear();
+ kDiskLabel.clear();
for (size_t i = 0; i < kHeFSPartNameLen && kHeFSDefaultVolumeName[i] != u'\0'; ++i) {
- kLabel.push_back(static_cast<char8_t>(kHeFSDefaultVolumeName[i]));
+ kDiskLabel.push_back(static_cast<char8_t>(kHeFSDefaultVolumeName[i]));
}
}
- auto opt_S = mkfs::get_option<char>(args, "-S");
+ auto opt_S = mkfs::get_option<char>(args, "S");
unsigned long long gb = 0;
if (!mkfs::detail::parse_decimal(opt_S, gb) || gb == 0ULL) {
mkfs::console_out() << "hefs: error: Invalid disk size \"" << opt_S
@@ -76,12 +77,12 @@ int main(int argc, char** argv) {
}
kDiskSize = static_cast<size_t>(gb * 1024ULL * 1024ULL * 1024ULL);
- auto opt_b = mkfs::get_option<char>(args, "-b");
- auto opt_e = mkfs::get_option<char>(args, "-e");
- auto opt_bs = mkfs::get_option<char>(args, "-bs");
- auto opt_be = mkfs::get_option<char>(args, "-be");
- auto opt_is = mkfs::get_option<char>(args, "-is");
- auto opt_ie = mkfs::get_option<char>(args, "-ie");
+ auto opt_b = mkfs::get_option<char>(args, "b");
+ auto opt_e = mkfs::get_option<char>(args, "e");
+ auto opt_bs = mkfs::get_option<char>(args, "bs");
+ auto opt_be = mkfs::get_option<char>(args, "be");
+ auto opt_is = mkfs::get_option<char>(args, "is");
+ auto opt_ie = mkfs::get_option<char>(args, "ie");
long start_ind = 0, end_ind = 0;
long start_block = 0, end_block = 0;
@@ -117,7 +118,7 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
- if (static_cast<size_t>(end_block) * kSectorSize > kDiskSize ||
+ if (static_cast<size_t>(end_block) * kDiskSectorSz > kDiskSize ||
static_cast<size_t>(end_ind) > kDiskSize || static_cast<size_t>(end_in) > kDiskSize) {
mkfs::console_out() << "hefs: error: One or more ranges exceed disk size.\n";
return EXIT_FAILURE;
@@ -137,8 +138,8 @@ int main(int argc, char** argv) {
boot_node.diskKind = mkfs::hefs::kHeFSHardDrive;
boot_node.encoding = mkfs::hefs::kHeFSEncodingFlagsUTF8;
boot_node.diskSize = kDiskSize;
- boot_node.sectorSize = kSectorSize;
- boot_node.sectorCount = kDiskSize / kSectorSize;
+ boot_node.sectorSize = kDiskSectorSz;
+ boot_node.sectorCount = kDiskSize / kDiskSectorSz;
boot_node.startIND = static_cast<size_t>(start_ind) + sizeof(mkfs::hefs::BootNode);
boot_node.endIND = static_cast<size_t>(end_ind);
boot_node.startIN = static_cast<size_t>(start_in);
@@ -161,10 +162,10 @@ int main(int argc, char** argv) {
std::memset(boot_node.volumeName, 0, sizeof(boot_node.volumeName));
- size_t label_units = std::min(kLabel.size(), vol_slots - 1);
+ size_t label_units = std::min(kDiskLabel.size(), vol_slots - 1);
for (size_t i = 0; i < label_units; ++i) {
- boot_node.volumeName[i] = static_cast<char8_t>(kLabel[i]);
+ boot_node.volumeName[i] = static_cast<char8_t>(kDiskLabel[i]);
}
boot_node.volumeName[label_units] = 0U;