From 69d628dd02df81e64dfd9a2e730a44c5c5a0e5a8 Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 13 Sep 2024 10:52:28 +0200 Subject: DDK: Export DDK symbols by default. ADD: Add ZWM (ZKA Window Manager). META: The rest are refactors. Signed-off-by: Amlal --- dev/ZWM/.keepme | 0 dev/ZWM/Sources/zwm_main.cxx | 32 ++++++++++++++++++++++++++++++++ dev/ZWM/zwm.json | 22 ++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 dev/ZWM/.keepme create mode 100644 dev/ZWM/Sources/zwm_main.cxx create mode 100644 dev/ZWM/zwm.json (limited to 'dev/ZWM') diff --git a/dev/ZWM/.keepme b/dev/ZWM/.keepme new file mode 100644 index 00000000..e69de29b diff --git a/dev/ZWM/Sources/zwm_main.cxx b/dev/ZWM/Sources/zwm_main.cxx new file mode 100644 index 00000000..38d441bd --- /dev/null +++ b/dev/ZWM/Sources/zwm_main.cxx @@ -0,0 +1,32 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + + FILE: IFSMain.cxx + PURPOSE: HPFS IFS entrypoint. + +------------------------------------------- */ + +#include +#include + +static uint32_t cGPUIndexHW = 0U; +static struct DDK_OBJECT_MANIFEST* cGPUObject = nullptr; + +/** @brief ZWM main, ZWM acts a proxy to the Installed GPU Driver. */ +int32_t ModuleMain(void) +{ + int index_gpu = 0; + struct DDK_OBJECT_MANIFEST* gpu_object = nullptr; + + while (!gpu_object) + { + gpu_object = KernelGetObject(index_gpu, "GPU_OBJECT"); + ++index_gpu; + } + + cGPUIndexHW = index_gpu; + cGPUObject = gpu_object; + + return 0; +} diff --git a/dev/ZWM/zwm.json b/dev/ZWM/zwm.json new file mode 100644 index 00000000..2f759c56 --- /dev/null +++ b/dev/ZWM/zwm.json @@ -0,0 +1,22 @@ +{ + "compiler_path": "x86_64-w64-mingw32-g++", + "compiler_std": "c++20", + "headers_path": ["../"], + "sources_path": ["Sources/*.cxx"], + "output_name": "zwm.sys", + "compiler_flags": [ + "-fPIC", + "-ffreestanding", + "-shared", + "-fno-rtti", + "-fno-exceptions", + "-Wl,--subsystem=17" + ], + "cpp_macros": [ + "__ZWM_IMPL__", + "__NEWOSKRNL__", + "cZWMVersion=0x0100", + "cZWMVersionHighest=0x0100", + "cZWMVersionLowest=0x0100" + ] +} -- cgit v1.2.3