summaryrefslogtreecommitdiffhomepage
path: root/dev/ZBA/Sources/HEL
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-08-23 15:26:33 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-08-23 15:26:33 +0200
commit58ec3282634ccf75006043017ceacffed9a4533c (patch)
tree81dc8f3823a4c77af34be62371523b5378e05aa9 /dev/ZBA/Sources/HEL
parentf5ed9f8a41b760a659e23f8c2a72d1ca73f3b826 (diff)
[IMP] BootScr module, manage boot driver (TODO need a UI toolkit for
it) [IMP] Made NetBoot compilable as well. [IMP] Fix Thread loader to be able to load other executables. [REFACTOR] __NEWOS_ to __ZKA_ refactor. [WIP] Fixing catalog which can't be fetched again after being written. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZBA/Sources/HEL')
-rw-r--r--dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx2
-rw-r--r--dev/ZBA/Sources/HEL/AMD64/BootJump.S2
-rw-r--r--dev/ZBA/Sources/HEL/AMD64/BootMain.cxx20
-rw-r--r--dev/ZBA/Sources/HEL/AMD64/compile_flags.txt2
4 files changed, 22 insertions, 4 deletions
diff --git a/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx b/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx
index e94c690a..5686318b 100644
--- a/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx
+++ b/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx
@@ -139,7 +139,7 @@ Void BFileReader::ReadAll(SizeT readUntil, SizeT chunkToRead, UIntPtr outAddress
else if (readUntil < 1)
readUntil = newPtrInfo.FileSize;
- mWriter.Write(L"newosldr: physical size: ").Write(readUntil).Write("\r");
+ mWriter.Write(L"newosldr: Physical size: ").Write(readUntil).Write("\r");
}
if (!outAddress)
diff --git a/dev/ZBA/Sources/HEL/AMD64/BootJump.S b/dev/ZBA/Sources/HEL/AMD64/BootJump.S
index 2eb745d0..de474c96 100644
--- a/dev/ZBA/Sources/HEL/AMD64/BootJump.S
+++ b/dev/ZBA/Sources/HEL/AMD64/BootJump.S
@@ -1,8 +1,8 @@
.global rt_jump_to_address
.global rt_reset_hardware
-.text
.text
+
.intel_syntax noprefix
/**
diff --git a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx
index 1011ce10..c5ee3fb3 100644
--- a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx
+++ b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx
@@ -185,7 +185,8 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
handoverHdrPtr->f_HeapStart = nullptr;
- while (BS->AllocatePool(EfiLoaderCode, kHandoverHeapSz, &handoverHdrPtr->f_HeapStart) != kEfiOk);
+ while (BS->AllocatePool(EfiLoaderCode, kHandoverHeapSz, &handoverHdrPtr->f_HeapStart) != kEfiOk)
+ ;
handoverHdrPtr->f_VirtualSize =
Descriptor[cDefaultMemoryMap].NumberOfPages; /* # of pages */
@@ -225,6 +226,23 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
// format the disk.
// ---------------------------------------------------- //
+ BFileReader readerBootScr(L"bootscr.sys", ImageHandle);
+ readerBootScr.ReadAll(0);
+
+ Boot::BThread* loaderBootScr = nullptr;
+
+ // ------------------------------------------ //
+ // If we succeed in reading the blob, then execute it.
+ // ------------------------------------------ //
+
+ if (readerBootScr.Blob())
+ {
+ loaderBootScr = new Boot::BThread(readerBootScr.Blob());
+ loaderBootScr->SetName("64-bit Boot Screen DLL.");
+ }
+
+ loaderBootScr->Start(handoverHdrPtr);
+
BFileReader readerKernel(L"newoskrnl.dll", ImageHandle);
readerKernel.ReadAll(0);
diff --git a/dev/ZBA/Sources/HEL/AMD64/compile_flags.txt b/dev/ZBA/Sources/HEL/AMD64/compile_flags.txt
index c24c4b09..cc79d229 100644
--- a/dev/ZBA/Sources/HEL/AMD64/compile_flags.txt
+++ b/dev/ZBA/Sources/HEL/AMD64/compile_flags.txt
@@ -1,7 +1,7 @@
-std=c++20
-I../../../
-I../../../../Kernel
--D__NEWOS_AMD64__
+-D__ZKA_AMD64__
-std=c++20
-D__x86_64__
-D__NEWOS_OTA__