From ff94ce367f7f23e3a78f157f9420c480a4d7f9aa Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 26 Aug 2024 04:07:14 +0200 Subject: [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 --- dev/SCI/Hint.h | 23 ---- dev/SCI/SCIBase.hxx | 207 ------------------------------- dev/SCI/SCIErr.hxx | 49 -------- dev/SCI/Sources/SCIBase.cxx | 7 -- dev/SCI/Sources/SCIErr.cxx | 9 -- dev/SCI/Sources/base.cxx | 7 ++ dev/SCI/sci_base.hxx | 220 +++++++++++++++++++++++++++++++++ dev/SCI/sci_err.hxx | 47 +++++++ dev/SCI/sci_hint.hxx | 23 ++++ dev/ZBA/Sources/HEL/AMD64/BootMain.cxx | 3 + dev/ZKA/CompressKit/RLE.hxx | 18 +++ dev/ZKA/FirmwareKit/Handover.hxx | 15 ++- dev/ZKA/HALKit/AXP/Processor.hpp | 7 -- dev/ZKA/HALKit/AXP/Processor.hxx | 7 ++ dev/ZKA/KernelKit/CodeManager.hxx | 2 +- dev/ZKA/KernelKit/DLLInterface.hxx | 44 +++++++ dev/ZKA/KernelKit/PEFDLLInterface.hxx | 105 ++++++++++++++++ dev/ZKA/KernelKit/PEFSharedObject.hxx | 117 ------------------ dev/ZKA/KernelKit/ProcessScheduler.hxx | 5 +- dev/ZKA/KernelKit/RLE.hxx | 15 --- dev/ZKA/KernelKit/User.hxx | 3 - dev/ZKA/NetworkKit/IPC.hxx | 2 + dev/ZKA/Sources/DLLInterface.cxx | 23 ++++ dev/ZKA/Sources/DLLMain.cxx | 30 ++--- dev/ZKA/Sources/PEFDLLInterface.cxx | 100 +++++++++++++++ dev/ZKA/Sources/PEFSharedObject.cxx | 110 ----------------- dev/ZKA/Sources/ProcessScheduler.cxx | 2 +- dev/ZKA/Sources/ThreadLocalStorage.cxx | 2 +- 28 files changed, 624 insertions(+), 578 deletions(-) delete mode 100644 dev/SCI/Hint.h delete mode 100644 dev/SCI/SCIBase.hxx delete mode 100644 dev/SCI/SCIErr.hxx delete mode 100644 dev/SCI/Sources/SCIBase.cxx delete mode 100644 dev/SCI/Sources/SCIErr.cxx create mode 100644 dev/SCI/Sources/base.cxx create mode 100644 dev/SCI/sci_base.hxx create mode 100644 dev/SCI/sci_err.hxx create mode 100644 dev/SCI/sci_hint.hxx create mode 100644 dev/ZKA/CompressKit/RLE.hxx delete mode 100644 dev/ZKA/HALKit/AXP/Processor.hpp create mode 100644 dev/ZKA/HALKit/AXP/Processor.hxx create mode 100644 dev/ZKA/KernelKit/DLLInterface.hxx create mode 100644 dev/ZKA/KernelKit/PEFDLLInterface.hxx delete mode 100644 dev/ZKA/KernelKit/PEFSharedObject.hxx delete mode 100644 dev/ZKA/KernelKit/RLE.hxx create mode 100644 dev/ZKA/Sources/DLLInterface.cxx create mode 100644 dev/ZKA/Sources/PEFDLLInterface.cxx delete mode 100644 dev/ZKA/Sources/PEFSharedObject.cxx (limited to 'dev') diff --git a/dev/SCI/Hint.h b/dev/SCI/Hint.h deleted file mode 100644 index c785f953..00000000 --- a/dev/SCI/Hint.h +++ /dev/null @@ -1,23 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#ifndef __SCI_HINT_HXX__ -#define __SCI_HINT_HXX__ - -#pragma compiler(hint_manifest) - -#define _Input -#define _Output - -#define _Optional - -#define _StrictCheckInput -#define _StrictCheckOutput - -#define _InOut -#define _StrictInOut - -#endif // ifndef __SCI_HINT_HXX__ diff --git a/dev/SCI/SCIBase.hxx b/dev/SCI/SCIBase.hxx deleted file mode 100644 index 982ca950..00000000 --- a/dev/SCI/SCIBase.hxx +++ /dev/null @@ -1,207 +0,0 @@ -/* ------------------------------------------- - -Copyright ZKA Technologies. - -File: SCIBase.hxx -Purpose: SCI/M core header file (C++) - -------------------------------------------- */ - -#ifndef __SCI_BASE_HXX__ -#define __SCI_BASE_HXX__ - -#include - -#define IMPORT_CXX extern "C++" -#define IMPORT_C extern "C" - -typedef bool Bool; -typedef void UInt0; - -typedef __UINT64_TYPE__ UInt64; -typedef __UINT32_TYPE__ UInt32; -typedef __UINT16_TYPE__ UInt16; -typedef __UINT8_TYPE__ UInt8; - -typedef __SIZE_TYPE__ SizeT; - -typedef __INT64_TYPE__ SInt64; -typedef __INT32_TYPE__ SInt32; -typedef __INT16_TYPE__ SInt16; -typedef __INT8_TYPE__ SInt8; - -typedef void* VoidPtr; -typedef __UINTPTR_TYPE__ UIntPtr; -typedef char Char; - -#ifdef __SCI_IMPL__ -#include -#else -class UnknownInterface; // Refrenced from an IDB entry. -class UnknownUCLSID; // From the IDB, the constructor of the object, e.g: WordUCLSID. -class UUID; - -/// @brief Allocate new SCM class. -/// @tparam TCLS -/// @tparam UCLSID -/// @param uclsidOfCls -/// @return -template -TCLS* RtlQueryInterface(UCLSID uclsidOfCls, Args... args); - -/// @brief Release SCM class. -/// @tparam TCLS -/// @param cls -/// @return -template -SInt32 RtlReleaseClass(TCLS* cls); - -class __attribute__((uuid("d7c144b6-0792-44b8-b06b-02b227b547df"))) UnknownInterface -{ -public: - explicit UnknownInterface() = default; - virtual ~UnknownInterface() = default; - - UnknownInterface& operator=(const UnknownInterface&) = default; - UnknownInterface(const UnknownInterface&) = default; - - virtual SInt32 Release() = 0; - virtual void RemoveRef() = 0; - virtual UnknownInterface* AddRef() = 0; - virtual VoidPtr QueryInterface(UUID* p_uuid) = 0; -}; - -template -class EventListenerInterface : public ClsID -{ -public: - explicit EventListenerInterface() = default; - virtual ~EventListenerInterface() = default; - - EventListenerInterface& operator=(const EventListenerInterface&) = default; - EventListenerInterface(const EventListenerInterface&) = default; - - virtual EventListenerInterface& operator +=(FnSign arg) = 0; -}; -#endif - -// ------------------------------------------------------------------------------------------ // -/// @note Handle types. -// ------------------------------------------------------------------------------------------ // - -typedef VoidPtr NEW_OBJECT; - -typedef NEW_OBJECT DLL_OBJECT; -typedef NEW_OBJECT IO_OBJECT; -typedef NEW_OBJECT COMP_OBJECT; -typedef NEW_OBJECT SCM_OBJECT; - -// ------------------------------------------------------------------------------------------ // - -// ------------------------------------------------------------------------------------------ // -/// @note Part of ZKA loader API. -// ------------------------------------------------------------------------------------------ // - -/// @brief Get function which is part of the DLL. -/// @param symbol the symbol to look for -/// @param dll_handle the DLL handle. -/// @return the proc pointer. -IMPORT_C NEW_OBJECT LdrGetDLLProc(_Input const Char* symbol, _Input NEW_OBJECT dll_handle); - -/// @brief Open DLL handle. -/// @param path -/// @param drv -/// @return -IMPORT_C NEW_OBJECT LdrOpenDLL(_Input const Char* path, _Input const Char* drive_letter); - -/// @brief Close DLL handle -/// @param dll_handle -/// @return -IMPORT_C UInt0 LdrCloseDLL(_Input NEW_OBJECT dll_handle); - -// ------------------------------------------------------------------------------------------ // -// File API. -// ------------------------------------------------------------------------------------------ // - -/// @brief Opens a file from a drive. -/// @param fs_path the filesystem path. -/// @param drive_letter drive name, use NULL to use default one. -/// @return the file descriptor of the file. -IMPORT_C NEW_OBJECT RtlOpenFile(const Char* fs_path, const Char* drive_letter); - -/// @brief Closes a file and flushes its content. -/// @param file_desc the file descriptor. -/// @return -IMPORT_C UInt0 RtlCloseFile(_Input NEW_OBJECT file_desc); - -// ------------------------------------------------------------------------ -// TLS API. -// ------------------------------------------------------------------------ - -/// @brief Installs the TIB and GIB inside the current process. -/// @param void. -/// @return > 0 error ocurred or already present, = 0 success. -IMPORT_C UInt32 TlsInstallIB(UInt0); - -// ------------------------------------------------------------------------ -// SCM API. -// ------------------------------------------------------------------------ - -/// @brief Allocate new SCM object. -/// @tparam TCLS the class type. -/// @tparam UCLSID UCLS factory class type. -/// @param uclsidOfCls UCLS factory class -/// @return TCLS interface -template -TCLS* ScmQueryInterface(_Input UCLSID* uclsidOfCls, _Input Args&&... args); - -/// @brief Release SCM object. -/// @tparam TCLS the class type. -/// @param cls the class to release. -/// @return status code. -template -SInt32 ScmReleaseClass(_Input TCLS* cls); - -/// @brief Creates an SCM instance in the process. -/// @param handle_instance the SCM handle. -/// @param flags the SCM flags. -IMPORT_C SInt32 ScmCreateInstance(_Input UInt32 flags, _Output SCM_OBJECT* handle_instance); - -/// @brief Destroys an SCM instance of the process. -/// @param handle_instance the SCM handle. -IMPORT_C UInt0 ScmDestroyInstance(_Input SCM_OBJECT handle_instance); - -// ------------------------------------------------------------------------ -// Memory Management API. -// ------------------------------------------------------------------------ - -/// @brief Creates a new heap from the process's address space. -/// @param len the length of it. -/// @param flags the flags of it. -/// @return heap pointer. -IMPORT_C VoidPtr RtlCreateHeap(_Input SizeT len, _Input UInt32 flags); - -/// @brief Destroys the pointer -/// @param heap the heap itself. -/// @return void. -IMPORT_C UInt0 RtlDestroyHeap(_Input VoidPtr heap); - -// ------------------------------------------------------------------------ -// Error handling API. -// ------------------------------------------------------------------------ - -IMPORT_C SInt32 ErrGetLastError(UInt0); - -// ------------------------------------------------------------------------ -// Threading API. -// ------------------------------------------------------------------------ - -IMPORT_C UInt0 ThrExitCurrentThread(SInt32 exit_code); -IMPORT_C UInt0 ThrExitMainThread(SInt32 exit_code); - -IMPORT_C UInt0 ThrExitYieldThread(UInt0); - -IMPORT_C UInt0 ThrExitJoinThread(UInt0); -IMPORT_C UInt0 ThrExitDetachThread(UInt0); - -#endif // ifndef __SCI_BASE_HXX__ diff --git a/dev/SCI/SCIErr.hxx b/dev/SCI/SCIErr.hxx deleted file mode 100644 index af5d54fd..00000000 --- a/dev/SCI/SCIErr.hxx +++ /dev/null @@ -1,49 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include - -#define ErrLocalIsOk() (kLastError == kErrorSuccess) -#define ErrLocalFailed() (kLastError != kErrorSuccess) -#define ErrLocal() (kLastError) - -typedef SInt32 NEW_ERROR_TYPE; - -inline constexpr NEW_ERROR_TYPE kErrorSuccess = 0; -inline constexpr NEW_ERROR_TYPE kErrorExecutable = 33; -inline constexpr NEW_ERROR_TYPE kErrorExecutableLib = 34; -inline constexpr NEW_ERROR_TYPE kErrorFileNotFound = 35; -inline constexpr NEW_ERROR_TYPE kErrorDirectoryNotFound = 36; -inline constexpr NEW_ERROR_TYPE kErrorDiskReadOnly = 37; -inline constexpr NEW_ERROR_TYPE kErrorDiskIsFull = 38; -inline constexpr NEW_ERROR_TYPE kErrorProcessFault = 39; -inline constexpr NEW_ERROR_TYPE kErrorSocketHangUp = 40; -inline constexpr NEW_ERROR_TYPE kErrorThreadLocalStorage = 41; -inline constexpr NEW_ERROR_TYPE kErrorMath = 42; -inline constexpr NEW_ERROR_TYPE kErrorNoNetwork = 43; -inline constexpr NEW_ERROR_TYPE kErrorHeapOutOfMemory = 44; -inline constexpr NEW_ERROR_TYPE kErrorNoSuchDisk = 45; -inline constexpr NEW_ERROR_TYPE kErrorFileExists = 46; -inline constexpr NEW_ERROR_TYPE kErrorFormatFailed = 47; -inline constexpr NEW_ERROR_TYPE kErrorNetworkTimeout = 48; -inline constexpr NEW_ERROR_TYPE kErrorInternal = 49; -inline constexpr NEW_ERROR_TYPE kErrorForkAlreadyExists = 50; -inline constexpr NEW_ERROR_TYPE kErrorOutOfTeamSlot = 51; -inline constexpr NEW_ERROR_TYPE kErrorHeapNotPresent = 52; -inline constexpr NEW_ERROR_TYPE kErrorNoEntrypoint = 53; -inline constexpr NEW_ERROR_TYPE kErrorDiskIsCorrupted = 54; -inline constexpr NEW_ERROR_TYPE kErrorDisk = 55; -inline constexpr NEW_ERROR_TYPE kErrorInvalidData = 56; -inline constexpr NEW_ERROR_TYPE kErrorAsync = 57; -inline constexpr NEW_ERROR_TYPE kErrorNonBlocking = 58; -inline constexpr NEW_ERROR_TYPE kErrorIPC = 59; -inline constexpr NEW_ERROR_TYPE kErrorSign = 60; -inline constexpr NEW_ERROR_TYPE kErrorInvalidCreds = 61; -inline constexpr NEW_ERROR_TYPE kErrorUnimplemented = 0; - -IMPORT_C NEW_ERROR_TYPE kLastError; diff --git a/dev/SCI/Sources/SCIBase.cxx b/dev/SCI/Sources/SCIBase.cxx deleted file mode 100644 index b103886c..00000000 --- a/dev/SCI/Sources/SCIBase.cxx +++ /dev/null @@ -1,7 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#include diff --git a/dev/SCI/Sources/SCIErr.cxx b/dev/SCI/Sources/SCIErr.cxx deleted file mode 100644 index 509ccd6d..00000000 --- a/dev/SCI/Sources/SCIErr.cxx +++ /dev/null @@ -1,9 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#include - -NEW_ERROR_TYPE kLastError = 0; diff --git a/dev/SCI/Sources/base.cxx b/dev/SCI/Sources/base.cxx new file mode 100644 index 00000000..6963a624 --- /dev/null +++ b/dev/SCI/Sources/base.cxx @@ -0,0 +1,7 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#include diff --git a/dev/SCI/sci_base.hxx b/dev/SCI/sci_base.hxx new file mode 100644 index 00000000..1d69a56b --- /dev/null +++ b/dev/SCI/sci_base.hxx @@ -0,0 +1,220 @@ +/* ------------------------------------------- + +Copyright ZKA Technologies. + +File: SCIBase.hxx +Purpose: SCI/M core header file (C++) + +------------------------------------------- */ + +#ifndef __SCI_BASE_HXX__ +#define __SCI_BASE_HXX__ + +#include + +#define IMPORT_CXX extern "C++" +#define IMPORT_C extern "C" + +typedef bool Bool; +typedef void UInt0; + +typedef __UINT64_TYPE__ UInt64; +typedef __UINT32_TYPE__ UInt32; +typedef __UINT16_TYPE__ UInt16; +typedef __UINT8_TYPE__ UInt8; + +typedef __SIZE_TYPE__ SizeT; + +typedef __INT64_TYPE__ SInt64; +typedef __INT32_TYPE__ SInt32; +typedef __INT16_TYPE__ SInt16; +typedef __INT8_TYPE__ SInt8; + +typedef void* VoidPtr; +typedef __UINTPTR_TYPE__ UIntPtr; +typedef char Char; + +#include + +#ifdef __SCI_IMPL__ +#include +#else +class UnknownInterface; // Refrenced from an IDB entry. +class UnknownUCLSID; // From the IDB, the constructor of the object, e.g: WordUCLSID. +class UUID; + +/// @brief Allocate new SCM class. +/// @tparam TCLS +/// @tparam UCLSID +/// @param uclsidOfCls +/// @return +template +TCLS* RtlQueryInterface(UCLSID uclsidOfCls, Args... args); + +/// @brief Release SCM class. +/// @tparam TCLS +/// @param cls +/// @return +template +SInt32 RtlReleaseClass(TCLS* cls); + +class __attribute__((uuid("d7c144b6-0792-44b8-b06b-02b227b547df"))) UnknownInterface +{ +public: + explicit UnknownInterface() = default; + virtual ~UnknownInterface() = default; + + UnknownInterface& operator=(const UnknownInterface&) = default; + UnknownInterface(const UnknownInterface&) = default; + + virtual SInt32 Release() = 0; + virtual void RemoveRef() = 0; + virtual UnknownInterface* AddRef() = 0; + virtual VoidPtr QueryInterface(UUID* p_uuid) = 0; +}; + +template +class EventListenerInterface : public ClsID +{ +public: + explicit EventListenerInterface() = default; + virtual ~EventListenerInterface() = default; + + EventListenerInterface& operator=(const EventListenerInterface&) = default; + EventListenerInterface(const EventListenerInterface&) = default; + + virtual EventListenerInterface& operator +=(FnSign arg) = 0; +}; +#endif + +// ------------------------------------------------------------------------------------------ // +/// @note Handle types. +// ------------------------------------------------------------------------------------------ // + +typedef VoidPtr ZKAObject; + +typedef ZKAObject ZKADLLObject; +typedef ZKAObject ZKAIOObject; +typedef ZKAObject ZKASCMObject; +typedef ZKAObject ZKAThreadObject; +typedef ZKAObject ZKASocketObject; + +// ------------------------------------------------------------------------------------------ // + +// ------------------------------------------------------------------------------------------ // +/// @note Part of ZKA loader API. +// ------------------------------------------------------------------------------------------ // + +/// @brief Get function which is part of the DLL. +/// @param symbol the symbol to look for +/// @param dll_handle the DLL handle. +/// @return the proc pointer. +IMPORT_C ZKAObject LdrGetDLLProc(_Input const Char* symbol, _Input ZKAObject dll_handle); + +/// @brief Open DLL handle. +/// @param path +/// @param drv +/// @return +IMPORT_C ZKAObject LdrOpenDLL(_Input const Char* path, _Input const Char* drive_letter); + +/// @brief Close DLL handle +/// @param dll_handle +/// @return +IMPORT_C UInt0 LdrCloseDLL(_Input ZKAObject dll_handle); + +// ------------------------------------------------------------------------------------------ // +// File API. +// ------------------------------------------------------------------------------------------ // + +/// @brief Opens a file from a drive. +/// @param fs_path the filesystem path. +/// @param drive_letter drive name, use NULL to use default one. +/// @return the file descriptor of the file. +IMPORT_C ZKAObject IoOpenFile(const Char* fs_path, const Char* drive_letter); + +/// @brief Closes a file and flushes its content. +/// @param file_desc the file descriptor. +/// @return void. +IMPORT_C UInt0 IoCloseFile(_Input ZKAObject file_desc); + +IMPORT_C UInt32 IoWriteFile(_Input ZKAObject file_desc, _Output VoidPtr out_data, SizeT sz_data); + +IMPORT_C UInt32 IoReadFile(_Input ZKAObject file_desc, _Output VoidPtr* out_data, SizeT sz_data); + +IMPORT_C UInt64 IoRewindFile(_Input ZKAObject file_desc); + +IMPORT_C UInt64 IoTellFile(_Input ZKAObject file_desc); + +IMPORT_C UInt64 IoSeekFile(_Input ZKAObject file_desc, UInt64 file_offset); + +// ------------------------------------------------------------------------ +// TLS API. +// ------------------------------------------------------------------------ + +/// @brief Installs the Thread Information Block and Global Information Block inside the current process. +/// @param void. +/// @return > 0 error ocurred or already present, = 0 success. +IMPORT_C UInt32 TlsInstallIB(UInt0); + +// ------------------------------------------------------------------------ +// SCM API. +// ------------------------------------------------------------------------ + +/// @brief Allocate new SCM object. +/// @tparam TCLS the class type. +/// @tparam UCLSID UCLS factory class type. +/// @param uclsidOfCls UCLS factory class +/// @return TCLS interface +template +TCLS* ScmQueryInterface(_Input UCLSID* uclsidOfCls, _Input Args&&... args); + +/// @brief Release SCM object. +/// @tparam TCLS the class type. +/// @param cls the class to release. +/// @return status code. +template +SInt32 ScmReleaseClass(_Input TCLS* cls); + +/// @brief Creates an SCM instance in the process. +/// @param handle_instance the SCM handle. +/// @param flags the SCM flags. +IMPORT_C SInt32 ScmCreateInstance(_Input UInt32 flags, _Output ZKAObject* handle_instance); + +/// @brief Destroys an SCM instance of the process. +/// @param handle_instance the SCM handle. +IMPORT_C UInt0 ScmDestroyInstance(_Input ZKAObject handle_instance); + +// ------------------------------------------------------------------------ +// Memory Management API. +// ------------------------------------------------------------------------ + +/// @brief Creates a new heap from the process's address space. +/// @param len the length of it. +/// @param flags the flags of it. +/// @return heap pointer. +IMPORT_C VoidPtr RtlCreateHeap(_Input SizeT len, _Input UInt32 flags); + +/// @brief Destroys the pointer +/// @param heap the heap itself. +/// @return void. +IMPORT_C UInt0 RtlDestroyHeap(_Input VoidPtr heap); + +// ------------------------------------------------------------------------ +// Error handling API. +// ------------------------------------------------------------------------ + +IMPORT_C SInt32 ErrGetLastError(UInt0); + +// ------------------------------------------------------------------------ +// Threading API. +// ------------------------------------------------------------------------ + +IMPORT_C UInt0 ThrExitCurrentThread(SInt32 exit_code); +IMPORT_C UInt0 ThrExitMainThread(SInt32 exit_code); + +IMPORT_C UInt0 ThrExitYieldThread(UInt0); + +IMPORT_C UInt0 ThrExitJoinThread(UInt0); +IMPORT_C UInt0 ThrExitDetachThread(UInt0); + +#endif // ifndef __SCI_BASE_HXX__ diff --git a/dev/SCI/sci_err.hxx b/dev/SCI/sci_err.hxx new file mode 100644 index 00000000..a1e56dfd --- /dev/null +++ b/dev/SCI/sci_err.hxx @@ -0,0 +1,47 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once + +#define ErrLocalIsOk() (kLastError == kErrorSuccess) +#define ErrLocalFailed() (kLastError != kErrorSuccess) +#define ErrLocal() (kLastError) + +typedef SInt32 ZKAErr; + +inline constexpr ZKAErr kErrorSuccess = 0; +inline constexpr ZKAErr kErrorExecutable = 33; +inline constexpr ZKAErr kErrorExecutableLib = 34; +inline constexpr ZKAErr kErrorFileNotFound = 35; +inline constexpr ZKAErr kErrorDirectoryNotFound = 36; +inline constexpr ZKAErr kErrorDiskReadOnly = 37; +inline constexpr ZKAErr kErrorDiskIsFull = 38; +inline constexpr ZKAErr kErrorProcessFault = 39; +inline constexpr ZKAErr kErrorSocketHangUp = 40; +inline constexpr ZKAErr kErrorThreadLocalStorage = 41; +inline constexpr ZKAErr kErrorMath = 42; +inline constexpr ZKAErr kErrorNoNetwork = 43; +inline constexpr ZKAErr kErrorHeapOutOfMemory = 44; +inline constexpr ZKAErr kErrorNoSuchDisk = 45; +inline constexpr ZKAErr kErrorFileExists = 46; +inline constexpr ZKAErr kErrorFormatFailed = 47; +inline constexpr ZKAErr kErrorNetworkTimeout = 48; +inline constexpr ZKAErr kErrorInternal = 49; +inline constexpr ZKAErr kErrorForkAlreadyExists = 50; +inline constexpr ZKAErr kErrorOutOfTeamSlot = 51; +inline constexpr ZKAErr kErrorHeapNotPresent = 52; +inline constexpr ZKAErr kErrorNoEntrypoint = 53; +inline constexpr ZKAErr kErrorDiskIsCorrupted = 54; +inline constexpr ZKAErr kErrorDisk = 55; +inline constexpr ZKAErr kErrorInvalidData = 56; +inline constexpr ZKAErr kErrorAsync = 57; +inline constexpr ZKAErr kErrorNonBlocking = 58; +inline constexpr ZKAErr kErrorIPC = 59; +inline constexpr ZKAErr kErrorSign = 60; +inline constexpr ZKAErr kErrorInvalidCreds = 61; +inline constexpr ZKAErr kErrorUnimplemented = 0; + +IMPORT_C ZKAErr kLastError; diff --git a/dev/SCI/sci_hint.hxx b/dev/SCI/sci_hint.hxx new file mode 100644 index 00000000..c785f953 --- /dev/null +++ b/dev/SCI/sci_hint.hxx @@ -0,0 +1,23 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#ifndef __SCI_HINT_HXX__ +#define __SCI_HINT_HXX__ + +#pragma compiler(hint_manifest) + +#define _Input +#define _Output + +#define _Optional + +#define _StrictCheckInput +#define _StrictCheckOutput + +#define _InOut +#define _StrictInOut + +#endif // ifndef __SCI_HINT_HXX__ diff --git a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx index 9cdaf603..cd18d34a 100644 --- a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx +++ b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx @@ -253,6 +253,9 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, // If we succeed in reading the blob, then execute it. // ------------------------------------------ // + handoverHdrPtr->f_HardwareTables.f_ImagePtr = readerKernel.Blob(); + handoverHdrPtr->f_HardwareTables.f_ImageSz = readerKernel.Size(); + if (readerKernel.Blob()) { loader = new Boot::BThread(readerKernel.Blob()); diff --git a/dev/ZKA/CompressKit/RLE.hxx b/dev/ZKA/CompressKit/RLE.hxx new file mode 100644 index 00000000..647cf00b --- /dev/null +++ b/dev/ZKA/CompressKit/RLE.hxx @@ -0,0 +1,18 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#ifndef __KERNELKIT_RLE_HXX__ +#define __KERNELKIT_RLE_HXX__ + +#include + +namespace Kernel +{ + EXTERN_C Void rle_compress(VoidPtr data, Size sz, VoidPtr out, Size out_sz); + EXTERN_C Void rle_decompress(VoidPtr data, Size sz, VoidPtr out, Size out_sz); +} // namespace Kernel + +#endif // !ifndef __KERNELKIT_RLE_HXX__ diff --git a/dev/ZKA/FirmwareKit/Handover.hxx b/dev/ZKA/FirmwareKit/Handover.hxx index 5c09f79b..ba7b23b2 100644 --- a/dev/ZKA/FirmwareKit/Handover.hxx +++ b/dev/ZKA/FirmwareKit/Handover.hxx @@ -26,8 +26,8 @@ #define kHandoverMaxCmdLine 8 -#define kHandoverBetterEFI "ZKA_EFI" -#define kHandoverBetterEFI_U L"ZKA_EFI" +#define kHandoverBetterEFI "ZKA_EFI" +#define kHandoverBetterEFI_U L"ZKA_EFI" #define kHandoverHeapSz gib_cast(2) @@ -43,8 +43,8 @@ namespace Kernel::HEL kTypeKernel = 100, kTypeKernelDriver = 101, kTypeRsrc = 102, - kTypeInvalid = 103, - kTypeCount = 4, + kTypeInvalid = 103, + kTypeCount = 4, }; /** @@ -75,6 +75,11 @@ namespace Kernel::HEL { VoidPtr f_SmBios; VoidPtr f_VendorPtr; + struct + { + VoidPtr f_ImagePtr; + SizeT f_ImageSz; + }; VoidPtr f_MPPtr; } f_HardwareTables; @@ -89,7 +94,7 @@ namespace Kernel::HEL } f_GOP; UInt64 f_FirmwareSpecific[8]; - Char f_CommandLine[255][kHandoverMaxCmdLine]; + Char f_CommandLine[255][kHandoverMaxCmdLine]; }; enum diff --git a/dev/ZKA/HALKit/AXP/Processor.hpp b/dev/ZKA/HALKit/AXP/Processor.hpp deleted file mode 100644 index 25a434a0..00000000 --- a/dev/ZKA/HALKit/AXP/Processor.hpp +++ /dev/null @@ -1,7 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once \ No newline at end of file diff --git a/dev/ZKA/HALKit/AXP/Processor.hxx b/dev/ZKA/HALKit/AXP/Processor.hxx new file mode 100644 index 00000000..25a434a0 --- /dev/null +++ b/dev/ZKA/HALKit/AXP/Processor.hxx @@ -0,0 +1,7 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once \ No newline at end of file diff --git a/dev/ZKA/KernelKit/CodeManager.hxx b/dev/ZKA/KernelKit/CodeManager.hxx index a1fea211..b551815e 100644 --- a/dev/ZKA/KernelKit/CodeManager.hxx +++ b/dev/ZKA/KernelKit/CodeManager.hxx @@ -16,7 +16,7 @@ #include #include -#include +#include namespace Kernel { 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 + +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 diff --git a/dev/ZKA/KernelKit/PEFDLLInterface.hxx b/dev/ZKA/KernelKit/PEFDLLInterface.hxx new file mode 100644 index 00000000..3c0187f1 --- /dev/null +++ b/dev/ZKA/KernelKit/PEFDLLInterface.hxx @@ -0,0 +1,105 @@ +/* + * ======================================================== + * + * Kernel + * Copyright ZKA Technologies., all rights reserved. + * + * ======================================================== + */ + +#ifndef __KERNELKIT_SHARED_OBJECT_HXX__ +#define __KERNELKIT_SHARED_OBJECT_HXX__ + +#include +#include +#include +#include + +namespace Kernel +{ + /** + * @brief Shared Library class + * Load library from this class + */ + class PEFDLLInterface final : public DLLInterface + { + public: + explicit PEFDLLInterface() = default; + ~PEFDLLInterface() = default; + + public: + ZKA_COPY_DEFAULT(PEFDLLInterface); + + private: + DLL_TRAITS* fMounted{nullptr}; + + public: + DLL_TRAITS** GetAddressOf() + { + return &fMounted; + } + + DLL_TRAITS* Get() + { + return fMounted; + } + + public: + void Mount(DLL_TRAITS* to_mount) + { + if (!to_mount || !to_mount->fImageObject) + return; + + fMounted = to_mount; + + if (fLoader && to_mount) + { + delete fLoader; + fLoader = nullptr; + } + + if (!fLoader) + { + fLoader = new PEFLoader(fMounted->fImageObject); + } + } + + void Unmount() + { + if (fMounted) + fMounted = nullptr; + }; + + template + SymbolType Load(const Char* symbol_name, SizeT len, Int32 kind) + { + if (symbol_name == nullptr || *symbol_name == 0) + return nullptr; + if (len > kPathLen || len < 1) + return nullptr; + + auto ret = + reinterpret_cast(fLoader->FindSymbol(symbol_name, kind)); + + if (!ret) + { + if (kind == kPefCode) + return (VoidPtr)__zka_pure_call; + + return nullptr; + } + + return ret; + } + + private: + PEFLoader* fLoader{nullptr}; + }; + + typedef PEFDLLInterface* DLLInterfacePtr; + + EXTERN_C DLLInterfacePtr rtl_init_shared_object(PROCESS_HEADER_BLOCK* header); + EXTERN_C Void rtl_fini_shared_object(PROCESS_HEADER_BLOCK* header, DLLInterfacePtr lib, Bool* successful); +} // namespace Kernel + +#endif /* ifndef __KERNELKIT_SHARED_OBJECT_HXX__ */ diff --git a/dev/ZKA/KernelKit/PEFSharedObject.hxx b/dev/ZKA/KernelKit/PEFSharedObject.hxx deleted file mode 100644 index 48b70508..00000000 --- a/dev/ZKA/KernelKit/PEFSharedObject.hxx +++ /dev/null @@ -1,117 +0,0 @@ -/* - * ======================================================== - * - * Kernel - * Copyright ZKA Technologies., all rights reserved. - * - * ======================================================== - */ - -#ifndef __KERNELKIT_SHARED_OBJECT_HXX__ -#define __KERNELKIT_SHARED_OBJECT_HXX__ - -#include -#include -#include -#include - -namespace Kernel -{ - /// @brief Pure implementation, missing method/function handler. - extern "C" void __mh_purecall(void); - - /** - * @brief Shared Library class - * Load library from this class - */ - class PEFSharedObjectInterface final - { - public: - struct PEF_SHARED_OBJECT_TRAITS final - { - VoidPtr fImageObject{nullptr}; - VoidPtr fImageEntrypointOffset{nullptr}; - - Bool IsValid() { return fImageObject && fImageEntrypointOffset; } - }; - - public: - explicit PEFSharedObjectInterface() = default; - ~PEFSharedObjectInterface() = default; - - public: - ZKA_COPY_DEFAULT(PEFSharedObjectInterface); - - private: - PEF_SHARED_OBJECT_TRAITS* fMounted{nullptr}; - - public: - PEF_SHARED_OBJECT_TRAITS** GetAddressOf() - { - return &fMounted; - } - - PEF_SHARED_OBJECT_TRAITS* Get() - { - return fMounted; - } - - public: - void Mount(PEF_SHARED_OBJECT_TRAITS* to_mount) - { - if (!to_mount || !to_mount->fImageObject) - return; - - fMounted = to_mount; - - if (fLoader && to_mount) - { - delete fLoader; - fLoader = nullptr; - } - - if (!fLoader) - { - fLoader = new PEFLoader(fMounted->fImageObject); - } - } - - void Unmount() - { - if (fMounted) - fMounted = nullptr; - }; - - template - SymbolType Load(const Char* symbol_name, SizeT len, Int32 kind) - { - if (symbol_name == nullptr || *symbol_name == 0) - return nullptr; - if (len > kPathLen || len < 1) - return nullptr; - - auto ret = - reinterpret_cast(fLoader->FindSymbol(symbol_name, kind)); - - if (!ret) - { - if (kind == kPefCode) - return (VoidPtr)__mh_purecall; - - return nullptr; - } - - return ret; - } - - private: - PEFLoader* fLoader{nullptr}; - }; - - typedef PEFSharedObjectInterface* SharedObjectPtr; - - EXTERN_C SharedObjectPtr rtl_init_shared_object(PROCESS_HEADER_BLOCK* header); - EXTERN_C Void rtl_fini_shared_object(PROCESS_HEADER_BLOCK* header, SharedObjectPtr lib, Bool* successful); -} // namespace Kernel - -#endif /* ifndef __KERNELKIT_SHARED_OBJECT_HXX__ */ diff --git a/dev/ZKA/KernelKit/ProcessScheduler.hxx b/dev/ZKA/KernelKit/ProcessScheduler.hxx index 5df9d369..1f70158b 100644 --- a/dev/ZKA/KernelKit/ProcessScheduler.hxx +++ b/dev/ZKA/KernelKit/ProcessScheduler.hxx @@ -29,7 +29,7 @@ namespace Kernel //! @brief Forward declarations. struct PROCESS_HEADER_BLOCK; - class PEFSharedObjectInterface; + class PEFDLLInterface; class ProcessTeam; class ProcessScheduler; class ProcessHelper; @@ -157,8 +157,7 @@ namespace Kernel HeapPtrKind HeapPtr{nullptr}; // shared library handle, reserved for kSharedObjectKind types of executables only. - PEFSharedObjectInterface* DLLPtr{nullptr}; - + PEFDLLInterface* DLLPtr{nullptr}; PROCESS_HEADER_BLOCK* Parent{nullptr}; // Memory usage. diff --git a/dev/ZKA/KernelKit/RLE.hxx b/dev/ZKA/KernelKit/RLE.hxx deleted file mode 100644 index 31e37619..00000000 --- a/dev/ZKA/KernelKit/RLE.hxx +++ /dev/null @@ -1,15 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#ifndef __KERNELKIT_RLE_HXX__ -#define __KERNELKIT_RLE_HXX__ - -#include - -EXTERN_C void rle_compress(void* data, long sz, void* out, long out_sz); -EXTERN_C void rle_decompress(void* data, long sz, void* out, long out_sz); - -#endif // !ifndef __KERNELKIT_RLE_HXX__ diff --git a/dev/ZKA/KernelKit/User.hxx b/dev/ZKA/KernelKit/User.hxx index a7f8fc02..d8f81fd7 100644 --- a/dev/ZKA/KernelKit/User.hxx +++ b/dev/ZKA/KernelKit/User.hxx @@ -27,7 +27,6 @@ namespace Kernel { - class UserManager; class User; enum class RingKind @@ -74,8 +73,6 @@ namespace Kernel RingKind fRing{RingKind::kRingStdUser}; Char fUserName[kMaxUserNameLen] = { 0 }; Char fUserToken[kMaxUserTokenLen] = { 0 }; - - friend UserManager; }; } // namespace Kernel diff --git a/dev/ZKA/NetworkKit/IPC.hxx b/dev/ZKA/NetworkKit/IPC.hxx index 2a5ae452..eb62f433 100644 --- a/dev/ZKA/NetworkKit/IPC.hxx +++ b/dev/ZKA/NetworkKit/IPC.hxx @@ -13,6 +13,8 @@ #include #include +#include + /// @file IPC.hxx /// @brief IPC protocol. diff --git a/dev/ZKA/Sources/DLLInterface.cxx b/dev/ZKA/Sources/DLLInterface.cxx new file mode 100644 index 00000000..ed1793eb --- /dev/null +++ b/dev/ZKA/Sources/DLLInterface.cxx @@ -0,0 +1,23 @@ +/* + * ======================================================== + * + * newoskrnl + * Copyright ZKA Technologies., all rights reserved. + * + * ======================================================== + */ + +#include +#include + +using namespace Kernel; + +/***********************************************************************************/ +/// @brief Unimplemented function (crashes by default) +/// @param +/***********************************************************************************/ + +EXTERN_C void __zka_pure_call(void) +{ + kcout << "newoskrnl: unimplemented symbol!\r"; +} diff --git a/dev/ZKA/Sources/DLLMain.cxx b/dev/ZKA/Sources/DLLMain.cxx index c8db0c29..997fed52 100644 --- a/dev/ZKA/Sources/DLLMain.cxx +++ b/dev/ZKA/Sources/DLLMain.cxx @@ -80,7 +80,7 @@ namespace Kernel::Detail if (catalogDir) { - Kernel::kcout << "newoskrnl: already exists.\r"; + Kernel::kcout << "newoskrnl: Already exists.\r"; delete catalogDir; continue; @@ -132,9 +132,9 @@ namespace Kernel::Detail } NFS_CATALOG_STRUCT* catalogDisk = - this->fNewFS->GetParser()->GetCatalog("\\Mount\\NUL:"); + this->fNewFS->GetParser()->GetCatalog("\\System\\newoskrnl.dll"); - const Kernel::Char* cSrcName = "DISK-INF"; + const Kernel::Char* cSrcName = "KERNEL_EXEC"; if (catalogDisk) { @@ -143,17 +143,7 @@ namespace Kernel::Detail else { catalogDisk = - (NFS_CATALOG_STRUCT*)this->Leak()->CreateAlias("\\Mount\\NUL:"); - - Kernel::StringView diskFolder(kNewFSSectorSz); - - diskFolder += - "

Kind: alias to NULL.

\r

Created by: system

\r

Edited " - "by: " - "system

\r

Volume Type: NULL.

\r"; - - diskFolder += "

Root: NUL"; - diskFolder += "

\r"; + (NFS_CATALOG_STRUCT*)this->Leak()->CreateAlias("\\System\\newoskrnl.dll"); NFS_FORK_STRUCT theDiskFork{0}; @@ -164,16 +154,16 @@ namespace Kernel::Detail theDiskFork.CatalogName, Kernel::rt_string_len(catalogDisk->Name)); - theDiskFork.DataSize = kNewFSForkSize; - theDiskFork.ResourceId = 0; - theDiskFork.ResourceKind = Kernel::kNewFSRsrcForkKind; + theDiskFork.DataSize = kHandoverHeader->f_HardwareTables.f_ImageSz; + theDiskFork.ResourceId = Kernel::kPefKindExec | 0xFFFF000; + theDiskFork.ResourceKind = Kernel::kNewFSDataForkKind; theDiskFork.Kind = Kernel::kNewFSDataForkKind; fNewFS->GetParser()->CreateFork(catalogDisk, theDiskFork); fNewFS->GetParser()->WriteCatalog(catalogDisk, - true, - (Kernel::VoidPtr)diskFolder.CData(), - kNewFSSectorSz, cSrcName); + false, + kHandoverHeader->f_HardwareTables.f_ImagePtr, + kHandoverHeader->f_HardwareTables.f_ImageSz, cSrcName); delete catalogDisk; } diff --git a/dev/ZKA/Sources/PEFDLLInterface.cxx b/dev/ZKA/Sources/PEFDLLInterface.cxx new file mode 100644 index 00000000..0ca6b85e --- /dev/null +++ b/dev/ZKA/Sources/PEFDLLInterface.cxx @@ -0,0 +1,100 @@ +/* + * ======================================================== + * + * newoskrnl + * Copyright ZKA Technologies., all rights reserved. + * + * ======================================================== + */ + +#include +#include +#include +#include +#include +#include + +/* ------------------------------------------- + + Revision History: + + 01/02/24: Rework shared sharedObj ABI, except a rtl_init_shared_object and + rtl_fini_shared_object (amlel) 15/02/24: Breaking changes, changed the name of the + routines. (amlel) + + 07/28/24: Replace rt_library_free with rtl_fini_shared_object + + ------------------------------------------- */ + +using namespace Kernel; + +/***********************************************************************************/ +/// @file PEFSharedObjectRT.cxx +/// @brief PEF's shared object runtime. +/***********************************************************************************/ + +/***********************************************************************************/ +/** @brief Library initializer. */ +/***********************************************************************************/ + +EXTERN_C DLLInterfacePtr rtl_init_shared_object(PROCESS_HEADER_BLOCK* header) +{ + DLLInterfacePtr sharedObj = tls_new_class(); + + if (!sharedObj) + { + header->Crash(); + + return nullptr; + } + + sharedObj->Mount(tls_new_class()); + + if (!sharedObj->Get()) + { + header->Crash(); + + return nullptr; + } + + sharedObj->Get()->fImageObject = + header->Image; + + if (!sharedObj->Get()->fImageObject) + { + header->Crash(); + + return nullptr; + } + + sharedObj->Get()->fImageEntrypointOffset = + sharedObj->Load(kPefStart, rt_string_len(kPefStart, 0), kPefCode); + + return sharedObj; +} + +/***********************************************************************************/ +/** @brief Frees the sharedObj. */ +/** @note Please check if the lib got freed! */ +/** @param lib The sharedObj to free. */ +/** @param successful Reports if successful or not. */ +/***********************************************************************************/ + +EXTERN_C Void rtl_fini_shared_object(PROCESS_HEADER_BLOCK* header, DLLInterfacePtr lib, Bool* successful) +{ + MUST_PASS(successful); + + // sanity check (will also trigger a bug check if this fails) + if (lib == nullptr) + { + *successful = false; + header->Crash(); + } + + delete lib->Get(); + delete lib; + + lib = nullptr; + + *successful = true; +} diff --git a/dev/ZKA/Sources/PEFSharedObject.cxx b/dev/ZKA/Sources/PEFSharedObject.cxx deleted file mode 100644 index 22890e22..00000000 --- a/dev/ZKA/Sources/PEFSharedObject.cxx +++ /dev/null @@ -1,110 +0,0 @@ -/* - * ======================================================== - * - * Kernel - * Copyright ZKA Technologies., all rights reserved. - * - * ======================================================== - */ - -#include -#include -#include -#include -#include -#include - -/* ------------------------------------------- - - Revision History: - - 01/02/24: Rework shared sharedObj ABI, except a rtl_init_shared_object and - rtl_fini_shared_object (amlel) 15/02/24: Breaking changes, changed the name of the - routines. (amlel) - - 07/28/24: Replace rt_library_free with rtl_fini_shared_object - - ------------------------------------------- */ - -using namespace Kernel; - -/***********************************************************************************/ -/// @file PEFSharedObjectRT.cxx -/// @brief PEF's shared object runtime. -/***********************************************************************************/ - -/***********************************************************************************/ -/** @brief Library initializer. */ -/***********************************************************************************/ - -EXTERN_C SharedObjectPtr rtl_init_shared_object(PROCESS_HEADER_BLOCK* header) -{ - SharedObjectPtr sharedObj = tls_new_class(); - - if (!sharedObj) - { - header->Crash(); - - return nullptr; - } - - sharedObj->Mount(tls_new_class()); - - if (!sharedObj->Get()) - { - header->Crash(); - - return nullptr; - } - - sharedObj->Get()->fImageObject = - header->Image; - - if (!sharedObj->Get()->fImageObject) - { - header->Crash(); - - return nullptr; - } - - sharedObj->Get()->fImageEntrypointOffset = - sharedObj->Load(kPefStart, rt_string_len(kPefStart, 0), kPefCode); - - return sharedObj; -} - -/***********************************************************************************/ -/** @brief Frees the sharedObj. */ -/** @note Please check if the lib got freed! */ -/** @param lib The sharedObj to free. */ -/** @param successful Reports if successful or not. */ -/***********************************************************************************/ - -EXTERN_C Void rtl_fini_shared_object(PROCESS_HEADER_BLOCK* header, SharedObjectPtr lib, Bool* successful) -{ - MUST_PASS(successful); - - // sanity check (will also trigger a bug check if this fails) - if (lib == nullptr) - { - *successful = false; - header->Crash(); - } - - delete lib->Get(); - delete lib; - - lib = nullptr; - - *successful = true; -} - -/***********************************************************************************/ -/// @brief Unimplemented function (crashes by default) -/// @param -/***********************************************************************************/ - -EXTERN_C void __mh_purecall(void) -{ - kcout << "newoskrnl: unimplemented symbol!\r"; -} diff --git a/dev/ZKA/Sources/ProcessScheduler.cxx b/dev/ZKA/Sources/ProcessScheduler.cxx index d33c7e85..965c5eb1 100644 --- a/dev/ZKA/Sources/ProcessScheduler.cxx +++ b/dev/ZKA/Sources/ProcessScheduler.cxx @@ -10,7 +10,7 @@ /***********************************************************************************/ #include -#include +#include #include #include #include diff --git a/dev/ZKA/Sources/ThreadLocalStorage.cxx b/dev/ZKA/Sources/ThreadLocalStorage.cxx index a29f153e..ed12c890 100644 --- a/dev/ZKA/Sources/ThreadLocalStorage.cxx +++ b/dev/ZKA/Sources/ThreadLocalStorage.cxx @@ -1,7 +1,7 @@ /* * ======================================================== * - * Kernel + * newoskrnl * Copyright ZKA Technologies., all rights reserved. * * ======================================================== -- cgit v1.2.3