blob: 17bdaaba5707dcb594f412e2f1d848013d0c9f5f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
// TITLE("PCR access")
//++
//
// Copyright (c) 1995 Microsoft Corporation
//
// Module Name:
//
// pcr.s
//
// Abstract:
//
// This module implements the routines for accessing PCR fields.
// Specifically, routines that need multiple-instruction access
// to the PCR and its related structures, and need to run with
// interrupts disabled.
//
// Author:
//
// Chuck Lenzmeier (chuckl) 5-Apr-95
//
// Environment:
//
// Kernel mode only.
//
// Revision History:
//
//--
#include "ksppc.h"
SBTTL("KeIsExecutingDpc")
//++
//
// BOOLEAN
// KeIsExecutingDpc (
// VOID
// )
//
// Routine Description:
//
// This function returns the DPC Active flag on the current processor.
//
// Arguments:
//
// None.
//
// Return Value:
//
// Current DPC Active flag. This flag indicates if a DPC routine is
// currently running on this processor.
//
//--
LEAF_ENTRY(KeIsExecutingDpc)
#if !defined(NT_UP)
DISABLE_INTERRUPTS(r9, r8)
#endif
//
// Get the DPC active indicator and return a BOOLEAN. Note that
// DpcRoutineActive holds 0 or some nonzero value (usually the
// stack pointer), so it does not conform to the C TRUE/FALSE values.
//
lwz r4, KiPcr+PcPrcb(r0) // get PRCB address
li r3, FALSE // assume DPC not active
lwz r4, PbDpcRoutineActive(r4) // get DPC active indicator
cmpwi r4, 0 // DPC active?
beq kied10 // branch if not
li r3, TRUE // indicate DPC active
kied10:
#if !defined(NT_UP)
ENABLE_INTERRUPTS(r9)
#endif
LEAF_EXIT(KeIsExecutingDpc) // return
|