summaryrefslogtreecommitdiff
path: root/EDK/Foundation/Core/Dxe/Misc/DebugMask.h
blob: 18dbef557a103325ee8b963c1f0de1cbe55c25c5 (plain)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/*++

Copyright (c) 2004 - 2005, Intel Corporation                                                         
All rights reserved. This program and the accompanying materials                          
are licensed and made available under the terms and conditions of the BSD License         
which accompanies this distribution.  The full text of the license may be found at        
http://opensource.org/licenses/bsd-license.php                                            
                                                                                          
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             

Module Name:

  DebugMask.h
    
Abstract:


--*/

#ifndef __DEBUG_MASK_INFO_H__
#define __DEBUG_MASK_INFO_H__

#include EFI_PROTOCOL_CONSUMER (DebugMask)

//
// local type definitions
//
#define DEBUGMASK_PRIVATE_DATA_SIGNATURE  EFI_SIGNATURE_32('D','M','S','K')

//
// Private structure used by driver
//
typedef struct {
  UINT32                            Signature;
  UINTN                             ImageDebugMask;
  EFI_DEBUG_MASK_PROTOCOL           DebugMaskInterface;
}DEBUG_MASK_PRIVATE_DATA;

#define DEBUG_MASK_PRIVATE_DATA_FROM_THIS(a) \
  CR(a, DEBUG_MASK_PRIVATE_DATA, DebugMaskInterface, DEBUGMASK_PRIVATE_DATA_SIGNATURE)

//
// Internal DebugMask Procotol Install/Uninstall Function
//
EFI_STATUS
InstallDebugMaskProtocol (
  IN EFI_HANDLE      ImageHandle
  )
/*++

Routine Description:

  Install debug mask protocol on an image handle.

Arguments:

  ImageHandle     - Image handle which debug mask protocol will install on

Returns:

  EFI_INVALID_PARAMETER   - Invalid image handle
  
  EFI_OUT_OF_RESOURCES    - No enough buffer could be allocated
  
  EFI_SUCCESS             - Debug mask protocol successfully installed

--*/
;
  
//
// Internal DebugMask Procotol Install/Uninstall Function
//
EFI_STATUS
InstallCoreDebugMaskProtocol (
  IN EFI_HANDLE      ImageHandle
  )
/*++

Routine Description:

  Install debug mask protocol on Dxe Core.

Arguments:

  ImageHandle     - Image handle which debug mask protocol will install on

Returns:

  EFI_INVALID_PARAMETER   - Invalid image handle
  
  EFI_OUT_OF_RESOURCES    - No enough buffer could be allocated
  
  EFI_SUCCESS             - Debug mask protocol successfully installed

--*/
;
  
EFI_STATUS
UninstallDebugMaskProtocol (
  IN EFI_HANDLE      ImageHandle
  )
/*++

Routine Description:

  Uninstall debug mask protocol on an image handle.

Arguments:

  ImageHandle     - Image handle which debug mask protocol will uninstall on

Returns:

  EFI_INVALID_PARAMETER   - Invalid image handle
  
  EFI_SUCCESS             - Debug mask protocol successfully uninstalled

--*/
;

#endif