Add 2 new Bds features

1. Lazy ConIn
  2. OsIndicationsSupported & OsIndications

Signed-off-by: Chao Zhang<chao.b.zhang@intel.com>
Reviewed-by: Hot Tian<Hot.Tian@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13566 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
czhang46
2012-07-30 05:56:33 +00:00
parent 402e4a9d77
commit 18cf395022
6 changed files with 251 additions and 54 deletions

View File

@@ -561,6 +561,75 @@ BdsLibConnectAllDefaultConsoles (
}
/**
This function will connect console device except ConIn base on the console
device variable ConOut and ErrOut.
@retval EFI_SUCCESS At least one of the ConOut device have
been connected success.
@retval EFI_STATUS Return the status of BdsLibConnectConsoleVariable ().
**/
EFI_STATUS
EFIAPI
BdsLibConnectAllDefaultConsolesWithOutConIn (
VOID
)
{
EFI_STATUS Status;
BOOLEAN SystemTableUpdated;
//
// Connect all default console variables except ConIn
//
//
// It seems impossible not to have any ConOut device on platform,
// so we check the status here.
//
Status = BdsLibConnectConsoleVariable (L"ConOut");
if (EFI_ERROR (Status)) {
return Status;
}
//
// Insert the performance probe for Console Out
//
PERF_START (NULL, "ConOut", "BDS", 1);
PERF_END (NULL, "ConOut", "BDS", 0);
//
// The _ModuleEntryPoint err out var is legal.
//
BdsLibConnectConsoleVariable (L"ErrOut");
SystemTableUpdated = FALSE;
//
// Fill console handles in System Table if no console device assignd.
//
if (UpdateSystemTableConsole (L"ConOut", &gEfiSimpleTextOutProtocolGuid, &gST->ConsoleOutHandle, (VOID **) &gST->ConOut)) {
SystemTableUpdated = TRUE;
}
if (UpdateSystemTableConsole (L"ErrOut", &gEfiSimpleTextOutProtocolGuid, &gST->StandardErrorHandle, (VOID **) &gST->StdErr)) {
SystemTableUpdated = TRUE;
}
if (SystemTableUpdated) {
//
// Update the CRC32 in the EFI System Table header
//
gST->Hdr.CRC32 = 0;
gBS->CalculateCrc32 (
(UINT8 *) &gST->Hdr,
gST->Hdr.HeaderSize,
&gST->Hdr.CRC32
);
}
return EFI_SUCCESS;
}
/**
Convert a *.BMP graphics image to a GOP blt buffer. If a NULL Blt buffer
is passed in a GopBlt buffer will be allocated by this routine. If a GopBlt