From a9d87cbd143b05cc3de711d84401f8ef514f3aa3 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Fri, 30 Aug 2024 18:46:00 +0200 Subject: [IMP] Updated the ARM64 release of ZKA. [IMP] Shall use the timer on AMD64 by default, a SMP driver will be written if needed. Signed-off-by: Amlal EL Mahrouss --- dev/ZBA/BootKit/BootKit.hxx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'dev/ZBA/BootKit/BootKit.hxx') diff --git a/dev/ZBA/BootKit/BootKit.hxx b/dev/ZBA/BootKit/BootKit.hxx index 1d0dca94..6ac87b82 100644 --- a/dev/ZBA/BootKit/BootKit.hxx +++ b/dev/ZBA/BootKit/BootKit.hxx @@ -336,17 +336,20 @@ inline Boolean BDiskFormatFactory::Format(const Char* partName, if (strncmp(kNewFSIdent, partBlock.Ident, kNewFSIdentLen) == 0 && partBlock.Version != kNewFSVersionInteger) { - BTextWriter writer; - writer.Write(L"newosldr: Disk partition updated.\r"); + if (partBlock.Version != 0) + { + BTextWriter writer; + writer.Write(L"newosldr: Disk partition updated.\r"); - partBlock.Version = kNewFSVersionInteger; + partBlock.Version = kNewFSVersionInteger; - fDiskDev.Leak().mBase = kNewFSRootCatalogStartAddress; - fDiskDev.Leak().mSize = sectorSz; + fDiskDev.Leak().mBase = kNewFSRootCatalogStartAddress; + fDiskDev.Leak().mSize = sectorSz; - fDiskDev.Write((Char*)&partBlock, sectorSz); + fDiskDev.Write((Char*)&partBlock, sectorSz); - return true; + return true; + } } else if (strncmp(kNewFSIdent, partBlock.Ident, kNewFSIdentLen)) { @@ -354,7 +357,8 @@ inline Boolean BDiskFormatFactory::Format(const Char* partName, writer.Write(L"newosldr: Disk partition error, not a valid one.\r"); // TODO: Find a way to use EFI::Stop. - while (1); + while (1) + ; } CopyMem(partBlock.Ident, kNewFSIdent, kNewFSIdentLen - 1); -- cgit v1.2.3