diff options
| -rw-r--r-- | dev/FMT/SIGG.hxx | 39 | ||||
| -rw-r--r-- | dev/ZBA/Sources/Thread.cxx | 5 | ||||
| -rw-r--r-- | dev/ZKA/HALKit/AMD64/HalProcessorMgr.cxx (renamed from dev/ZKA/HALKit/AMD64/HalProcessor.cxx) | 6 | ||||
| -rw-r--r-- | dev/ZKA/HALKit/AMD64/ReadMe.md | 4 | ||||
| -rw-r--r-- | tools/drvsign.cxx | 15 |
5 files changed, 15 insertions, 54 deletions
diff --git a/dev/FMT/SIGG.hxx b/dev/FMT/SIGG.hxx deleted file mode 100644 index a1e8400f..00000000 --- a/dev/FMT/SIGG.hxx +++ /dev/null @@ -1,39 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#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/PE.hxx> -#include <KernelKit/MSDOS.hxx> - -#define kDriverSignedExt ".sigg" -#define kDriverExt ".sys" -#define kSignedDriverMagic "SIGG" - -/// @brief SIGG format, takes care of signed drivers. - -namespace Kernel -{ - namespace Detail - { - /// @brief Instablle Secure Driver record. - struct SIGNED_DRIVER_HEADER final - { - // doesn't change. - Char d_binary_magic[5]; - Int d_binary_version; - // can change. - Char d_binary_name[4096]; - UInt64 d_binary_checksum; - UInt64 d_binary_size; - Char d_binary_padding[512]; - }; - } // namespace Detail -} // namespace Kernel diff --git a/dev/ZBA/Sources/Thread.cxx b/dev/ZBA/Sources/Thread.cxx index ee9b73c1..8bcecc2c 100644 --- a/dev/ZBA/Sources/Thread.cxx +++ b/dev/ZBA/Sources/Thread.cxx @@ -15,9 +15,6 @@ #include <CFKit/LoaderUtils.hxx> #include <Modules/CoreCG/TextRenderer.hxx> -//! Get SIGG header from formats directory. -#include <FMT/SIGG.hxx> - EXTERN_C{ #include <string.h> } @@ -138,7 +135,7 @@ namespace Boot } else { - writer.Write("NEWOSLDR: Invalid executable. (note: SIGG executables aren't loadable by default).\r"); + writer.Write("NEWOSLDR: Invalid executable.\r"); } } diff --git a/dev/ZKA/HALKit/AMD64/HalProcessor.cxx b/dev/ZKA/HALKit/AMD64/HalProcessorMgr.cxx index 24c123df..53b8b0b0 100644 --- a/dev/ZKA/HALKit/AMD64/HalProcessor.cxx +++ b/dev/ZKA/HALKit/AMD64/HalProcessorMgr.cxx @@ -10,8 +10,8 @@ #include <HALKit/AMD64/Processor.hxx> /** - * @file HalProcessor.cxx - * @brief This file is about processor specific functions (in/out/cli/std...) + * @file HalProcessorMgr.cxx + * @brief CPU Processor managers. */ namespace Kernel::HAL @@ -61,6 +61,7 @@ namespace Kernel::HAL kcout << "=================================================\r"; kcout << "Post page allocation.\r"; kcout << "=================================================\r"; + kcout << (*pt_entry & eFlagsPresent ? "Page Present." : "Page Not Present.") << endl; kcout << (*pt_entry & eFlagsRw ? "Page RW." : "Page Not RW.") << endl; kcout << (*pt_entry & eFlagsUser ? "Page User." : "Page Not User.") << endl; @@ -76,6 +77,7 @@ namespace Kernel::HAL kcout << "=================================================\r"; kcout << "Post page change.\r"; kcout << "=================================================\r"; + kcout << (*pt_entry & eFlagsPresent ? "Page Present." : "Page Not Present.") << endl; kcout << (*pt_entry & eFlagsRw ? "Page RW." : "Page Not RW.") << endl; kcout << (*pt_entry & eFlagsUser ? "Page User." : "Page Not User.") << endl; diff --git a/dev/ZKA/HALKit/AMD64/ReadMe.md b/dev/ZKA/HALKit/AMD64/ReadMe.md index 0be48c77..bb936737 100644 --- a/dev/ZKA/HALKit/AMD64/ReadMe.md +++ b/dev/ZKA/HALKit/AMD64/ReadMe.md @@ -1,4 +1,4 @@ -AMD64 Hardware Abstraction Layer +# AMD64 Hardware Abstraction Layer - Supported CPU: AMD64 CPU -- Supported Firmware: EDK 2
\ No newline at end of file +- Supported Firmware: EDK 2 diff --git a/tools/drvsign.cxx b/tools/drvsign.cxx index 95407162..ec5a6945 100644 --- a/tools/drvsign.cxx +++ b/tools/drvsign.cxx @@ -8,6 +8,7 @@ #include <iostream> #include <fstream> #include <string> +#include <cstring> #include <sstream> #include <filesystem> @@ -15,9 +16,9 @@ #define kDriverExt ".sys" #define kSignedDriverMagic " ZXD" -namespace details +namespace ZXD { - struct ZKA_DRIVER_HEADER final + struct ZXD_HEADER final { char d_binary_padding[512]; // doesn't change. @@ -38,7 +39,7 @@ namespace details return mz_blob[0] == 'M' && mz_blob[1] == 'Z'; } -} // namespace details +} // namespace ZXD /// @brief This program converts a PE32+ driver, into a custom format, the ZXD. /// @note ZXD is a format for ZKA signed drivers. @@ -48,7 +49,7 @@ int main(int argc, char* argv[]) { if (strcmp(argv[i], "/?") == 0) { - std::cout << "drvsign: ZKA ZKA Driver Tool.\n"; + std::cout << "drvsign: ZKA ZXD Driver Tool.\n"; std::cout << "drvsign: © ZKA Technologies, all rights reserved.\n"; return 0; @@ -59,7 +60,7 @@ int main(int argc, char* argv[]) !std::string(argv[1]).ends_with(kDriverExt)) return -1; - details::ZKA_DRIVER_HEADER sig{0}; + ZXD::ZXD_HEADER sig{0}; sig.d_binary_version = 1; @@ -82,7 +83,7 @@ int main(int argc, char* argv[]) std::stringstream ss; ss << if_drv.rdbuf(); - if (!details::drvsign_check_for_mz(ss.str())) + if (!ZXD::drvsign_check_for_mz(ss.str())) { std::filesystem::remove(signed_path); std::cout << "drvsign: Couldn't sign current driver, Input driver isn't a valid executable.\n"; @@ -97,7 +98,7 @@ int main(int argc, char* argv[]) sig.d_binary_checksum ^= sig.d_binary_size; - of_drv.write((char*)&sig, sizeof(details::ZKA_DRIVER_HEADER)); + of_drv.write((char*)&sig, sizeof(ZXD::ZXD_HEADER)); of_drv.write(ss.str().c_str(), ss.str().size()); std::cout << "drvsign: Signing is done, quiting, here is the key: " << sig.d_binary_checksum << ".\n"; |
