iPXE
Macros | Functions | Variables
efi_fdt.c File Reference

EFI Flattened Device Tree. More...

#include <string.h>
#include <ipxe/fdt.h>
#include <ipxe/efi/efi.h>
#include <ipxe/init.h>

Go to the source code of this file.

Macros

#define DEVICE_TREE_TABLE_GUID
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
 EFI_USE_TABLE (DEVICE_TREE_TABLE, &efi_fdt, 0)
 
static void efi_fdt_init (void)
 Initialise EFI Flattened Device Tree. More...
 
struct init_fn efi_fdt_init_fn __init_fn (INIT_EARLY)
 EFI Flattened Device Tree initialisation function. More...
 

Variables

static struct fdt_headerefi_fdt
 EFI Flattened Device Tree configuration table. More...
 

Detailed Description

EFI Flattened Device Tree.

Definition in file efi_fdt.c.

Macro Definition Documentation

◆ DEVICE_TREE_TABLE_GUID

#define DEVICE_TREE_TABLE_GUID
Value:
{ 0xb1b621d5, 0xf19c, 0x41a5, \
{ 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 } }

Definition at line 37 of file efi_fdt.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ EFI_USE_TABLE()

EFI_USE_TABLE ( DEVICE_TREE_TABLE  ,
efi_fdt,
 
)

◆ efi_fdt_init()

static void efi_fdt_init ( void  )
static

Initialise EFI Flattened Device Tree.

Definition at line 49 of file efi_fdt.c.

49  {
50  int rc;
51 
52  /* Do nothing if no configuration table is present */
53  if ( ! efi_fdt ) {
54  DBGC ( &efi_fdt, "EFIFDT has no configuration table\n" );
55  return;
56  }
57  DBGC ( &efi_fdt, "EFIFDT configuration table at %p\n", efi_fdt );
58 
59  /* Register device tree */
60  if ( ( rc = register_fdt ( efi_fdt ) ) != 0 ) {
61  DBGC ( &efi_fdt, "EFIFDT could not register: %s\n",
62  strerror ( rc ) );
63  return;
64  }
65 }
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
#define DBGC(...)
Definition: compiler.h:505
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 register_fdt(const struct fdt_header *hdr)
Register device tree.
Definition: fdt.c:410

References DBGC, efi_fdt, rc, register_fdt(), and strerror().

◆ __init_fn()

struct init_fn efi_fdt_init_fn __init_fn ( INIT_EARLY  )

EFI Flattened Device Tree initialisation function.

Variable Documentation

◆ efi_fdt

struct fdt_header* efi_fdt
static

EFI Flattened Device Tree configuration table.

Definition at line 42 of file efi_fdt.c.

Referenced by efi_fdt_init().