]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/UefiLib.h
1) Added BIT0, BIT1, …, BIT63 to the Base Defines
[mirror_edk2.git] / MdePkg / Include / Library / UefiLib.h
CommitLineData
878ddf1f 1/** @file\r
2 MDE UEFI library functions and macros\r
3\r
ca21f1a2 4 Copyright (c) 2006 - 2007, Intel Corporation \r
878ddf1f 5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13**/\r
14\r
15#ifndef __UEFI_LIB_H__\r
16#define __UEFI_LIB_H__\r
17\r
18//\r
19// Unicode String Table\r
20//\r
21typedef struct {\r
22 CHAR8 *Language;\r
23 CHAR16 *UnicodeString;\r
24} EFI_UNICODE_STRING_TABLE;\r
25\r
26//\r
27// EFI Lock Status\r
28//\r
29typedef enum {\r
30 EfiLockUninitialized = 0,\r
31 EfiLockReleased = 1,\r
32 EfiLockAcquired = 2\r
33} EFI_LOCK_STATE;\r
34\r
35//\r
36// EFI Lock \r
37//\r
38typedef struct {\r
39 EFI_TPL Tpl;\r
40 EFI_TPL OwnerTpl;\r
41 EFI_LOCK_STATE Lock;\r
42} EFI_LOCK;\r
43\r
44\r
45/**\r
46 This function searches the list of configuration tables stored in the EFI System \r
47 Table for a table with a GUID that matches TableGuid. If a match is found, \r
48 then a pointer to the configuration table is returned in Table, and EFI_SUCCESS \r
49 is returned. If a matching GUID is not found, then EFI_NOT_FOUND is returned.\r
50\r
51 @param TableGuid Pointer to table's GUID type..\r
52 @param Table Pointer to the table associated with TableGuid in the EFI System Table.\r
53\r
54 @retval EFI_SUCCESS A configuration table matching TableGuid was found.\r
55 @retval EFI_NOT_FOUND A configuration table matching TableGuid could not be found.\r
56\r
57**/\r
58EFI_STATUS\r
59EFIAPI\r
60EfiGetSystemConfigurationTable ( \r
61 IN EFI_GUID *TableGuid,\r
62 OUT VOID **Table\r
63 );\r
64\r
65/**\r
66 This function causes the notification function to be executed for every protocol \r
67 of type ProtocolGuid instance that exists in the system when this function is \r
68 invoked. In addition, every time a protocol of type ProtocolGuid instance is \r
69 installed or reinstalled, the notification function is also executed.\r
70\r
71 @param ProtocolGuid Supplies GUID of the protocol upon whose installation the event is fired.\r
72 @param NotifyTpl Supplies the task priority level of the event notifications.\r
73 @param NotifyFunction Supplies the function to notify when the event is signaled.\r
74 @param NotifyContext The context parameter to pass to NotifyFunction.\r
75 @param Registration A pointer to a memory location to receive the registration value.\r
76\r
77 @return The notification event that was created. \r
78\r
79**/\r
80EFI_EVENT\r
81EFIAPI\r
82EfiCreateProtocolNotifyEvent(\r
83 IN EFI_GUID *ProtocolGuid,\r
84 IN EFI_TPL NotifyTpl,\r
85 IN EFI_EVENT_NOTIFY NotifyFunction,\r
86 IN VOID *NotifyContext, OPTIONAL\r
13c84604 87 OUT VOID **Registration\r
878ddf1f 88 );\r
89\r
90/**\r
91 This function creates an event using NotifyTpl, NoifyFunction, and NotifyContext.\r
92 This event is signaled with EfiNamedEventSignal(). This provide the ability for \r
93 one or more listeners on the same event named by the GUID specified by Name.\r
94\r
95 @param Name Supplies GUID name of the event.\r
96 @param NotifyTpl Supplies the task priority level of the event notifications.\r
97 @param NotifyFunction Supplies the function to notify when the event is signaled.\r
98 @param NotifyContext The context parameter to pass to NotifyFunction. \r
99 @param Registration A pointer to a memory location to receive the registration value.\r
100\r
101 @retval EFI_SUCCESS A named event was created.\r
102 @retval EFI_OUT_OF_RESOURCES There are not enough resource to create the named event.\r
103\r
104**/\r
105EFI_STATUS\r
106EFIAPI\r
107EfiNamedEventListen (\r
108 IN CONST EFI_GUID *Name,\r
109 IN EFI_TPL NotifyTpl,\r
110 IN EFI_EVENT_NOTIFY NotifyFunction,\r
111 IN CONST VOID *NotifyContext, OPTIONAL\r
13c84604 112 OUT VOID *Registration OPTIONAL\r
878ddf1f 113 );\r
114\r
115/**\r
116 This function signals the named event specified by Name. The named event must \r
117 have been created with EfiNamedEventListen().\r
118\r
119 @param Name Supplies GUID name of the event.\r
120\r
121 @retval EFI_SUCCESS A named event was signaled.\r
122 @retval EFI_OUT_OF_RESOURCES There are not enough resource to signal the named event.\r
123\r
124**/\r
125EFI_STATUS\r
126EFIAPI\r
127EfiNamedEventSignal (\r
128 IN CONST EFI_GUID *Name\r
129 );\r
130\r
d958721a 131/** \r
132 Returns the current TPL.\r
133\r
134 This function returns the current TPL. There is no EFI service to directly \r
135 retrieve the current TPL. Instead, the RaiseTPL() function is used to raise \r
136 the TPL to TPL_HIGH_LEVEL. This will return the current TPL. The TPL level \r
137 can then immediately be restored back to the current TPL level with a call \r
138 to RestoreTPL().\r
139\r
140 @param VOID\r
141\r
142 @retvale EFI_TPL The current TPL.\r
143\r
144**/\r
145EFI_TPL\r
146EFIAPI\r
147EfiGetCurrentTpl (\r
148 VOID\r
149 );\r
150\r
878ddf1f 151/**\r
152 This function initializes a basic mutual exclusion lock to the released state \r
153 and returns the lock. Each lock provides mutual exclusion access at its task \r
154 priority level. Since there is no preemption or multiprocessor support in EFI,\r
155 acquiring the lock only consists of raising to the locks TPL.\r
156\r
157 @param Lock A pointer to the lock data structure to initialize.\r
158 @param Priority EFI TPL associated with the lock.\r
159\r
160 @return The lock.\r
161\r
162**/\r
163EFI_LOCK *\r
164EFIAPI\r
165EfiInitializeLock (\r
166 IN OUT EFI_LOCK *Lock,\r
167 IN EFI_TPL Priority\r
168 );\r
169\r
170/**\r
171 This macro initializes the contents of a basic mutual exclusion lock to the \r
172 released state. Each lock provides mutual exclusion access at its task \r
173 priority level. Since there is no preemption or multiprocessor support in EFI,\r
174 acquiring the lock only consists of raising to the locks TPL.\r
175\r
176 @param Lock A pointer to the lock data structure to initialize.\r
177 @param Priority The task priority level of the lock.\r
178\r
179 @return The lock.\r
180\r
181**/\r
182#define EFI_INITIALIZE_LOCK_VARIABLE(Priority) \\r
183 {Priority, EFI_TPL_APPLICATION, EfiLockReleased }\r
184\r
185\r
186/**\r
187 \r
188 Macro that calls DebugAssert() if an EFI_LOCK structure is not in the locked state.\r
189\r
190 If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set, \r
191 then this macro evaluates the EFI_LOCK structure specified by Lock. If Lock \r
192 is not in the locked state, then DebugAssert() is called passing in the source \r
193 filename, source line number, and Lock.\r
194\r
195 If Lock is NULL, then ASSERT().\r
196\r
197 @param LockParameter A pointer to the lock to acquire.\r
198\r
199**/\r
200#define ASSERT_LOCKED(LockParameter) \\r
201 do { \\r
202 if (DebugAssertEnabled ()) { \\r
203 ASSERT (LockParameter != NULL); \\r
204 if ((LockParameter)->Lock != EfiLockAcquired) { \\r
205 _ASSERT (LockParameter not locked); \\r
206 } \\r
207 } \\r
208 } while (FALSE)\r
209\r
210\r
211/**\r
511710d6 212 This function raises the system's current task priority level to the task \r
878ddf1f 213 priority level of the mutual exclusion lock. Then, it places the lock in the \r
214 acquired state.\r
215\r
216 @param Priority The task priority level of the lock.\r
217\r
218**/\r
219VOID\r
220EFIAPI\r
221EfiAcquireLock (\r
222 IN EFI_LOCK *Lock\r
223 );\r
224\r
225/**\r
511710d6 226 This function raises the system's current task priority level to the task \r
878ddf1f 227 priority level of the mutual exclusion lock. Then, it attempts to place the \r
228 lock in the acquired state.\r
229\r
230 @param Lock A pointer to the lock to acquire.\r
231\r
232 @retval EFI_SUCCESS The lock was acquired.\r
233 @retval EFI_ACCESS_DENIED The lock could not be acquired because it is already owned.\r
234\r
235**/\r
236EFI_STATUS\r
237EFIAPI\r
238EfiAcquireLockOrFail (\r
239 IN EFI_LOCK *Lock\r
240 );\r
241\r
242/**\r
243 This function transitions a mutual exclusion lock from the acquired state to \r
511710d6 244 the released state, and restores the system's task priority level to its \r
878ddf1f 245 previous level.\r
246\r
247 @param Lock A pointer to the lock to release.\r
248\r
249**/\r
250VOID\r
251EFIAPI\r
252EfiReleaseLock (\r
253 IN EFI_LOCK *Lock\r
254 );\r
255\r
ca21f1a2 256/**
257 Tests whether a controller is managed by a specific driver.
258
259 This function tests whether a specific driver manages ControllerHandle by\r
260 opening on DriverBindingHandle a protocol specified by ProtocolGuid with\r
261 attribute EFI_OPEN_PROTOCOL_BY_DRIVER. This library function is used to\r
262 implement the Component Name Protocol for EFI Drivers.\r
263 If ProtocolGuid is NULL, then ASSERT().\r
264
265 @param ControllerHandle A handle for a controller to test.
266 @param DriverBindingHandle Specifies the driver binding handle for the
267 driver.
268 @param ProtocolGuid Supplies GUID for the protocol opened by the
269 driver on the controller.
270
271 @retval EFI_SUCCESS ControllerHandle is managed by the specific
272 driver.
273 @retval EFI_UNSUPPORTED ControllerHandle is not managed by the specific
274 driver.
275
276**/\r
277EFI_STATUS\r
278EFIAPI\r
279EfiTestManagedDevice (\r
280 IN CONST EFI_HANDLE ControllerHandle,\r
281 IN CONST EFI_HANDLE DriverBindingHandle,\r
282 IN CONST EFI_GUID *ProtocolGuid\r
283 );\r
284\r
285/**
286 Tests whether a child handle is a children device of the controller.
287
288 This function tests whether ChildHandle is one of the children of
289 ControllerHandle which are consuming a protocol specified by ProtocolGuid
290 with the attribute bit EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER set. This
291 library function is used to implement the Component Name Protocol for EFI
292 Drivers.
293 If ProtocolGuid is NULL, then ASSERT().
294
295 @param ControllerHandle A handle for a (parent) controller to test.
296 @param ChildHandle A child handle to test.
297 @param ConsumsedGuid Supplies GUID for the protocol consumed by
298 children from controller.
299
300 @retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle.
301 @retval EFI_UNSUPPORTED ChildHandle is not a child of the
302 ControllerHandle.
303
304**/\r
305EFI_STATUS\r
306EFIAPI\r
307EfiTestChildHandle (\r
308 IN CONST EFI_HANDLE ControllerHandle,\r
309 IN CONST EFI_HANDLE ChildHandle,\r
310 IN CONST EFI_GUID *ProtocolGuid\r
311 );\r
312\r
878ddf1f 313/**\r
314 This function looks up a Unicode string in UnicodeStringTable. If Language is \r
315 a member of SupportedLanguages and a Unicode string is found in UnicodeStringTable\r
316 that matches the language code specified by Language, then it is returned in \r
317 UnicodeString.\r
318\r
319 @param Language A pointer to the ISO 639-2 language code for the \r
320 Unicode string to look up and return.\r
321 @param SupportedLanguages A pointer to the set of ISO 639-2 language codes \r
322 that the Unicode string table supports. Language \r
323 must be a member of this set.\r
324 @param UnicodeStringTable A pointer to the table of Unicode strings.\r
325 @param UnicodeString A pointer to the Unicode string from UnicodeStringTable\r
326 that matches the language specified by Language.\r
327\r
328 @retval EFI_SUCCESS The Unicode string that matches the language \r
329 specified by Language was found\r
330 in the table of Unicoide strings UnicodeStringTable, \r
331 and it was returned in UnicodeString.\r
332 @retval EFI_INVALID_PARAMETER Language is NULL.\r
333 @retval EFI_INVALID_PARAMETER UnicodeString is NULL.\r
334 @retval EFI_UNSUPPORTED SupportedLanguages is NULL.\r
335 @retval EFI_UNSUPPORTED UnicodeStringTable is NULL.\r
336 @retval EFI_UNSUPPORTED The language specified by Language is not a \r
337 member of SupportedLanguages.\r
338 @retval EFI_UNSUPPORTED The language specified by Language is not \r
339 supported by UnicodeStringTable.\r
340\r
341**/\r
342EFI_STATUS\r
343EFIAPI\r
344LookupUnicodeString (\r
345 IN CONST CHAR8 *Language,\r
346 IN CONST CHAR8 *SupportedLanguages,\r
347 IN CONST EFI_UNICODE_STRING_TABLE *UnicodeStringTable,\r
348 OUT CHAR16 **UnicodeString\r
349 );\r
350\r
351/**\r
352 This function adds a Unicode string to UnicodeStringTable.\r
353 If Language is a member of SupportedLanguages then UnicodeString is added to \r
354 UnicodeStringTable. New buffers are allocated for both Language and \r
355 UnicodeString. The contents of Language and UnicodeString are copied into \r
356 these new buffers. These buffers are automatically freed when \r
357 FreeUnicodeStringTable() is called.\r
358\r
359 @param Language A pointer to the ISO 639-2 language code for the Unicode \r
360 string to add.\r
361 @param SupportedLanguages A pointer to the set of ISO 639-2 language codes\r
362 that the Unicode string table supports.\r
363 Language must be a member of this set.\r
364 @param UnicodeStringTable A pointer to the table of Unicode strings.\r
365 @param UnicodeString A pointer to the Unicode string to add.\r
366\r
367 @retval EFI_SUCCESS The Unicode string that matches the language \r
368 specified by Language was found in the table of \r
369 Unicode strings UnicodeStringTable, and it was \r
370 returned in UnicodeString.\r
371 @retval EFI_INVALID_PARAMETER Language is NULL.\r
372 @retval EFI_INVALID_PARAMETER UnicodeString is NULL.\r
373 @retval EFI_INVALID_PARAMETER UnicodeString is an empty string.\r
374 @retval EFI_UNSUPPORTED SupportedLanguages is NULL.\r
375 @retval EFI_ALREADY_STARTED A Unicode string with language Language is \r
376 already present in UnicodeStringTable.\r
377 @retval EFI_OUT_OF_RESOURCES There is not enough memory to add another \r
378 Unicode string to UnicodeStringTable.\r
379 @retval EFI_UNSUPPORTED The language specified by Language is not a \r
380 member of SupportedLanguages.\r
381\r
382**/\r
383EFI_STATUS\r
384EFIAPI\r
385AddUnicodeString (\r
386 IN CONST CHAR8 *Language,\r
387 IN CONST CHAR8 *SupportedLanguages,\r
388 IN EFI_UNICODE_STRING_TABLE **UnicodeStringTable,\r
389 IN CONST CHAR16 *UnicodeString\r
390 );\r
391\r
392/**\r
393 This function frees the table of Unicode strings in UnicodeStringTable.\r
394 If UnicodeStringTable is NULL, then EFI_SUCCESS is returned.\r
395 Otherwise, each language code, and each Unicode string in the Unicode string \r
396 table are freed, and EFI_SUCCESS is returned.\r
397\r
398 @param UnicodeStringTable A pointer to the table of Unicode strings.\r
399\r
400 @retval EFI_SUCCESS The Unicode string table was freed.\r
401\r
402**/\r
403EFI_STATUS\r
404EFIAPI\r
405FreeUnicodeStringTable (\r
406 IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable\r
407 );\r
408\r
409/**\r
410 This function computes and returns the width of the Unicode character \r
411 specified by UnicodeChar.\r
412\r
413 @param UnicodeChar A Unicode character.\r
414\r
415 @retval 0 The width if UnicodeChar could not be determined.\r
416 @retval 1 UnicodeChar is a narrow glyph.\r
417 @retval 2 UnicodeChar is a wide glyph.\r
418\r
419**/\r
420UINTN\r
421EFIAPI\r
422GetGlyphWidth (\r
423 IN CHAR16 UnicodeChar\r
424 );\r
425\r
426/**\r
427 This function computes and returns the display length of\r
428 the Null-terminated Unicode string specified by String.\r
429 If String is NULL, then 0 is returned.\r
430 If any of the widths of the Unicode characters in String\r
431 can not be determined, then 0 is returned.\r
432\r
433 @param String A pointer to a Null-terminated Unicode string.\r
434\r
435 @return The display length of the Null-terminated Unicode string specified by String.\r
436 \r
437**/\r
438UINTN\r
439EFIAPI\r
440UnicodeStringDisplayLength (\r
441 IN CONST CHAR16 *String\r
442 );\r
443\r
444//\r
445// Functions that abstract early Framework contamination of UEFI.\r
446//\r
447/**\r
448 Signal a Ready to Boot Event. \r
449 \r
450 Create a Ready to Boot Event. Signal it and close it. This causes other \r
451 events of the same event group to be signaled in other modules. \r
452\r
453**/\r
454VOID\r
455EFIAPI\r
456EfiSignalEventReadyToBoot (\r
457 VOID\r
458 );\r
459\r
460/**\r
461 Signal a Legacy Boot Event. \r
462 \r
463 Create a legacy Boot Event. Signal it and close it. This causes other \r
464 events of the same event group to be signaled in other modules. \r
465\r
466**/\r
467VOID\r
468EFIAPI\r
469EfiSignalEventLegacyBoot (\r
470 VOID\r
471 );\r
472\r
473/**\r
474 Create a Legacy Boot Event. \r
475 \r
476 Tiano extended the CreateEvent Type enum to add a legacy boot event type. \r
477 This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was\r
478 added and now it's possible to not voilate the UEFI specification by \r
479 declaring a GUID for the legacy boot event class. This library supports\r
a537f148 480 the EDK/EFI 1.10 form and EDK II/UEFI 2.0 form and allows common code to \r
878ddf1f 481 work both ways.\r
482\r
483 @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex).\r
484\r
485 @retval EFI_SUCCESS Event was created.\r
486 @retval Other Event was not created.\r
487\r
488**/\r
489EFI_STATUS\r
490EFIAPI\r
491EfiCreateEventLegacyBoot (\r
abea19db 492 OUT EFI_EVENT *LegacyBootEvent\r
878ddf1f 493 );\r
494\r
9a462b41 495/**\r
496 Create an EFI event in the Legacy Boot Event Group and allows\r
497 the caller to specify a notification function. \r
498 \r
499 This function abstracts the creation of the Legacy Boot Event.\r
500 The Framework moved from a proprietary to UEFI 2.0 based mechanism.\r
501 This library abstracts the caller from how this event is created to prevent\r
502 to code form having to change with the version of the specification supported.\r
503 If LegacyBootEvent is NULL, then ASSERT().\r
504\r
505 @param NotifyTpl The task priority level of the event.\r
506 @param NotifyFunction The notification function to call when the event is signaled.\r
507 @param NotifyContext The content to pass to NotifyFunction when the event is signaled.\r
508 @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex).\r
509\r
510 @retval EFI_SUCCESS Event was created.\r
511 @retval Other Event was not created.\r
512\r
513**/\r
514EFI_STATUS\r
515EFIAPI\r
516EfiCreateEventLegacyBootEx (\r
517 IN EFI_TPL NotifyTpl,\r
518 IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL\r
519 IN VOID *NotifyContext, OPTIONAL\r
520 OUT EFI_EVENT *LegacyBootEvent\r
521 );\r
522\r
878ddf1f 523/**\r
524 Create a Read to Boot Event. \r
525 \r
526 Tiano extended the CreateEvent Type enum to add a ready to boot event type. \r
527 This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was\r
528 added and now it's possible to not voilate the UEFI specification and use \r
529 the ready to boot event class defined in UEFI 2.0. This library supports\r
a537f148 530 the EDK/EFI 1.10 form and EDKII/UEFI 2.0 form and allows common code to \r
878ddf1f 531 work both ways.\r
532\r
533 @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex).\r
534\r
535 @retval EFI_SUCCESS Event was created.\r
536 @retval Other Event was not created.\r
537\r
538**/\r
539EFI_STATUS\r
540EFIAPI\r
541EfiCreateEventReadyToBoot (\r
abea19db 542 OUT EFI_EVENT *ReadyToBootEvent\r
878ddf1f 543 );\r
544\r
9a462b41 545/**\r
546 Create an EFI event in the Ready To Boot Event Group and allows\r
547 the caller to specify a notification function. \r
548 \r
549 This function abstracts the creation of the Ready to Boot Event.\r
550 The Framework moved from a proprietary to UEFI 2.0 based mechanism.\r
551 This library abstracts the caller from how this event is created to prevent\r
552 to code form having to change with the version of the specification supported.\r
553 If ReadyToBootEvent is NULL, then ASSERT().\r
554\r
555 @param NotifyTpl The task priority level of the event.\r
556 @param NotifyFunction The notification function to call when the event is signaled.\r
557 @param NotifyContext The content to pass to NotifyFunction when the event is signaled.\r
558 @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex).\r
559\r
560 @retval EFI_SUCCESS Event was created.\r
561 @retval Other Event was not created.\r
562\r
563**/\r
564EFI_STATUS\r
565EFIAPI\r
566EfiCreateEventReadyToBootEx (\r
567 IN EFI_TPL NotifyTpl,\r
568 IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL\r
569 IN VOID *NotifyContext, OPTIONAL\r
570 OUT EFI_EVENT *ReadyToBootEvent\r
571 );\r
572\r
878ddf1f 573/**\r
574 Initialize a Firmware Volume (FV) Media Device Path node.\r
575 \r
576 Tiano extended the EFI 1.10 device path nodes. Tiano does not own this enum\r
577 so as we move to UEFI 2.0 support we must use a mechanism that conforms with\r
578 the UEFI 2.0 specification to define the FV device path. An UEFI GUIDed \r
a537f148 579 device path is defined for Tiano extensions of device path. If the code \r
878ddf1f 580 is compiled to conform with the UEFI 2.0 specification use the new device path\r
581 else use the old form for backwards compatability.\r
582\r
583 @param FvDevicePathNode Pointer to a FV device path node to initialize\r
584 @param NameGuid FV file name to use in FvDevicePathNode\r
585\r
586**/\r
587VOID\r
588EFIAPI\r
589EfiInitializeFwVolDevicepathNode (\r
abea19db 590 IN OUT MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode,\r
591 IN CONST EFI_GUID *NameGuid\r
878ddf1f 592 );\r
593\r
594/**\r
595 Check to see if the Firmware Volume (FV) Media Device Path is valid \r
596 \r
597 Tiano extended the EFI 1.10 device path nodes. Tiano does not own this enum\r
598 so as we move to UEFI 2.0 support we must use a mechanism that conforms with\r
599 the UEFI 2.0 specification to define the FV device path. An UEFI GUIDed \r
a537f148 600 device path is defined for Tiano extensions of device path. If the code \r
878ddf1f 601 is compiled to conform with the UEFI 2.0 specification use the new device path\r
602 else use the old form for backwards compatability. The return value to this\r
603 function points to a location in FvDevicePathNode and it does not allocate\r
604 new memory for the GUID pointer that is returned.\r
605\r
606 @param FvDevicePathNode Pointer to FV device path to check.\r
607\r
608 @retval NULL FvDevicePathNode is not valid.\r
609 @retval Other FvDevicePathNode is valid and pointer to NameGuid was returned.\r
610\r
611**/\r
612EFI_GUID *\r
613EFIAPI\r
614EfiGetNameGuidFromFwVolDevicePathNode (\r
abea19db 615 IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode\r
878ddf1f 616 );\r
617\r
878ddf1f 618#endif\r