summaryrefslogtreecommitdiffhomepage
path: root/Boot/Sources/ProgramLoader.cxx
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-04 12:16:22 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-04 12:16:22 +0200
commitcd400898f5a6ef04690231323c0be107ae330fb4 (patch)
treeb94f98443797dcc0e4e0cdea4410a667e26391bc /Boot/Sources/ProgramLoader.cxx
parentd335a696d5aaf8f40d2f30555a2e1fe97a8f9e5c (diff)
[META] bump.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Boot/Sources/ProgramLoader.cxx')
-rw-r--r--Boot/Sources/ProgramLoader.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/Boot/Sources/ProgramLoader.cxx b/Boot/Sources/ProgramLoader.cxx
index 2103414a..be2650dc 100644
--- a/Boot/Sources/ProgramLoader.cxx
+++ b/Boot/Sources/ProgramLoader.cxx
@@ -70,18 +70,13 @@ namespace Boot
// if this is a code header, then we can look for the entrypoint.
if (sect->mCharacteristics & eUserSection)
{
- BS->AllocatePages(EfiAllocateType::AllocateAddress, EfiMemoryType::EfiLoaderCode, 1, &address_to_alloc);
-
if (!fStartAddress)
{
- fStartAddress = (VoidPtr)((UIntPtr)firstBytes + optHdr->mAddressOfEntryPoint);
+ fStartAddress = (VoidPtr)((VoidPtr)((UIntPtr)fBlob + 184 + (sect->mVirtualAddress - optHdr->mAddressOfEntryPoint)));
+
writer.Write("newosldr: Start Address set: ").Write((UIntPtr)fStartAddress).Write("\r");
}
}
- else
- {
- BS->AllocatePages(EfiAllocateType::AllocateAddress, EfiMemoryType::EfiLoaderData, 1, &address_to_alloc);
- }
}
}
else if (firstBytes[0] == kPefMagic[0] &&
@@ -125,9 +120,7 @@ namespace Boot
err_fn(handover);
}
- volatile HEL::HandoverProc start = reinterpret_cast<HEL::HandoverProc>((UIntPtr)fStartAddress);
-
- start(handover);
+ rt_jump_to_address(reinterpret_cast<HEL::HandoverProc>(fStartAddress), handover, fStackPtr);
err_fn(handover);
}