57 DBGC (
image,
"ELF %s could not load: %s\n",
68 DBGC (
image,
"ELF %s starting execution at %lx\n",
74 :
"eax",
"ebx",
"ecx",
"edx",
"esi",
"memory" );
97 DBGC (
image,
"ELF %s uses virtual addressing (phys %x, virt "
113 static const uint8_t e_ident[] = {
127 if (
image->
len < sizeof ( *ehdr ) ) {
128 DBGC (
image,
"ELF %s too short for ELF header\n",
133 if (
memcmp ( ehdr->
e_ident, e_ident, sizeof ( e_ident ) ) != 0 ) {
140 &entry, &
max ) ) != 0 ) {
141 DBGC (
image,
"ELF %s is not loadable: %s\n",
struct arbelprm_rc_send_wqe rc
__asm__ __volatile__("call *%9" :"=a"(result), "=c"(discard_ecx), "=d"(discard_edx) :"d"(0), "a"(code), "b"(0), "c"(in_phys), "D"(0), "S"(out_phys), "m"(hypercall))
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" retur dest)
int elf_load(struct image *image, physaddr_t *entry, physaddr_t *max)
Load ELF image into memory.
int elf_segments(struct image *image, const Elf_Ehdr *ehdr, int(*process)(struct image *image, const Elf_Phdr *phdr, physaddr_t dest), physaddr_t *entry, physaddr_t *max)
Process ELF segments.
static int elfboot_exec(struct image *image)
Execute ELF image.
static int elfboot_check_segment(struct image *image, const Elf_Phdr *phdr, physaddr_t dest)
Check that ELF segment uses flat physical addressing.
static int elfboot_probe(struct image *image)
Probe ELF image.
#define DHCP_EB_FEATURE_ELF
ELF format.
#define FEATURE_IMAGE
Image formats.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define ENOEXEC
Exec format error.
#define ECANCELED
Operation canceled.
#define PROBE_NORMAL
Normal image probe priority.
#define __image_type(probe_order)
An executable image type.
static void shutdown_boot(void)
Shut down system for OS boot.
#define FEATURE(category, text, feature_opt, version)
Declare a feature.
#define PHYS_CODE(asm_code_str)
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")
char * strerror(int errno)
Retrieve string representation of error number.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
unsigned char e_ident[EI_NIDENT]
An executable image type.
const void * data
Read-only data.
size_t len
Length of raw file image.