summaryrefslogtreecommitdiffhomepage
path: root/dev/ZBA
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-30 18:46:00 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-30 19:56:02 +0200
commita9d87cbd143b05cc3de711d84401f8ef514f3aa3 (patch)
treecfc703f1dc02f6894b4d6d173d18d84be5757c5f /dev/ZBA
parent5229ca8ae190c0cb3db8d381a44be4113e81d5dc (diff)
[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 <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/ZBA')
-rw-r--r--dev/ZBA/BootKit/BootKit.hxx20
-rw-r--r--dev/ZBA/Sources/HEL/AMD64/BootMain.cxx1
-rw-r--r--dev/ZBA/amd64-efi.make4
3 files changed, 15 insertions, 10 deletions
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<BootDev>::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<BootDev>::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);
diff --git a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx
index c8cbe6a7..824cee06 100644
--- a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx
+++ b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx
@@ -134,6 +134,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
BS->LocateProtocol(&guid_mp, nullptr, reinterpret_cast<VoidPtr*>(&mp));
handoverHdrPtr->f_MultiProcessingEnabled = mp != nullptr;
+ handoverHdrPtr->f_HardwareTables.f_MpPtr = reinterpret_cast<VoidPtr>(mp);
kHandoverHeader = handoverHdrPtr;
diff --git a/dev/ZBA/amd64-efi.make b/dev/ZBA/amd64-efi.make
index f5c19801..3cf9e0f2 100644
--- a/dev/ZBA/amd64-efi.make
+++ b/dev/ZBA/amd64-efi.make
@@ -33,7 +33,7 @@ EMU_FLAGS=-net none -smp 4 -m 8G -M q35 \
-bios $(BIOS) -device piix3-ide,id=ide \
-drive id=disk,file=$(IMG),format=raw,if=none \
-device ide-hd,drive=disk,bus=ide.0 -drive \
- file=fat:rw:Sources/Root/,index=2,format=raw -d int \
+ file=fat:rw:Sources/Root/,index=2,format=raw \
-drive id=disk_2,file=$(IMG_2),if=none \
-device ahci,id=ahci \
-device ide-hd,drive=disk_2,bus=ahci.0
@@ -49,7 +49,7 @@ REM_FLAG=-f
FLAG_ASM=-f win64
FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mno-red-zone -D__NEWOSKRNL__ -D__NEWOSLDR__ \
-DEFI_FUNCTION_WRAPPER -I./ -I../Vendor -I../ZKA -I../ -c -nostdlib -fno-rtti -fno-exceptions \
- -std=c++20 -D__HAVE_MAHROUSS_APIS__ -D__ZKA_AMD64__ -D__MAHROUSS__
+ -std=c++20 -D__HAVE_ZKA_APIS__ -D__ZKA_AMD64__ -D__ZKA__
BOOT_LOADER=newosldr.exe
KERNEL=newoskrnl.dll