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.)Status = This->SetAttribute (
This,
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.if (ExtendedVerification) {
Status = SerialIo->Reset (SerialIo);
if (EFI_ERROR (Status)) {
return Status;
}
}