From f7ca4eff84fa67283f0e0ac1e107e4bd6f569ca0 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Sun, 7 Jul 2024 10:35:32 +0200 Subject: MHR-36: Implementing ARM64 support: Implementing GT. Signed-off-by: Amlal EL Mahrouss --- Meta/TimerArch.drawio | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Meta/TimerArch.drawio (limited to 'Meta') diff --git a/Meta/TimerArch.drawio b/Meta/TimerArch.drawio new file mode 100644 index 00000000..9b5a9a88 --- /dev/null +++ b/Meta/TimerArch.drawio @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 2116311061ebb476c2fb56603f67e417f2bf0a5e Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 10 Jul 2024 10:35:33 +0200 Subject: MHR-36: Add OS design diagram. Signed-off-by: Amlal El Mahrouss --- Meta/OS-Design.drawio | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Meta/OS-Design.drawio (limited to 'Meta') diff --git a/Meta/OS-Design.drawio b/Meta/OS-Design.drawio new file mode 100644 index 00000000..61eef7f5 --- /dev/null +++ b/Meta/OS-Design.drawio @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 685d96bb8dd59b0f573bf7faa7ef2a3a4cff8eb0 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 10 Jul 2024 11:20:16 +0200 Subject: [MHR-36] Better drawio name. Signed-off-by: Amlal El Mahrouss --- Meta/OS-Timer-Architecture.drawio | 46 +++++++++++++++++++++++++++++++++++++++ Meta/TimerArch.drawio | 46 --------------------------------------- 2 files changed, 46 insertions(+), 46 deletions(-) create mode 100644 Meta/OS-Timer-Architecture.drawio delete mode 100644 Meta/TimerArch.drawio (limited to 'Meta') diff --git a/Meta/OS-Timer-Architecture.drawio b/Meta/OS-Timer-Architecture.drawio new file mode 100644 index 00000000..9b5a9a88 --- /dev/null +++ b/Meta/OS-Timer-Architecture.drawio @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Meta/TimerArch.drawio b/Meta/TimerArch.drawio deleted file mode 100644 index 9b5a9a88..00000000 --- a/Meta/TimerArch.drawio +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3 From 7516413c8b3156cc75e349f5f8b3392c3b4f885d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 10 Jul 2024 13:58:13 +0200 Subject: [UPDATE] New logo for zka. Signed-off-by: Amlal El Mahrouss --- Meta/NewOS.svg | 985 +-------------------------------------------------------- ReadMe.md | 2 + 2 files changed, 5 insertions(+), 982 deletions(-) (limited to 'Meta') diff --git a/Meta/NewOS.svg b/Meta/NewOS.svg index 630c10ee..cef1078e 100644 --- a/Meta/NewOS.svg +++ b/Meta/NewOS.svg @@ -1,983 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/ReadMe.md b/ReadMe.md index 659bd526..a157a4cb 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,5 +1,7 @@ +![ZKA](Meta/NewOS.svg) + # ZKA (Zeta Kernel Architecture) ZKA is an operating system kernel, also codenamed 'Ne'. -- cgit v1.2.3 From 7753fb12b4350b26c2182e4de870451b3328a1fc Mon Sep 17 00:00:00 2001 From: Amlal Date: Sun, 14 Jul 2024 06:56:29 +0200 Subject: [META] Bupming. Signed-off-by: Amlal --- Kernel/FSKit/NewFS.hxx | 3 --- Meta/Explicit Partition Map.pdf | Bin 0 -> 12517 bytes Meta/Zeta.pdf | Bin 28882 -> 0 bytes 3 files changed, 3 deletions(-) create mode 100644 Meta/Explicit Partition Map.pdf delete mode 100644 Meta/Zeta.pdf (limited to 'Meta') diff --git a/Kernel/FSKit/NewFS.hxx b/Kernel/FSKit/NewFS.hxx index 27ce95d5..86bd3be3 100644 --- a/Kernel/FSKit/NewFS.hxx +++ b/Kernel/FSKit/NewFS.hxx @@ -36,9 +36,6 @@ default. #define kNewFSIdent " NewFS" #define kNewFSPadLen (400) -/// @brief Partition GUID on EPM and GPT disks. -#define kNewFSUUID "@{DD997393-9CCE-4288-A8D5-C0FDE3908DBE}" - #define kNewFSVersionInteger (0x126) #define kNewFSVerionString "1.26" diff --git a/Meta/Explicit Partition Map.pdf b/Meta/Explicit Partition Map.pdf new file mode 100644 index 00000000..d9eeebc9 Binary files /dev/null and b/Meta/Explicit Partition Map.pdf differ diff --git a/Meta/Zeta.pdf b/Meta/Zeta.pdf deleted file mode 100644 index 339651d5..00000000 Binary files a/Meta/Zeta.pdf and /dev/null differ -- cgit v1.2.3 From 274cba18b8f1c255ddcff2f5c14aab4d0c846820 Mon Sep 17 00:00:00 2001 From: Amlal Date: Tue, 23 Jul 2024 12:02:10 +0200 Subject: [IMP] User class and current user global. [REMOVE] ApplicationInterface struct. [IMP] DDK_STATUS_STRUCT data structure for driver events. Signed-off-by: Amlal --- DDK/KernelStd.h | 12 ++++++ Kernel/KernelKit/PermissionSelector.hxx | 57 ---------------------------- Kernel/KernelKit/ProcessScheduler.hxx | 2 +- Kernel/KernelKit/User.hxx | 65 ++++++++++++++++++++++++++++++++ Kernel/NewKit/ApplicationInterface.hxx | 31 --------------- Kernel/Sources/Main.cxx | 6 ++- Kernel/Sources/PermissionSelector.cxx | 47 ----------------------- Kernel/Sources/User.cxx | 54 ++++++++++++++++++++++++++ Meta/DDK specs.pdf | Bin 0 -> 23051 bytes newoskrnl.files | 5 +-- 10 files changed, 139 insertions(+), 140 deletions(-) delete mode 100644 Kernel/KernelKit/PermissionSelector.hxx create mode 100644 Kernel/KernelKit/User.hxx delete mode 100644 Kernel/NewKit/ApplicationInterface.hxx delete mode 100644 Kernel/Sources/PermissionSelector.cxx create mode 100644 Kernel/Sources/User.cxx create mode 100644 Meta/DDK specs.pdf (limited to 'Meta') diff --git a/DDK/KernelStd.h b/DDK/KernelStd.h index aef1785f..af7bb306 100644 --- a/DDK/KernelStd.h +++ b/DDK/KernelStd.h @@ -11,14 +11,26 @@ #if defined(__cplusplus) #define DK_EXTERN extern "C" #define nil nullptr +#define DK_FINAL final #else #define DK_EXTERN extern #define nil ((void*)0) +#define DK_FINAL #endif // defined(__cplusplus) #include #include +struct DDK_STATUS_STRUCT; + +/// \brief DDK status structure (__at_enable, __at_disable...) +struct DDK_STATUS_STRUCT DK_FINAL +{ + int32_t action_id; + int32_t issuer_id; + int32_t group_id; +}; + /// @brief Call kernel (interrupt 0x33) /// @param kernelRpcName /// @param cnt number of elements in **dat** diff --git a/Kernel/KernelKit/PermissionSelector.hxx b/Kernel/KernelKit/PermissionSelector.hxx deleted file mode 100644 index 309e260a..00000000 --- a/Kernel/KernelKit/PermissionSelector.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies - -------------------------------------------- */ - -#ifndef _INC_PERMISSION_SEL_HXX_ -#define _INC_PERMISSION_SEL_HXX_ - -#include -#include - -// super admin mode user. -#define kMachineUser "Machine" - -// user mode users. -#define kSuperUser "Admin" -#define kGuestUser "Guest" - -// hash 'user@host:password' -> base64 encoded data -// use this data to then fetch specific data. - -namespace Kernel -{ - enum class RingKind - { - kRingUser = 3, - kRingDriver = 2, - kRingKernel = 0, - kRingUnknown = -1, - kRingCount = 4, - }; - - class PermissionSelector final - { - private: - explicit PermissionSelector(const Int32& sel); - explicit PermissionSelector(const RingKind& kind); - - ~PermissionSelector(); - - public: - NEWOS_COPY_DEFAULT(PermissionSelector) - - public: - bool operator==(const PermissionSelector& lhs); - bool operator!=(const PermissionSelector& lhs); - - public: - const RingKind& Ring() noexcept; - - private: - RingKind fRing; - }; -} // namespace Kernel - -#endif /* ifndef _INC_PERMISSION_SEL_HXX_ */ diff --git a/Kernel/KernelKit/ProcessScheduler.hxx b/Kernel/KernelKit/ProcessScheduler.hxx index e5368201..4f9f99f6 100644 --- a/Kernel/KernelKit/ProcessScheduler.hxx +++ b/Kernel/KernelKit/ProcessScheduler.hxx @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/Kernel/KernelKit/User.hxx b/Kernel/KernelKit/User.hxx new file mode 100644 index 00000000..aa0901ac --- /dev/null +++ b/Kernel/KernelKit/User.hxx @@ -0,0 +1,65 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies + +------------------------------------------- */ + +#ifndef _INC_PERMISSION_SEL_HXX_ +#define _INC_PERMISSION_SEL_HXX_ + +#include +#include +#include + +// user mode users. +#define kSuperUser "Admin" +#define kGuestUser "Guest" + +#define kUsersDir "\\Users\\Store\\" + +#define kMaxUserNameLen (255) + +// hash 'password' -> base64+md5 encoded data +// use this data to then fetch specific data of the user.. + +namespace Kernel +{ + enum class RingKind + { + kRingStdUser = 1, + kRingSuperUser = 2, + kRingGuestUser = 5, + kRingCount = 5, + }; + + class User final + { + public: + explicit User() = default; + + User(const Int32& sel, const Char* userName); + User(const RingKind& kind, const Char* userName); + + ~User(); + + public: + NEWOS_COPY_DEFAULT(User) + + public: + bool operator==(const User& lhs); + bool operator!=(const User& lhs); + + public: + const RingKind& Ring() noexcept; + const StringView Name() noexcept; + + private: + RingKind fRing{RingKind::kRingStdUser}; + StringView fUserName{kMaxUserNameLen}; + + }; + + inline User* cRootUser = nullptr; +} // namespace Kernel + +#endif /* ifndef _INC_PERMISSION_SEL_HXX_ */ diff --git a/Kernel/NewKit/ApplicationInterface.hxx b/Kernel/NewKit/ApplicationInterface.hxx deleted file mode 100644 index 31da9aa3..00000000 --- a/Kernel/NewKit/ApplicationInterface.hxx +++ /dev/null @@ -1,31 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies - -------------------------------------------- */ - -#pragma once - -/// -/// @brief Application object, given by the OS to the process. interact with the OS. -/// @file ApplicationInterface.hxx -/// @author Amlal EL Mahrouss -/// - -#include -#include - -/// \brief Application Interface. -/// \author Amlal El Mahrouss -typedef struct _ApplicationInterface final -{ - /// @brief Releases the object exit the process on main object. - Kernel::Void (*Release)(struct _Application* Self, Kernel::Int32 ExitCode); - /// @brief Invoke a function from the application object. - Kernel::IntPtr (*Invoke)(struct _Application* Self, Kernel::Int32 Sel, ...); - /// @brief Query a new application object from a GUID. - /// @note this doesn't query a process, it query a registered object withtin that app. - Kernel::Void (*Query)(struct _Application* Self, Kernel::VoidPtr* Dst, Kernel::SizeT SzDst, Kernel::XRN::GUIDSequence GuidOf); -} ApplicationInterface, *ApplicationInterfaceRef; - -#define app_cast reinterpret_cast diff --git a/Kernel/Sources/Main.cxx b/Kernel/Sources/Main.cxx index 92dac251..b0083730 100644 --- a/Kernel/Sources/Main.cxx +++ b/Kernel/Sources/Main.cxx @@ -63,7 +63,7 @@ namespace Kernel::Detail const auto cDirCount = 9; const char* cDirStr[cDirCount] = { "\\Boot\\", "\\System\\", "\\Support\\", "\\Applications\\", - "\\Users\\", "\\Library\\", "\\Mounted\\", "\\DCIM\\", "\\Applications\\Storage\\"}; + "\\Users\\", "\\Library\\", "\\Mounted\\", "\\DCIM\\", "\\Applications\\Store\\"}; for (Kernel::SizeT dirIndx = 0UL; dirIndx < cDirCount; ++dirIndx) { @@ -188,6 +188,10 @@ namespace Kernel::Detail /// @return void no return value. STATIC Kernel::Void ke_user_switch(Kernel::Void) { + + Kernel::cRootUser = new User(RingKind::kRingSuperUser, kSuperUser); + Kernel::kcout << "newoskrnl: logged in as: " << Kernel::cRootUser->Name().CData() << Kernel::endl; + Kernel::kcout << "newoskrnl: " << cKernelVersion.GetKey().CData() << ": " << Kernel::number(cKernelVersion.GetValue()) << Kernel::endl; } } // namespace Kernel::Detail diff --git a/Kernel/Sources/PermissionSelector.cxx b/Kernel/Sources/PermissionSelector.cxx deleted file mode 100644 index 726f34e1..00000000 --- a/Kernel/Sources/PermissionSelector.cxx +++ /dev/null @@ -1,47 +0,0 @@ -/* - * ======================================================== - * - * Kernel - * Copyright ZKA Technologies, all rights reserved. - * - * File: PermissionSelector.cpp - * Purpose: Permission selectors. - * - * ======================================================== - */ - -#include -#include - -/// bugs 0 - -namespace Kernel -{ - PermissionSelector::PermissionSelector(const Int32& sel) - : fRing((RingKind)sel) - { - MUST_PASS(sel > 0); - } - - PermissionSelector::PermissionSelector(const RingKind& ringKind) - : fRing(ringKind) - { - } - - PermissionSelector::~PermissionSelector() = default; - - bool PermissionSelector::operator==(const PermissionSelector& lhs) - { - return lhs.fRing == this->fRing; - } - - bool PermissionSelector::operator!=(const PermissionSelector& lhs) - { - return lhs.fRing != this->fRing; - } - - const RingKind& PermissionSelector::Ring() noexcept - { - return this->fRing; - } -} // namespace Kernel diff --git a/Kernel/Sources/User.cxx b/Kernel/Sources/User.cxx new file mode 100644 index 00000000..1deac5be --- /dev/null +++ b/Kernel/Sources/User.cxx @@ -0,0 +1,54 @@ +/* + * ======================================================== + * + * Kernel + * Copyright ZKA Technologies, all rights reserved. + * + * File: User.cpp + * Purpose: Permission selectors. + * + * ======================================================== + */ + +#include +#include + +/// bugs 0 + +namespace Kernel +{ + User::User(const Int32& sel, const Char* userName) + : fRing((RingKind)sel) + { + MUST_PASS(sel >= 0); + this->fUserName += userName; + } + + User::User(const RingKind& ringKind, const Char* userName) + : fRing(ringKind) + { + this->fUserName += userName; + } + + User::~User() = default; + + bool User::operator==(const User& lhs) + { + return lhs.fRing == this->fRing; + } + + bool User::operator!=(const User& lhs) + { + return lhs.fRing != this->fRing; + } + + const StringView User::Name() noexcept + { + return this->fUserName; + } + + const RingKind& User::Ring() noexcept + { + return this->fRing; + } +} // namespace Kernel diff --git a/Meta/DDK specs.pdf b/Meta/DDK specs.pdf new file mode 100644 index 00000000..c3af60cf Binary files /dev/null and b/Meta/DDK specs.pdf differ diff --git a/newoskrnl.files b/newoskrnl.files index d8988b7b..c626b783 100644 --- a/newoskrnl.files +++ b/newoskrnl.files @@ -176,7 +176,7 @@ Kernel/KernelKit/PECodeManager.hxx Kernel/KernelKit/PEF.hxx Kernel/KernelKit/PEFCodeManager.hxx Kernel/KernelKit/PEFSharedObject.hxx -Kernel/KernelKit/PermissionSelector.hxx +Kernel/KernelKit/User.hxx Kernel/KernelKit/ProcessScheduler.hxx Kernel/KernelKit/SMPManager.hpp Kernel/KernelKit/Semaphore.hpp @@ -216,7 +216,6 @@ Kernel/NetworkKit/LTE.hxx Kernel/NetworkKit/MAC.hxx Kernel/NetworkKit/NetworkDevice.hpp Kernel/NetworkKit/compile_flags.txt -Kernel/NewKit/ApplicationInterface.hxx Kernel/NewKit/Array.hpp Kernel/NewKit/ArrayList.hpp Kernel/NewKit/Atom.hpp @@ -279,7 +278,7 @@ Kernel/Sources/PEFSharedObject.cxx Kernel/Sources/PRDT.cxx Kernel/Sources/PageAllocator.cxx Kernel/Sources/PageManager.cxx -Kernel/Sources/PermissionSelector.cxx +Kernel/Sources/User.cxx Kernel/Sources/Pmm.cxx Kernel/Sources/ProcessScheduler.cxx Kernel/Sources/ProcessTeam.cxx -- cgit v1.2.3 From 14769b940725a9e323d237179e812ccfdae08382 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Fri, 26 Jul 2024 09:18:51 +0200 Subject: [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 --- Boot/Modules/NetBoot/manifest.json | 4 +- DDK/KernelAlloc.c | 2 +- DDK/KernelCall.c | 2 +- DDK/KernelCxxRt.cxx | 2 +- DDK/KernelDev.c | 2 +- DDK/KernelDev.h | 2 +- DDK/KernelPrint.c | 2 +- DDK/KernelPrint.h | 2 +- DDK/KernelStd.h | 15 ++++-- DDK/KernelString.c | 2 +- DDK/KernelString.h | 2 +- DDK/KernelVersion.c | 21 ++++++++ DDK/x86_64.make | 14 ++++++ Kernel/KernelRsrc.rsrc | 2 +- Kernel/amd64-efi.make | 2 +- Meta/OS-Design.drawio | 98 +++++++++++++++++++------------------- 16 files changed, 109 insertions(+), 65 deletions(-) create mode 100644 DDK/KernelVersion.c create mode 100644 DDK/x86_64.make (limited to 'Meta') 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 + +#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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3