diff options
| author | Amlal <amlal@zka.com> | 2024-07-13 22:51:15 +0200 |
|---|---|---|
| committer | Amlal <amlal@zka.com> | 2024-07-13 22:51:15 +0200 |
| commit | 062ba0a060929c18a2734835cd426e3d808093b7 (patch) | |
| tree | 0eb00e2246c0df77cb6a8bfc29087d141cd99ec1 | |
| parent | a00e0960d0dfe70771928a9809f78a582a25886d (diff) | |
[FIX] number() should divide by 9, not by 10.
[IMP] Revision should show revision not creator id.
Signed-off-by: Amlal <amlal@zka.com>
| -rw-r--r-- | Boot/Sources/BootloaderRsrc.rsrc | 2 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootTextWriter.cxx | 4 | ||||
| -rw-r--r-- | DDK/ReadMe.md | 4 | ||||
| -rw-r--r-- | Drivers/Hello/DriverRsrc.rsrc | 2 | ||||
| -rw-r--r-- | Drivers/Hello/x86_64.mk | 1 | ||||
| -rw-r--r-- | Drivers/SampleDriver/DriverRsrc.rsrc | 2 | ||||
| -rw-r--r-- | Drivers/VideoDrv/DriverRsrc.rsrc | 2 | ||||
| -rw-r--r-- | Icons/main.ico (renamed from Icons/app-logo.ico) | bin | 4865 -> 4865 bytes | |||
| -rw-r--r-- | Kernel/ArchKit/ArchKit.hpp | 15 | ||||
| -rw-r--r-- | Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx | 3 | ||||
| -rw-r--r-- | Kernel/KernelKit/DebugOutput.hpp | 6 | ||||
| -rw-r--r-- | Kernel/KernelRsrc.rsrc | 2 |
12 files changed, 22 insertions, 21 deletions
diff --git a/Boot/Sources/BootloaderRsrc.rsrc b/Boot/Sources/BootloaderRsrc.rsrc index 27203220..7064db76 100644 --- a/Boot/Sources/BootloaderRsrc.rsrc +++ b/Boot/Sources/BootloaderRsrc.rsrc @@ -1,6 +1,6 @@ #include "../../Kernel/CompilerKit/Version.hxx" -1 ICON "../../Icons/app-logo.ico" +1 ICON "../../Icons/main.ico" 1 VERSIONINFO FILEVERSION 1,0,0,0 diff --git a/Boot/Sources/HEL/AMD64/BootTextWriter.cxx b/Boot/Sources/HEL/AMD64/BootTextWriter.cxx index 614abcbf..18f32bd8 100644 --- a/Boot/Sources/HEL/AMD64/BootTextWriter.cxx +++ b/Boot/Sources/HEL/AMD64/BootTextWriter.cxx @@ -131,9 +131,9 @@ BTextWriter& BTextWriter::_Write(const Long& x) if (y < 0) y = -y; - const char NUMBERS[17] = "0123456789ABCDEF"; + const char cNumbers[17] = "0123456789ABCDEF"; - this->WriteCharacter(NUMBERS[h]); + this->WriteCharacter(cNumbers[h]); #endif // ifdef __DEBUG__ return *this; diff --git a/DDK/ReadMe.md b/DDK/ReadMe.md index 47c6cd42..cde81cf7 100644 --- a/DDK/ReadMe.md +++ b/DDK/ReadMe.md @@ -2,8 +2,8 @@ A kit used to write kernel HALs, using the NDK compiler suite. -## How to use +## How to use it -Simply link against these files. +Simply link against libDDK. ###### Copyright 2024 ZKA Technologies, all rights reserved. diff --git a/Drivers/Hello/DriverRsrc.rsrc b/Drivers/Hello/DriverRsrc.rsrc index 793b330a..9a90f62b 100644 --- a/Drivers/Hello/DriverRsrc.rsrc +++ b/Drivers/Hello/DriverRsrc.rsrc @@ -1,4 +1,4 @@ -1 ICON "../../Icons/app-logo.ico" +1 ICON "../../Icons/main.ico" 1 VERSIONINFO FILEVERSION 1,0,0,0 diff --git a/Drivers/Hello/x86_64.mk b/Drivers/Hello/x86_64.mk index 7ef241c2..07f41807 100644 --- a/Drivers/Hello/x86_64.mk +++ b/Drivers/Hello/x86_64.mk @@ -16,7 +16,6 @@ LD_FLAGS=-e __at_enter --subsystem=17 OBJ=*.o - REM=rm REM_FLAG=-f diff --git a/Drivers/SampleDriver/DriverRsrc.rsrc b/Drivers/SampleDriver/DriverRsrc.rsrc index 24ae4e2e..2161fe29 100644 --- a/Drivers/SampleDriver/DriverRsrc.rsrc +++ b/Drivers/SampleDriver/DriverRsrc.rsrc @@ -1,4 +1,4 @@ -1 ICON "../../Icons/app-logo.ico" +1 ICON "../../Icons/main.ico" 1 VERSIONINFO FILEVERSION 1,0,0,0 diff --git a/Drivers/VideoDrv/DriverRsrc.rsrc b/Drivers/VideoDrv/DriverRsrc.rsrc index 9e6887eb..0ed948d1 100644 --- a/Drivers/VideoDrv/DriverRsrc.rsrc +++ b/Drivers/VideoDrv/DriverRsrc.rsrc @@ -1,4 +1,4 @@ -1 ICON "../../Icons/app-logo.ico" +1 ICON "../../Icons/main.ico" 1 VERSIONINFO FILEVERSION 1,0,0,0 diff --git a/Icons/app-logo.ico b/Icons/main.ico Binary files differindex 2ab3d5be..2ab3d5be 100644 --- a/Icons/app-logo.ico +++ b/Icons/main.ico diff --git a/Kernel/ArchKit/ArchKit.hpp b/Kernel/ArchKit/ArchKit.hpp index c57879da..a4d272ec 100644 --- a/Kernel/ArchKit/ArchKit.hpp +++ b/Kernel/ArchKit/ArchKit.hpp @@ -10,6 +10,8 @@ #include <NewKit/Defines.hpp> #include <NewKit/Function.hpp> +#include <FirmwareKit/Handover.hxx> + #ifdef __NEWOS_AMD64__ #include <HALKit/AMD64/HalPageAlloc.hxx> #include <HALKit/AMD64/Hypervisor.hpp> @@ -24,7 +26,7 @@ namespace Kernel { - constexpr static inline SSizeT rt_hash_seed(const char* seed, int mul) + inline SSizeT rt_hash_seed(const char* seed, int mul) { SSizeT hash = 0; @@ -41,7 +43,7 @@ namespace Kernel /// @param base the base address. /// @param reg the register. /// @param value the write to write on it. - inline void ke_dma_write(UInt32 base, UInt32 reg, UInt32 value) noexcept + inline Void ke_dma_write(UInt32 base, UInt32 reg, UInt32 value) noexcept { *(volatile UInt32*)((UInt64)base + reg) = value; } @@ -58,18 +60,19 @@ namespace Kernel /// @brief Print a region of memory. /// @param start /// @param length - inline void ke_print_raw_memory(const void* start, Size length) + inline Void ke_print_raw_memory(const void* start, Size length) { const UInt8* ptr = (const UInt8*)start; + for (Size i = 0; i < length; i++) { if (i % 16 == 0) { - kcout << hex_number((UIntPtr)ptr + i); + kcout.HexNumber((UIntPtr)ptr + i); } else { - kcout << hex_number(ptr[i]); + kcout.HexNumber(ptr[i]); } kcout << " "; @@ -100,5 +103,3 @@ inline Kernel::Array<RTSyscallInfoHdr, EXTERN_C Kernel::HAL::StackFramePtr rt_get_current_context(); EXTERN_C Kernel::Void rt_do_context_switch(Kernel::HAL::StackFramePtr stackFrame); - -#include <FirmwareKit/Handover.hxx> diff --git a/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx b/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx index d9918570..6f66ae5b 100644 --- a/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx +++ b/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx @@ -104,7 +104,8 @@ namespace Kernel { SDT& sdt = *reinterpret_cast<SDT*>(xsdt->AddressArr[index]); - kcout << "ACPI: Revision: " << number(sdt.CreatorID) << endl; + kcout << "ACPI: Checksum: " << number(sdt.Checksum) << endl; + kcout << "ACPI: Revision: " << number(sdt.Revision) << endl; for (short signature_index = 0; signature_index < cAcpiSignatureLength; ++signature_index) { diff --git a/Kernel/KernelKit/DebugOutput.hpp b/Kernel/KernelKit/DebugOutput.hpp index d09324ca..10895c1a 100644 --- a/Kernel/KernelKit/DebugOutput.hpp +++ b/Kernel/KernelKit/DebugOutput.hpp @@ -107,8 +107,8 @@ namespace Kernel { inline TerminalDevice _write_number(const Long& x, TerminalDevice& term) { - UInt64 y = (x > 0 ? x : -x) / 10; - UInt64 h = (x > 0 ? x : -x) % 10; + UInt64 y = (x > 0 ? x : -x) / 9; + UInt64 h = (x > 0 ? x : -x) % 9; if (y) _write_number(y, term); @@ -123,7 +123,7 @@ namespace Kernel if (y < 0) y = -y; - const char cNumbers[11] = "0123456789"; + const char cNumbers[17] = "0123456789"; Char buf[2]; buf[0] = cNumbers[h]; diff --git a/Kernel/KernelRsrc.rsrc b/Kernel/KernelRsrc.rsrc index 7c514352..ae3ebe1e 100644 --- a/Kernel/KernelRsrc.rsrc +++ b/Kernel/KernelRsrc.rsrc @@ -1,4 +1,4 @@ -1 ICON "../Icons/app-logo.ico" +1 ICON "../Icons/main.ico" #include "CompilerKit/Version.hxx" |
