summaryrefslogtreecommitdiffhomepage
path: root/dev/zka
diff options
context:
space:
mode:
authorAmlal <amlal@el-mahrouss-logic.com>2024-10-24 20:11:21 +0200
committerAmlal <amlal@el-mahrouss-logic.com>2024-10-24 20:11:21 +0200
commitb0850d02b7fba8f0e16092c7609e928907d2521d (patch)
tree81ba785ba42607dff1df3538f305a23b8c2b1ce5 /dev/zka
parent52b4044ab4956597aee4c629ba5fe5ec8966beac (diff)
IMP: Doing a cleanup and finishing the first version of ZKA.
Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev/zka')
-rw-r--r--dev/zka/CFKit/LoaderUtils.h6
-rw-r--r--dev/zka/CompressKit/GZip.h6
-rw-r--r--dev/zka/CompressKit/RLE.h6
-rw-r--r--dev/zka/FirmwareKit/EPM.h6
-rw-r--r--dev/zka/HintKit/CompilerHint.h6
-rw-r--r--dev/zka/KernelKit/DriveMgr.h6
-rw-r--r--dev/zka/KernelKit/FileMgr.h8
-rw-r--r--dev/zka/KernelKit/IPEFDLLObject.h6
-rw-r--r--dev/zka/KernelKit/PE.h6
-rw-r--r--dev/zka/KernelKit/PEF.h6
-rw-r--r--dev/zka/KernelKit/PEFCodeMgr.h4
-rw-r--r--dev/zka/KernelKit/UserProcessScheduler.h3
-rw-r--r--dev/zka/KernelKit/XCOFF.h6
-rw-r--r--dev/zka/amd64-efi.make2
-rw-r--r--dev/zka/src/FS/HPFS.cc12
-rw-r--r--dev/zka/src/FS/NeFS.cc4
-rw-r--r--dev/zka/src/NeFS+FileMgr.cc4
-rw-r--r--dev/zka/src/NeFS+IO.cc4
18 files changed, 55 insertions, 46 deletions
diff --git a/dev/zka/CFKit/LoaderUtils.h b/dev/zka/CFKit/LoaderUtils.h
index 4a30ec84..b438de2a 100644
--- a/dev/zka/CFKit/LoaderUtils.h
+++ b/dev/zka/CFKit/LoaderUtils.h
@@ -1,5 +1,5 @@
-#ifndef __CFKIT_LOADER_UTILS_HXX__
-#define __CFKIT_LOADER_UTILS_HXX__
+#ifndef __CFKIT_LOADER_UTILS_H__
+#define __CFKIT_LOADER_UTILS_H__
#include <KernelKit/PE.h>
#include <KernelKit/MSDOS.h>
@@ -50,4 +50,4 @@ namespace Kernel
}
} // namespace Kernel
-#endif // ifndef __CFKIT_LOADER_UTILS_HXX__
+#endif // ifndef __CFKIT_LOADER_UTILS_H__
diff --git a/dev/zka/CompressKit/GZip.h b/dev/zka/CompressKit/GZip.h
index cd1b9744..3a1144f2 100644
--- a/dev/zka/CompressKit/GZip.h
+++ b/dev/zka/CompressKit/GZip.h
@@ -4,8 +4,8 @@
------------------------------------------- */
-#ifndef __KERNELKIT_GZIP_HXX__
-#define __KERNELKIT_GZIP_HXX__
+#ifndef __KERNELKIT_GZIP_H__
+#define __KERNELKIT_GZIP_H__
#include <NewKit/Defines.h>
@@ -15,4 +15,4 @@ namespace Kernel::GZip
class IGZipProxy;
} // namespace Kernel::GZip
-#endif // !__KERNELKIT_GZIP_HXX__
+#endif // !__KERNELKIT_GZIP_H__
diff --git a/dev/zka/CompressKit/RLE.h b/dev/zka/CompressKit/RLE.h
index 64cd53ca..9101b0b9 100644
--- a/dev/zka/CompressKit/RLE.h
+++ b/dev/zka/CompressKit/RLE.h
@@ -4,8 +4,8 @@
------------------------------------------- */
-#ifndef __KERNELKIT_RLE_HXX__
-#define __KERNELKIT_RLE_HXX__
+#ifndef __KERNELKIT_RLE_H__
+#define __KERNELKIT_RLE_H__
#include <NewKit/Defines.h>
@@ -15,4 +15,4 @@ namespace Kernel
class IRleProxy;
} // namespace Kernel
-#endif // !ifndef __KERNELKIT_RLE_HXX__
+#endif // !ifndef __KERNELKIT_RLE_H__
diff --git a/dev/zka/FirmwareKit/EPM.h b/dev/zka/FirmwareKit/EPM.h
index 7ff976a0..ab713a0a 100644
--- a/dev/zka/FirmwareKit/EPM.h
+++ b/dev/zka/FirmwareKit/EPM.h
@@ -8,8 +8,8 @@
@brief The Explicit Partition Map scheme.
*/
-#ifndef __FIRMWARE_EPM_HXX__
-#define __FIRMWARE_EPM_HXX__
+#ifndef __FIRMWARE_EPM_H__
+#define __FIRMWARE_EPM_H__
#include <NewKit/Defines.h>
@@ -119,4 +119,4 @@ enum
typedef struct _BOOT_BLOCK_STRUCT BOOT_BLOCK_STRUCT;
-#endif // ifndef __FIRMWARE_EPM_HXX__
+#endif // ifndef __FIRMWARE_EPM_H__
diff --git a/dev/zka/HintKit/CompilerHint.h b/dev/zka/HintKit/CompilerHint.h
index da670509..1cec5fa9 100644
--- a/dev/zka/HintKit/CompilerHint.h
+++ b/dev/zka/HintKit/CompilerHint.h
@@ -4,8 +4,8 @@
------------------------------------------- */
-#ifndef __HINTKIT_COMPILER_HINT_HXX__
-#define __HINTKIT_COMPILER_HINT_HXX__
+#ifndef __HINTKIT_COMPILER_HINT_H__
+#define __HINTKIT_COMPILER_HINT_H__
#pragma compiler(hint_manifest)
@@ -20,4 +20,4 @@
#define _InOut
#define _StrictInOut
-#endif // ifndef __HINTKIT_COMPILER_HINT_HXX__
+#endif // ifndef __HINTKIT_COMPILER_HINT_H__
diff --git a/dev/zka/KernelKit/DriveMgr.h b/dev/zka/KernelKit/DriveMgr.h
index 850217cb..db857a3c 100644
--- a/dev/zka/KernelKit/DriveMgr.h
+++ b/dev/zka/KernelKit/DriveMgr.h
@@ -4,8 +4,8 @@
------------------------------------------- */
-#ifndef __INC_DRIVE_MANAGER_HXX__
-#define __INC_DRIVE_MANAGER_HXX__
+#ifndef __INC_DRIVE_MANAGER_H__
+#define __INC_DRIVE_MANAGER_H__
#include <KernelKit/UserProcessScheduler.h>
#include <CompilerKit/CompilerKit.h>
@@ -152,4 +152,4 @@ namespace Kernel
DriveTrait io_construct_main_drive(void) noexcept;
} // namespace Kernel
-#endif /* ifndef __INC_DRIVE_MANAGER_HXX__ */
+#endif /* ifndef __INC_DRIVE_MANAGER_H__ */
diff --git a/dev/zka/KernelKit/FileMgr.h b/dev/zka/KernelKit/FileMgr.h
index cdda89e7..af302a64 100644
--- a/dev/zka/KernelKit/FileMgr.h
+++ b/dev/zka/KernelKit/FileMgr.h
@@ -19,9 +19,9 @@
#pragma once
-#ifdef __FSKIT_USE_NEFS__
+#ifdef __FSKIT_INCLUDES_NEFS__
#include <FSKit/NeFS.h>
-#endif // __FSKIT_USE_NEFS__
+#endif // __FSKIT_INCLUDES_NEFS__
#include <CompilerKit/CompilerKit.h>
#include <HintKit/CompilerHint.h>
@@ -135,7 +135,7 @@ namespace Kernel
virtual bool Rewind(_Input NodePtr node) = 0;
};
-#ifdef __FSKIT_USE_NEFS__
+#ifdef __FSKIT_INCLUDES_NEFS__
/**
* @brief Based of IFilesystemMgr, takes care of managing NeFS
* disks.
@@ -184,7 +184,7 @@ namespace Kernel
NeFSParser* fImpl{nullptr};
};
-#endif // ifdef __FSKIT_USE_NEFS__
+#endif // ifdef __FSKIT_INCLUDES_NEFS__
/**
* Usable FileStream
diff --git a/dev/zka/KernelKit/IPEFDLLObject.h b/dev/zka/KernelKit/IPEFDLLObject.h
index 8c0703ed..49d3519a 100644
--- a/dev/zka/KernelKit/IPEFDLLObject.h
+++ b/dev/zka/KernelKit/IPEFDLLObject.h
@@ -7,8 +7,8 @@
* ========================================================
*/
-#ifndef __KERNELKIT_SHARED_OBJECT_HXX__
-#define __KERNELKIT_SHARED_OBJECT_HXX__
+#ifndef __KERNELKIT_SHARED_OBJECT_H__
+#define __KERNELKIT_SHARED_OBJECT_H__
#include <KernelKit/PEF.h>
#include <NewKit/Defines.h>
@@ -103,4 +103,4 @@ namespace Kernel
EXTERN_C Void rtl_fini_dll(UserProcess* header, IDLL lib, Bool* successful);
} // namespace Kernel
-#endif /* ifndef __KERNELKIT_SHARED_OBJECT_HXX__ */
+#endif /* ifndef __KERNELKIT_SHARED_OBJECT_H__ */
diff --git a/dev/zka/KernelKit/PE.h b/dev/zka/KernelKit/PE.h
index b077f251..186f7e9f 100644
--- a/dev/zka/KernelKit/PE.h
+++ b/dev/zka/KernelKit/PE.h
@@ -11,8 +11,8 @@
------------------------------------------- */
-#ifndef __KERNELKIT_INC_PE_HXX__
-#define __KERNELKIT_INC_PE_HXX__
+#ifndef __KERNELKIT_INC_PE_H__
+#define __KERNELKIT_INC_PE_H__
#include <NewKit/Defines.h>
@@ -140,4 +140,4 @@ enum
cPEResourceId = 0xFFaadd00,
};
-#endif /* ifndef __KERNELKIT_INC_PE_HXX__ */
+#endif /* ifndef __KERNELKIT_INC_PE_H__ */
diff --git a/dev/zka/KernelKit/PEF.h b/dev/zka/KernelKit/PEF.h
index 15f9c5e2..5c010503 100644
--- a/dev/zka/KernelKit/PEF.h
+++ b/dev/zka/KernelKit/PEF.h
@@ -11,8 +11,8 @@
------------------------------------------- */
-#ifndef __KERNELKIT_INC_PEF_HXX__
-#define __KERNELKIT_INC_PEF_HXX__
+#ifndef __KERNELKIT_INC_PEF_H__
+#define __KERNELKIT_INC_PEF_H__
#include <CompilerKit/CompilerKit.h>
#include <KernelKit/LoaderInterface.h>
@@ -113,4 +113,4 @@ namespace Kernel
#define kPefForkKind kPefMagic
#define kPefForkKindFAT kPefMagicFat
-#endif /* ifndef __KERNELKIT_INC_PEF_HXX__ */
+#endif /* ifndef __KERNELKIT_INC_PEF_H__ */
diff --git a/dev/zka/KernelKit/PEFCodeMgr.h b/dev/zka/KernelKit/PEFCodeMgr.h
index 8ad9eb01..01b4c6bd 100644
--- a/dev/zka/KernelKit/PEFCodeMgr.h
+++ b/dev/zka/KernelKit/PEFCodeMgr.h
@@ -46,11 +46,11 @@ namespace Kernel
bool IsLoaded() noexcept;
private:
-#ifdef __FSKIT_USE_NEFS__
+#ifdef __FSKIT_INCLUDES_NEFS__
OwnPtr<FileStream<Char, NeFileSystemMgr>> fFile;
#else
OwnPtr<FileStream<Char>> fFile;
-#endif // __FSKIT_USE_NEFS__
+#endif // __FSKIT_INCLUDES_NEFS__
Ref<StringView> fPath;
VoidPtr fCachedBlob;
diff --git a/dev/zka/KernelKit/UserProcessScheduler.h b/dev/zka/KernelKit/UserProcessScheduler.h
index 5faafc0b..b2300ddf 100644
--- a/dev/zka/KernelKit/UserProcessScheduler.h
+++ b/dev/zka/KernelKit/UserProcessScheduler.h
@@ -99,7 +99,7 @@ namespace Kernel
// end of operator overloading.
- enum ProcessSubsystemEnum : Int32
+ enum class ProcessSubsystem: Int32
{
kProcessSubsystemSecurity = 100,
kProcessSubsystemApplication,
@@ -109,7 +109,6 @@ namespace Kernel
kProcessSubsystemCount = 4,
};
- using ProcessSubsystem = ProcessSubsystemEnum;
using ProcessTime = UInt64;
using PID = Int64;
diff --git a/dev/zka/KernelKit/XCOFF.h b/dev/zka/KernelKit/XCOFF.h
index a7cf3aff..3961f085 100644
--- a/dev/zka/KernelKit/XCOFF.h
+++ b/dev/zka/KernelKit/XCOFF.h
@@ -11,8 +11,8 @@
------------------------------------------- */
-#ifndef __INC_XCOFF_HXX__
-#define __INC_XCOFF_HXX__
+#ifndef INC_XOCFF_H
+#define INC_XOCFF_H
#include <NewKit/Defines.h>
@@ -48,4 +48,4 @@ typedef struct XCoffForkHeader
Kernel::Char fCodeSignFork[cForkNameLen];
} XCoffForkHeader;
-#endif // ifndef __INC_XCOFF_HXX__
+#endif // ifndef INC_XOCFF_H
diff --git a/dev/zka/amd64-efi.make b/dev/zka/amd64-efi.make
index 8d9d1311..e39a55ab 100644
--- a/dev/zka/amd64-efi.make
+++ b/dev/zka/amd64-efi.make
@@ -6,7 +6,7 @@
CC = x86_64-w64-mingw32-g++
LD = x86_64-w64-mingw32-ld
CCFLAGS = -fshort-wchar -c -D__ZKA_AMD64__ -mno-red-zone -fno-rtti -fno-exceptions \
- -std=c++20 -D__ZKA_SUPPORT_NX__ -I../Vendor -D__FSKIT_USE_NEFS__ \
+ -std=c++20 -D__ZKA_SUPPORT_NX__ -I../Vendor -D__FSKIT_INCLUDES_NEFS__ \
-D__NEWOSKRNL__ -D__HAVE_ZKA_APIS__ -D__FREESTANDING__ -D__ZKA__ -I./ -I../ -I../zba
ASM = nasm
diff --git a/dev/zka/src/FS/HPFS.cc b/dev/zka/src/FS/HPFS.cc
index 0fb80079..e3af1e03 100644
--- a/dev/zka/src/FS/HPFS.cc
+++ b/dev/zka/src/FS/HPFS.cc
@@ -6,7 +6,17 @@
#ifdef __FSKIT_INCLUDES_HPFS__
-#include <FirmwareKit/GPT.h>
+#include <modules/AHCI/AHCI.h>
+#include <modules/ATA/ATA.h>
+#include <modules/Flash/Flash.h>
+#include <FSKit/HPFS.h>
+#include <KernelKit/LPC.h>
+#include <NewKit/Crc32.h>
+#include <NewKit/Stop.h>
+#include <NewKit/String.h>
+#include <NewKit/Utils.h>
#include <FirmwareKit/EPM.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/User.h>
#endif // ifdef __FSKIT_INCLUDES_HPFS__
diff --git a/dev/zka/src/FS/NeFS.cc b/dev/zka/src/FS/NeFS.cc
index 4c706f86..be3d407f 100644
--- a/dev/zka/src/FS/NeFS.cc
+++ b/dev/zka/src/FS/NeFS.cc
@@ -4,7 +4,7 @@
------------------------------------------- */
-#ifdef __FSKIT_USE_NEFS__
+#ifdef __FSKIT_INCLUDES_NEFS__
#include <modules/AHCI/AHCI.h>
#include <modules/ATA/ATA.h>
@@ -1054,4 +1054,4 @@ namespace Kernel::Detail
} // namespace Kernel::Detail
#endif // !__ZKA_MINIMAL_OS__
-#endif // ifdef __FSKIT_USE_NEFS__
+#endif // ifdef __FSKIT_INCLUDES_NEFS__
diff --git a/dev/zka/src/NeFS+FileMgr.cc b/dev/zka/src/NeFS+FileMgr.cc
index 3cc5400b..dcc9c3b2 100644
--- a/dev/zka/src/NeFS+FileMgr.cc
+++ b/dev/zka/src/NeFS+FileMgr.cc
@@ -8,7 +8,7 @@
#include <KernelKit/Heap.h>
#ifndef __ZKA_MINIMAL_OS__
-#ifdef __FSKIT_USE_NEFS__
+#ifdef __FSKIT_INCLUDES_NEFS__
/// @brief NeFS File manager.
/// BUGS: 0
@@ -244,5 +244,5 @@ namespace Kernel
}
} // namespace Kernel
-#endif // ifdef __FSKIT_USE_NEFS__
+#endif // ifdef __FSKIT_INCLUDES_NEFS__
#endif // ifndef __ZKA_MINIMAL_OS__
diff --git a/dev/zka/src/NeFS+IO.cc b/dev/zka/src/NeFS+IO.cc
index 010ec3f2..5a5f60c6 100644
--- a/dev/zka/src/NeFS+IO.cc
+++ b/dev/zka/src/NeFS+IO.cc
@@ -17,7 +17,7 @@
*
*************************************************************/
-#ifdef __FSKIT_USE_NEFS__
+#ifdef __FSKIT_INCLUDES_NEFS__
#include <FirmwareKit/EPM.h>
@@ -98,4 +98,4 @@ Int32 fs_newfs_write(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIn
return DrvTrait.fPacket.fPacketGood;
}
-#endif // ifdef __FSKIT_USE_NEFS__
+#endif // ifdef __FSKIT_INCLUDES_NEFS__