iPXE
Functions | Variables
efidrvprefix.c File Reference
#include <stdlib.h>
#include <ipxe/init.h>
#include <ipxe/device.h>
#include <ipxe/efi/efi.h>
#include <ipxe/efi/efi_driver.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
 
EFI_STATUS EFIAPI _efidrv_start (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab)
 EFI entry point. More...
 
static int efi_probe (struct root_device *rootdev __unused)
 Probe EFI root bus. More...
 
static void efi_remove (struct root_device *rootdev __unused)
 Remove EFI root bus. More...
 

Variables

static struct root_driver efi_root_driver
 EFI root device driver. More...
 
struct root_device efi_root_device __root_device
 EFI root device. More...
 

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER  )

◆ _efidrv_start()

EFI_STATUS EFIAPI _efidrv_start ( EFI_HANDLE  image_handle,
EFI_SYSTEM_TABLE systab 
)

EFI entry point.

Parameters
image_handleImage handle
systabSystem table
Return values
efircEFI return status code

Definition at line 35 of file efidrvprefix.c.

36  {
37  EFI_STATUS efirc;
38 
39  /* Initialise EFI environment */
40  if ( ( efirc = efi_init ( image_handle, systab ) ) != 0 )
41  return efirc;
42 
43  /* Initialise iPXE environment */
44  initialise();
45  startup();
46 
47  return 0;
48 }
void initialise(void)
Initialise iPXE.
Definition: init.c:52
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:35
EFI_STATUS efi_init(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab)
Initialise EFI environment.
Definition: efi_init.c:97
void startup(void)
Start up iPXE.
Definition: init.c:67

References efi_init(), initialise(), and startup().

◆ efi_probe()

static int efi_probe ( struct root_device *rootdev  __unused)
static

Probe EFI root bus.

Parameters
rootdevEFI root device

Definition at line 55 of file efidrvprefix.c.

55  {
56 
57  /* Do nothing */
58  return 0;
59 }

◆ efi_remove()

static void efi_remove ( struct root_device *rootdev  __unused)
static

Remove EFI root bus.

Parameters
rootdevEFI root device

Definition at line 66 of file efidrvprefix.c.

66  {
67 
69 }
void efi_driver_disconnect_all(void)
Disconnect EFI driver from all possible devices.
Definition: efi_driver.c:562

References efi_driver_disconnect_all().

Variable Documentation

◆ efi_root_driver

struct root_driver efi_root_driver
static
Initial value:
= {
.probe = efi_probe,
.remove = efi_remove,
}
static void efi_remove(struct root_device *rootdev __unused)
Remove EFI root bus.
Definition: efidrvprefix.c:66
static int efi_probe(struct root_device *rootdev __unused)
Probe EFI root bus.
Definition: efidrvprefix.c:55

EFI root device driver.

Definition at line 72 of file efidrvprefix.c.

◆ __root_device

struct root_device efi_root_device __root_device
Initial value:
= {
.dev = { .name = "EFI" },
.driver = &efi_root_driver,
}
static struct root_driver efi_root_driver
EFI root device driver.
Definition: efidrvprefix.c:72

EFI root device.

Definition at line 78 of file efidrvprefix.c.