summaryrefslogtreecommitdiffhomepage
path: root/Boot/Sources
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-10 10:35:44 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-10 10:35:44 +0200
commit192892221333113b28353fbe428adfc1bf6bbaae (patch)
tree04f2da30b021880ea3c5ca1bac030fcd206c5c52 /Boot/Sources
parent80039963ff08d1810e22a0ae41497b156e861db0 (diff)
[FIX] [newoskrnl.dll] Fixed it's heap and improved it as well.
[FIX] Fix memory leak in TrySave. (\Kernel\Sources\User.cxx) Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Boot/Sources')
-rw-r--r--Boot/Sources/HEL/AMD64/BootMain.cxx10
-rw-r--r--Boot/Sources/KernelLoader.cxx2
2 files changed, 10 insertions, 2 deletions
diff --git a/Boot/Sources/HEL/AMD64/BootMain.cxx b/Boot/Sources/HEL/AMD64/BootMain.cxx
index 0e2be7ac..53587e40 100644
--- a/Boot/Sources/HEL/AMD64/BootMain.cxx
+++ b/Boot/Sources/HEL/AMD64/BootMain.cxx
@@ -118,7 +118,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
vendorTable[4] == 'P' && vendorTable[5] == 'T' &&
vendorTable[6] == 'R' && vendorTable[7] == ' ')
{
- writer.Write(L"newosldr: Filling rsdptr...\r");
+ writer.Write(L"newosldr: Filling RSD PTR...\r");
handoverHdrPtr->f_HardwareTables.f_VendorPtr = (VoidPtr)vendorTable;
break;
@@ -163,6 +163,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
handoverHdrPtr->f_VirtualStart =
(VoidPtr)Descriptor[cDefaultMemoryMap].VirtualStart;
+
handoverHdrPtr->f_VirtualSize =
Descriptor[cDefaultMemoryMap].NumberOfPages; /* # of pages */
@@ -195,6 +196,13 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
CGDrawInRegion(CGColor(0xFF, 0xFF, 0xFF), handoverHdrPtr->f_GOP.f_Height, handoverHdrPtr->f_GOP.f_Width, 0, 0);
CGFini();
+ BDiskFormatFactory<BootDeviceATA> checkPart;
+
+ if (!checkPart.IsPartitionValid())
+ {
+ writer.Write("newosldr: Warning, partition isn't valid! Need to repartition it.\r");
+ }
+
// ---------------------------------------------------- //
// The following checks for an exisiting partition
// inside the disk, if it doesn't have one,
diff --git a/Boot/Sources/KernelLoader.cxx b/Boot/Sources/KernelLoader.cxx
index 02fa97e4..aaabddc3 100644
--- a/Boot/Sources/KernelLoader.cxx
+++ b/Boot/Sources/KernelLoader.cxx
@@ -93,7 +93,7 @@ namespace Boot
UInt64 HandoverMagic;
UInt32 HandoverType;
- }* structHandover = (struct HANDOVER_INFORMATION_STUB*)(fBlob + sect->mPointerToRawData);
+ }* structHandover = (struct HANDOVER_INFORMATION_STUB*)((UIntPtr)fBlob + sect->mPointerToRawData);
if (structHandover->HandoverMagic != kHandoverMagic ||
structHandover->HandoverType != kHOTypeKernel)