diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-08 14:19:42 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-08 14:19:42 +0200 |
| commit | df8393cebbae61ed7686be17a28d80c657f49b7e (patch) | |
| tree | 96a67cbbe80a69f2b3c59a94a517741b6583a88b /Boot/BootKit/KernelLoader.hxx | |
| parent | 209ebb8caa774c8d73ead8e0eba3bd65d138930f (diff) | |
[IMP] Code cleanup and improvements of the bootloader, still trying to
figure what is going wrong on the kernel's DLL.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Boot/BootKit/KernelLoader.hxx')
| -rw-r--r-- | Boot/BootKit/KernelLoader.hxx | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Boot/BootKit/KernelLoader.hxx b/Boot/BootKit/KernelLoader.hxx new file mode 100644 index 00000000..3c98a238 --- /dev/null +++ b/Boot/BootKit/KernelLoader.hxx @@ -0,0 +1,43 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies + +------------------------------------------- */ + +#pragma once + +#include <KernelKit/PE.hxx> +#include <KernelKit/MSDOS.hxx> +#include <FirmwareKit/Handover.hxx> + +namespace Boot +{ + using namespace Kernel; + + class KernelLoader; + + /// @brief Program loader class + /// @package nl.zeta.boot.api + class KernelLoader final + { + public: + explicit KernelLoader() = delete; + ~KernelLoader() = default; + + explicit KernelLoader(Kernel::VoidPtr blob); + + KernelLoader& operator=(const KernelLoader&) = default; + KernelLoader(const KernelLoader&) = default; + + void Start(HEL::HandoverInformationHeader* handover); + const char* GetName(); + void SetName(const char* name); + bool IsValid(); + + private: + Char fBlobName[255]; + Char* fHeapForProgram{nullptr}; + VoidPtr fStartAddress{nullptr}; + VoidPtr fBlob{nullptr}; + }; +} // namespace Boot |
