diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2024-12-17 15:28:28 +0100 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2024-12-17 15:28:28 +0100 |
| commit | 4d7f00657c62fcdc5765bfa525f28c37a52461af (patch) | |
| tree | ca5e0fbc0f4911683823d7d635e8df77f370081d /dev/ZBAKit | |
| parent | e55ba3e0711e1e0d66da002f2847f0d6d0e838cd (diff) | |
BUG: Fixing Filesystem Init.
Signed-off-by: Amlal <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/ZBAKit')
| -rw-r--r-- | dev/ZBAKit/BootKit/BootKit.h | 8 | ||||
| -rw-r--r-- | dev/ZBAKit/src/HEL/AMD64/BootMain.cc | 10 |
2 files changed, 6 insertions, 12 deletions
diff --git a/dev/ZBAKit/BootKit/BootKit.h b/dev/ZBAKit/BootKit/BootKit.h index 7741e713..ea1ebfb8 100644 --- a/dev/ZBAKit/BootKit/BootKit.h +++ b/dev/ZBAKit/BootKit/BootKit.h @@ -311,15 +311,15 @@ namespace Boot return false; /// sanity check /// convert the sector into something that the disk understands. - SizeT sectorSz = BootDev::kSectorSize; + SizeT sectorSz = sizeof(NFS_ROOT_PARTITION_BLOCK); /// @note A catalog roughly equal to a sector. - constexpr auto cMinimumDiskSize = kNeFSMinimumDiskSize; // at minimum. + constexpr auto kMinimumDiskSize = kNeFSMinimumDiskSize; // at minimum. /// @note also look at EPM headers, for free part blocks. - if (fDiskDev.GetDiskSize() < cMinimumDiskSize) + if (fDiskDev.GetDiskSize() < kMinimumDiskSize) { EFI::ThrowError(L"Drive-Too-Tiny", L"Can't format a New Filesystem partition here."); return false; @@ -328,7 +328,7 @@ namespace Boot NFS_ROOT_PARTITION_BLOCK partBlock{0}; CopyMem(partBlock.Ident, kNeFSIdent, kNeFSIdentLen - 1); - CopyMem(partBlock.PartitionName, partName, strlen(partName)); + CopyMem(partBlock.PartitionName, partName, StrLen(partName)); partBlock.Version = kNeFSVersionInteger; partBlock.CatalogCount = blobCount; diff --git a/dev/ZBAKit/src/HEL/AMD64/BootMain.cc b/dev/ZBAKit/src/HEL/AMD64/BootMain.cc index 90d6df05..26348ac2 100644 --- a/dev/ZBAKit/src/HEL/AMD64/BootMain.cc +++ b/dev/ZBAKit/src/HEL/AMD64/BootMain.cc @@ -156,7 +156,7 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, #ifdef ZBA_USE_FB CGDrawString("ZBA (c) Theater Quality Inc.", 10, 10, RGB(0xFF, 0xFF, 0xFF)); - CGDrawString((cnt_enabled > 1) ? "SMP detected." : "Single processor configuration detected.", 20, 10, RGB(0xFF, 0xFF, 0xFF)); + CGDrawString((cnt_enabled > 1) ? "Multi processor configuration detected." : "Single processor configuration detected.", 20, 10, RGB(0xFF, 0xFF, 0xFF)); #endif // ZBA_USE_FB handover_hdr->f_HardwareTables.f_MultiProcessingEnabled = cnt_enabled > 1; @@ -181,13 +181,7 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, root.fKind = kNeFSCatalogKindDir; - partition_factory.Format("FileSystem (A:)", &root, 1); - - rt_reset_hardware(); - } - else - { - CGDrawString("Booting from EPM disk...", 30, 10, RGB(0xFF, 0xFF, 0xFF)); + partition_factory.Format("FileSystem (A:)\0", &root, 1); } #endif // ZKA_AUTO_FORMAT |
