Author: tkreuzer
Date: Wed Oct 28 23:38:42 2009
New Revision: 43820
URL:
http://svn.reactos.org/svn/reactos?rev=43820&view=rev
Log:
partly implement KdpSysWriteControlSpace
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdsup.c
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdsup.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdsup.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdsup.c [iso-8859-1] Wed Oct 28
23:38:42 2009
@@ -226,9 +226,28 @@
IN ULONG Length,
OUT PULONG ActualLength)
{
- UNIMPLEMENTED;
- while (TRUE);
- return STATUS_UNSUCCESSFUL;
+ PVOID ControlStart;
+ PKPRCB Prcb = KiProcessorBlock[Processor];
+ PKIPCR Pcr = CONTAINING_RECORD(Prcb, KIPCR, Prcb);
+
+ switch (BaseAddress)
+ {
+ case AMD64_DEBUG_CONTROL_SPACE_KSPECIAL:
+ /* Copy SpecialRegisters */
+ ControlStart = &Prcb->ProcessorState.SpecialRegisters;
+ *ActualLength = sizeof(KSPECIAL_REGISTERS);
+ break;
+
+ default:
+ *ActualLength = 0;
+ ASSERT(FALSE);
+ return STATUS_UNSUCCESSFUL;
+ }
+
+ /* Copy the memory */
+ RtlCopyMemory(ControlStart, Buffer, min(Length, *ActualLength));
+
+ return STATUS_SUCCESS;
}
NTSTATUS