summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-07-26 09:18:51 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-07-26 09:18:51 +0200
commit14769b940725a9e323d237179e812ccfdae08382 (patch)
tree67892a70fc54e30373442acaae6a4058ce3a983e
parent31f1293d3192e0910906858aded1aca88c6ef4c5 (diff)
[IMP] DDK compiles as a DLL now.
[IMP] DDK versioning symbols. [UPD] manifest.json of NetBoot has been updated. [UPD] update OS-Design.drawio to replace launcher to UI and CF and CG at the same level, SCI is the lowest level of abstraction as it should be. Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
-rw-r--r--Boot/Modules/NetBoot/manifest.json4
-rw-r--r--DDK/KernelAlloc.c2
-rw-r--r--DDK/KernelCall.c2
-rw-r--r--DDK/KernelCxxRt.cxx2
-rw-r--r--DDK/KernelDev.c2
-rw-r--r--DDK/KernelDev.h2
-rw-r--r--DDK/KernelPrint.c2
-rw-r--r--DDK/KernelPrint.h2
-rw-r--r--DDK/KernelStd.h15
-rw-r--r--DDK/KernelString.c2
-rw-r--r--DDK/KernelString.h2
-rw-r--r--DDK/KernelVersion.c21
-rw-r--r--DDK/x86_64.make14
-rw-r--r--Kernel/KernelRsrc.rsrc2
-rw-r--r--Kernel/amd64-efi.make2
-rw-r--r--Meta/OS-Design.drawio98
16 files changed, 109 insertions, 65 deletions
diff --git a/Boot/Modules/NetBoot/manifest.json b/Boot/Modules/NetBoot/manifest.json
index 5f94c677..708c451e 100644
--- a/Boot/Modules/NetBoot/manifest.json
+++ b/Boot/Modules/NetBoot/manifest.json
@@ -1,4 +1,4 @@
{
- "pluginName": "iBoot",
- "description": "OTA updates."
+ "pluginName": "NetBoot",
+ "description": "Over the Air update module."
}
diff --git a/DDK/KernelAlloc.c b/DDK/KernelAlloc.c
index 17e49d6a..1eadd4e2 100644
--- a/DDK/KernelAlloc.c
+++ b/DDK/KernelAlloc.c
@@ -2,7 +2,7 @@
Copyright ZKA Technologies
- Purpose: Standard library.
+ Purpose: DDK allocator.
------------------------------------------- */
diff --git a/DDK/KernelCall.c b/DDK/KernelCall.c
index 18d544ef..ffc2ded6 100644
--- a/DDK/KernelCall.c
+++ b/DDK/KernelCall.c
@@ -2,7 +2,7 @@
Copyright ZKA Technologies
- Purpose: Kernel Definitions.
+ Purpose: DDK kernel call.
------------------------------------------- */
diff --git a/DDK/KernelCxxRt.cxx b/DDK/KernelCxxRt.cxx
index 8a5f4c66..08fab7b9 100644
--- a/DDK/KernelCxxRt.cxx
+++ b/DDK/KernelCxxRt.cxx
@@ -2,7 +2,7 @@
Copyright ZKA Technologies
- Purpose: Driver C++ Definitions.
+ Purpose: DDK C++ runtime.
------------------------------------------- */
diff --git a/DDK/KernelDev.c b/DDK/KernelDev.c
index a7c29b9e..07a64bdd 100644
--- a/DDK/KernelDev.c
+++ b/DDK/KernelDev.c
@@ -2,7 +2,7 @@
Copyright ZKA Technologies
- Purpose: Kernel Text I/O.
+ Purpose: DDK Text I/O.
------------------------------------------- */
diff --git a/DDK/KernelDev.h b/DDK/KernelDev.h
index c97c2acc..d7c13a13 100644
--- a/DDK/KernelDev.h
+++ b/DDK/KernelDev.h
@@ -2,7 +2,7 @@
Copyright ZKA Technologies
- Purpose: Kernel Devices.
+ Purpose: DDK Devices.
------------------------------------------- */
diff --git a/DDK/KernelPrint.c b/DDK/KernelPrint.c
index ad14fbf5..eee90e3c 100644
--- a/DDK/KernelPrint.c
+++ b/DDK/KernelPrint.c
@@ -2,7 +2,7 @@
Copyright ZKA Technologies
- Purpose: Kernel Text I/O.
+ Purpose: DDK Text I/O.
------------------------------------------- */
diff --git a/DDK/KernelPrint.h b/DDK/KernelPrint.h
index c7101107..25b702e1 100644
--- a/DDK/KernelPrint.h
+++ b/DDK/KernelPrint.h
@@ -2,7 +2,7 @@
Copyright ZKA Technologies
- Purpose: Kernel Text I/O.
+ Purpose: DDK Text I/O.
------------------------------------------- */
diff --git a/DDK/KernelStd.h b/DDK/KernelStd.h
index af7bb306..5d8af8cd 100644
--- a/DDK/KernelStd.h
+++ b/DDK/KernelStd.h
@@ -2,7 +2,7 @@
Copyright ZKA Technologies
- Purpose: Kernel Definitions.
+ Purpose: DDK Definitions.
------------------------------------------- */
@@ -44,11 +44,20 @@ DK_EXTERN void* kernelCall(const char* kernelRpcName, int32_t cnt, void* dat, si
/// @param slotFn, syscall slot.
DK_EXTERN void kernelAddSyscall(const int slot, void (*slotFn)(void* a0));
-/// @brief allocate ptr.
+/// @brief allocate heap ptr.
/// @param sz size of ptr.
/// @return the pointer allocated or **nil**.
DK_EXTERN void* kernelAlloc(size_t sz);
-/// @brief allocate ptr.
+/// @brief free heap ptr.
/// @param pointer to free
DK_EXTERN void kernelFree(void*);
+
+/// @brief The highest API version of the DDK.
+DK_EXTERN int32_t c_api_version_highest;
+
+/// @brief The lowest API version of the DDK.
+DK_EXTERN int32_t c_api_version_least;
+
+/// @brief c_api_version_least+c_api_version_highest combined version.
+DK_EXTERN int32_t c_api_version; \ No newline at end of file
diff --git a/DDK/KernelString.c b/DDK/KernelString.c
index 52e71e0f..2cb6adcc 100644
--- a/DDK/KernelString.c
+++ b/DDK/KernelString.c
@@ -2,7 +2,7 @@
Copyright ZKA Technologies
- Purpose: Kernel Strings.
+ Purpose: DDK Strings.
------------------------------------------- */
diff --git a/DDK/KernelString.h b/DDK/KernelString.h
index 0d244dc8..dd6fdce6 100644
--- a/DDK/KernelString.h
+++ b/DDK/KernelString.h
@@ -2,7 +2,7 @@
Copyright ZKA Technologies
- Purpose: Kernel Strings.
+ Purpose: DDK Strings.
------------------------------------------- */
diff --git a/DDK/KernelVersion.c b/DDK/KernelVersion.c
new file mode 100644
index 00000000..0f27d345
--- /dev/null
+++ b/DDK/KernelVersion.c
@@ -0,0 +1,21 @@
+/* -------------------------------------------
+
+ Copyright ZKA Technologies
+
+ Purpose: DDK versioning.
+
+------------------------------------------- */
+
+#include <KernelStd.h>
+
+#ifndef cDDKVersionHighest
+#define cDDKVersionHighest 1
+#endif // cDDKVersionHighest
+
+#ifndef cDDKVersionLowest
+#define cDDKVersionLowest 1
+#endif // cDDKVersionLowest
+
+int32_t c_api_version_highest = cDDKVersionHighest;
+int32_t c_api_version_least = cDDKVersionLowest;
+int32_t c_api_version = cDDKVersionHighest | cDDKVersionLowest; \ No newline at end of file
diff --git a/DDK/x86_64.make b/DDK/x86_64.make
new file mode 100644
index 00000000..61cafeee
--- /dev/null
+++ b/DDK/x86_64.make
@@ -0,0 +1,14 @@
+##################################################
+# (C) ZKA Technologies, all rights reserved.
+# This is the DDK's makefile.
+##################################################
+
+CC=x86_64-w64-mingw32-gcc
+INC=-I./ -I../
+FLAGS=-ffreestanding -shared -std=c17 -std=c++20 -fno-rtti -fno-exceptions -D__DDK_AMD64__ -Wl,--subsystem=17
+VERSION=-DcDDKVersionLowest=1 -DcDDKVersionHighest=1
+OUTPUT=libDDK.dll
+
+.PHONY: all
+all:
+ $(CC) $(INC) $(FLAGS) $(VERSION) $(wildcard *.c) $(wildcard *.S) $(wildcard *.cxx) -o $(OUTPUT) \ No newline at end of file
diff --git a/Kernel/KernelRsrc.rsrc b/Kernel/KernelRsrc.rsrc
index ae3ebe1e..97432f54 100644
--- a/Kernel/KernelRsrc.rsrc
+++ b/Kernel/KernelRsrc.rsrc
@@ -14,7 +14,7 @@ BEGIN
VALUE "FileDescription", "NewOS Kernel."
VALUE "FileVersion", KERNEL_VERSION
VALUE "InternalName", "newoskrnl"
- VALUE "LegalCopyright", "ZKA Technologies"
+ VALUE "LegalCopyright", "(c) ZKA Technologies, all rights reserved."
VALUE "OriginalFilename", "newoskrnl.exe"
VALUE "ProductName", "newoskrnl"
VALUE "ProductVersion", KERNEL_VERSION
diff --git a/Kernel/amd64-efi.make b/Kernel/amd64-efi.make
index a6a60405..be59f2e9 100644
--- a/Kernel/amd64-efi.make
+++ b/Kernel/amd64-efi.make
@@ -1,6 +1,6 @@
##################################################
# (C) ZKA Technologies, all rights reserved.
-# This is the microkernel makefile.
+# This is the newoskrnl's makefile.
##################################################
CC = x86_64-w64-mingw32-g++
diff --git a/Meta/OS-Design.drawio b/Meta/OS-Design.drawio
index 61eef7f5..539e0bf9 100644
--- a/Meta/OS-Design.drawio
+++ b/Meta/OS-Design.drawio
@@ -1,49 +1,49 @@
-<mxfile host="app.diagrams.net" modified="2024-07-10T08:35:09.264Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" etag="3vMfxDKsgdLXeMbgt9fG" version="24.6.4" type="device">
- <diagram name="Page-1" id="lDkK2i6CeL2VbSOVDvrP">
- <mxGraphModel dx="866" dy="517" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
- <root>
- <mxCell id="0" />
- <mxCell id="1" parent="0" />
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-1" value="DDK Hooks (KCI and SCI routes.)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
- <mxGeometry x="234" y="450" width="360" height="60" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-2" value="libCoreFoundation/libCoreSystem (SCI)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
- <mxGeometry x="234" y="410" width="360" height="30" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-3" value="libCoreGraphics" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
- <mxGeometry x="234" y="370" width="360" height="30" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-4" value="libCoreApplication" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
- <mxGeometry x="241" y="330" width="136" height="30" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-5" value="libCoreMT" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
- <mxGeometry x="387" y="330" width="200" height="30" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-8" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;System layer.&lt;/h1&gt;&lt;p&gt;This layer describes the kernel and it&#39;s API, which makes the Zeta OS.&lt;/p&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
- <mxGeometry x="620" y="325" width="180" height="120" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-9" value="libCoreHTML" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
- <mxGeometry x="241" y="200" width="136" height="100" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-10" value="libCoreAsync" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
- <mxGeometry x="387" y="200" width="203" height="100" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-11" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;High level layer.&lt;/h1&gt;&lt;p&gt;This contains the launcher, some&lt;/p&gt;&lt;p&gt;APIs (here CoreHTML and CoreAsync.) and apps.&lt;/p&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
- <mxGeometry x="620" y="140" width="180" height="140" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-12" value="Launcher" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
- <mxGeometry x="241" y="130" width="349" height="60" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-13" value="Kernel" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
- <mxGeometry x="235.5" y="520" width="360" height="60" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-14" value="New OS" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
- <mxGeometry x="241" y="70" width="60" height="30" as="geometry" />
- </mxCell>
- <mxCell id="ifhO3zQZNW-sXvZMTmu8-15" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;Application&lt;/span&gt;&lt;/h1&gt;&lt;div&gt;Each app is organized so:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;/*.exe&lt;/div&gt;&lt;div&gt;/NewOS/&lt;/div&gt;&lt;div&gt;/NewOS/Libraries/lib*&lt;/div&gt;&lt;div&gt;/NewOS/Manifests/*.alist&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;*.exe must match the MLExecutable field, and be a PEF executable.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;App.alist is mandatory on apps.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;An New OS is simply a directory&lt;/div&gt;&lt;div&gt;with the .app extension.&lt;/div&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
- <mxGeometry x="10" y="130" width="180" height="240" as="geometry" />
- </mxCell>
- </root>
- </mxGraphModel>
- </diagram>
-</mxfile>
+<mxfile host="65bd71144e">
+ <diagram name="Page-1" id="lDkK2i6CeL2VbSOVDvrP">
+ <mxGraphModel dx="746" dy="307" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+ <root>
+ <mxCell id="0"/>
+ <mxCell id="1" parent="0"/>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-1" value="DDK Hooks (KCI and SCI routes.)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="234" y="450" width="360" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-2" value="SCI" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="234" y="410" width="360" height="30" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-3" value="libCoreGraphics/libCoreFoundation" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="234" y="370" width="360" height="30" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-4" value="libCoreApplication" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="241" y="330" width="136" height="30" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-5" value="libCoreMT" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="387" y="330" width="200" height="30" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-8" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;System layer.&lt;/h1&gt;&lt;p&gt;This layer describes the kernel and it's API, which makes the Zeta OS.&lt;/p&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
+ <mxGeometry x="620" y="325" width="180" height="120" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-9" value="libCoreHTML" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="241" y="200" width="136" height="100" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-10" value="libCoreAsync" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="387" y="200" width="203" height="100" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-11" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;High level layer.&lt;/h1&gt;&lt;p&gt;This contains the launcher, some&lt;/p&gt;&lt;p&gt;APIs (here CoreHTML and CoreAsync.) and apps.&lt;/p&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
+ <mxGeometry x="620" y="140" width="180" height="140" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-12" value="UI" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="241" y="130" width="349" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-13" value="Kernel" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="235.5" y="520" width="360" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-14" value="New OS" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
+ <mxGeometry x="241" y="70" width="60" height="30" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-15" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;Application&lt;/span&gt;&lt;/h1&gt;&lt;div&gt;Each app is organized so:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;/*.exe&lt;/div&gt;&lt;div&gt;/NewOS/&lt;/div&gt;&lt;div&gt;/NewOS/Libraries/lib*&lt;/div&gt;&lt;div&gt;/NewOS/Manifests/*.alist&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;*.exe must match the MLExecutable field, and be a PEF executable.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;App.alist is mandatory on apps.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;An New OS is simply a directory&lt;/div&gt;&lt;div&gt;with the .app extension.&lt;/div&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
+ <mxGeometry x="10" y="130" width="180" height="240" as="geometry"/>
+ </mxCell>
+ </root>
+ </mxGraphModel>
+ </diagram>
+</mxfile> \ No newline at end of file