summaryrefslogtreecommitdiffhomepage
path: root/KernelKit
diff options
context:
space:
mode:
Diffstat (limited to 'KernelKit')
-rw-r--r--KernelKit/CodeManager.hpp11
-rw-r--r--KernelKit/DebugOutput.hpp4
-rw-r--r--KernelKit/Device.hpp20
-rw-r--r--KernelKit/DriveManager.hpp2
-rw-r--r--KernelKit/PEF.hpp2
-rw-r--r--KernelKit/SharedObjectCore.hxx6
6 files changed, 22 insertions, 23 deletions
diff --git a/KernelKit/CodeManager.hpp b/KernelKit/CodeManager.hpp
index fdf80e91..04d5647b 100644
--- a/KernelKit/CodeManager.hpp
+++ b/KernelKit/CodeManager.hpp
@@ -56,16 +56,15 @@ namespace hCore
namespace Utils
{
/// \brief Much like Mac OS's UPP.
+ /// This is read-only by design.
/// It handles different kind of code.
/// PowerPC <-> AMD64 for example.
typedef struct UniversalProcedureTable
{
- public:
- Char symbolName[kPefNameLen];
- VoidPtr symbolPtr;
- SizeT symbolArchitecture;
-
- } UniversalProcedureTableType;
+ const Char NAME[kPefNameLen];
+ const VoidPtr TRAP;
+ const SizeT ARCH;
+ } __attribute__((packed)) UniversalProcedureTableType;
bool execute_from_image(PEFLoader& exec);
}
diff --git a/KernelKit/DebugOutput.hpp b/KernelKit/DebugOutput.hpp
index 3bfb0144..1e30e6a4 100644
--- a/KernelKit/DebugOutput.hpp
+++ b/KernelKit/DebugOutput.hpp
@@ -16,10 +16,10 @@
namespace hCore
{
// @brief Emulates a VT100 terminal.
- class TerminalDevice final : public IDevice<const char*>
+ class TerminalDevice final : public DeviceInterface<const char*>
{
public:
- TerminalDevice(void (*print)(const char *), void (*get)(const char *)) : IDevice<const char*>(print, get) {}
+ TerminalDevice(void (*print)(const char *), void (*get)(const char *)) : DeviceInterface<const char*>(print, get) {}
virtual ~TerminalDevice() {}
/// @brief returns device name (terminal name)
diff --git a/KernelKit/Device.hpp b/KernelKit/Device.hpp
index e407f4e9..b117cf7f 100644
--- a/KernelKit/Device.hpp
+++ b/KernelKit/Device.hpp
@@ -19,37 +19,37 @@
namespace hCore
{
template<typename T>
- class IDevice;
+ class DeviceInterface;
template<typename T>
- class IDevice
+ class DeviceInterface
{
public:
- IDevice(void (*Out)(T), void (*In)(T))
+ explicit DeviceInterface(void (*Out)(T), void (*In)(T))
: m_Out(Out), m_In(In) {}
- virtual ~IDevice() = default;
+ virtual ~DeviceInterface() = default;
public:
- IDevice &operator=(const IDevice<T> &) = default;
- IDevice(const IDevice<T> &) = default;
+ DeviceInterface &operator=(const DeviceInterface<T> &) = default;
+ DeviceInterface(const DeviceInterface<T> &) = default;
public:
- IDevice<T> &operator<<(T Data)
+ DeviceInterface<T> &operator<<(T Data)
{
m_Out(Data);
return *this;
}
- IDevice<T> &operator>>(T Data)
+ DeviceInterface<T> &operator>>(T Data)
{
m_In(Data);
return *this;
}
- virtual const char *Name() const
+ virtual const char* Name() const
{
- return ("IDevice");
+ return ("DeviceInterface");
}
operator bool() { return m_Out && m_In; }
diff --git a/KernelKit/DriveManager.hpp b/KernelKit/DriveManager.hpp
index bb4e453c..9951c9cf 100644
--- a/KernelKit/DriveManager.hpp
+++ b/KernelKit/DriveManager.hpp
@@ -64,7 +64,7 @@ namespace hCore
#define kPacketZip "file/x-zip"
//! drive as a device.
- typedef IDevice<DriveTraits> Drive;
+ typedef DeviceInterface<DriveTraits> Drive;
typedef Drive* DrivePtr;
class DriveSelector final
diff --git a/KernelKit/PEF.hpp b/KernelKit/PEF.hpp
index 40c9f8a0..a2f5c5b8 100644
--- a/KernelKit/PEF.hpp
+++ b/KernelKit/PEF.hpp
@@ -32,7 +32,7 @@ namespace hCore
kPefArchAMD64,
kPefArchRISCV,
kPefArch64x0, /* 64x000. */
- kPefArchPOWER,
+ kPefArch32x0,
kPefArchInvalid = 0xFF,
};
diff --git a/KernelKit/SharedObjectCore.hxx b/KernelKit/SharedObjectCore.hxx
index f648fdc0..94b0ead2 100644
--- a/KernelKit/SharedObjectCore.hxx
+++ b/KernelKit/SharedObjectCore.hxx
@@ -7,8 +7,8 @@
* ========================================================
*/
-#ifndef __SUPPORTKIT_SHARED_OBJECT_CORE_HXX__
-#define __SUPPORTKIT_SHARED_OBJECT_CORE_HXX__
+#ifndef __KERNELKIT_SHARED_OBJECT_CORE_HXX__
+#define __KERNELKIT_SHARED_OBJECT_CORE_HXX__
#include <NewKit/Defines.hpp>
#include <KernelKit/Loader.hpp>
@@ -54,4 +54,4 @@ namespace hCore
}
}
-#endif /* ifndef __SUPPORTKIT_SHARED_OBJECT_CORE_HXX__ */
+#endif /* ifndef __KERNELKIT_SHARED_OBJECT_CORE_HXX__ */