summaryrefslogtreecommitdiffhomepage
path: root/dev/ZBA
diff options
context:
space:
mode:
Diffstat (limited to 'dev/ZBA')
-rw-r--r--dev/ZBA/BootKit/BootKit.hxx10
-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
4 files changed, 29 insertions, 31 deletions
diff --git a/dev/ZBA/BootKit/BootKit.hxx b/dev/ZBA/BootKit/BootKit.hxx
index 3f7b0a96..ee2aea1f 100644
--- a/dev/ZBA/BootKit/BootKit.hxx
+++ b/dev/ZBA/BootKit/BootKit.hxx
@@ -236,7 +236,7 @@ public:
return false;
}
- writer.Write(L"newosldr: Disk is ").Write(GIB(this->fDiskDev.GetDiskSize())).Write(L" GB.\r");
+ writer.Write(L"NEWOSLDR: Disk is ").Write(GIB(this->fDiskDev.GetDiskSize())).Write(L" GB.\r");
if (blockPart->DiskSize != this->fDiskDev.GetDiskSize() ||
blockPart->DiskSize < 1 ||
@@ -251,7 +251,7 @@ public:
return false;
}
- writer.Write(L"newosldr: Partition: ").Write(blockPart->PartitionName).Write(L" is healthy.\r");
+ writer.Write(L"NEWOSLDR: Partition: ").Write(blockPart->PartitionName).Write(L" is healthy.\r");
return true;
}
@@ -288,7 +288,7 @@ private:
fDiskDev.Write((Char*)&catalogKind, sizeof(NFS_CATALOG_STRUCT));
- writer.Write(L"newosldr: Wrote directory: ").Write(blob->fFileName).Write(L"\r");
+ writer.Write(L"NEWOSLDR: Wrote directory: ").Write(blob->fFileName).Write(L"\r");
return true;
}
@@ -325,7 +325,7 @@ inline Boolean BDiskFormatFactory<BootDev>::Format(const Char* partName,
EFI::ThrowError(L"Disk-Too-Tiny", L"Can't format a New Filesystem partition here.");
return false;
}
-
+
NFS_ROOT_PARTITION_BLOCK partBlock{0};
CopyMem(partBlock.Ident, kNeFSIdent, kNeFSIdentLen - 1);
@@ -371,7 +371,7 @@ inline Boolean BDiskFormatFactory<BootDev>::Format(const Char* partName,
if (this->WriteRootCatalog(fileBlobs, blobCount, partBlock))
{
BTextWriter writer;
- writer.Write(L"newosldr: Disk formatted.\r");
+ writer.Write(L"NEWOSLDR: Disk formatted.\r");
return true;
}
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;
}