diff options
| -rw-r--r-- | dev/CRT/ReadMe.md | 2 | ||||
| -rw-r--r-- | dev/DDK/ReadMe.md | 2 | ||||
| -rw-r--r-- | dev/EFS/ReadMe.md | 2 | ||||
| -rw-r--r-- | dev/SCI/Hint.h (renamed from dev/SCI/Hint.hxx) | 0 | ||||
| -rw-r--r-- | dev/SCI/ReadMe.md | 4 | ||||
| -rw-r--r-- | dev/SCI/SCIBase.hxx | 60 | ||||
| -rw-r--r-- | dev/ZKA/KernelKit/LPC.hxx | 7 | ||||
| -rw-r--r-- | dev/ZKA/Sources/LPC.cxx (renamed from dev/ZKA/Sources/HError.cxx) | 4 | ||||
| -rw-r--r-- | dev/ZKA/amd64-efi.make | 2 |
9 files changed, 56 insertions, 27 deletions
diff --git a/dev/CRT/ReadMe.md b/dev/CRT/ReadMe.md index a959d6b8..c90f5b5f 100644 --- a/dev/CRT/ReadMe.md +++ b/dev/CRT/ReadMe.md @@ -1,4 +1,4 @@ -# ZKA C++ RunTime
+# ZKA C++ RunTime.
This is the public interface of ZKA' C++ RunTime.
diff --git a/dev/DDK/ReadMe.md b/dev/DDK/ReadMe.md index ee12a9c1..41e39d83 100644 --- a/dev/DDK/ReadMe.md +++ b/dev/DDK/ReadMe.md @@ -1,4 +1,4 @@ -# DDK (Device Driver Kit) +# ZKA's Device Driver Kit. A kit used to write kernel HALs, using the NDK compiler suite. diff --git a/dev/EFS/ReadMe.md b/dev/EFS/ReadMe.md index ba9de32f..e99d4105 100644 --- a/dev/EFS/ReadMe.md +++ b/dev/EFS/ReadMe.md @@ -1,4 +1,4 @@ -# ZKA Encrypted File System +# ZKA Encrypted File System. This is the ZKA's Encrypted file system DLL. diff --git a/dev/SCI/Hint.hxx b/dev/SCI/Hint.h index c785f953..c785f953 100644 --- a/dev/SCI/Hint.hxx +++ b/dev/SCI/Hint.h diff --git a/dev/SCI/ReadMe.md b/dev/SCI/ReadMe.md index 72732c21..00d90c14 100644 --- a/dev/SCI/ReadMe.md +++ b/dev/SCI/ReadMe.md @@ -1,5 +1,5 @@ -# ZKA System Call Interface.
+# ZKA's SCI.
-System Call Interface and Component Interface.
+System Call and Component Interface, used maninly to communicate with kernel and registered objects.
###### (c) ZKA Technologies, all rights reserved.
diff --git a/dev/SCI/SCIBase.hxx b/dev/SCI/SCIBase.hxx index 1e79bbbc..982ca950 100644 --- a/dev/SCI/SCIBase.hxx +++ b/dev/SCI/SCIBase.hxx @@ -10,9 +10,7 @@ Purpose: SCI/M core header file (C++) #ifndef __SCI_BASE_HXX__
#define __SCI_BASE_HXX__
-#ifdef __cplusplus
-
-#include <SCI/Hint.hxx>
+#include <SCI/Hint.h>
#define IMPORT_CXX extern "C++"
#define IMPORT_C extern "C"
@@ -96,32 +94,34 @@ 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 NK loader API.
+/// @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 VoidPtr RtlGetDLLProc(_Input const Char* symbol, _Input NEW_OBJECT dll_handle);
+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 RtlOpenDLL(_Input const Char* path, _Input const Char* drive_letter);
+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 RtlCloseDLL(_Input NEW_OBJECT dll_handle);
+IMPORT_C UInt0 LdrCloseDLL(_Input NEW_OBJECT dll_handle);
-/// @note Part of NK file API.
+// ------------------------------------------------------------------------------------------ //
+// File API.
+// ------------------------------------------------------------------------------------------ //
/// @brief Opens a file from a drive.
/// @param fs_path the filesystem path.
@@ -134,10 +134,18 @@ IMPORT_C NEW_OBJECT RtlOpenFile(const Char* fs_path, const Char* drive_letter); /// @return
IMPORT_C UInt0 RtlCloseFile(_Input NEW_OBJECT file_desc);
+// ------------------------------------------------------------------------
+// TLS API.
+// ------------------------------------------------------------------------
+
/// @brief Installs the TIB and GIB inside the current process.
-/// @param none
+/// @param void.
/// @return > 0 error ocurred or already present, = 0 success.
-IMPORT_C UInt32 RtlInstallInfoBlocks(UInt0);
+IMPORT_C UInt32 TlsInstallIB(UInt0);
+
+// ------------------------------------------------------------------------
+// SCM API.
+// ------------------------------------------------------------------------
/// @brief Allocate new SCM object.
/// @tparam TCLS the class type.
@@ -157,27 +165,43 @@ SInt32 ScmReleaseClass(_Input TCLS* cls); /// @brief Creates an SCM instance in the process.
/// @param handle_instance the SCM handle.
/// @param flags the SCM flags.
-SInt32 ScmCreateInstance(_Input UInt32 flags, _Output VoidPtr* handle_instance);
+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.
-UInt0 ScmDestroyInstance(_Input VoidPtr handle_instance);
+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.
-VoidPtr RtlCreateHeap(_Input SizeT len, _Input UInt32 flags);
+IMPORT_C VoidPtr RtlCreateHeap(_Input SizeT len, _Input UInt32 flags);
/// @brief Destroys the pointer
/// @param heap the heap itself.
/// @return void.
-UInt0 RtlDestroyHeap(_Input VoidPtr heap);
+IMPORT_C UInt0 RtlDestroyHeap(_Input VoidPtr heap);
-#else
+// ------------------------------------------------------------------------
+// Error handling API.
+// ------------------------------------------------------------------------
+
+IMPORT_C SInt32 ErrGetLastError(UInt0);
+
+// ------------------------------------------------------------------------
+// Threading API.
+// ------------------------------------------------------------------------
+
+IMPORT_C UInt0 ThrExitCurrentThread(SInt32 exit_code);
+IMPORT_C UInt0 ThrExitMainThread(SInt32 exit_code);
-#include <SCI/SCIBase.h>
+IMPORT_C UInt0 ThrExitYieldThread(UInt0);
-#endif // ifdef __cplusplus
+IMPORT_C UInt0 ThrExitJoinThread(UInt0);
+IMPORT_C UInt0 ThrExitDetachThread(UInt0);
#endif // ifndef __SCI_BASE_HXX__
diff --git a/dev/ZKA/KernelKit/LPC.hxx b/dev/ZKA/KernelKit/LPC.hxx index fec1d637..6553f45c 100644 --- a/dev/ZKA/KernelKit/LPC.hxx +++ b/dev/ZKA/KernelKit/LPC.hxx @@ -51,6 +51,11 @@ namespace Kernel inline constexpr HError kErrorInvalidCreds = 61; inline constexpr HError kErrorUnimplemented = 0; - Void err_bug_check_raise(void) noexcept; + /// @brief Reports a bug to system check. + Void err_bug_check_raise(void) noexcept; + + /// @brief Does a system wide bug check. + /// @param void no params. + /// @return if error-free: false, otherwise true. Boolean err_bug_check(void) noexcept; } // namespace Kernel diff --git a/dev/ZKA/Sources/HError.cxx b/dev/ZKA/Sources/LPC.cxx index 5ccf8aea..46f621bb 100644 --- a/dev/ZKA/Sources/HError.cxx +++ b/dev/ZKA/Sources/LPC.cxx @@ -13,7 +13,7 @@ namespace Kernel /// @brief Does a system wide bug check. /// @param void no params. - /// @return if error-free: true, otherwise false. + /// @return if error-free: false, otherwise true. Boolean err_bug_check(void) noexcept { if (cRaise) @@ -21,7 +21,7 @@ namespace Kernel ke_stop(RUNTIME_CHECK_BAD_BEHAVIOR); } - return true; + return false; } /// @brief Tells if we should raise a bug check not. diff --git a/dev/ZKA/amd64-efi.make b/dev/ZKA/amd64-efi.make index 0926e7c0..3797e5ba 100644 --- a/dev/ZKA/amd64-efi.make +++ b/dev/ZKA/amd64-efi.make @@ -71,7 +71,7 @@ link-amd64-epm: .PHONY: all all: newos-amd64-epm link-amd64-epm - @echo "NewOSKrnl => OK." + @echo "Kernel => OK." .PHONY: help help: |
