From 8621867b0e4b38dedc8556e6c483e3575d776af0 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 31 Jan 2024 19:36:16 +0100 Subject: Kernel: Many improvements done to the kernel and it's HAL and protocols. Will implement BFileReader on next commit. Signed-off-by: Amlal El Mahrouss --- Private/KernelKit/CodeManager.hpp | 76 ++++++--------------------------------- 1 file changed, 11 insertions(+), 65 deletions(-) (limited to 'Private/KernelKit/CodeManager.hpp') diff --git a/Private/KernelKit/CodeManager.hpp b/Private/KernelKit/CodeManager.hpp index afb1a33e..fcb0d46b 100644 --- a/Private/KernelKit/CodeManager.hpp +++ b/Private/KernelKit/CodeManager.hpp @@ -1,72 +1,18 @@ -/* - * ======================================================== - * - * HCore - * Copyright Mahrouss Logic, all rights reserved. - * - * ======================================================== - */ +/* ------------------------------------------- -#ifndef _INC_CODE_MANAGER_ -#define _INC_CODE_MANAGER_ + Copyright Mahrouss Logic -#include -#include -#include + File: CodeManager.hpp + Purpose: Code Manager and Shared Objects. -#include "NewKit/Defines.hpp" + Revision History: -namespace HCore { -/// -/// \name PEFLoader -/// \brief PEF loader class. -/// -class PEFLoader : public Loader { - private: - explicit PEFLoader() = delete; + 30/01/24: Added file (amlel) - public: - explicit PEFLoader(const VoidPtr blob); - explicit PEFLoader(const char *path); - ~PEFLoader() override; +------------------------------------------- */ - public: - HCORE_COPY_DEFAULT(PEFLoader); +#pragma once - public: - typedef void (*MainKind)(void); - - public: - const char *Path() override; - const char *Format() override; - const char *MIME() override; - - public: - ErrorOr LoadStart() override; - VoidPtr FindSymbol(const char *name, Int32 kind) override; - - public: - bool IsLoaded() noexcept; - - private: - Ref fPath; - VoidPtr fCachedBlob; - bool fBad; -}; - -namespace Utils { -/// \brief Much like Mac OS's UPP. -/// This is read-only by design. -/// It handles different kind of code. -/// ARM <-> AMD64 for example. -typedef struct UniversalProcedureTable final { - const Char NAME[kPefNameLen]; - const VoidPtr TRAP; - const SizeT ARCH; -} __attribute__((packed)) UniversalProcedureTableType; - -bool execute_from_image(PEFLoader &exec) noexcept; -} // namespace Utils -} // namespace HCore - -#endif // ifndef _INC_CODE_MANAGER_ +#include +// #include +#include -- cgit v1.2.3