diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-20 12:17:47 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-20 12:17:47 +0100 |
| commit | 6f95c0b5815a4bd3362c1e8fe2241df25318d6fa (patch) | |
| tree | c33ed712cdb9f72d7bb3c9294d9f9e07b456edad | |
| parent | bee34b67fdc357cc8d504d4864bd9faf94b6b374 (diff) | |
ADD: Working on a fix for the last problem on NeFS.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
| -rw-r--r-- | dev/Boot/src/BootThread.cc | 4 | ||||
| -rw-r--r-- | dev/Kernel/src/DriveMgr.cc | 11 | ||||
| -rw-r--r-- | dev/Kernel/src/FS/NeFS.cc | 13 | ||||
| -rw-r--r-- | dev/Kernel/src/Heap.cc | 4 |
4 files changed, 19 insertions, 13 deletions
diff --git a/dev/Boot/src/BootThread.cc b/dev/Boot/src/BootThread.cc index 01ff3588..b8ac7806 100644 --- a/dev/Boot/src/BootThread.cc +++ b/dev/Boot/src/BootThread.cc @@ -163,7 +163,7 @@ namespace Boot writer.Write("BootZ: Invalid Executable.\r"); } - fStack = new UInt8[mib_cast(8)]; + fStack = new UInt8[mib_cast(16)]; } /// @note handover header has to be valid! @@ -185,7 +185,7 @@ namespace Boot if (own_stack) { - rt_jump_to_address(fStartAddress, fHandover, &fStack[mib_cast(8) - 1]); + rt_jump_to_address(fStartAddress, fHandover, &fStack[mib_cast(16) - 1]); } else { diff --git a/dev/Kernel/src/DriveMgr.cc b/dev/Kernel/src/DriveMgr.cc index 2ba48a4e..b73dfbe6 100644 --- a/dev/Kernel/src/DriveMgr.cc +++ b/dev/Kernel/src/DriveMgr.cc @@ -47,15 +47,12 @@ namespace Kernel Void io_drv_output(DriveTrait::DrivePacket* pckt) { if (!pckt) - { return; - } - if (pckt->fPacketReadOnly) - { - pckt->fPacketGood = NO; - return; - } + if (pckt->fPacketReadOnly) + return; + + kcout << "Writing blob to disk...\r"; #ifdef __AHCI__ drv_std_write(pckt->fPacketLba, (Char*)pckt->fPacketContent, pckt->fSectorSz, pckt->fPacketSize); diff --git a/dev/Kernel/src/FS/NeFS.cc b/dev/Kernel/src/FS/NeFS.cc index e375632f..0ef83615 100644 --- a/dev/Kernel/src/FS/NeFS.cc +++ b/dev/Kernel/src/FS/NeFS.cc @@ -138,13 +138,22 @@ _Output BOOL NeFileSystemParser::CreateFork(_Input NFS_FORK_STRUCT& the_fork) the_fork.PreviousSibling = lbaOfPreviousFork; the_fork.NextSibling = (the_fork.DataOffset - the_fork.DataSize - sizeof(NFS_FORK_STRUCT)); + NFS_FORK_STRUCT* fork = new NFS_FORK_STRUCT; + + MUST_PASS(fork); // ????? + + rt_copy_memory(&the_fork, fork, sizeof(NFS_FORK_STRUCT)); + drv.fPacket.fPacketLba = lba; drv.fPacket.fPacketSize = sizeof(NFS_FORK_STRUCT); - drv.fPacket.fPacketContent = &the_fork; + drv.fPacket.fPacketContent = fork; kcout << "Writing fork...\r"; - drv.fOutput(&drv.fPacket); + drv.fOutput(&drv.fPacket); + + delete fork; + fork = nullptr; /// log what we have now. kcout << "Wrote fork data at: " << hex_number(the_fork.DataOffset) diff --git a/dev/Kernel/src/Heap.cc b/dev/Kernel/src/Heap.cc index 984ffebc..7409813b 100644 --- a/dev/Kernel/src/Heap.cc +++ b/dev/Kernel/src/Heap.cc @@ -40,7 +40,7 @@ namespace Kernel struct PACKED HEAP_INFORMATION_BLOCK final { ///! @brief 32-bit value which contains the magic number of the heap. - UInt32 fMagic : 24; + UInt32 fMagic; ///! @brief Boolean value which tells if the heap is allocated. Boolean fPresent : 1; @@ -63,7 +63,7 @@ namespace Kernel /// @brief 64-bit pointer size. SizeT fHeapSize; - /// @brief 64-bit target pointer. + /// @brief 64-bit target offset pointer. UIntPtr fHeapPtr; /// @brief Padding bytes for header. |
