Log in

View Full Version : BPM on multiple CPU system


crUsAdEr
April 17th, 2004, 16:57
Hi folks,

I myself do not have a multiple CPU rig but was just wondering how ntice handle BPMs on those boxes... does it set DRx on all CPU to the same breakpoints or does it uses DRx on one CPU only? I think it is likely the former but there is no way to verify... hence if anyone with Multiple CPU, hyperthreading perhaps can help me check if DRx on all CPUs are set to the same breakpoint? You know the drill.. use "CPU" command after a couple of BPM?

Thanks,
crUs

tgodd
April 17th, 2004, 21:21
Each processor has it's own IDT hence each processors break points would have to be set.

i.e. proc1-dr1 gets set as well as proc2-dr1.

This is because it could never be pre-determined which
processor thread the breakpoint will occur.

crUsAdEr
April 18th, 2004, 03:42
Hi tgodd,

Thanks for the reply... u r POSITIVELY sure about this?
I thought so too but i just want someone with Multiple CPU to verify..

tgodd
April 18th, 2004, 08:41
KDPC Alt_Hook[64]; // DPC Object
// Dpc routine to call idt setup again
VOID CallInt2(IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SystemContext1,
IN PVOID SystemContext2)

{
ASM_Init_Routine(); // Call ASM to do Debug code
return;
}

//Code snippet to setup break point registers on each cpu.
Proc_Num = *KeNumberProcessors;
for ( i = 0 ; i < Proc_Num ; i++ )
{
KeInitializeDpc(&Alt_Hook[I],CallInt2,pDriverObject);
KeSetTargetProcessorDpc(&Alt_Hook[I],i);
KeInsertQueueDpc(&Alt_Hook[I],NULL,NULL);
}


Here is a code snippet on how this is done.