diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-23 21:06:27 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-23 21:06:27 -0500 |
| commit | 23040fad647634c08697451fc22ee2ca999629c8 (patch) | |
| tree | 72888f88c7728c82f3f6df1f4f70591de15eab36 /src/kernel/KernelKit/ZXD.h | |
| parent | e5cc7351f0577b54c528fb827a7c7e6306c3e843 (diff) | |
| parent | 83d870e58457a1d335a1d9b9966a6a1887cc297b (diff) | |
Merge pull request #81 from nekernel-org/dev
feat! breaking changes on kernel sources.
Diffstat (limited to 'src/kernel/KernelKit/ZXD.h')
| -rw-r--r-- | src/kernel/KernelKit/ZXD.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/kernel/KernelKit/ZXD.h b/src/kernel/KernelKit/ZXD.h new file mode 100644 index 00000000..a4b07bfa --- /dev/null +++ b/src/kernel/KernelKit/ZXD.h @@ -0,0 +1,53 @@ +/* ======================================== + + Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. + +======================================== */ + +#pragma once + +#include <NeKit/Defines.h> + +#define kZXDMagicNumber (0x2010AF) +#define kZXDVersion (0x0001) + +namespace Kernel { +struct ZXD_EXEC_HEADER; +struct ZXD_STUB_HEADER; + +enum ZXD_FLAGS { + kZXDFlagsInvalid, + kZXDFlagsDriver, + kZXDFlagsCount, +}; + +/// @brief ZXD executable header +/// @details This header is used to identify ZXD executable files. +struct PACKED ZXD_EXEC_HEADER final { + UInt32 fMagic; + UInt32 fVersion; + UInt32 fFlags; + UInt32 fHdrSize; + UInt32 fCRC32; + UInt32 fAssigneeSignature; + UInt32 fIssuerSingature; + UIntPtr fExecOffset; + SizeT fExecSize; + UIntPtr fStubOffset; + SizeT fStubSize; + SizeT fStubAlign; + SizeT fStubCount; +}; + +/// @brief ZXD stub header +/// @details This header is used to identify ZXD stub files. It contains the size of the stub, the +/// offset of the stub, and the CRC32 checksum of the stub. +struct PACKED ZXD_STUB_HEADER final { + UInt32 fStubSize; + UInt32 fStubOffset; + UInt32 fStubCRC32; +}; + +using ZXD_EXEC_HEADER_PTR = ZXD_EXEC_HEADER*; +using ZXD_STUB_HEADER_PTR = ZXD_STUB_HEADER*; +} // namespace Kernel |
