Intel Extensible Firmware Interface Manuale Utente Pagina 92

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 108
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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;
}
Vedere la pagina 91
1 2 ... 87 88 89 90 91 92 93 94 95 96 97 ... 107 108

Commenti su questo manuale

Nessun commento