iPXE
|
SYSLINUX COMBOOT (16-bit) image format. More...
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <errno.h>
#include <assert.h>
#include <realmode.h>
#include <basemem.h>
#include <comboot.h>
#include <ipxe/uaccess.h>
#include <ipxe/image.h>
#include <ipxe/segment.h>
#include <ipxe/init.h>
#include <ipxe/features.h>
#include <ipxe/console.h>
Go to the source code of this file.
Data Structures | |
struct | comboot_psp |
COMBOOT PSP, copied to offset 0 of code segment. More... | |
Macros | |
#define | COMBOOT_PSP_CMDLINE_OFFSET 0x81 |
Offset in PSP of command line. More... | |
#define | COMBOOT_MAX_CMDLINE_LEN 125 |
Maximum length of command line in PSP (127 bytes minus space and CR) More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER) | |
FEATURE (FEATURE_IMAGE, "COMBOOT", DHCP_EB_FEATURE_COMBOOT, 1) | |
static void | comboot_copy_cmdline (struct image *image, userptr_t seg_userptr) |
Copy command line to PSP. More... | |
static void | comboot_init_psp (struct image *image, userptr_t seg_userptr) |
Initialize PSP. More... | |
static int | comboot_exec_loop (struct image *image) |
Execute COMBOOT image. More... | |
static int | comboot_identify (struct image *image) |
Check image name extension. More... | |
static int | comboot_prepare_segment (struct image *image) |
Load COMBOOT image into memory, preparing a segment and returning it. More... | |
static int | comboot_probe (struct image *image) |
Probe COMBOOT image. More... | |
static int | comboot_exec (struct image *image) |
Execute COMBOOT image. More... | |
struct image_type comboot_image_type | __image_type (PROBE_NORMAL) |
SYSLINUX COMBOOT (16-bit) image type. More... | |
SYSLINUX COMBOOT (16-bit) image format.
Definition in file comboot.c.
#define COMBOOT_PSP_CMDLINE_OFFSET 0x81 |
#define COMBOOT_MAX_CMDLINE_LEN 125 |
FILE_LICENCE | ( | GPL2_OR_LATER | ) |
FEATURE | ( | FEATURE_IMAGE | , |
"COMBOOT" | , | ||
DHCP_EB_FEATURE_COMBOOT | , | ||
1 | |||
) |
Copy command line to PSP.
image | COMBOOT image |
Definition at line 70 of file comboot.c.
References cmdline, image::cmdline, COMBOOT_MAX_CMDLINE_LEN, COMBOOT_PSP_CMDLINE_OFFSET, copy_to_user(), cr, and strlen().
Referenced by comboot_init_psp().
Initialize PSP.
image | COMBOOT image |
seg_userptr | segment to initialize |
Definition at line 104 of file comboot.c.
References comboot_copy_cmdline(), copy_to_user(), DBGC, comboot_psp::first_non_free_para, get_fbms(), and comboot_psp::int20.
Referenced by comboot_exec_loop().
|
static |
Execute COMBOOT image.
image | COMBOOT image |
rc | Return status code |
Definition at line 134 of file comboot.c.
References __asm__(), __volatile__(), assert(), COMBOOT_EXIT, COMBOOT_EXIT_COMMAND, COMBOOT_EXIT_RUN_KERNEL, comboot_force_text_mode(), comboot_init_psp(), COMBOOT_PSP_SEG, comboot_return, DBGC, hook_comboot_interrupts(), image::name, REAL_CODE, real_to_user(), image::replacement, rmsetjmp, state, unhook_comboot_interrupts(), and unregister_image().
Referenced by comboot_exec().
|
static |
Check image name extension.
image | COMBOOT image |
rc | Return status code |
Definition at line 220 of file comboot.c.
References DBGC, ENOEXEC, ext, image::name, strcasecmp(), and strrchr().
Referenced by comboot_probe().
|
static |
Load COMBOOT image into memory, preparing a segment and returning it.
image | COMBOOT image |
rc | Return status code |
Definition at line 247 of file comboot.c.
References COMBOOT_PSP_SEG, image::data, DBGC, image::len, memcpy_user(), memset_user(), prep_segment(), rc, real_to_user(), and strerror().
Referenced by comboot_exec().
|
static |
Probe COMBOOT image.
image | COMBOOT image |
rc | Return status code |
Definition at line 284 of file comboot.c.
References comboot_identify(), DBGC, image::name, and rc.
|
static |
Execute COMBOOT image.
image | COMBOOT image |
rc | Return status code |
Definition at line 305 of file comboot.c.
References comboot_exec_loop(), comboot_prepare_segment(), console_reset(), DBGC, ENOEXEC, image::len, and rc.
struct image_type comboot_image_type __image_type | ( | PROBE_NORMAL | ) |
SYSLINUX COMBOOT (16-bit) image type.