22.3.1 Reset() Implementation

The reset here can be as simple as resetting the mode and clearing the screen, as demonstrated by the following example. (The example is from the terminal driver located at \Sample\Universal\Console\Terminal\Dxe\ in EDK II.)

Example 226-Light reset of terminal driver

Status = This->SetAttribute (
EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BACKGROUND_BLACK)
Status = This->SetMode (This, 0);

A reset can also easily perform more actions, as shown in the following example. When the ExtendedVerification parameter is TRUE this same driver also resets the serial protocol that it is running on top of.

Example 227-Full reset of terminal driver

if (ExtendedVerification) {
Status = SerialIo->Reset (SerialIo);
if (EFI_ERROR (Status)) {
return Status;