From 38a534c90e682bd4ce3d176127520f0ff513fb11 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 13 May 2025 23:49:28 +0200 Subject: feat(kernel): expand KDBG packet structure, and prefix hexadecimal numbers with 0x100, instead of 100h. Signed-off-by: Amlal El Mahrouss --- dev/ddk/DDKKit/ifs.h | 2 +- dev/ddk/DDKKit/macros.h | 2 +- dev/kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc | 3 ++- dev/kernel/HALKit/AMD64/HalDebugPort.cc | 4 ++-- dev/kernel/KernelKit/CoreProcessScheduler.h | 7 +++++++ dev/kernel/KernelKit/DebugOutput.h | 10 ++++++---- dev/user/SystemCalls.h | 6 +++--- 7 files changed, 22 insertions(+), 12 deletions(-) (limited to 'dev') diff --git a/dev/ddk/DDKKit/ifs.h b/dev/ddk/DDKKit/ifs.h index 46c13be4..f03ed53c 100644 --- a/dev/ddk/DDKKit/ifs.h +++ b/dev/ddk/DDKKit/ifs.h @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright Amlal El Mahrouss. + Copyright 2025 Amlal El Mahrouss, all right reserved. FILE: ifs.h PURPOSE: IFS model base header. diff --git a/dev/ddk/DDKKit/macros.h b/dev/ddk/DDKKit/macros.h index 6de03ae0..9b7b3d50 100644 --- a/dev/ddk/DDKKit/macros.h +++ b/dev/ddk/DDKKit/macros.h @@ -45,4 +45,4 @@ #ifndef __NEOSKRNL__ #error !!! Do not include header in EL0/Ring 3 mode !!! -#endif // __MINOSKRNL__ \ No newline at end of file +#endif // __NEOSKRNL__ \ No newline at end of file diff --git a/dev/kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc b/dev/kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc index c72a109a..3a380a42 100644 --- a/dev/kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc +++ b/dev/kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc @@ -139,7 +139,8 @@ EXTERN_C Kernel::Void idt_handle_breakpoint(Kernel::UIntPtr rip) { kIsScheduling = NO; - while (YES); + while (YES) + ; } kIsScheduling = NO; diff --git a/dev/kernel/HALKit/AMD64/HalDebugPort.cc b/dev/kernel/HALKit/AMD64/HalDebugPort.cc index e7448aa3..105fcf47 100644 --- a/dev/kernel/HALKit/AMD64/HalDebugPort.cc +++ b/dev/kernel/HALKit/AMD64/HalDebugPort.cc @@ -13,7 +13,7 @@ // after that we have start of additional data. namespace Kernel { -void rt_debug_listen(DebuggerPortHeader* theHook) noexcept { - NE_UNUSED(theHook); +void rt_debug_listen(KernelDebugHeader* the_hdr) noexcept { + NE_UNUSED(the_hdr); } } // namespace Kernel diff --git a/dev/kernel/KernelKit/CoreProcessScheduler.h b/dev/kernel/KernelKit/CoreProcessScheduler.h index 830f17f9..4fd6321c 100644 --- a/dev/kernel/KernelKit/CoreProcessScheduler.h +++ b/dev/kernel/KernelKit/CoreProcessScheduler.h @@ -22,8 +22,15 @@ namespace Kernel { class USER_PROCESS; class KERNEL_TASK; +class UserProcessScheduler; class UserProcessTeam; +template +struct PROCESS_HEAP_TREE; + +template +struct PROCESS_FILE_TREE; + enum { kInvalidTreeKind = 0U, kRedTreeKind = 100U, diff --git a/dev/kernel/KernelKit/DebugOutput.h b/dev/kernel/KernelKit/DebugOutput.h index f6cfa027..cf9378a9 100644 --- a/dev/kernel/KernelKit/DebugOutput.h +++ b/dev/kernel/KernelKit/DebugOutput.h @@ -158,8 +158,8 @@ namespace Detail { inline TerminalDevice hex_number(const Long& x) { TerminalDevice self = TerminalDevice::The(); + self << "0x"; Detail::_write_number_hex(x, self); - self.operator<<("h"); return self; } @@ -184,10 +184,12 @@ inline constexpr SizeT kDebugTypeLen = 256U; typedef Char rt_debug_type[kDebugTypeLen]; -class DebuggerPortHeader final { +/// @brief KDBG's packet header. +class KernelDebugHeader final { public: - Int16 fPort; - Int16 fPortBsy; + Int16 fPort; + Int16 fPortKind; + rt_debug_type fPortBlob; }; inline TerminalDevice& operator<<(TerminalDevice& src, const Long& num) { diff --git a/dev/user/SystemCalls.h b/dev/user/SystemCalls.h index 5bbe2f26..61021a01 100644 --- a/dev/user/SystemCalls.h +++ b/dev/user/SystemCalls.h @@ -7,8 +7,8 @@ Purpose: System Call Interface. ------------------------------------------- */ -#ifndef SCI_SCI_H -#define SCI_SCI_H +#ifndef SCI_SYSTEM_CALLS_H +#define SCI_SYSTEM_CALLS_H #include @@ -362,4 +362,4 @@ IMPORT_C Char* StrFmt(const Char* fmt, ...); IMPORT_C UInt64 StrMathToNumber(const Char* in, const Char** endp, const SInt16 base); -#endif // ifndef SCI_SCI_H +#endif // ifndef SCI_SYSTEM_CALLS_H -- cgit v1.2.3