summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-16 14:00:12 +0000
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-16 14:00:12 +0000
commit82f0a2da77af7d79e53f5e65e46c527c1fe92765 (patch)
tree319ef7dd933367d64911c0ed9a53f91565002b00 /Private/KernelKit
parent544d0cadfc371bcfb54d9f7ec15464bc6a79af21 (diff)
parent4c7aebf1b8964b99b89a25da0965b30fe6c7e6b3 (diff)
Merge branch 'HCR-18' into 'trunk'
HCR-18: First commit, bringing HCoreKrnl.exe into memory. See merge request mahrouss-logic/micro-kernel!6
Diffstat (limited to 'Private/KernelKit')
-rw-r--r--Private/KernelKit/MSDOS.hpp2
-rw-r--r--Private/KernelKit/ProcessManager.hpp12
2 files changed, 11 insertions, 3 deletions
diff --git a/Private/KernelKit/MSDOS.hpp b/Private/KernelKit/MSDOS.hpp
index 2276f3cb..1adf6082 100644
--- a/Private/KernelKit/MSDOS.hpp
+++ b/Private/KernelKit/MSDOS.hpp
@@ -48,7 +48,7 @@ namespace HCore {
inline auto rt_find_exec_header(DosHeaderPtr ptrDos) -> VoidPtr {
if (!ptrDos) return nullptr;
if (ptrDos->eMagic[0] != kMagMz0) return nullptr;
- if (ptrDos->eMagic[0] != kMagMz1) return nullptr;
+ if (ptrDos->eMagic[1] != kMagMz1) return nullptr;
return (VoidPtr)(&ptrDos->eLfanew + 1);
}
diff --git a/Private/KernelKit/ProcessManager.hpp b/Private/KernelKit/ProcessManager.hpp
index e6d86959..543b3007 100644
--- a/Private/KernelKit/ProcessManager.hpp
+++ b/Private/KernelKit/ProcessManager.hpp
@@ -130,17 +130,25 @@ class Process final {
ProcessStatus Status;
// Memory, images.
- HeapPtr PoolCursor{nullptr};
+ HeapPtr HeapCursor{nullptr};
ImagePtr Image{nullptr};
- HeapPtr Pool{nullptr};
+ HeapPtr HeapPtr{nullptr};
// memory usage
SizeT UsedMemory{0};
SizeT FreeMemory{0};
+ enum {
+ ExecutableType,
+ DLLType,
+ DriverType,
+ TypeCount,
+ };
+
ProcessTime PTime;
PID ProcessId{-1};
Int32 Ring{3};
+ Int32 Kind{0};
public:
//! @brief boolean operator, check status.