The
UEFI shell comes in four flavors, called levels of support. These "levels" (from 0 to 3) allows for compliant implementations of the shell that range from light-weight, bare-bones to a full-featured versions. At the same time, the user of the shell can determine, at run-time, whether the necessary features are available for it to run correctly.
Why offer different levels of support?
- Size. While the rest of the universe expands storage capacity exponentially, the firmware world still lives with relatively expensive flash devices. Suffice it to say that the types of flash and trends in flash which are driving down the cost for devices such as the iPod are a little slower in dropping the average price of motherboard flash. Flash size can significantly impact the cost of a motherboard. So there is constant pressure to keep the "required" elements of the firmware as small as possible. NOTE: One additional trend is that silicon vendors such as Intel are gobbling up room on the flash devices as well, both with their own firmware modules and with support for on-board micro controllers such as the ME (Management Engine). In some systems, 2/3 of the flash space is consumed by support for these devices. So the shell in the firmware must be small.
- Video & Keyboard Support. When most of us think of a "shell" we usually think of some sort of command-prompt console at which a user can type in commands, execute scripts, etc. However, in many of the systems, the shell is used primarily for execution of scripts or applications that do not require a console at all.
So the
UEFI shell can provide any of 4
standard support levels:
- 0 (Minimal). This is the most basic support. The APIs are fully supported, but there is no support for scripting, aliases or a console. Normal shell applications will execute.
- 1 (Scripting). This level adds support for scripts and the script control commands, but none of the other commands that do anything (such as write text to the screen or manipulate files). This allows scripts to be launched, but all of the script commands must be executables (.efi files) on a mapped drive.
- 2 (Basic). This level adds file script commands, such as rm, ls and mkdir. At this level, there is still no console support. As a result, those commands which would normally output to the console do not do so at this support level. Notice that, up to this point, an application could use the APIs to read and write files, but not execute scripts which used the common file manipulation commands.
- 3 (Interactive). This level adds console input and output, as well as those script commands which depend on the console, such as echo, type and cls.
The support level provided by the
UEFI shell can be checked by any script or application by examining the environment variable
shellsupport which contains the text "0" for Level 0, "1" for Level 1 and so on.
Next week we'll look at how support provided by the shell can further be augmented in a standard way using "profiles".
Tim
No comments:
Post a Comment