diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-29 18:13:03 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-29 18:14:42 +0200 |
| commit | 34cc73d2e443ab812e42982a76310627a6693f64 (patch) | |
| tree | 325345ff26ac3bf2bcbae65698ca93599690c54f | |
| parent | 506eb4d52ae1e4b7b98784b2af022274572f9108 (diff) | |
[FIX] Fix storage size for SSD inside StorageKit.
[FIX] Don't support SIGG executables on bootloader side.
[REF] Rename SIGG to FMT, to contain other formats.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
| -rw-r--r-- | dev/FMT/SIGG.hxx (renamed from dev/SIGG/SIGG.hxx) | 12 | ||||
| -rw-r--r-- | dev/ZBA/Sources/Thread.cxx | 10 | ||||
| -rw-r--r-- | dev/ZKA/StorageKit/Storage.hxx | 4 |
3 files changed, 15 insertions, 11 deletions
diff --git a/dev/SIGG/SIGG.hxx b/dev/FMT/SIGG.hxx index e7d9f60b..a1e8400f 100644 --- a/dev/SIGG/SIGG.hxx +++ b/dev/FMT/SIGG.hxx @@ -6,8 +6,10 @@ #pragma once +/// @file SIGG.hxx +/// @brief SIGG is the extended PE32+ container for drivers, not to confused with .sign.exe, .sign.dll formats. + #include <NewKit/Defines.hxx> -#include <KernelKit/PEF.hxx> #include <KernelKit/PE.hxx> #include <KernelKit/MSDOS.hxx> @@ -25,13 +27,13 @@ namespace Kernel struct SIGNED_DRIVER_HEADER final { // doesn't change. - char d_binary_magic[5]; - int d_binary_version; + Char d_binary_magic[5]; + Int d_binary_version; // can change. - char d_binary_name[4096]; + Char d_binary_name[4096]; UInt64 d_binary_checksum; UInt64 d_binary_size; - char d_binary_padding[512]; + Char d_binary_padding[512]; }; } // namespace Detail } // namespace Kernel diff --git a/dev/ZBA/Sources/Thread.cxx b/dev/ZBA/Sources/Thread.cxx index 2f662f0d..bddbdd52 100644 --- a/dev/ZBA/Sources/Thread.cxx +++ b/dev/ZBA/Sources/Thread.cxx @@ -15,7 +15,8 @@ #include <CFKit/LoaderUtils.hxx> #include <Modules/CoreCG/TextRenderer.hxx> -#include <SIGG/SIGG.hxx> +//! Get SIGG header from formats directory. +#include <FMT/SIGG.hxx> EXTERN_C{ #include <string.h> @@ -111,7 +112,7 @@ namespace Boot if (structHandover->HandoverMagic != kHandoverMagic && structHandover->HandoverType != HEL::kTypeKernel) { - writer.Write("newosldr: Entrypoint of SYS: ").Write((UIntPtr)fStartAddress).Write("\r"); + writer.Write("newosldr: Entrypoint of EXE: ").Write((UIntPtr)fStartAddress).Write("\r"); CGDrawString("NEWOSLDR: NOT AN HANDOVER IMAGE...", 40, 10, RGB(0xFF, 0xFF, 0xFF)); } } @@ -131,11 +132,12 @@ namespace Boot // ========================================= // fStartAddress = nullptr; - writer.Write("newosldr: PEF executable detected.\r"); + writer.Write("newosldr: PEF executable detected, won't load it.\r"); + writer.Write("newosldr: note: PEF executables aren't loadable by default.\r"); } else { - writer.Write("newosldr: Invalid executable.\r"); + writer.Write("newosldr: Invalid executable. (note: SIGG executables aren't loadable by default).\r"); } } diff --git a/dev/ZKA/StorageKit/Storage.hxx b/dev/ZKA/StorageKit/Storage.hxx index a9e0f8e4..70f22420 100644 --- a/dev/ZKA/StorageKit/Storage.hxx +++ b/dev/ZKA/StorageKit/Storage.hxx @@ -6,8 +6,8 @@ #pragma once -#define kDriveSectorSizeHDD (512) -#define kDriveSectorSizeSSD (4096) +#define kDriveSectorSizeHDD (512U) +#define kDriveSectorSizeSSD (512U) #define kDriveSectorSizeOptical (2048) namespace Kernel |
