reactos/ntoskrnl/kd64
Hermès Bélusca-Maïto 1a02d3306b
[NTOS:KD64] Fix usage of the debugging banner code, based on when KdInitSystem() is called (#7540)
- The debugging banner helpers *CANNOT* be in the INIT section, because
  it is possible for KdInitSystem() to enable the debugger **MUCH LATER**
  after boot time. (Reverts part of commit f239ca0f0 (r72922).)

  This can happen in two situations:

  * When the debugger is in CRASHDEBUG mode, i.e. initialized at boot
    time but not immediately enabled, and a BSOD happens later that
    enables the debugger with a `KdInitSystem(0, NULL)` call.

  * When the debugger was possibly manually disabled with a
    KdDisableDebugger() call, then later re-enabled with a
    KdEnableDebugger() call.

- In the same cases as described above, the KeLoaderBlock is freed after
  boot time. Thus, KdpGetMemorySizeInMBs() cannot use it and enumerate
  the MemoryDescriptors to evaluate the number of physical memory pages
  available on the system. Instead, we can use what the memory manager
  has already computed, since the latter is already initialized by now.

These two fixes avoid (invisible) crashes when (re-)enabling
the debugger at non-boot run time.
2024-12-03 22:13:57 +01:00
..
amd64 [NTOS:KD64] kdx64.c: Implement KdpAllowDisable() the same as in x86 (#7538) 2024-12-03 19:02:28 +01:00
arm [NTOS:KD64] Only use the UNIMPLEMENTED macro in the debugger's KdpSys* helpers. 2024-11-21 22:34:37 +01:00
i386 [NTOS:KD64] kdx86.c: Fix Dr7 check to verify whether debugger disabling is allowed (#7538) 2024-12-03 19:02:21 +01:00
kdapi.c [NTOS:KE/x64] Implement Kd processor switching 2024-04-23 15:50:06 +02:00
kdbreak.c
kddata.c [NTOS:KE/x64] Implement Kd processor switching 2024-04-23 15:50:06 +02:00
kdinit.c [NTOS:KD64] Fix usage of the debugging banner code, based on when KdInitSystem() is called (#7540) 2024-12-03 22:13:57 +01:00
kdlock.c [NTOS:KD64] KdPollBreakIn(): Use the KeRestoreInterrupts() inline. 2021-09-12 18:16:13 +02:00
kdprint.c [NTOS:KD64] Format string of KdpDprintf can be const. 2023-03-22 19:57:59 +01:00
kdtrap.c [NTOS:KDBG] Minor code style for the following commits 2024-10-14 22:51:51 +02:00