diff options
| -rw-r--r-- | doc/specs/SPECIFICATION_MACROS.md | 18 | ||||
| -rw-r--r-- | src/kernel/FSKit/Ext2+IFS.h | 2 | ||||
| -rw-r--r-- | src/kernel/FSKit/Ext2.h | 2 | ||||
| -rw-r--r-- | src/kernel/src/FS/OpenHeFS+FileSystemParser.cpp | 8 | ||||
| -rw-r--r-- | src/kernel/src/UserProcessTeam.cpp | 10 |
5 files changed, 22 insertions, 18 deletions
diff --git a/doc/specs/SPECIFICATION_MACROS.md b/doc/specs/SPECIFICATION_MACROS.md index 5b2336ea..34c05167 100644 --- a/doc/specs/SPECIFICATION_MACROS.md +++ b/doc/specs/SPECIFICATION_MACROS.md @@ -4,7 +4,8 @@ =================================== -The NeKernel System uses macro to configure its compilation. Some of them shall not be defined at the same time to avoid run-time issues. +The NeKernel System uses macro to configure its compilation. +Some of them shall not be defined at the same time to avoid run-time issues. =================================== @@ -12,13 +13,14 @@ The NeKernel System uses macro to configure its compilation. Some of them shall =================================== -- `__nekernel_max_cores` -> Max SMP cores usable by NeKernel's scheduler. -- `__nekernel_boot_core_index` -> Index of the boot core (0, 1, or 3). -- `__nekernel_allow_non_nekernel_pe` -> Allow non-subsystem 17 to run on NeKernel. -- `__nekernel_halkit_include_processor` HALKit include directory for Processor.h -- `__nekernel_dma_pool_start` NeKernel DMA pool start. -- `__nekernel_dma_pool_size` NeKernel DMA pool size. -- `__nekernel_dma_best_align` NeKernel Best DMA align size. +- `__nekernel_max_cores`: Max SMP cores usable by NeKernel's scheduler. +- `__nekernel_boot_core_index`: Index of the boot core (0, 1, or 3). +- `__nekernel_allow_non_nekernel_pe`: Allow non-subsystem 17 to run on NeKernel. +- `__nekernel_halkit_include_processor`: HALKit include directory for Processor.h +- `__nekernel_dma_pool_start`: NeKernel DMA pool start. +- `__nekernel_dma_pool_size`: NeKernel DMA pool size. +- `__nekernel_dma_best_align`: NeKernel Best DMA align size. +- `__NE_VERBOSE_HEFS__`: Enables HeFS logging. =================================== diff --git a/src/kernel/FSKit/Ext2+IFS.h b/src/kernel/FSKit/Ext2+IFS.h index ea676c97..06450a76 100644 --- a/src/kernel/FSKit/Ext2+IFS.h +++ b/src/kernel/FSKit/Ext2+IFS.h @@ -1,4 +1,4 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) // Official repository: https://github.com/ne-foss-org/nekernel diff --git a/src/kernel/FSKit/Ext2.h b/src/kernel/FSKit/Ext2.h index c8adf512..25d9f9bd 100644 --- a/src/kernel/FSKit/Ext2.h +++ b/src/kernel/FSKit/Ext2.h @@ -1,4 +1,4 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) // Official repository: https://github.com/ne-foss-org/nekernel diff --git a/src/kernel/src/FS/OpenHeFS+FileSystemParser.cpp b/src/kernel/src/FS/OpenHeFS+FileSystemParser.cpp index 19479264..fa3f5785 100644 --- a/src/kernel/src/FS/OpenHeFS+FileSystemParser.cpp +++ b/src/kernel/src/FS/OpenHeFS+FileSystemParser.cpp @@ -263,7 +263,7 @@ namespace Detail { STATIC _Output BOOL hefsi_update_ind_status(HEFS_BOOT_NODE* boot, DriveTrait* mnt, const Utf8Char* dir_name, UInt16 flags, const BOOL delete_or_create) { - if (mnt) { + if (mnt && boot) { HEFS_INDEX_NODE_DIRECTORY* tmpdir = (HEFS_INDEX_NODE_DIRECTORY*) mm_alloc_ptr(sizeof(HEFS_INDEX_NODE_DIRECTORY), Yes, No); @@ -462,7 +462,7 @@ namespace Detail { const Utf8Char* dir_name, const Utf8Char* file_name, UInt8 kind) { - if (mnt) { + if (mnt && boot) { if (boot->fStartIND > boot->fEndIND) return nullptr; if (boot->fStartIN > boot->fEndIN) return nullptr; @@ -751,6 +751,8 @@ namespace Kernel { /// @return If it was sucessful, see err_local_get(). _Output Bool HeFileSystemParser::Format(_Input _Output DriveTrait* mnt, _Input const Int32 flags, _Input const Utf8Char* vol_name) { + if (!mnt) return NO; + // Verify Disk. mnt->fVerify(mnt->fPacket); @@ -859,6 +861,7 @@ _Output Bool HeFileSystemParser::Format(_Input _Output DriveTrait* mnt, _Input c mnt->fOutput(mnt->fPacket); +#if defined(__NE_VERBOSE_HEFS__) (Void)(kout << "Protocol: " << mnt->fProtocol() << kendl); (Void)(kout8 << u8"Volume Name: " << boot->fVolName << kendl8); (Void)(kout << "Start IND: " << hex_number(boot->fStartIND) << kendl); @@ -870,6 +873,7 @@ _Output Bool HeFileSystemParser::Format(_Input _Output DriveTrait* mnt, _Input c (Void)(kout << "Number of IND: " << hex_number(boot->fINDCount) << kendl); (Void)(kout << "Sector Size: " << hex_number(boot->fSectorSize) << kendl); (Void)(kout << "Drive Kind: " << Detail::hefs_drive_kind_to_string(boot->fDiskKind) << kendl); +#endif if (!mnt->fPacket.fPacketGood) { err_global_get() = kErrorDiskIsCorrupted; diff --git a/src/kernel/src/UserProcessTeam.cpp b/src/kernel/src/UserProcessTeam.cpp index de8edcf2..6a302066 100644 --- a/src/kernel/src/UserProcessTeam.cpp +++ b/src/kernel/src/UserProcessTeam.cpp @@ -1,6 +1,6 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/nekernel +// Official repository: https://github.com/ne-foss-org/kernel #include <KernelKit/UserProcessScheduler.h> @@ -12,12 +12,9 @@ UserProcessTeam::UserProcessTeam() { this->mProcessList[i].RTime = 0; this->mProcessList[i].UTime = 0; this->mProcessList[i].Status = ProcessStatusKind::kKilled; - - auto team{this->mProcessList[i].GetParentTeam()}; - team = this; - (void) team; } + // se the cursor to zero. this->mProcessCur = 0UL; } @@ -36,6 +33,7 @@ Array<UserProcess, kSchedProcessLimitPerTeam>& UserProcessTeam::AsArray() { /***********************************************************************************/ ProcessID& UserProcessTeam::Id() { + MUST_PASS(mTeamId >= 0); return this->mTeamId; } |
