3 * FILE: ntoskrnl/ke/profile.c
4 * PURPOSE: Kernel Device/Settings Functions
5 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
12 #include <internal/debug.h>
19 KeFindConfigurationEntry(
22 IN CONFIGURATION_TYPE Type
,
26 /* Start Search at Root */
27 return KeFindConfigurationNextEntry(Unknown
, Class
, Type
, RegKey
, NULL
);
35 KeFindConfigurationNextEntry(
38 IN CONFIGURATION_TYPE Type
,
54 IN BOOLEAN CurrentCpuOnly
58 PKPROCESS Process
= NULL
;
61 /* Raise the IRQL for the TB Flush */
62 OldIrql
= KeRaiseIrqlToSynchLevel();
64 /* All CPUs need to have the TB flushed. */
65 if (CurrentCpuOnly
== FALSE
) {
66 Pcr
= KeGetCurrentKPCR();
68 /* How many CPUs is our caller using? */
69 Process
= Pcr
->PrcbData
.CurrentThread
->ApcState
.Process
;
71 /* More then one, so send an IPI */
72 if (Process
->ActiveProcessors
> 1) {
77 /* Flush the TB for the Current CPU */
81 if (CurrentCpuOnly
== FALSE
) {
82 /* Did we send an IPI? If so, wait for completion */
83 if (Process
->ActiveProcessors
> 1) {
85 } while (Pcr
->PrcbData
.TargetSet
!= 0);
89 /* FIXME: According to MSKB, we should increment a counter? */
91 /* Return to Original IRQL */
105 KiDmaIoCoherency
= Coherency
;
113 KeRemoveByKeyDeviceQueueIfBusy (
114 IN PKDEVICE_QUEUE DeviceQueue
,
127 KeQueryActiveProcessors (
131 return KeActiveProcessors
;
140 KeSaveStateForHibernate(