Yes, certainly it is really bad idea: But I need update the configuration of
a SuperIO-chip (setup watchdog timer), so it is necessary.
On UP-system it is really simple, but on SMP system an interrupts must be
disabled synchronously on all processors. Otherwise any interrupt raised on
the “live” CPU may cause an IPI (Inter-Processor Interrupt) to the other
“frozen” CPU, and the system will hang. Unfortunately NT kernel hides IPI
inside, and doesn’t have suitable facility to do such task on SMP.
Currently I implemented this by DPCs with interlocked-frozen loop, but it
takes up to 100-1000 iterations on the each CPU for entering into target
“irq-safe” mode. Perhaps someone knows the better solution?