iPXE
Functions
efi_fdt.h File Reference

EFI Flattened Device Tree. More...

#include <ipxe/efi/efi.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
int efi_fdt_install (const char *cmdline)
 Install EFI Flattened Device Tree table. More...
 
int efi_fdt_uninstall (void)
 Uninstall EFI Flattened Device Tree table (when no FDT support is present) More...
 

Detailed Description

EFI Flattened Device Tree.

Definition in file efi_fdt.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ efi_fdt_install()

int efi_fdt_install ( const char *  cmdline)

Install EFI Flattened Device Tree table.

Parameters
cmdlineCommand line, or NULL
Return values
rcReturn status code

Definition at line 114 of file efi_fdt.c.

114  {
115  int rc;
116 
117  /* Create device tree */
118  if ( ( rc = fdt_create ( &efi_fdt_installed, cmdline, 0, 0 ) ) != 0 ) {
119  DBGC ( &efi_fdt, "EFI_FDT could not install: %s\n",
120  strerror ( rc ) );
121  goto err_create;
122  }
123 
124  /* Install table */
126  &efi_fdt_backup ) ) != 0 ) {
127  DBGC ( &efi_fdt, "EFIFDT could not install: %s\n",
128  strerror ( rc ) );
129  goto err_install;
130  }
131 
132  return 0;
133 
135  err_install:
137  err_create:
138  return rc;
139 }
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
static struct efi_table efi_fdt_table
EFI Flattened Device Tree table type.
Definition: efi_fdt.c:97
#define DBGC(...)
Definition: compiler.h:505
static struct fdt_header * efi_fdt_installed
EFI Flattened Device Tree installed table.
Definition: efi_fdt.c:106
void fdt_remove(struct fdt_header *hdr)
Remove device tree.
Definition: fdt.c:1458
static struct fdt_header * efi_fdt
EFI Flattened Device Tree configuration table.
Definition: efi_fdt.c:42
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
int efi_uninstall_table(struct efi_table *table, void **backup)
Uninstall EFI configuration table.
Definition: efi_table.c:161
uint32_t cmdline
Definition: multiboot.h:16
static void * efi_fdt_backup
EFI Flattened Device Tree table backup.
Definition: efi_fdt.c:103
int fdt_create(struct fdt_header **hdr, const char *cmdline, physaddr_t initrd, size_t initrd_len)
Create device tree.
Definition: fdt.c:1407
int efi_install_table(struct efi_table *table, const void *data, void **backup)
Install EFI configuration table.
Definition: efi_table.c:70

References cmdline, DBGC, efi_fdt, efi_fdt_backup, efi_fdt_installed, efi_fdt_table, efi_install_table(), efi_uninstall_table(), fdt_create(), fdt_remove(), rc, and strerror().

◆ efi_fdt_uninstall()

int efi_fdt_uninstall ( void  )

Uninstall EFI Flattened Device Tree table (when no FDT support is present)

Return values
rcReturn status code

Uninstall EFI Flattened Device Tree table (when no FDT support is present)

Return values
rcReturn status code

Definition at line 142 of file efi_image.c.

142  {
143  return 0;
144 }

References DBGC, efi_fdt, efi_fdt_backup, efi_fdt_installed, efi_fdt_table, efi_uninstall_table(), fdt_remove(), rc, and strerror().

Referenced by efi_image_exec().