diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-09-01 15:38:05 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-09-01 15:38:05 +0200 |
| commit | 76835f023db03aef20c74541fb2a8a9485206cf7 (patch) | |
| tree | ab7b82e1860ac3d04353ade7ef74449ea4454488 /dev/ZBA/Sources | |
| parent | 46670e7ba97ec80bbcc88feb3d7db7ef3f5e2147 (diff) | |
Added new fields for the OS inside handover header.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZBA/Sources')
21 files changed, 36 insertions, 10 deletions
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 Binary files differdeleted file mode 100644 index e1ec32b3..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-Black.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-BlackItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-BlackItalic.ttf Binary files differdeleted file mode 100644 index 85323c97..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-BlackItalic.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Bold.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Bold.ttf Binary files differdeleted file mode 100644 index 330e84f9..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-Bold.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-BoldItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-BoldItalic.ttf Binary files differdeleted file mode 100644 index 08d47a8a..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-BoldItalic.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBold.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBold.ttf Binary files differdeleted file mode 100644 index 7971b6db..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBold.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBoldItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBoldItalic.ttf Binary files differdeleted file mode 100644 index 050297e2..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraBoldItalic.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLight.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLight.ttf Binary files differdeleted file mode 100644 index a20a0bf9..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLight.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLightItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLightItalic.ttf Binary files differdeleted file mode 100644 index 68968472..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-ExtraLightItalic.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Italic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Italic.ttf Binary files differdeleted file mode 100644 index 79688a6c..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-Italic.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Light.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Light.ttf Binary files differdeleted file mode 100644 index 59034000..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-Light.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-LightItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-LightItalic.ttf Binary files differdeleted file mode 100644 index 1a455ce2..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-LightItalic.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-MediumItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-MediumItalic.ttf Binary files differdeleted file mode 100644 index 44a9c897..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-MediumItalic.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Regular.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Regular.ttf Binary files differdeleted file mode 100644 index 2a794b27..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-Regular.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBold.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBold.ttf Binary files differdeleted file mode 100644 index 6d393d1c..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBold.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBoldItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBoldItalic.ttf Binary files differdeleted file mode 100644 index 327aa044..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-SemiBoldItalic.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Thin.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-Thin.ttf Binary files differdeleted file mode 100644 index 9e272162..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-Thin.ttf +++ /dev/null diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-ThinItalic.ttf b/dev/ZBA/Sources/Root/ZKA/Urbanist-ThinItalic.ttf Binary files differdeleted file mode 100644 index 5cf054f1..00000000 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-ThinItalic.ttf +++ /dev/null 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 Binary files differnew file mode 100644 index 00000000..524921f5 --- /dev/null +++ b/dev/ZBA/Sources/Root/ZKA/startup.wav diff --git a/dev/ZBA/Sources/Root/ZKA/Urbanist-Medium.ttf b/dev/ZBA/Sources/Root/ZKA/urbanist.ttf Binary files differindex e9a6dbb0..e9a6dbb0 100644 --- a/dev/ZBA/Sources/Root/ZKA/Urbanist-Medium.ttf +++ b/dev/ZBA/Sources/Root/ZKA/urbanist.ttf |
