summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Boot/BootKit/BootKit.hxx7
-rw-r--r--Kernel/Sources/FS/NewFS.cxx4
-rw-r--r--Kernel/Sources/PEFCodeManager.cxx10
3 files changed, 12 insertions, 9 deletions
diff --git a/Boot/BootKit/BootKit.hxx b/Boot/BootKit/BootKit.hxx
index 3eeb8633..f24f75b2 100644
--- a/Boot/BootKit/BootKit.hxx
+++ b/Boot/BootKit/BootKit.hxx
@@ -366,6 +366,7 @@ inline Boolean BDiskFormatFactory<BootDev>::Format(const char* partName,
BootBlockType* epmBoot = (BootBlockType*)buf;
constexpr auto cFsName = "NewFS";
+ constexpr auto cBlockName = "Zeta:";
CopyMem(reinterpret_cast<VoidPtr>(const_cast<Char*>(cFsName)), epmBoot->Fs, StrLen(cFsName));
@@ -374,8 +375,8 @@ inline Boolean BDiskFormatFactory<BootDev>::Format(const char* partName,
epmBoot->SectorSz = partBlock->SectorSize;
epmBoot->NumBlocks = partBlock->CatalogCount;
- CopyMem(reinterpret_cast<VoidPtr>(const_cast<Char*>("BOOT:")), epmBoot->Name, StrLen("BOOT:"));
- CopyMem(reinterpret_cast<VoidPtr>(const_cast<Char*>(kEPMMagic)), epmBoot->Magic, StrLen(kEPMMagic));
+ CopyMem(epmBoot->Name, reinterpret_cast<VoidPtr>(const_cast<Char*>(cBlockName)), StrLen(cBlockName));
+ CopyMem(epmBoot->Magic, reinterpret_cast<VoidPtr>(const_cast<Char*>(kEPMMagic)), StrLen(kEPMMagic));
BTextWriter writer;
writer.Write(L"newosldr: wrote parition.\r");
@@ -384,7 +385,7 @@ inline Boolean BDiskFormatFactory<BootDev>::Format(const char* partName,
fDiskDev.Leak().mSize = sectorSz;
fDiskDev.Write(buf, sectorSz);
-
+
return true;
}
else
diff --git a/Kernel/Sources/FS/NewFS.cxx b/Kernel/Sources/FS/NewFS.cxx
index 541b7eef..5c5b50ca 100644
--- a/Kernel/Sources/FS/NewFS.cxx
+++ b/Kernel/Sources/FS/NewFS.cxx
@@ -497,6 +497,7 @@ bool NewFSParser::Format(_Input _Output DriveTrait* drive)
BootBlockType* epmBoot = (BootBlockType*)bufEpmHdr;
constexpr auto cFsName = "NewFS";
+ constexpr auto cBlockName = "Zeta:";
rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(cFsName)), epmBoot->Fs, rt_string_len(cFsName));
@@ -505,8 +506,7 @@ bool NewFSParser::Format(_Input _Output DriveTrait* drive)
epmBoot->SectorSz = partBlock->SectorSize;
epmBoot->NumBlocks = partBlock->CatalogCount;
- rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>("BOOT:")), epmBoot->Name, rt_string_len("BOOT:"));
-
+ rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(cBlockName)), epmBoot->Name, rt_string_len(cBlockName));
rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(kEPMMagic)), epmBoot->Magic, rt_string_len(kEPMMagic));
drive->fPacket.fPacketContent = bufEpmHdr;
diff --git a/Kernel/Sources/PEFCodeManager.cxx b/Kernel/Sources/PEFCodeManager.cxx
index f8b50e56..12ca9b10 100644
--- a/Kernel/Sources/PEFCodeManager.cxx
+++ b/Kernel/Sources/PEFCodeManager.cxx
@@ -20,14 +20,16 @@ namespace NewOS
/// @brief Get the PEF platform signature according to the compiled backebnd
UInt32 rt_get_pef_platform(void) noexcept
{
-#ifdef __32x0__
+#ifdef __NEWOS_32X0__
return kPefArch32x0;
-#elif defined(__64x0__)
+#elif defined(__NEWOS_64X0__)
return kPefArch64x0;
-#elif defined(__x86_64__)
+#elif defined(__NEWOS_AMD64__)
return kPefArchAMD64;
-#elif defined(__powerpc64__)
+#elif defined(__NEWOS_PPC64__)
return kPefArchPowerPC;
+#elif defined(__NEWOS_ARM64__)
+ return kPefArchARM64;
#else
return kPefArchInvalid;
#endif // __32x0__ || __64x0__ || __x86_64__