summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dev/base/FireWall/FireWall.h11
-rw-r--r--dev/base/FireWall/build.json2
-rw-r--r--dev/base/FireWall/fwapi.h7
-rw-r--r--dev/base/FireWall/src/FireWall.cc34
-rw-r--r--dev/base/FireWall/src/fwentry.cc5
-rw-r--r--dev/base/RunDLL64/src/Main.cc (renamed from dev/base/RunDLL64/src/dll.cc)0
-rw-r--r--dev/base/RunXPCOM/src/Main.cc (renamed from dev/base/RunXPCOM/src/xpcom.cc)0
-rw-r--r--dev/base/View/IPDF.h (renamed from dev/base/View/pdf.h)0
-rw-r--r--dev/base/View/VPainter.h9
-rw-r--r--dev/base/View/build.json (renamed from dev/base/View/view.json)12
-rw-r--r--dev/base/View/src/IPDF.cc (renamed from dev/base/View/src/pdf.cc)2
-rw-r--r--dev/base/View/src/VPainter.cc7
-rw-r--r--dev/base/View/src/app.cc0
-rw-r--r--dev/base/View/src/viewer_box.cc0
-rw-r--r--dev/base/View/viewer_box.h0
-rw-r--r--dev/ddk/ddk.h4
-rw-r--r--dev/ddk/src/ddk_alloc.c4
-rw-r--r--dev/ddk/src/ddk_dev.c4
-rw-r--r--dev/ddk/src/ddk_io.c11
-rw-r--r--dev/ddk/src/ddk_kernel_call.c2
-rw-r--r--dev/hpfs/hpfs_specs.h2
-rw-r--r--dev/install/hal/install_api.asm2
-rw-r--r--dev/sci/sci_base.h48
-rw-r--r--dev/zka/FSKit/HPFS.h9
-rw-r--r--dev/zka/src/CxxAbi-AMD64.cc2
-rw-r--r--dev/zka/src/CxxAbi-ARM64.cc2
-rw-r--r--zka-dev.files20
27 files changed, 133 insertions, 66 deletions
diff --git a/dev/base/FireWall/FireWall.h b/dev/base/FireWall/FireWall.h
new file mode 100644
index 00000000..b9a1c57e
--- /dev/null
+++ b/dev/base/FireWall/FireWall.h
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) 2024 ZKA Web Services Co
+ */
+
+#pragma once
+
+#include <sci/sci_base.h>
+
+IMPORT_C Bool FwAllowConnection(const Char* ip_address, SizeT ip_address_len, Bool is_ipv6);
+
+IMPORT_C Bool FwForbidConnection(const Char* ip_address, SizeT ip_address_len, Bool is_ipv6);
diff --git a/dev/base/FireWall/build.json b/dev/base/FireWall/build.json
index 7f8c4956..77657ca5 100644
--- a/dev/base/FireWall/build.json
+++ b/dev/base/FireWall/build.json
@@ -3,7 +3,7 @@
"compiler_std": "c++20",
"headers_path": [ "../", "./", "../../" ],
"sources_path": [ "src/*.cc" ],
- "output_name": "firewall.zsc",
+ "output_name": "firewall.exe",
"compiler_flags": [
"-ffreestanding",
"-fno-rtti",
diff --git a/dev/base/FireWall/fwapi.h b/dev/base/FireWall/fwapi.h
deleted file mode 100644
index cd916657..00000000
--- a/dev/base/FireWall/fwapi.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Copyright (c) 2024 ZKA Web Services Co
- */
-
-#pragma once
-
-#include <sci/sci_base.h>
diff --git a/dev/base/FireWall/src/FireWall.cc b/dev/base/FireWall/src/FireWall.cc
new file mode 100644
index 00000000..1afae1c5
--- /dev/null
+++ b/dev/base/FireWall/src/FireWall.cc
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2024 ZKA Web Services Co
+ */
+
+#include <FireWall/FireWall.h>
+
+struct FW_CONNECTION_ENTRY
+{
+ Bool is_ipv6, is_allowed;
+ Char f_ip_address;
+ SizeT f_ip_address_len;
+};
+
+IMPORT_C Bool FwAllowConnection(const Char* ip_address, SizeT ip_address_len, Bool is_ipv6)
+{
+ if (!ip_address ||
+ !ip_address_len)
+ return No;
+
+
+
+ return Yes;
+}
+
+IMPORT_C Bool FwForbidConnection(const Char* ip_address, SizeT ip_address_len, Bool is_ipv6)
+{
+ if (!ip_address ||
+ !ip_address_len)
+ return No;
+
+
+
+ return Yes;
+}
diff --git a/dev/base/FireWall/src/fwentry.cc b/dev/base/FireWall/src/fwentry.cc
deleted file mode 100644
index 3fb739f7..00000000
--- a/dev/base/FireWall/src/fwentry.cc
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * Copyright (c) 2024 ZKA Web Services Co
- */
-
-#include <FireWall/fwapi.h>
diff --git a/dev/base/RunDLL64/src/dll.cc b/dev/base/RunDLL64/src/Main.cc
index ee3cdfa6..ee3cdfa6 100644
--- a/dev/base/RunDLL64/src/dll.cc
+++ b/dev/base/RunDLL64/src/Main.cc
diff --git a/dev/base/RunXPCOM/src/xpcom.cc b/dev/base/RunXPCOM/src/Main.cc
index 3fcfc708..3fcfc708 100644
--- a/dev/base/RunXPCOM/src/xpcom.cc
+++ b/dev/base/RunXPCOM/src/Main.cc
diff --git a/dev/base/View/pdf.h b/dev/base/View/IPDF.h
index b28806d7..b28806d7 100644
--- a/dev/base/View/pdf.h
+++ b/dev/base/View/IPDF.h
diff --git a/dev/base/View/VPainter.h b/dev/base/View/VPainter.h
new file mode 100644
index 00000000..c39a9780
--- /dev/null
+++ b/dev/base/View/VPainter.h
@@ -0,0 +1,9 @@
+/* -------------------------------------------
+
+Copyright ZKA Web Services Co.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <sci/sci_base.h>
diff --git a/dev/base/View/view.json b/dev/base/View/build.json
index ba9f979f..a98e8730 100644
--- a/dev/base/View/view.json
+++ b/dev/base/View/build.json
@@ -1,9 +1,9 @@
{
"compiler_path": "x86_64-w64-mingw32-g++",
"compiler_std": "c++20",
- "headers_path": ["../../", "....//zka"],
+ "headers_path": ["../", "../../", "../../zka"],
"sources_path": ["src/*.cc"],
- "output_name": "View.exe",
+ "output_name": "ViewPDF.exe",
"compiler_flags": [
"-fPIC",
"-ffreestanding",
@@ -13,9 +13,9 @@
"-Wl,--subsystem=17"
],
"cpp_macros": [
- "__VIEW_IMPL__",
- "cPRMVersion=0x0100",
- "cPRMVersionHighest=0x0100",
- "cPRMVersionLowest=0x0100"
+ "__VIEW_PDF_IMPL__",
+ "cPDFVersion=0x0100",
+ "cPDFVersionHighest=0x0100",
+ "cPDFVersionLowest=0x0100"
]
}
diff --git a/dev/base/View/src/pdf.cc b/dev/base/View/src/IPDF.cc
index 2f5e628e..2126b64a 100644
--- a/dev/base/View/src/pdf.cc
+++ b/dev/base/View/src/IPDF.cc
@@ -4,4 +4,4 @@
------------------------------------------- */
-#include <View/pdf.h>
+#include <View/IPDF.h>
diff --git a/dev/base/View/src/VPainter.cc b/dev/base/View/src/VPainter.cc
new file mode 100644
index 00000000..92f1075a
--- /dev/null
+++ b/dev/base/View/src/VPainter.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright ZKA Web Services Co.
+
+------------------------------------------- */
+
+#include <View/VPainter.h>
diff --git a/dev/base/View/src/app.cc b/dev/base/View/src/app.cc
deleted file mode 100644
index e69de29b..00000000
--- a/dev/base/View/src/app.cc
+++ /dev/null
diff --git a/dev/base/View/src/viewer_box.cc b/dev/base/View/src/viewer_box.cc
deleted file mode 100644
index e69de29b..00000000
--- a/dev/base/View/src/viewer_box.cc
+++ /dev/null
diff --git a/dev/base/View/viewer_box.h b/dev/base/View/viewer_box.h
deleted file mode 100644
index e69de29b..00000000
--- a/dev/base/View/viewer_box.h
+++ /dev/null
diff --git a/dev/ddk/ddk.h b/dev/ddk/ddk.h
index 0d313fba..002dfe0c 100644
--- a/dev/ddk/ddk.h
+++ b/dev/ddk/ddk.h
@@ -40,13 +40,13 @@
#define DDK_SMS_MAX_SZ 128
#ifndef __NEWOSKRNL__
-#error !!! including header in low exception/ring-3 mode !!!
+#error !!! including header in l0/ring-3 mode !!!
#endif // __NEWOSKRNL__
struct DDK_STATUS_STRUCT;
struct DDK_OBJECT_MANIFEST;
-/// \brief Object handle manifest.
+/// \brief manifest structure, represents a structure with methods and fields.
struct DDK_OBJECT_MANIFEST DK_FINAL
{
char* p_name;
diff --git a/dev/ddk/src/ddk_alloc.c b/dev/ddk/src/ddk_alloc.c
index a0bac74b..441c2c83 100644
--- a/dev/ddk/src/ddk_alloc.c
+++ b/dev/ddk/src/ddk_alloc.c
@@ -18,7 +18,7 @@ DK_EXTERN void* KernelAlloc(size_t sz)
if (!sz)
++sz;
- void* ptr = KernelCall("MmNewKeHeap", 1, &sz, sizeof(size_t));
+ void* ptr = KernelCall("MmNew", 1, &sz, sizeof(size_t));
return ptr;
}
@@ -32,5 +32,5 @@ DK_EXTERN void KernelFree(void* ptr)
if (!ptr)
return;
- KernelCall("MmDeleteKeHeap", 1, ptr, 0);
+ KernelCall("MmDelete", 1, ptr, 0);
}
diff --git a/dev/ddk/src/ddk_dev.c b/dev/ddk/src/ddk_dev.c
index 6399b039..3cc28117 100644
--- a/dev/ddk/src/ddk_dev.c
+++ b/dev/ddk/src/ddk_dev.c
@@ -15,7 +15,7 @@ DK_EXTERN KERNEL_DEVICE_PTR KernelOpenDevice(const char* devicePath)
if (!devicePath)
return nil;
- return KernelCall("ZkOpenDevice", 1, (void*)devicePath, KernelStringLength(devicePath));
+ return KernelCall("RtlOpenDevice", 1, (void*)devicePath, KernelStringLength(devicePath));
}
/// @brief Close any device.
@@ -25,5 +25,5 @@ DK_EXTERN void KernelCloseDevice(KERNEL_DEVICE_PTR device)
if (!device)
return;
- KernelCall("ZkCloseDevice", 1, device, sizeof(KERNEL_DEVICE));
+ KernelCall("RtlCloseDevice", 1, device, sizeof(KERNEL_DEVICE));
}
diff --git a/dev/ddk/src/ddk_io.c b/dev/ddk/src/ddk_io.c
index 267366c2..daee6711 100644
--- a/dev/ddk/src/ddk_io.c
+++ b/dev/ddk/src/ddk_io.c
@@ -8,11 +8,16 @@
#include <ddk/io.h>
-DK_EXTERN void KernelPrintChar(const char ch)
+DK_EXTERN void KernelPrintChar(const char msg_ch)
{
char assembled[2] = {0};
- assembled[0] = ch;
- assembled[1] = 0;
+
+ assembled[0] = msg_ch;
+
+ if (msg_ch != 0)
+ {
+ assembled[1] = 0;
+ }
KernelCall("SrWriteCharacter", 1, assembled, 1);
}
diff --git a/dev/ddk/src/ddk_kernel_call.c b/dev/ddk/src/ddk_kernel_call.c
index dc003d22..2a310dc6 100644
--- a/dev/ddk/src/ddk_kernel_call.c
+++ b/dev/ddk/src/ddk_kernel_call.c
@@ -38,7 +38,7 @@ DK_EXTERN void KernelAddSyscall(const int slot, void (*slotFn)(void* a0))
/// @brief Get a Kernel property.
/// @param slot property id (always 0)
/// @param name the object's name.
-/// @return Object manifest.
+/// @return The manifest structure.
DK_EXTERN struct DDK_OBJECT_MANIFEST* KernelGetObject(const int slot, const char* name)
{
struct DDK_OBJECT_MANIFEST* manifest = (struct DDK_OBJECT_MANIFEST*)KernelCall("RtlGetObject", slot, (void*)name, 1);
diff --git a/dev/hpfs/hpfs_specs.h b/dev/hpfs/hpfs_specs.h
index aad694fa..3a6ef582 100644
--- a/dev/hpfs/hpfs_specs.h
+++ b/dev/hpfs/hpfs_specs.h
@@ -15,6 +15,8 @@
#define kHPFSMagic " HPFS"
#define kHPFSMagicLen 8
+#define kHPFSMinimumDiskSize (gib_cast(64))
+
/** @brief Drive type enum. */
enum
{
diff --git a/dev/install/hal/install_api.asm b/dev/install/hal/install_api.asm
index a67849d7..76a198b6 100644
--- a/dev/install/hal/install_api.asm
+++ b/dev/install/hal/install_api.asm
@@ -1,7 +1,7 @@
;; /*
;; * ---------------------------------------------------
;; *
-;; * Copyright ZKA Web Services Co., all rights reserved.
+;; * Copyright ZKA Web Services Co.
;; *
;; * File: Install.asm
;; * Purpose: ZKA installer program, runs at ring-0.
diff --git a/dev/sci/sci_base.h b/dev/sci/sci_base.h
index c225c966..73d7e87e 100644
--- a/dev/sci/sci_base.h
+++ b/dev/sci/sci_base.h
@@ -16,6 +16,7 @@ Purpose: SCI core header file (C++ only).
#define IMPORT_XPCOM extern "XPCOM"
#define IMPORT_CXX extern "C++"
#define IMPORT_C extern "C"
+
typedef bool Bool;
typedef void Void;
@@ -76,15 +77,15 @@ class IEventListener : public ClsID
/// @note Handle typedefs.
// ------------------------------------------------------------------------------------------ //
-typedef VoidPtr Object;
+typedef VoidPtr SCIObject;
-typedef Object DLLObject;
-typedef Object IOObject;
-typedef Object SCMObject;
-typedef Object ThreadObject;
-typedef Object SocketObject;
-typedef Object ShellObject;
-typedef Object UIObject;
+typedef SCIObject DLLObject;
+typedef SCIObject IOObject;
+typedef SCIObject SCMObject;
+typedef SCIObject ThreadObject;
+typedef SCIObject SocketObject;
+typedef SCIObject ShellObject;
+typedef SCIObject UIObject;
// ------------------------------------------------------------------------------------------ //
@@ -96,18 +97,18 @@ typedef Object UIObject;
/// @param symbol the symbol to look for
/// @param dll_handle the DLL handle.
/// @return the proc pointer.
-IMPORT_C Object LdrGetDLLSymbolFromHandle(_Input const Char* symbol, _Input Object dll_handle);
+IMPORT_C SCIObject LdrGetDLLSymbolFromHandle(_Input const Char* symbol, _Input SCIObject dll_handle);
/// @brief Open DLL handle.
/// @param path
/// @param drv
/// @return
-IMPORT_C Object LdrOpenDLLHandle(_Input const Char* path, _Input const Char* drive_letter);
+IMPORT_C SCIObject LdrOpenDLLHandle(_Input const Char* path, _Input const Char* drive_letter);
/// @brief Close DLL handle
/// @param dll_handle
/// @return
-IMPORT_C Void LdrCloseDLLHandle(_Input Object* dll_handle);
+IMPORT_C Void LdrCloseDLLHandle(_Input SCIObject* dll_handle);
// ------------------------------------------------------------------------------------------ //
// File API.
@@ -117,37 +118,38 @@ IMPORT_C Void LdrCloseDLLHandle(_Input Object* dll_handle);
/// @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 Object IoOpenFile(const Char* fs_path, const Char* drive_letter);
+IMPORT_C SCIObject 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 Void IoCloseFile(_Input Object file_desc);
+IMPORT_C Void IoCloseFile(_Input SCIObject file_desc);
/// @brief Write data to a file.
/// @param file_desc the file descriptor.
/// @param out_data the data to write.
/// @param sz_data the size of the data to write.
/// @return the number of bytes written.
-IMPORT_C UInt32 IoWriteFile(_Input Object file_desc, _Output VoidPtr out_data, SizeT sz_data);
+IMPORT_C UInt32 IoWriteFile(_Input SCIObject file_desc, _Output VoidPtr out_data, SizeT sz_data);
/// @brief Read data from a file.
/// @param file_desc the file descriptor.
/// @param out_data the data to read.
/// @param sz_data the size of the data to read.
-IMPORT_C UInt32 IoReadFile(_Input Object file_desc, _Output VoidPtr* out_data, SizeT sz_data);
+IMPORT_C UInt32 IoReadFile(_Input SCIObject file_desc, _Output VoidPtr* out_data, SizeT sz_data);
/// @brief Rewind the file pointer to the beginning of the file.
/// @param file_desc the file descriptor.
/// @return the number of bytes read.
-IMPORT_C UInt64 IoRewindFile(_Input Object file_desc);
+IMPORT_C UInt64 IoRewindFile(_Input SCIObject file_desc);
/// @brief Tell the current position of the file pointer.
/// @param file_desc the file descriptor.
/// @return the current position of the file pointer.
-IMPORT_C UInt64 IoTellFile(_Input Object file_desc);
+IMPORT_C UInt64 IoTellFile(_Input SCIObject file_desc);
-IMPORT_C UInt64 IoSeekFile(_Input Object file_desc, UInt64 file_offset);
+/// @brief Seek file offset from file descriptor.
+IMPORT_C UInt64 IoSeekFile(_Input SCIObject file_desc, UInt64 file_offset);
// ------------------------------------------------------------------------
// TLS API.
@@ -182,11 +184,11 @@ SInt32 XPCOMReleaseClass(_Input TCLS* cls);
/// @brief Creates an XPCOM instance in the process.
/// @param handle_instance the XPCOM handle.
/// @param flags the XPCOM flags.
-IMPORT_C SInt32 XPCOMCreateInstance(_Input UInt32 flags, _Output Object* handle_instance);
+IMPORT_C SInt32 XPCOMCreateInstance(_Input UInt32 flags, _Output SCIObject* handle_instance);
/// @brief Destroys an XPCOM instance of the process.
/// @param handle_instance the XPCOM handle.
-IMPORT_C Void XPCOMDestroyInstance(_Input Object handle_instance);
+IMPORT_C Void XPCOMDestroyInstance(_Input SCIObject handle_instance);
#endif // !__XPCOM_IMPL__
@@ -281,7 +283,7 @@ IMPORT_C Char* DrvGetDriveLetterFromPath(_Input const Char* path);
/// @brief Get a mounted drive from a letter.
/// @param letter the letter (A..Z).
/// @return the drive object.
-IMPORT_C Object DrvGetMountedDrive(_Input const Char letter);
+IMPORT_C SCIObject DrvGetMountedDrive(_Input const Char letter);
/// @brief Mount a drive.
/// @param path the path to mount.
@@ -300,13 +302,13 @@ IMPORT_C Void DrvUnmountDrive(_Input const Char letter);
/// @param event_name the event name.
/// @param listener the listener to add.
/// @return the event listener.
-IMPORT_C Void EvtAddListener(_Input const Char* event_name, _Input Object listener);
+IMPORT_C Void EvtAddListener(_Input const Char* event_name, _Input SCIObject listener);
/// @brief Remove an event listener.
/// @param event_name the event name.
/// @param listener the listener to remove.
/// @return the event listener.
-IMPORT_C Void EvtRemoveListener(_Input const Char* event_name, _Input Object listener);
+IMPORT_C Void EvtRemoveListener(_Input const Char* event_name, _Input SCIObject listener);
/// @brief Dispatch an event.
/// @param event_name the event name.
diff --git a/dev/zka/FSKit/HPFS.h b/dev/zka/FSKit/HPFS.h
index 0c778f30..69831e33 100644
--- a/dev/zka/FSKit/HPFS.h
+++ b/dev/zka/FSKit/HPFS.h
@@ -17,6 +17,15 @@
#define kHPFSMinimumDiskSize (gib_cast(64))
+enum
+{
+ kHPFSInvalidDrive,
+ kHPFSCDROMDrive,
+ kHPFSHDDDrive,
+ kHPFSSSDDrive,
+ kHPFSUSBDrive,
+};
+
struct HPFS_EXPLICIT_BOOT_SECTOR;
struct HPFS_EXPLICIT_BOOT_SECTOR final
diff --git a/dev/zka/src/CxxAbi-AMD64.cc b/dev/zka/src/CxxAbi-AMD64.cc
index 9d439d6b..1aac28e6 100644
--- a/dev/zka/src/CxxAbi-AMD64.cc
+++ b/dev/zka/src/CxxAbi-AMD64.cc
@@ -14,7 +14,7 @@ atexit_func_entry_t __atexit_funcs[kDSOMaxObjects];
uarch_t __atexit_func_count;
-/// @brief Dynamic Shared Object Handle.
+/// @brief dynamic shared object Handle.
Kernel::UIntPtr __dso_handle;
EXTERN_C Kernel::Void __cxa_pure_virtual(void* self)
diff --git a/dev/zka/src/CxxAbi-ARM64.cc b/dev/zka/src/CxxAbi-ARM64.cc
index f603f863..6b5c1a0e 100644
--- a/dev/zka/src/CxxAbi-ARM64.cc
+++ b/dev/zka/src/CxxAbi-ARM64.cc
@@ -14,7 +14,7 @@ atexit_func_entry_t __atexit_funcs[kDSOMaxObjects];
uarch_t __atexit_func_count;
-/// @brief Dynamic Shared Object Handle.
+/// @brief dynamic shared object Handle.
Kernel::UIntPtr __dso_handle;
EXTERN_C void __chkstk(void)
diff --git a/zka-dev.files b/zka-dev.files
index 8f7bab30..ccd548f6 100644
--- a/zka-dev.files
+++ b/zka-dev.files
@@ -1,19 +1,18 @@
dev/base/EncryptFS/build.json
dev/base/EncryptFS/disk_crypt.h
dev/base/EncryptFS/src/disk_crypt.cc
+dev/base/FireWall/FireWall.h
dev/base/FireWall/build.json
-dev/base/FireWall/fwapi.h
-dev/base/FireWall/src/fwentry.cc
+dev/base/FireWall/src/FireWall.cc
dev/base/RunDLL64/build.json
-dev/base/RunDLL64/src/dll.cc
+dev/base/RunDLL64/src/Main.cc
dev/base/RunXPCOM/build.json
-dev/base/RunXPCOM/src/xpcom.cc
-dev/base/View/pdf.h
-dev/base/View/src/app.cc
-dev/base/View/src/pdf.cc
-dev/base/View/src/viewer_box.cc
-dev/base/View/view.json
-dev/base/View/viewer_box.h
+dev/base/RunXPCOM/src/Main.cc
+dev/base/View/IPDF.h
+dev/base/View/VPainter.h
+dev/base/View/build.json
+dev/base/View/src/IPDF.cc
+dev/base/View/src/VPainter.cc
dev/crt/alloca.h
dev/crt/base_alloc.h
dev/crt/base_exception.h
@@ -311,3 +310,4 @@ tools/make_zxd.json
tools/src/make_framework.cc
tools/src/make_zxd.cc
tools/zxd.h
+compile_flags.txt