diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-26 04:07:14 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-26 04:16:24 +0200 |
| commit | ff94ce367f7f23e3a78f157f9420c480a4d7f9aa (patch) | |
| tree | fc87ecd1ccf3de317db4214fe6460e324a5e76e4 /dev/ZKA/KernelKit/DLLInterface.hxx | |
| parent | b98a81f4f26b4da98f2ac760763af656f95f392b (diff) | |
[IMP] DLLInterface class and also reworked SCI's API.
[IMP] Handover now gives the kernel image, for the OS.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/KernelKit/DLLInterface.hxx')
| -rw-r--r-- | dev/ZKA/KernelKit/DLLInterface.hxx | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/dev/ZKA/KernelKit/DLLInterface.hxx b/dev/ZKA/KernelKit/DLLInterface.hxx new file mode 100644 index 00000000..370363b7 --- /dev/null +++ b/dev/ZKA/KernelKit/DLLInterface.hxx @@ -0,0 +1,44 @@ +/* + * ======================================================== + * + * Kernel + * Copyright ZKA Technologies., all rights reserved. + * + * ======================================================== + */ + +#pragma once + +#include <NewKit/Defines.hxx> + +namespace Kernel +{ + class DLLInterface + { + public: + explicit DLLInterface() = default; + virtual ~DLLInterface() = default; + + struct DLL_TRAITS final + { + VoidPtr fImageObject{nullptr}; + VoidPtr fImageEntrypointOffset{nullptr}; + + Bool IsValid() + { + return fImageObject && fImageEntrypointOffset; + } + }; + + ZKA_COPY_DEFAULT(DLLInterface); + + virtual DLL_TRAITS** GetAddressOf() = 0; + virtual DLL_TRAITS* Get() = 0; + + virtual void Mount(DLL_TRAITS* to_mount) = 0; + virtual void Unmount() = 0; + }; + + /// @brief Pure implementation, missing method/function handler. + EXTERN_C void __zka_pure_call(void); +} // namespace Kernel |
