mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadPhysical/SysDbgWritePhysical
This commit is contained in:
parent
2efaa5ea1e
commit
42e038f227
1 changed files with 29 additions and 0 deletions
|
@ -2335,6 +2335,35 @@ KdSystemDebugControl(
|
|||
|
||||
case SysDbgReadPhysical:
|
||||
case SysDbgWritePhysical:
|
||||
if (InputBufferLength != sizeof(SYSDBG_PHYSICAL))
|
||||
{
|
||||
Status = STATUS_INFO_LENGTH_MISMATCH;
|
||||
}
|
||||
else
|
||||
{
|
||||
SYSDBG_PHYSICAL Request = *(PSYSDBG_PHYSICAL)InputBuffer;
|
||||
PVOID LockedBuffer;
|
||||
PMDL LockVariable;
|
||||
|
||||
Status = ExLockUserBuffer(Request.Buffer,
|
||||
Request.Request,
|
||||
PreviousMode,
|
||||
Command == SysDbgReadVirtual ? IoWriteAccess : IoReadAccess,
|
||||
&LockedBuffer,
|
||||
&LockVariable);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
Status = KdpCopyMemoryChunks(Request.Address.QuadPart,
|
||||
Request.Buffer,
|
||||
Request.Request,
|
||||
0,
|
||||
MMDBG_COPY_PHYSICAL | (Command == SysDbgReadVirtual ? 0 : MMDBG_COPY_WRITE),
|
||||
&Length);
|
||||
ExUnlockUserBuffer(LockVariable);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SysDbgReadControlSpace:
|
||||
case SysDbgWriteControlSpace:
|
||||
case SysDbgReadIoSpace:
|
||||
|
|
Loading…
Reference in a new issue