Intel Extensible Firmware Interface Manual do Utilizador Página 92

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 108
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 91
Extensible Firmware Interface Specification
4-14 12/01/02 Version 1.10
4.7 EFI Image Entry Point Examples
The examples in the following sections show how the various table examples are presented in
the EFI environment.
4.7.1 EFI Image Entry Point Examples
The following example shows the EFI image entry point for an EFI Application. This
application makes use of the EFI System Table, the EFI Boot Services Table, and the EFI
Runtime Services Table.
EFI_SYSTEM_TABLE *gST;
EFI_BOOT_SERVICES_TABLE *gBS;
EFI_RUNTIME_SERVICES_TABLE *gRT;
EfiApplicationEntryPoint(
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
EFI_TIME *Time;
gST = SystemTable;
gBS = gST->BootServices;
gRT = gST->RuntimeServices;
//
// Use EFI System Table to print “Hello World” to the active console output
// device.
//
Status = gST->ConOut->OutputString (gST->ConOut, L”Hello World\n\r”);
if (EFI_ERROR (Status)) {
return Status;
}
//
// Use EFI Boot Services Table to allocate a buffer to store the current time
// and date.
//
Status = gBS->AllocatePool (
EfiBootServicesData,
sizeof (EFI_TIME),
(VOID **)&Time
);
if (EFI_ERROR (Status)) {
return Status;
}
Vista de página 91
1 2 ... 87 88 89 90 91 92 93 94 95 96 97 ... 107 108

Comentários a estes Manuais

Sem comentários