65 DBGC (
image,
"COM32 %s: available memory top = 0x%x\n",
67 assert ( avail_mem_top != 0 );
84 "movl %%esp, (%k0)\n\t" 103 "movl 28(%%esp), %%esp\n\t" 107 :
"R" ( avail_mem_top ),
126 DBGC (
image,
"COM32 %s: exited to run kernel %s\n",
131 DBGC (
image,
"COM32 %s: exited after executing command\n",
154 static const uint8_t magic[] = { 0xB8, 0xFF, 0x4C, 0xCD, 0x21 };
162 DBGC (
image,
"COM32 %s: found magic number\n",
173 DBGC (
image,
"COM32 %s: no extension\n",
181 DBGC (
image,
"COM32 %s: unrecognized extension %s\n",
196 size_t filesz,
memsz;
204 DBGC (
image,
"COM32 %s: could not prepare segment: %s\n",
222 size_t filesz,
memsz;
233 DBGC (
image,
"COM32 %s: could not prepare bounce buffer segment: %s\n",
static int memmap_is_usable(const struct memmap_region *region)
Check if memory region is usable.
#define PHYS_CODE(asm_code_str)
struct arbelprm_rc_send_wqe rc
static int com32_exec_loop(struct image *image)
Execute COMBOOT image.
static int com32_prepare_bounce_buffer(struct image *image)
Prepare COM32 low memory bounce buffer.
static unsigned int get_fbms(void)
Read the BIOS free base memory counter.
char * strrchr(const char *src, int character)
Find rightmost character within a string.
const void * data
Read-only data.
uint16_t magic
Magic signature.
#define COM32_BOUNCE_SEG
COM32 bounce buffer segment.
#define ENOEXEC
Exec format error.
static int com32_exec(struct image *image)
Execute COMBOOT image.
An executable image type.
#define PROBE_NORMAL
Normal image probe priority.
int strcasecmp(const char *first, const char *second)
Compare case-insensitive strings.
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
#define COM32_START_PHYS
Entry point address of COM32 images.
char * name
Name of this image type.
char * cmdline
Command line to pass to image.
static __always_inline void * real_to_virt(unsigned int segment, unsigned int offset)
Convert segment:offset address to virtual address.
Executable image segments.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void memmap_describe(uint64_t min, int hide, struct memmap_region *region)
Describe memory region from system memory map.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
Access to external ("user") memory.
static int com32_probe(struct image *image)
Probe COM32 image.
void comboot_force_text_mode(void)
Set default text mode.
FILE_LICENCE(GPL2_OR_LATER)
char * strerror(int errno)
Retrieve string representation of error number.
void unhook_comboot_interrupts()
Unhook BIOS interrupts related to COMBOOT API (INT 20h, 21h, 22h)
size_t len
Length of raw file image.
__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))
void com32_cfarcall_wrapper()
static void console_reset(void)
Reset console.
void com32_farcall_wrapper()
uint16_t ext
Extended status.
#define COMBOOT_EXIT_RUN_KERNEL
static int com32_load_image(struct image *image)
Load COM32 image into memory.
void unregister_image(struct image *image)
Unregister executable image.
__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")
void hook_comboot_interrupts()
Hook BIOS interrupts related to COMBOOT API (INT 20h, 21h, 22h)
static uint64_t memmap_size(const struct memmap_region *region)
Get remaining size of memory region (from the described address upwards)
#define COMBOOT_EXIT_COMMAND
struct image * replacement
Replacement image.
struct image_type com32_image_type __image_type(PROBE_NORMAL)
SYSLINUX COM32 image type.
int prep_segment(void *segment, size_t filesz, size_t memsz)
Prepare segment for loading.
A memory region descriptor.
struct golan_mkey_seg seg
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
static int com32_identify(struct image *image)
Check image name extension.
void com32_intcall_wrapper()