diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2024-11-02 07:46:45 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2024-11-02 07:49:04 +0100 |
| commit | f5e656424dc41ff93c67bcc8139a76d40f525efc (patch) | |
| tree | f701847fb8d2bec8a31c1f24f86afc5f2f338e64 /dev/ZKAKit/KernelKit | |
| parent | 358379efc79bdda8b5742b82b95c45063184d76f (diff) | |
IMP: minOSKrnl commit 1039.
- KernelKit: New allocation limit in Heap.cc
- KernelKit: Add Matches method for password validation.
- KernelKit: Scheduler and Thread have been improved with new validations on frame.
- META: Ran format command.
- NewKit: Add new Ptr8 type for UInt8* types.
- MBCI: Fix codestyle.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKAKit/KernelKit')
| -rw-r--r-- | dev/ZKAKit/KernelKit/DriveMgr.h | 12 | ||||
| -rw-r--r-- | dev/ZKAKit/KernelKit/HardwareThreadScheduler.h | 2 | ||||
| -rw-r--r-- | dev/ZKAKit/KernelKit/PEFCodeMgr.h | 6 | ||||
| -rw-r--r-- | dev/ZKAKit/KernelKit/User.h | 11 | ||||
| -rw-r--r-- | dev/ZKAKit/KernelKit/UserProcessScheduler.h | 6 |
5 files changed, 21 insertions, 16 deletions
diff --git a/dev/ZKAKit/KernelKit/DriveMgr.h b/dev/ZKAKit/KernelKit/DriveMgr.h index 6f17e03b..38b9624a 100644 --- a/dev/ZKAKit/KernelKit/DriveMgr.h +++ b/dev/ZKAKit/KernelKit/DriveMgr.h @@ -34,13 +34,13 @@ namespace Kernel kFloppyDisc = 0xCD, kOpticalDisc = 0xDC, // CD-ROM/DVD-ROM/Blu-Ray /// Storage flags, combine with below. - kReadOnly = 0x10, // Read only drive - kEPMDrive = 0x11, // Explicit Partition Map. - kEPTDrive = 0x12, // ESP w/ EPM partition. - kMBRDrive = 0x13, // PC classic partition scheme - kGPTDrive = 0x14, // PC new partition scheme + kReadOnly = 0x10, // Read only drive + kEPMDrive = 0x11, // Explicit Partition Map. + kEPTDrive = 0x12, // ESP w/ EPM partition. + kMBRDrive = 0x13, // PC classic partition scheme + kGPTDrive = 0x14, // PC new partition scheme kUnformattedDrive = 0x15, - kStorageCount = 9, + kStorageCount = 9, }; typedef Int64 rt_drive_id_type; diff --git a/dev/ZKAKit/KernelKit/HardwareThreadScheduler.h b/dev/ZKAKit/KernelKit/HardwareThreadScheduler.h index 3e94af75..bd669018 100644 --- a/dev/ZKAKit/KernelKit/HardwareThreadScheduler.h +++ b/dev/ZKAKit/KernelKit/HardwareThreadScheduler.h @@ -61,7 +61,7 @@ namespace Kernel void Busy(const bool busy = false) noexcept; public: - bool Switch(VoidPtr image, UInt8* stack_ptr, HAL::StackFramePtr frame); + bool Switch(VoidPtr image, Ptr8 stack_ptr, HAL::StackFramePtr frame); bool IsWakeup() noexcept; public: diff --git a/dev/ZKAKit/KernelKit/PEFCodeMgr.h b/dev/ZKAKit/KernelKit/PEFCodeMgr.h index 32e3c838..568b77da 100644 --- a/dev/ZKAKit/KernelKit/PEFCodeMgr.h +++ b/dev/ZKAKit/KernelKit/PEFCodeMgr.h @@ -53,9 +53,9 @@ namespace Kernel #endif // __FSKIT_INCLUDES_NEFS__ Ref<KString> fPath; - VoidPtr fCachedBlob; - bool fFatBinary; - bool fBad; + VoidPtr fCachedBlob; + bool fFatBinary; + bool fBad; }; namespace Utils diff --git a/dev/ZKAKit/KernelKit/User.h b/dev/ZKAKit/KernelKit/User.h index 3e48f1bd..ebb8cee2 100644 --- a/dev/ZKAKit/KernelKit/User.h +++ b/dev/ZKAKit/KernelKit/User.h @@ -65,12 +65,17 @@ namespace Kernel /// @brief Is she a super user? Bool IsSuperUser() noexcept; - Bool TrySave(const UserPublicKey password) noexcept; + /// @brief Saves a password from the public key. + Bool Save(const UserPublicKey password) noexcept; + + /// @brief Checks if a password matches the **password**. + /// @param password the password to check. + Bool Matches(const UserPublicKey password) noexcept; private: UserRingKind fRing{UserRingKind::kRingStdUser}; - Char fUserName[kMaxUserNameLen] = {0}; - Char fUserToken[kMaxUserTokenLen] = {0}; + Char fUserName[kMaxUserNameLen] = {0}; + Char fUserToken[kMaxUserTokenLen] = {0}; }; } // namespace Kernel diff --git a/dev/ZKAKit/KernelKit/UserProcessScheduler.h b/dev/ZKAKit/KernelKit/UserProcessScheduler.h index 798519ac..3ec92e8c 100644 --- a/dev/ZKAKit/KernelKit/UserProcessScheduler.h +++ b/dev/ZKAKit/KernelKit/UserProcessScheduler.h @@ -154,8 +154,8 @@ namespace Kernel struct USER_PROCESS_HEAP final { VoidPtr MemoryEntry{nullptr}; - SizeT MemoryEntrySize{0UL}; - SizeT MemoryEntryPad{0UL}; + SizeT MemoryEntrySize{0UL}; + SizeT MemoryEntryPad{0UL}; struct USER_PROCESS_HEAP* MemoryPrev{nullptr}; struct USER_PROCESS_HEAP* MemoryNext{nullptr}; @@ -275,7 +275,7 @@ namespace Kernel public: Ref<UserProcess>& GetCurrentProcess(); - const SizeT Run() noexcept; + const SizeT Run() noexcept; public: STATIC UserProcessScheduler& The(); |
