iPXE
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)
 FILE_SECBOOT (PERMITTED)
int efi_fdt_install (const char *cmdline)
 Install EFI Flattened Device Tree table.
int efi_fdt_uninstall (void)
 Uninstall EFI Flattened Device Tree table (when no FDT support is present)

Detailed Description

EFI Flattened Device Tree.

Definition in file efi_fdt.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

References cmdline.

◆ efi_fdt_install()

int efi_fdt_install ( const char * cmdline)
extern

Install EFI Flattened Device Tree table.

Parameters
cmdlineCommand line, or NULL
Return values
rcReturn status code

Definition at line 115 of file efi_fdt.c.

115 {
116 int rc;
117
118 /* Create device tree */
119 if ( ( rc = fdt_create ( &efi_fdt_installed, cmdline, 0, 0 ) ) != 0 ) {
120 DBGC ( &efi_fdt, "EFI_FDT could not install: %s\n",
121 strerror ( rc ) );
122 goto err_create;
123 }
124
125 /* Install table */
127 &efi_fdt_backup ) ) != 0 ) {
128 DBGC ( &efi_fdt, "EFIFDT could not install: %s\n",
129 strerror ( rc ) );
130 goto err_install;
131 }
132
133 return 0;
134
136 err_install:
138 err_create:
139 return rc;
140}
struct arbelprm_rc_send_wqe rc
Definition arbel.h:3
static struct fdt_header * efi_fdt
EFI Flattened Device Tree configuration table.
Definition efi_fdt.c:43
static struct efi_table efi_fdt_table
EFI Flattened Device Tree table type.
Definition efi_fdt.c:98
static void * efi_fdt_backup
EFI Flattened Device Tree table backup.
Definition efi_fdt.c:104
static struct fdt_header * efi_fdt_installed
EFI Flattened Device Tree installed table.
Definition efi_fdt.c:107
int efi_install_table(struct efi_table *table, const void *data, void **backup)
Install EFI configuration table.
Definition efi_table.c:71
int efi_uninstall_table(struct efi_table *table, void **backup)
Uninstall EFI configuration table.
Definition efi_table.c:162
void fdt_remove(struct fdt_header *hdr)
Remove device tree.
Definition fdt.c:1459
int fdt_create(struct fdt_header **hdr, const char *cmdline, physaddr_t initrd, size_t initrd_len)
Create device tree.
Definition fdt.c:1408
#define DBGC(...)
Definition compiler.h:505
uint32_t cmdline
Definition multiboot.h:4
char * strerror(int errno)
Retrieve string representation of error number.
Definition strerror.c:79

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 )
extern

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 143 of file efi_image.c.

143 {
144 return 0;
145}

References __weak, 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().