beautypg.com

Tpl_application, Tpl_callback, Tpl_notify – Intel Extensible Firmware Interface User Manual

Page 101: Tpl_high_level

background image

Services — Boot Services

Version 1.10

12/01/02

5-3

The intended usage of the priority levels is shown in Table 5-2 from the lowest level
(

TPL_APPLICATION

) to the highest level (

TPL_HIGH_LEVEL

). As the level increases, the

duration of the code and the amount of blocking allowed decrease. Execution generally occurs at
the

TPL_APPLICATION

level. Execution occurs at other levels as a direct result of the triggering

of an event notification function(this is typically caused by the signaling of an event). During timer
interrupts, firmware signals timer events when an event’s “trigger time” has expired. This allows
event notification functions to interrupt lower priority code to check devices (for example). The
notification function can signal other events as required. After all pending event notification
functions execute, execution continues at the

TPL_APPLICATION

level.

Table 5-2.

TPL Usage

Task PriorityLevel

Usage

TPL_APPLICATION

This is the lowest priority level. It is the level of execution which occurs when
no event notifications are pending and whichinteracts withthe user. User I/O
(and blocking on User I/O) can be performed at this level. The boot manager
executes at this level and passes control to other EFI applications at this level.

TPL_CALLBACK

Interrupts code executing below

TPL_CALLBACK

level. Long term

operations (suchas file system operations and disk I/O) can occur at this level.

TPL_NOTIFY

Interrupts code executing below

TPL_NOTIFY

level. Blocking is not

allowed at this level. Code executes to completion and returns. If code
requires more processing, it needs to signal an event to wait to reobtain
control at whatever level it requires. This level is typically used to process low
level IO to or from a device.

(Firmware Interrupts)

This level is internal to the firmware. It is the level at which internal interrupts
occur. Code running at this level interrupts code running at the

TPL_NOTIFY

level (or lower levels). If the interrupt requires extended time

to complete, firmware signals another event (or events) to perform the longer
term operations so that other interrupts can occur.

TPL_HIGH_LEVEL

Interrupts code executing below

TPL_HIGH_LEVEL

. This is the highest

priority level. It is not interruptable (interrupts are disabled) and is used
sparingly by firmware to synchronize operations that need to be accessible
from any priority level. For example, it must be possible to signal events while
executing at any priority level. Therefore, firmware manipulates the internal
event structure while at this priority level.