summaryrefslogtreecommitdiffhomepage
path: root/Boot/Sources
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-07-09 20:51:20 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-07-09 20:52:00 +0200
commitdfaf137915094e7ba72f7d7f1f57dc5158d1b6ab (patch)
tree802a5bf263d606b59bb52d5e7434a04c8644d07e /Boot/Sources
parent891245c6c9a78cea6074e336d1b04a2264b2fcce (diff)
MHR-36: A set of major fixes for bootloader and kernel alongside new
implementations. - Implement realloc for kernel scheduler improvements. - Fixed readAll on bootloader's BFileReader. - Add resources for zeta installation. - Add STB header. - Process Heap which replaced the previous User Heap. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Boot/Sources')
-rw-r--r--Boot/Sources/HEL/AMD64/BootFileReader.cxx15
-rw-r--r--Boot/Sources/HEL/AMD64/BootMain.cxx16
-rw-r--r--Boot/Sources/Root/ZETA/BootLoader-Load.webmbin0 -> 22081 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-Black.ttfbin0 -> 42784 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-BlackItalic.ttfbin0 -> 44084 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-Bold.ttfbin0 -> 42636 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-BoldItalic.ttfbin0 -> 43900 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-ExtraBold.ttfbin0 -> 42908 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-ExtraBoldItalic.ttfbin0 -> 44208 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-ExtraLight.ttfbin0 -> 42792 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-ExtraLightItalic.ttfbin0 -> 44104 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-Italic.ttfbin0 -> 43996 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-Light.ttfbin0 -> 42764 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-LightItalic.ttfbin0 -> 44052 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-Medium.ttfbin0 -> 42752 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-MediumItalic.ttfbin0 -> 44080 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-Regular.ttfbin0 -> 42704 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-SemiBold.ttfbin0 -> 42740 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-SemiBoldItalic.ttfbin0 -> 44088 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-Thin.ttfbin0 -> 42580 bytes
-rw-r--r--Boot/Sources/Root/ZETA/Urbanist-ThinItalic.ttfbin0 -> 43868 bytes
-rw-r--r--Boot/Sources/Root/splash.text7
22 files changed, 22 insertions, 16 deletions
diff --git a/Boot/Sources/HEL/AMD64/BootFileReader.cxx b/Boot/Sources/HEL/AMD64/BootFileReader.cxx
index d32f2a17..f5e0a55b 100644
--- a/Boot/Sources/HEL/AMD64/BootFileReader.cxx
+++ b/Boot/Sources/HEL/AMD64/BootFileReader.cxx
@@ -48,7 +48,7 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path,
EfiGUID guidEfp = EfiGUID(EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID);
- EfiSimpleFilesystemProtocol* efp = nullptr;
+ EfiSimpleFilesystemProtocol* efp = nullptr;
EfiLoadImageProtocol* img = nullptr;
EfiGUID guidImg = EfiGUID(EFI_LOADED_IMAGE_PROTOCOL_GUID);
@@ -84,7 +84,7 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path,
.Write(mPath)
.Write(L"\r");
this->mErrorCode = kNotSupported;
-
+
mRootFs->Close(mRootFs);
return;
@@ -147,11 +147,18 @@ Void BFileReader::ReadAll(SizeT readUntil, SizeT chunkToRead)
szCnt += bufSize;
if (res == kBufferTooSmall)
- bufSize = chunkToRead;
+ {
+ mErrorCode = kTooSmall;
+ return;
+ }
else if (res == kEfiOk)
- bufSize = chunkToRead;
+ {
+ continue;
+ }
else
+ {
break;
+ }
}
mSizeFile = szCnt;
diff --git a/Boot/Sources/HEL/AMD64/BootMain.cxx b/Boot/Sources/HEL/AMD64/BootMain.cxx
index 9faeac7e..928bc5de 100644
--- a/Boot/Sources/HEL/AMD64/BootMain.cxx
+++ b/Boot/Sources/HEL/AMD64/BootMain.cxx
@@ -16,11 +16,15 @@
#include <NewKit/Macros.hpp>
#include <NewKit/Ref.hpp>
#include <BootKit/ProgramLoader.hxx>
+#include <KernelKit/KernelHeap.hpp>
#include <cstring>
+#include <BootKit/Vendor/Support.hxx>ke_realloc_ke_heap
+#include <BootKit/STB.hxx>
+
/// make the compiler shut up.
#ifndef kMachineModel
-#define kMachineModel "Zeta HD"
+#define kMachineModel "Zeta SSD"
#endif // !kMachineModel
#ifndef cExpectedWidth
@@ -152,13 +156,13 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
CGInit();
CGDrawInRegion(cCGClearClr, handoverHdrPtr->f_GOP.f_Height,
- handoverHdrPtr->f_GOP.f_Width, 0, 0);
+ handoverHdrPtr->f_GOP.f_Width, 0, 0);
CGFini();
CGDrawBitMapInRegion(NewBoot, NEWBOOT_HEIGHT, NEWBOOT_WIDTH,
- (handoverHdrPtr->f_GOP.f_Width - NEWBOOT_WIDTH) / 2,
- (handoverHdrPtr->f_GOP.f_Height - NEWBOOT_HEIGHT) / 2);
+ (handoverHdrPtr->f_GOP.f_Width - NEWBOOT_WIDTH) / 2,
+ (handoverHdrPtr->f_GOP.f_Height - NEWBOOT_HEIGHT) / 2);
CGFini();
@@ -229,7 +233,9 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
BFileReader readerKernel(L"newoskrnl.exe", ImageHandle);
- readerKernel.ReadAll(kib_cast(5), kib_cast(5));
+ /// TODO: BFileReader::GetSize(...);
+ constexpr auto cKernelSz = 275101;
+ readerKernel.ReadAll(cKernelSz, 4096);
Boot::ProgramLoader* loader = nullptr;
diff --git a/Boot/Sources/Root/ZETA/BootLoader-Load.webm b/Boot/Sources/Root/ZETA/BootLoader-Load.webm
new file mode 100644
index 00000000..84b5e749
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/BootLoader-Load.webm
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-Black.ttf b/Boot/Sources/Root/ZETA/Urbanist-Black.ttf
new file mode 100644
index 00000000..e1ec32b3
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-Black.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-BlackItalic.ttf b/Boot/Sources/Root/ZETA/Urbanist-BlackItalic.ttf
new file mode 100644
index 00000000..85323c97
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-BlackItalic.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-Bold.ttf b/Boot/Sources/Root/ZETA/Urbanist-Bold.ttf
new file mode 100644
index 00000000..330e84f9
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-Bold.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-BoldItalic.ttf b/Boot/Sources/Root/ZETA/Urbanist-BoldItalic.ttf
new file mode 100644
index 00000000..08d47a8a
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-BoldItalic.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-ExtraBold.ttf b/Boot/Sources/Root/ZETA/Urbanist-ExtraBold.ttf
new file mode 100644
index 00000000..7971b6db
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-ExtraBold.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-ExtraBoldItalic.ttf b/Boot/Sources/Root/ZETA/Urbanist-ExtraBoldItalic.ttf
new file mode 100644
index 00000000..050297e2
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-ExtraBoldItalic.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-ExtraLight.ttf b/Boot/Sources/Root/ZETA/Urbanist-ExtraLight.ttf
new file mode 100644
index 00000000..a20a0bf9
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-ExtraLight.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-ExtraLightItalic.ttf b/Boot/Sources/Root/ZETA/Urbanist-ExtraLightItalic.ttf
new file mode 100644
index 00000000..68968472
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-ExtraLightItalic.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-Italic.ttf b/Boot/Sources/Root/ZETA/Urbanist-Italic.ttf
new file mode 100644
index 00000000..79688a6c
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-Italic.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-Light.ttf b/Boot/Sources/Root/ZETA/Urbanist-Light.ttf
new file mode 100644
index 00000000..59034000
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-Light.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-LightItalic.ttf b/Boot/Sources/Root/ZETA/Urbanist-LightItalic.ttf
new file mode 100644
index 00000000..1a455ce2
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-LightItalic.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-Medium.ttf b/Boot/Sources/Root/ZETA/Urbanist-Medium.ttf
new file mode 100644
index 00000000..e9a6dbb0
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-Medium.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-MediumItalic.ttf b/Boot/Sources/Root/ZETA/Urbanist-MediumItalic.ttf
new file mode 100644
index 00000000..44a9c897
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-MediumItalic.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-Regular.ttf b/Boot/Sources/Root/ZETA/Urbanist-Regular.ttf
new file mode 100644
index 00000000..2a794b27
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-Regular.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-SemiBold.ttf b/Boot/Sources/Root/ZETA/Urbanist-SemiBold.ttf
new file mode 100644
index 00000000..6d393d1c
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-SemiBold.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-SemiBoldItalic.ttf b/Boot/Sources/Root/ZETA/Urbanist-SemiBoldItalic.ttf
new file mode 100644
index 00000000..327aa044
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-SemiBoldItalic.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-Thin.ttf b/Boot/Sources/Root/ZETA/Urbanist-Thin.ttf
new file mode 100644
index 00000000..9e272162
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-Thin.ttf
Binary files differ
diff --git a/Boot/Sources/Root/ZETA/Urbanist-ThinItalic.ttf b/Boot/Sources/Root/ZETA/Urbanist-ThinItalic.ttf
new file mode 100644
index 00000000..5cf054f1
--- /dev/null
+++ b/Boot/Sources/Root/ZETA/Urbanist-ThinItalic.ttf
Binary files differ
diff --git a/Boot/Sources/Root/splash.text b/Boot/Sources/Root/splash.text
deleted file mode 100644
index 4a851dc1..00000000
--- a/Boot/Sources/Root/splash.text
+++ /dev/null
@@ -1,7 +0,0 @@
-==================================================================
-Welcome to Zeta.
-Brought to you by: Amlal EL Mahrouss.
-* newosldr, newoskrnl: Amlal EL Mahrouss.
-
-Copyright Zeta Electronics Corporation, all rights reserved.
-==================================================================