iPXE
fakee820.h File Reference

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
void fake_e820 (void)
void unfake_e820 (void)

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ fake_e820()

void fake_e820 ( void )
extern

Definition at line 64 of file fakee820.c.

64 {
66 TEXT16_CODE ( "\nint15_fakee820:\n\t"
67 "pushfw\n\t"
68 "cmpl $0xe820, %%eax\n\t"
69 "jne 99f\n\t"
70 "cmpl $0x534d4150, %%edx\n\t"
71 "jne 99f\n\t"
72 "pushaw\n\t"
73 "movw %%sp, %%bp\n\t"
74 "andb $~0x01, 22(%%bp)\n\t" /* Clear return CF */
75 "leaw e820map(%%bx), %%si\n\t"
76 "cs rep movsb\n\t"
77 "popaw\n\t"
78 "movl %%edx, %%eax\n\t"
79 "addl $20, %%ebx\n\t"
80 "cmpl %0, %%ebx\n\t"
81 "jne 1f\n\t"
82 "xorl %%ebx,%%ebx\n\t"
83 "\n1:\n\t"
84 "popfw\n\t"
85 "iret\n\t"
86 "\n99:\n\t"
87 "popfw\n\t"
88 "ljmp *%%cs:real_int15_vector\n\t" )
89 : : "i" ( sizeof ( e820map ) ) );
90
93}
__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))
unsigned long intptr_t
Definition stdint.h:21
void hook_bios_interrupt(unsigned int interrupt, unsigned int handler, struct segoff *chain_vector)
Hook INT vector.
Definition biosint.c:25
#define real_int15_vector
Definition fakee820.c:33
#define e820map
Definition fakee820.c:62
void int15_fakee820()
Assembly routine in inline asm.
#define TEXT16_CODE(asm_code_str)
Definition libkir.h:217
__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")

References __asm__(), __volatile__(), e820map, hook_bios_interrupt(), int15_fakee820(), real_int15_vector, and TEXT16_CODE.

Referenced by hide_etherboot().

◆ unfake_e820()

void unfake_e820 ( void )
extern

Definition at line 95 of file fakee820.c.

95 {
98}
int unhook_bios_interrupt(unsigned int interrupt, unsigned int handler, struct segoff *chain_vector)
Unhook INT vector.
Definition biosint.c:70

References int15_fakee820(), real_int15_vector, and unhook_bios_interrupt().

Referenced by unhide_etherboot().