summaryrefslogtreecommitdiffhomepage
path: root/dev/ZBA/Sources
diff options
context:
space:
mode:
authorAmlal <amlal@el-mahrouss-logic.com>2024-09-06 12:52:02 +0200
committerAmlal <amlal@el-mahrouss-logic.com>2024-09-06 12:52:02 +0200
commit39d95f7fb429c5c6b71cd7c1e985cadaf4ab7b83 (patch)
tree33e5832930b82adadfec61ad2e509e79995b7cf1 /dev/ZBA/Sources
parent1404bdfdbf767a7c8e445766af4c27fe17f7c205 (diff)
[ IMP ] Fixed Scheduler and Team object, also fixed other things.
Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev/ZBA/Sources')
-rw-r--r--dev/ZBA/Sources/HEL/AMD64/BootATA.cxx2
-rw-r--r--dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx10
-rw-r--r--dev/ZBA/Sources/Thread.cxx38
3 files changed, 24 insertions, 26 deletions
diff --git a/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx b/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx
index 6cc7f9b7..2f802cc0 100644
--- a/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx
+++ b/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx
@@ -81,7 +81,7 @@ ATAInit_Retry:
if (statRdy & ATA_SR_ERR)
{
writer.Write(
- L"newosldr: ATA: Select error, not an IDE based hard-drive.\r");
+ L"NEWOSLDR: ATA: Select error, not an IDE based hard-drive.\r");
return false;
}
diff --git a/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx b/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx
index c2dff978..7c9fd042 100644
--- a/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx
+++ b/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx
@@ -56,13 +56,13 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path,
if (BS->HandleProtocol(ImageHandle, &guidImg, (void**)&img) != kEfiOk)
{
- mWriter.Write(L"newosldr: Handle-Protocol: No-Such-Protocol").Write(L"\r");
+ mWriter.Write(L"NEWOSLDR: Handle-Protocol: No-Such-Protocol").Write(L"\r");
this->mErrorCode = kNotSupported;
}
if (BS->HandleProtocol(img->DeviceHandle, &guidEfp, (void**)&efp) != kEfiOk)
{
- mWriter.Write(L"newosldr: Handle-Protocol: No-Such-Protocol").Write(L"\r");
+ mWriter.Write(L"NEWOSLDR: Handle-Protocol: No-Such-Protocol").Write(L"\r");
this->mErrorCode = kNotSupported;
return;
}
@@ -71,7 +71,7 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path,
if (efp->OpenVolume(efp, &mRootFs) != kEfiOk)
{
- mWriter.Write(L"newosldr: Fetch-Protocol: No-Such-Volume").Write(L"\r");
+ mWriter.Write(L"NEWOSLDR: Fetch-Protocol: No-Such-Volume").Write(L"\r");
this->mErrorCode = kNotSupported;
return;
}
@@ -81,7 +81,7 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path,
if (mRootFs->Open(mRootFs, &KernelFile, mPath, kEFIFileRead, kEFIReadOnly) !=
kEfiOk)
{
- mWriter.Write(L"newosldr: Fetch-Protocol: No-Such-Path: ")
+ mWriter.Write(L"NEWOSLDR: Fetch-Protocol: No-Such-Path: ")
.Write(mPath)
.Write(L"\r");
this->mErrorCode = kNotSupported;
@@ -142,7 +142,7 @@ Void BFileReader::ReadAll(SizeT readUntil, SizeT chunkToRead, UIntPtr outAddress
else if (readUntil < 1)
readUntil = newPtrInfo.FileSize;
- mWriter.Write(L"newosldr: Physical size: ").Write(readUntil).Write("\r");
+ mWriter.Write(L"NEWOSLDR: Physical size: ").Write(readUntil).Write("\r");
}
if (!outAddress)
diff --git a/dev/ZBA/Sources/Thread.cxx b/dev/ZBA/Sources/Thread.cxx
index 13b02b92..ee9b73c1 100644
--- a/dev/ZBA/Sources/Thread.cxx
+++ b/dev/ZBA/Sources/Thread.cxx
@@ -55,32 +55,32 @@ namespace Boot
if (hdrPtr->mMachine != kPeMachineAMD64 ||
hdrPtr->mSignature != kPeMagic)
{
- writer.Write("newosldr: Not a PE32+ executable.\r");
+ writer.Write("NEWOSLDR: Not a PE32+ executable.\r");
return;
}
if (optHdr->mSubsystem != kZKASubsystem)
{
- writer.Write("newosldr: Not a ZKA Subsystem executable.\r");
+ writer.Write("NEWOSLDR: Not a ZKA Subsystem executable.\r");
return;
}
- writer.Write("newosldr: PE32+ executable detected (ZKA Subsystem).\r");
+ writer.Write("NEWOSLDR: PE32+ executable detected (ZKA Subsystem).\r");
auto numSecs = hdrPtr->mNumberOfSections;
- writer.Write("newosldr: Major Linker Ver: ").Write(optHdr->mMajorLinkerVersion).Write("\r");
- writer.Write("newosldr: Minor Linker Ver: ").Write(optHdr->mMinorLinkerVersion).Write("\r");
- writer.Write("newosldr: Major Subsystem Ver: ").Write(optHdr->mMajorSubsystemVersion).Write("\r");
- writer.Write("newosldr: Minor Subsystem Ver: ").Write(optHdr->mMinorSubsystemVersion).Write("\r");
- writer.Write("newosldr: Magic: ").Write(hdrPtr->mSignature).Write("\r");
+ writer.Write("NEWOSLDR: Major Linker Ver: ").Write(optHdr->mMajorLinkerVersion).Write("\r");
+ writer.Write("NEWOSLDR: Minor Linker Ver: ").Write(optHdr->mMinorLinkerVersion).Write("\r");
+ writer.Write("NEWOSLDR: Major Subsystem Ver: ").Write(optHdr->mMajorSubsystemVersion).Write("\r");
+ writer.Write("NEWOSLDR: Minor Subsystem Ver: ").Write(optHdr->mMinorSubsystemVersion).Write("\r");
+ writer.Write("NEWOSLDR: Magic: ").Write(hdrPtr->mSignature).Write("\r");
constexpr auto cPageSize = 512;
EfiPhysicalAddress loadStartAddress = optHdr->mImageBase;
loadStartAddress += optHdr->mBaseOfData;
- writer.Write("newosldr: ImageBase: ").Write(loadStartAddress).Write("\r");
+ writer.Write("NEWOSLDR: ImageBase: ").Write(loadStartAddress).Write("\r");
auto numPages = optHdr->mSizeOfImage / cPageSize;
BS->AllocatePages(AllocateAddress, EfiLoaderData, numPages, &loadStartAddress);
@@ -95,14 +95,12 @@ namespace Boot
{
LDR_SECTION_HEADER_PTR sect = &sectPtr[sectIndex];
+ SetMem((VoidPtr)(loadStartAddress + sect->mVirtualAddress), 0, sect->mSizeOfRawData);
+
if (StrCmp(sectionForCode, sect->mName) == 0)
{
fStartAddress = (VoidPtr)((UIntPtr)loadStartAddress + optHdr->mAddressOfEntryPoint);
- writer.Write("newosldr: Entrypoint of DLL: ").Write((UIntPtr)fStartAddress).Write("\r");
- }
- else if (StrCmp(sectionForBSS, sect->mName) == 0)
- {
- SetMem((VoidPtr)(loadStartAddress + sect->mVirtualAddress), 0, sect->mSizeOfRawData);
+ writer.Write("NEWOSLDR: Entrypoint of DLL: ").Write((UIntPtr)fStartAddress).Write("\r");
}
else if (StrCmp(sectionForNewLdr, sect->mName) == 0)
{
@@ -115,12 +113,12 @@ namespace Boot
if (structHandover->HandoverMagic != kHandoverMagic &&
structHandover->HandoverType != HEL::kTypeKernel)
{
- writer.Write("newosldr: Entrypoint of EXE: ").Write((UIntPtr)fStartAddress).Write("\r");
+ writer.Write("NEWOSLDR: Entrypoint of EXE: ").Write((UIntPtr)fStartAddress).Write("\r");
CGDrawString("NEWOSLDR: NOT AN HANDOVER IMAGE...", 40, 10, RGB(0xFF, 0xFF, 0xFF));
}
}
- writer.Write("newosldr: offset ").Write(sect->mPointerToRawData).Write(" of ").Write(sect->mName).Write("\r");
+ writer.Write("NEWOSLDR: offset ").Write(sect->mPointerToRawData).Write(" of ").Write(sect->mName).Write("\r");
CopyMem((VoidPtr)(loadStartAddress + sect->mVirtualAddress), (VoidPtr)((UIntPtr)fBlob + sect->mPointerToRawData), sect->mSizeOfRawData);
}
@@ -135,12 +133,12 @@ namespace Boot
// ========================================= //
fStartAddress = nullptr;
- writer.Write("newosldr: PEF executable detected, won't load it.\r");
- writer.Write("newosldr: note: PEF executables aren't loadable by default.\r");
+ writer.Write("NEWOSLDR: PEF executable detected, won't load it.\r");
+ writer.Write("NEWOSLDR: note: PEF executables aren't loadable by default.\r");
}
else
{
- writer.Write("newosldr: Invalid executable. (note: SIGG executables aren't loadable by default).\r");
+ writer.Write("NEWOSLDR: Invalid executable. (note: SIGG executables aren't loadable by default).\r");
}
}
@@ -151,7 +149,7 @@ namespace Boot
if (!handover)
{
- writer.Write("newosldr: Exec format error.\r");
+ writer.Write("NEWOSLDR: Exec format error.\r");
return;
}