Extensible Firmware Interface Specification
40
12/12/00
Version 1.02
Description
The
RaiseTPL()
function raises the priority of the currently executing task and returns its
previous priority level.
Only three task priority levels are exposed outside of the firmware during EFI boot services
execution. The first is
TPL_APPLICATION
where all normal execution occurs. That level may
be interrupted to perform various asynchronous interrupt style notifications, which occur at the
TPL_CALLBACK
or
TPL_NOTIFY
level. By raising the task priority level to
TPL_NOTIFY
such
notifications are masked until the task priority level is restored, thereby synchronizing execution
with such notifications. Synchronous blocking I/O functions execute at
TPL_NOTIFY
.
TPL_CALLBACK
is the typically used for application level notification functions. Device drivers
will typically use
TPL_CALLBACK
or
TPL_NOTIFY
for their notification functions. Applications
and drivers may also use
TPL_NOTIFY
to protect data structures in critical sections of code.
The caller must restore the task priority level with
RestoreTPL()
to the previous level before
returning.
Note: If
NewTpl
is below the current TPL level, then the system behavior is indeterminate.
Additionally, only
TPL_APPLICATION
,
TPL_CALLBACK
,
TPL_NOTIFY
, and
TPL_HIGH_LEVEL
may be used. All other values are reserved for use by the firmware; using
them will result in unpredictable behavior. Good codeing practice dictates that all code should
execute at its lowest possible TPL level, and the use of TPL levels above
TPL_APPLICATION
must be minimized. Executing at TPL levels above
TPL_APPLICATION
for extended periods of
time may also result in unpredictable behavior.
Status Codes Returned
Unlike other EFI interface functions,
RaiseTPL()
does not return a status code. Instead, it
returns the previous task priority level, which is to be restored later with a matching call to
RestoreTPL()
.
Summary of Contents for Extensible Firmware Interface
Page 1: ...Extensible Firmware Interface Specification Version 1 02 December 12 2000...
Page 4: ...Extensible Firmware Interface Specification iv 12 12 00 Version 1 02...
Page 42: ...Extensible Firmware Interface Specification 24 12 01 00 Version 1 02...
Page 190: ...Extensible Firmware Interface Specification 172 12 12 00 Version 1 02...
Page 200: ...Extensible Firmware Interface Specification 182 12 12 00 Version 1 02...
Page 226: ...Extensible Firmware Interface Specification 208 12 12 00 Version 1 02...
Page 230: ...Extensible Firmware Interface Specification 212 12 12 00 Version 1 02...
Page 252: ...Extensible Firmware Interface Specification 234 12 12 00 Version 1 02...
Page 294: ...Extensible Firmware Interface Specification 276 12 12 00 Version 1 02...
Page 348: ...Extensible Firmware Interface Specification 330 12 01 00 Version 1 01...
Page 350: ...Extensible Firmware Interface Specification 332 12 12 00 Version 1 02...
Page 354: ...Extensible Firmware Interface Specification 336 12 12 00 Version 1 02...
Page 362: ...Extensible Firmware Interface Specification 344 12 12 00 Version 1 02...
Page 486: ...Extensible Firmware Interface Specification 468 12 12 00 Version 1 02...
Page 494: ...Extensible Firmware Interface Specification 476 12 12 00 Version 1 02...