summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-01 17:24:09 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-01 17:24:09 +0100
commit6ce7dffe92775f262384a028af233999a7d18048 (patch)
tree985e7e39fd9657ceb45ab292f6a934e0e6d4571b /Private/NewBoot
parent26ceef5cccbb40b00a302979ed297243b356feff (diff)
Kernel: Really big improvements on Paged Memory Model.
Bootloader: Design shift in BFileReader class. Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot')
-rw-r--r--Private/NewBoot/BootKit/BootKit.hxx12
-rw-r--r--Private/NewBoot/Source/EFILib.cxx14
-rw-r--r--Private/NewBoot/Source/compile_flags.txt3
-rw-r--r--Private/NewBoot/Source/makefile2
4 files changed, 16 insertions, 15 deletions
diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx
index 54f1d5d9..cec3bdc2 100644
--- a/Private/NewBoot/BootKit/BootKit.hxx
+++ b/Private/NewBoot/BootKit/BootKit.hxx
@@ -62,11 +62,23 @@ class BFileReader final {
HCore::VoidPtr ReadAll();
+ enum {
+ kOperationOkay,
+ kNotSupported,
+ kEmptyDirectory,
+ kNoSuchEntry,
+ kIsDirectory,
+ kCount,
+ };
+
+ Int32 &Error() { return mErrorCode; }
+
public:
BFileReader &operator=(const BFileReader &) = default;
BFileReader(const BFileReader &) = default;
private:
+ Int32 mErrorCode{kOperationOkay};
CharacterType mPath[255];
};
diff --git a/Private/NewBoot/Source/EFILib.cxx b/Private/NewBoot/Source/EFILib.cxx
deleted file mode 100644
index 3e30e0d3..00000000
--- a/Private/NewBoot/Source/EFILib.cxx
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -------------------------------------------
-
- Copyright Mahrouss Logic
-
- File: EFI.cxx
- Purpose: EFI Library for NewBoot.
-
- Revision History:
-
- 01/02/24: Added file (amlel)
-
-------------------------------------------- */
-
-#include <EFIKit/EFILib.hxx>
diff --git a/Private/NewBoot/Source/compile_flags.txt b/Private/NewBoot/Source/compile_flags.txt
new file mode 100644
index 00000000..e58d7ab9
--- /dev/null
+++ b/Private/NewBoot/Source/compile_flags.txt
@@ -0,0 +1,3 @@
+-std=c++20
+-I../
+-I../../
diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile
index 4193f12d..f10a4194 100644
--- a/Private/NewBoot/Source/makefile
+++ b/Private/NewBoot/Source/makefile
@@ -14,7 +14,7 @@ invalid-recipe:
.PHONY: bootloader-amd64
bootloader-amd64:
- $(CC_GNU) $(FLAG_GNU) HEL/AMD64/*.cxx
+ $(CC_GNU) $(FLAG_GNU) HEL/AMD64/*.cxx *.cxx
$(LD_GNU) *.o -e efi_main -filealign:16 -shared --subsystem=10 -ffreestanding -o HCoreLdr.exe
cp HCoreLdr.exe CDROM/EFI/BOOT/BOOTX64.EFI
cp ../../HCoreKrnl.exe CDROM/EFI/BOOT/HCoreKrnl.exe