From 76835f023db03aef20c74541fb2a8a9485206cf7 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 1 Sep 2024 15:38:05 +0200 Subject: Added new fields for the OS inside handover header. Signed-off-by: Amlal El Mahrouss --- dev/ZBA/Sources/HEL/AMD64/BootMain.cxx | 42 ++++++++++++++++++--- dev/ZBA/Sources/Root/ZKA/Urbanist-Black.ttf | Bin 42784 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-BlackItalic.ttf | Bin 44084 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-Bold.ttf | Bin 42636 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-BoldItalic.ttf | Bin 43900 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBold.ttf | Bin 42908 -> 0 bytes .../Sources/Root/ZKA/Urbanist-ExtraBoldItalic.ttf | Bin 44208 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLight.ttf | Bin 42792 -> 0 bytes .../Sources/Root/ZKA/Urbanist-ExtraLightItalic.ttf | Bin 44104 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-Italic.ttf | Bin 43996 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-Light.ttf | Bin 42764 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-LightItalic.ttf | Bin 44052 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-Medium.ttf | Bin 42752 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-MediumItalic.ttf | Bin 44080 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-Regular.ttf | Bin 42704 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBold.ttf | Bin 42740 -> 0 bytes .../Sources/Root/ZKA/Urbanist-SemiBoldItalic.ttf | Bin 44088 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-Thin.ttf | Bin 42580 -> 0 bytes dev/ZBA/Sources/Root/ZKA/Urbanist-ThinItalic.ttf | Bin 43868 -> 0 bytes dev/ZBA/Sources/Root/ZKA/fonts.json | 4 -- dev/ZBA/Sources/Root/ZKA/startup.wav | Bin 0 -> 1045048 bytes dev/ZBA/Sources/Root/ZKA/urbanist.ttf | Bin 0 -> 42752 bytes 22 files changed, 36 insertions(+), 10 deletions(-) delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-Black.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-BlackItalic.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-Bold.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-BoldItalic.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBold.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBoldItalic.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLight.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLightItalic.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-Italic.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-Light.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-LightItalic.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-Medium.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-MediumItalic.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-Regular.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBold.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBoldItalic.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-Thin.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/Urbanist-ThinItalic.ttf delete mode 100644 dev/ZBA/Sources/Root/ZKA/fonts.json create mode 100644 dev/ZBA/Sources/Root/ZKA/startup.wav create mode 100644 dev/ZBA/Sources/Root/ZKA/urbanist.ttf (limited to 'dev/ZBA/Sources') diff --git a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx index 67b2a478..382cbcd6 100644 --- a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx +++ b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx @@ -149,7 +149,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, CGDrawString("NEWOSLDR (C) ZKA TECHNOLOGIES.", 10, 10, RGB(0xFF, 0xFF, 0xFF)); CGDrawString((cnt_enabled > 1) ? "MULTIPROCESSOR SYSTEM." : "UNIPROCESSOR SYSTEM.", 20, 10, RGB(0xFF, 0xFF, 0xFF)); - handoverHdrPtr->f_MultiProcessingEnabled = cnt_enabled > 1 + handoverHdrPtr->f_HardwareTables.f_MultiProcessingEnabled = cnt_enabled > 1 ; // Fill handover header now. @@ -233,10 +233,13 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, // format the disk. // ---------------------------------------------------- // + handoverHdrPtr->f_FirmwareCustomTables[0] = (VoidPtr)BS; + handoverHdrPtr->f_FirmwareCustomTables[1] = (VoidPtr)ST; + BFileReader readerSysChk(L"syschk.sys", ImageHandle); readerSysChk.ReadAll(0); - Boot::BThread* loaderBootScr = nullptr; + Boot::BThread* loaderSysChk = nullptr; // ------------------------------------------ // // If we succeed in reading the blob, then execute it. @@ -244,11 +247,16 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, if (readerSysChk.Blob()) { - loaderBootScr = new Boot::BThread(readerSysChk.Blob()); - loaderBootScr->SetName("64-bit System Check DLL."); + loaderSysChk = new Boot::BThread(readerSysChk.Blob()); + loaderSysChk->SetName("64-bit System Check DLL."); } - loaderBootScr->Start(handoverHdrPtr); + loaderSysChk->Start(handoverHdrPtr); + + // nullify these fields, to avoid being reused later. + + handoverHdrPtr->f_FirmwareCustomTables[0] = nullptr; + handoverHdrPtr->f_FirmwareCustomTables[1] = nullptr; BFileReader readerKernel(L"newoskrnl.dll", ImageHandle); @@ -264,10 +272,32 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, { loader = new Boot::BThread(readerKernel.Blob()); loader->SetName("64-bit Kernel DLL."); + + handoverHdrPtr->f_KernelImage = readerKernel.Blob(); + } + else + { + CGDrawString("NEWOSLDR: PLEASE RECOVER YOUR NEWOSKRNL KERNEL DLL.", 30, 10, RGB(0xFF, 0xFF, 0xFF)); + } + + BFileReader chimeWav(L"ZKA\\startup.wav", ImageHandle); + BFileReader readerSysDrv(L"ZKA\\startup.sys", ImageHandle); + BFileReader urbanistTTF(L"ZKA\\urbanist.ttf", ImageHandle); + + readerSysDrv.ReadAll(0); + chimeWav.ReadAll(0); + urbanistTTF.ReadAll(0); + + if (readerSysDrv.Blob() && + chimeWav.Blob()) + { + handoverHdrPtr->f_StartupChime = chimeWav.Blob(); + handoverHdrPtr->f_StartupImage = readerKernel.Blob(); + handoverHdrPtr->f_TTFallbackFont = urbanistTTF.Blob(); } else { - CGDrawString("NEWOSLDR: PLEASE RECOVER YOUR NEWOSKRNL INSTALL.", 40, 10, RGB(0xFF, 0xFF, 0xFF)); + CGDrawString("NEWOSLDR: ONE OR MORE SYSTEM COMPONENTS ARE MISSING, PLEASE REINSTALL THE OS.", 30, 10, RGB(0xFF, 0xFF, 0xFF)); } EFI::ExitBootServices(MapKey, ImageHandle); diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Black.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Black.ttf deleted file mode 100644 index e1ec32b3..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-Black.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-BlackItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-BlackItalic.ttf deleted file mode 100644 index 85323c97..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-BlackItalic.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Bold.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Bold.ttf deleted file mode 100644 index 330e84f9..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-Bold.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-BoldItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-BoldItalic.ttf deleted file mode 100644 index 08d47a8a..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-BoldItalic.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBold.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBold.ttf deleted file mode 100644 index 7971b6db..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBold.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBoldItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBoldItalic.ttf deleted file mode 100644 index 050297e2..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBoldItalic.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLight.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLight.ttf deleted file mode 100644 index a20a0bf9..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLight.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLightItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLightItalic.ttf deleted file mode 100644 index 68968472..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLightItalic.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Italic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Italic.ttf deleted file mode 100644 index 79688a6c..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-Italic.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Light.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Light.ttf deleted file mode 100644 index 59034000..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-Light.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-LightItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-LightItalic.ttf deleted file mode 100644 index 1a455ce2..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-LightItalic.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Medium.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Medium.ttf deleted file mode 100644 index e9a6dbb0..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-Medium.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-MediumItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-MediumItalic.ttf deleted file mode 100644 index 44a9c897..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-MediumItalic.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Regular.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Regular.ttf deleted file mode 100644 index 2a794b27..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-Regular.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBold.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBold.ttf deleted file mode 100644 index 6d393d1c..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBold.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBoldItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBoldItalic.ttf deleted file mode 100644 index 327aa044..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBoldItalic.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Thin.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Thin.ttf deleted file mode 100644 index 9e272162..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-Thin.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-ThinItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-ThinItalic.ttf deleted file mode 100644 index 5cf054f1..00000000 Binary files a/dev/ZBA/Sources/Root/ZKA/Urbanist-ThinItalic.ttf and /dev/null differ diff --git a/dev/ZBA/Sources/Root/ZKA/fonts.json b/dev/ZBA/Sources/Root/ZKA/fonts.json deleted file mode 100644 index 05487cec..00000000 --- a/dev/ZBA/Sources/Root/ZKA/fonts.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "font_pkg_src": "*.ttf", - "font_pkg_name": "ZKA Standard Fonts." -} diff --git a/dev/ZBA/Sources/Root/ZKA/startup.wav b/dev/ZBA/Sources/Root/ZKA/startup.wav new file mode 100644 index 00000000..524921f5 Binary files /dev/null and b/dev/ZBA/Sources/Root/ZKA/startup.wav differ diff --git a/dev/ZBA/Sources/Root/ZKA/urbanist.ttf b/dev/ZBA/Sources/Root/ZKA/urbanist.ttf new file mode 100644 index 00000000..e9a6dbb0 Binary files /dev/null and b/dev/ZBA/Sources/Root/ZKA/urbanist.ttf differ -- cgit v1.2.3