diff options
Diffstat (limited to 'dev/ZBAKit')
| -rw-r--r-- | dev/ZBAKit/amd64-efi.make | 6 | ||||
| -rw-r--r-- | dev/ZBAKit/arm64-efi.make | 2 | ||||
| -rw-r--r-- | dev/ZBAKit/src/HEL/AMD64/BootATA.cc | 2 | ||||
| -rw-r--r-- | dev/ZBAKit/src/HEL/AMD64/BootMain.cc | 50 |
4 files changed, 34 insertions, 26 deletions
diff --git a/dev/ZBAKit/amd64-efi.make b/dev/ZBAKit/amd64-efi.make index 23e88b55..ba32671a 100644 --- a/dev/ZBAKit/amd64-efi.make +++ b/dev/ZBAKit/amd64-efi.make @@ -21,7 +21,7 @@ EMU=qemu-system-x86_64 endif ifeq ($(NEWS_MODEL), ) -ZKA_MODEL=-DkMachineModel="\"ZKA SSD\"" +ZKA_MODEL=-DkMachineModel="\"ZKA\"" endif BIOS=OVMF.fd @@ -34,7 +34,7 @@ EMU_FLAGS=-net none -smp 4 -m 8G -M q35 \ file=fat:rw:src/Root/,index=2,format=raw \ -drive id=disk_2,file=$(IMG),if=none \ -device ahci,id=ahci \ - -device ide-hd,drive=disk_2,bus=ahci.0 -d int + -device ide-hd,drive=disk_2,bus=ahci.0 -serial stdio LD_FLAGS=-e Main --subsystem=10 @@ -47,7 +47,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../ZKAKit -I../ -c -nostdlib -fno-rtti -fno-exceptions \ - -std=c++20 -D__HAVE_ZKA_APIS__ -D__ZKA_USE_FB__ -D__ZKA_AMD64__ -D__ZKA__ + -std=c++20 -D__HAVE_ZKA_APIS__ -DZBA_USE_FB -D__ZKA_AMD64__ -D__ZKA__ BOOTLOADER=zbaosldr.exe KERNEL=minoskrnl.exe diff --git a/dev/ZBAKit/arm64-efi.make b/dev/ZBAKit/arm64-efi.make index fb2317c4..1dd58d80 100644 --- a/dev/ZBAKit/arm64-efi.make +++ b/dev/ZBAKit/arm64-efi.make @@ -19,7 +19,7 @@ EMU=qemu-system-aarch64 endif ifeq ($(NEWS_MODEL), ) -ZKA_MODEL=-DkMachineModel="\"ZKA SSD\"" +ZKA_MODEL=-DkMachineModel="\"ZKA\"" endif BIOS=OVMF.fd diff --git a/dev/ZBAKit/src/HEL/AMD64/BootATA.cc b/dev/ZBAKit/src/HEL/AMD64/BootATA.cc index ca883935..0d24f99b 100644 --- a/dev/ZBAKit/src/HEL/AMD64/BootATA.cc +++ b/dev/ZBAKit/src/HEL/AMD64/BootATA.cc @@ -83,7 +83,7 @@ ATAInit_Retry: if (statRdy & ATA_SR_ERR) { writer.Write( - L"ZBA: ATA: error, not an IDE based hard-drive.\r"); + L"ZBA: ATA: Not an IDE based drive.\r"); return false; } diff --git a/dev/ZBAKit/src/HEL/AMD64/BootMain.cc b/dev/ZBAKit/src/HEL/AMD64/BootMain.cc index 98db6587..39e3fd31 100644 --- a/dev/ZBAKit/src/HEL/AMD64/BootMain.cc +++ b/dev/ZBAKit/src/HEL/AMD64/BootMain.cc @@ -16,10 +16,11 @@ #include <NewKit/Macros.h> #include <NewKit/Ref.h> #include <BootKit/Thread.h> +#include <Modules/FB/FB.h> // Makes the compiler shut up. #ifndef kMachineModel -#define kMachineModel "ZKA SSD" +#define kMachineModel "ZKA" #endif // !kMachineModel #ifndef kExpectedWidth @@ -94,7 +95,7 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, UInt32 sz_desc = sizeof(EfiMemoryDescriptor); UInt32 rev_desc = 0; -#ifdef __ZKA_USE_FB__ +#ifdef ZBA_USE_FB if (!boot_init_fb()) return 1; ///! Init the GOP. @@ -125,7 +126,7 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, handover_hdr->f_GOP.f_PixelPerLine = kGop->Mode->Info->PixelsPerScanLine; handover_hdr->f_GOP.f_PixelFormat = kGop->Mode->Info->PixelFormat; handover_hdr->f_GOP.f_Size = kGop->Mode->FrameBufferSize; -#endif // __ZKA_USE_FB__ +#endif // ZBA_USE_FB // ------------------------------------------- // // Grab MP services, extended to runtime. // @@ -140,21 +141,23 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, kHandoverHeader = handover_hdr; -#ifdef __ZKA_USE_FB__ +#ifdef ZBA_USE_FB CGInit(); - CGDrawInRegion(CGColor(0xFF, 0x3A, 0x3A), handover_hdr->f_GOP.f_Height, handover_hdr->f_GOP.f_Width, 0, 0); + CGDrawInRegion(CGColor(0x00, 0x00, 0x00), handover_hdr->f_GOP.f_Height, handover_hdr->f_GOP.f_Width, 0, 0); + CGFini(); + CGFini(); -#endif // __ZKA_USE_FB__ +#endif // ZBA_USE_FB UInt32 cnt_enabled = 0; UInt32 cnt_disabled = 0; mp->GetNumberOfProcessors(mp, &cnt_disabled, &cnt_enabled); -#ifdef __ZKA_USE_FB__ +#ifdef ZBA_USE_FB CGDrawString("ZBA (C) EL MAHROUSS LOGIC", 10, 10, RGB(0xFF, 0xFF, 0xFF)); CGDrawString((cnt_enabled > 1) ? "MULTIPLE PROCESSORS DETECTED." : "SINGLE PROCESSOR DETECTED.", 20, 10, RGB(0xFF, 0xFF, 0xFF)); -#endif // __ZKA_USE_FB__ +#endif // ZBA_USE_FB handover_hdr->f_HardwareTables.f_MultiProcessingEnabled = cnt_enabled > 1; // Fill handover header now. @@ -167,9 +170,11 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, // format the disk. // ---------------------------------------------------- // -#ifdef __ZKA_AUTO_FORMAT__ +#ifdef ZKA_AUTO_FORMAT if (!partition_factory.IsPartitionValid()) { + CGDrawString("FORMATTING EPM DISK...", 20, 10, RGB(0xFF, 0xFF, 0xFF)); + Boot::BDiskFormatFactory<BootDeviceATA>::BFileDescriptor root; root.fFileName[0] = kNeFSRoot[0]; root.fFileName[1] = 0; @@ -180,7 +185,11 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, rt_reset_hardware(); } -#endif // __ZKA_AUTO_FORMAT__ + else + { + CGDrawString("BOOTING FROM EPM DISK...", 20, 10, RGB(0xFF, 0xFF, 0xFF)); + } +#endif // ZKA_AUTO_FORMAT BS->GetMemoryMap(&size_struct_ptr, struct_ptr, &map_key, &sz_desc, &rev_desc); @@ -234,7 +243,7 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, if (reader_syschk.Blob()) { syschk_thread = new Boot::BThread(reader_syschk.Blob()); - syschk_thread->SetName("System Check (Integrity check)"); + syschk_thread->SetName("System Check (ZBA Driver)"); } syschk_thread->Start(handover_hdr); @@ -271,15 +280,17 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, if (reader_kernel.Blob()) { kernel_thread = new Boot::BThread(reader_kernel.Blob()); - kernel_thread->SetName("OS Kernel (Microkernel)."); + kernel_thread->SetName("Minimal OS Kernel."); handover_hdr->f_KernelImage = reader_kernel.Blob(); } else { -#ifdef __ZKA_USE_FB__ +#ifdef ZBA_USE_FB CGDrawString("ZBA: PLEASE RECOVER YOUR KERNEL IMAGE.", 30, 10, RGB(0xFF, 0xFF, 0xFF)); -#endif // __ZKA_USE_FB__ +#endif // ZBA_USE_FB + + EFI::Stop(); } Boot::BFileReader chime_wav(L"zka\\startup.wav", ImageHandle); @@ -300,18 +311,15 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle, } else { -#ifdef __ZKA_USE_FB__ +#ifdef ZBA_USE_FB CGDrawString("ZBA: ONE OR MORE SYSTEM COMPONENTS ARE MISSING, PLEASE REINSTALL THE OS.", 30, 10, RGB(0xFF, 0xFF, 0xFF)); -#endif // __ZKA_USE_FB__ +#endif // ZBA_USE_FB + + EFI::Stop(); } EFI::ExitBootServices(map_key, ImageHandle); -#ifdef __ZKA_USE_FB__ - CGDrawInRegion(CGColor(0xFF, 0x3A, 0x3A), handover_hdr->f_GOP.f_Height, handover_hdr->f_GOP.f_Width, 0, 0); - CGFini(); -#endif // __ZKA_USE_FB__ - // ---------------------------------------------------- // // Finally load the operating system kernel. // ---------------------------------------------------- // |
