iPXE
Defines | 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.

Defines

#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.
struct init_fn efi_fdt_init_fn __init_fn (INIT_EARLY)
 EFI Flattened Device Tree initialisation function.

Variables

static struct fdt_headerefi_fdt
 EFI Flattened Device Tree configuration table.

Detailed Description

EFI Flattened Device Tree.

Definition in file efi_fdt.c.


Define Documentation

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 ( GPL2_OR_LATER_OR_UBDL  )
EFI_USE_TABLE ( DEVICE_TREE_TABLE  ,
efi_fdt,
 
)
static void efi_fdt_init ( void  ) [static]

Initialise EFI Flattened Device Tree.

Definition at line 49 of file efi_fdt.c.

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

                                  {
        int rc;

        /* Do nothing if no configuration table is present */
        if ( ! efi_fdt ) {
                DBGC ( &efi_fdt, "EFIFDT has no configuration table\n" );
                return;
        }
        DBGC ( &efi_fdt, "EFIFDT configuration table at %p\n", efi_fdt );

        /* Register device tree */
        if ( ( rc = register_fdt ( efi_fdt ) ) != 0 ) {
                DBGC ( &efi_fdt, "EFIFDT could not register: %s\n",
                       strerror ( rc ) );
                return;
        }
}
struct init_fn efi_fdt_init_fn __init_fn ( INIT_EARLY  ) [read]

EFI Flattened Device Tree initialisation function.


Variable Documentation

struct fdt_header* efi_fdt [static]

EFI Flattened Device Tree configuration table.

Definition at line 42 of file efi_fdt.c.