]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Dxe/Library.h
Clean up DxeCore to remove duplicate memory allocation & device path utility services...
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Library.h
1 /** @file
2 Internal functions shared in DxeCore module.
3
4 Copyright (c) 2006 - 2008, Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _DXE_LIBRARY_H_
16 #define _DXE_LIBRARY_H_
17
18
19
20 /**
21 Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid.
22
23 @param Value Describes the class/subclass/operation of the
24 hardware or software entity that the Status Code
25 relates to.
26
27 **/
28 VOID
29 CoreReportProgressCode (
30 IN EFI_STATUS_CODE_VALUE Value
31 );
32
33
34 /**
35 Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid,
36 with a handle as additional information.
37
38 @param Value Describes the class/subclass/operation of the
39 hardware or software entity that the Status Code
40 relates to.
41 @param Handle Additional information.
42
43 **/
44 VOID
45 CoreReportProgressCodeSpecific (
46 IN EFI_STATUS_CODE_VALUE Value,
47 IN EFI_HANDLE Handle
48 );
49
50
51 /**
52 Raising to the task priority level of the mutual exclusion
53 lock, and then acquires ownership of the lock.
54
55 @param Lock The lock to acquire
56
57 @return Lock owned
58
59 **/
60 VOID
61 CoreAcquireLock (
62 IN EFI_LOCK *Lock
63 );
64
65
66 /**
67 Initialize a basic mutual exclusion lock. Each lock
68 provides mutual exclusion access at it's task priority
69 level. Since there is no-premption (at any TPL) or
70 multiprocessor support, acquiring the lock only consists
71 of raising to the locks TPL.
72
73 @param Lock The EFI_LOCK structure to initialize
74
75 @retval EFI_SUCCESS Lock Owned.
76 @retval EFI_ACCESS_DENIED Reentrant Lock Acquisition, Lock not Owned.
77
78 **/
79 EFI_STATUS
80 CoreAcquireLockOrFail (
81 IN EFI_LOCK *Lock
82 );
83
84
85 /**
86 Releases ownership of the mutual exclusion lock, and
87 restores the previous task priority level.
88
89 @param Lock The lock to release
90
91 @return Lock unowned
92
93 **/
94 VOID
95 CoreReleaseLock (
96 IN EFI_LOCK *Lock
97 );
98
99
100 /**
101 Create a protocol notification event and return it.
102
103 @param ProtocolGuid Protocol to register notification event on.
104 @param NotifyTpl Maximum TPL to signal the NotifyFunction.
105 @param NotifyFunction EFI notification routine.
106 @param NotifyContext Context passed into Event when it is created.
107 @param Registration Registration key returned from
108 RegisterProtocolNotify().
109 @param SignalFlag Boolean value to decide whether kick the event after
110 register or not.
111
112 @return The EFI_EVENT that has been registered to be signaled when a ProtocolGuid
113 is added to the system.
114
115 **/
116 EFI_EVENT
117 CoreCreateProtocolNotifyEvent (
118 IN EFI_GUID *ProtocolGuid,
119 IN EFI_TPL NotifyTpl,
120 IN EFI_EVENT_NOTIFY NotifyFunction,
121 IN VOID *NotifyContext,
122 OUT VOID **Registration,
123 IN BOOLEAN SignalFlag
124 );
125
126 #endif