iPXE
|
Command line and initrd passed to iPXE at runtime. More...
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <assert.h>
#include <ipxe/init.h>
#include <ipxe/image.h>
#include <ipxe/script.h>
#include <realmode.h>
Go to the source code of this file.
Macros | |
#define | cmdline_phys __use_data16 ( cmdline_phys ) |
#define | initrd_phys __use_data16 ( initrd_phys ) |
#define | initrd_len __use_data16 ( initrd_len ) |
#define | colour &cmdline_image |
Colour for debug messages. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
uint32_t | __bss16 (cmdline_phys) |
Command line physical address. More... | |
uint32_t | __bss16 (initrd_phys) |
initrd physical address More... | |
uint32_t | __bss16 (initrd_len) |
initrd length More... | |
static void | cmdline_image_free (struct refcnt *refcnt) |
Free command line image. More... | |
static void | cmdline_strip (char *cmdline, const char *cruft) |
Strip unwanted cruft from command line. More... | |
static int | cmdline_init (void) |
Initialise command line. More... | |
static int | initrd_init (void) |
Initialise initrd. More... | |
static void | runtime_init (void) |
Initialise command line and initrd. More... | |
struct startup_fn runtime_startup_fn | __startup_fn (STARTUP_NORMAL) |
Command line and initrd initialisation function. More... | |
Variables | |
static char * | cmdline_copy |
Internal copy of the command line. More... | |
static struct image | cmdline_image |
Embedded script representing the command line. More... | |
Command line and initrd passed to iPXE at runtime.
Definition in file runtime.c.
#define cmdline_phys __use_data16 ( cmdline_phys ) |
#define initrd_phys __use_data16 ( initrd_phys ) |
#define initrd_len __use_data16 ( initrd_len ) |
#define colour &cmdline_image |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
uint32_t __bss16 | ( | cmdline_phys | ) |
Command line physical address.
This can be set by the prefix.
uint32_t __bss16 | ( | initrd_phys | ) |
initrd physical address
This can be set by the prefix.
uint32_t __bss16 | ( | initrd_len | ) |
initrd length
This can be set by the prefix.
|
static |
Free command line image.
Definition at line 68 of file runtime.c.
References cmdline_copy, container_of, DBGC, and free.
|
static |
Strip unwanted cruft from command line.
cmdline | Command line |
cruft | Initial substring of cruft to strip |
Definition at line 91 of file runtime.c.
References cmdline, colour, DBGC, strchr(), strcpy(), and strstr().
Referenced by cmdline_init().
|
static |
Initialise command line.
rc | Return status code |
Definition at line 116 of file runtime.c.
References cmdline, cmdline_copy, cmdline_image, cmdline_phys, cmdline_strip(), colour, copy_from_user(), image::data, DBGC, ENOMEM, image_put(), isspace(), len, image::len, malloc(), phys_to_user(), rc, register_image(), strerror(), strlen(), strlen_user(), and virt_to_user().
Referenced by runtime_init().
|
static |
Initialise initrd.
rc | Return status code |
Definition at line 180 of file runtime.c.
References colour, DBGC, ENOMEM, image_memory(), initrd_len, initrd_phys, and phys_to_user().
Referenced by runtime_init().
|
static |
Initialise command line and initrd.
Definition at line 213 of file runtime.c.
References cmdline_init(), initrd_init(), and rc.
struct startup_fn runtime_startup_fn __startup_fn | ( | STARTUP_NORMAL | ) |
Command line and initrd initialisation function.
|
static |
Internal copy of the command line.
Definition at line 65 of file runtime.c.
Referenced by cmdline_image_free(), and cmdline_init().
|
static |
Embedded script representing the command line.
Definition at line 76 of file runtime.c.
Referenced by cmdline_init().