iPXE
Functions
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  )

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 }
#define e820map
Definition: fakee820.c:62
unsigned long intptr_t
Definition: stdint.h:21
#define real_int15_vector
Definition: fakee820.c:33
void hook_bios_interrupt(unsigned int interrupt, unsigned int handler, struct segoff *chain_vector)
Hook INT vector.
Definition: biosint.c:24
void int15_fakee820()
Assembly routine in inline asm.
__asm__ __volatile__("\n1:\n\t" "movb -1(%3,%1), %%al\n\t" "stosb\n\t" "loop 1b\n\t" "xorl %%eax, %%eax\n\t" "mov %4, %1\n\t" "rep stosb\n\t" :"=&D"(discard_D), "=&c"(discard_c), "+m"(*value) :"r"(data), "g"(pad_len), "0"(value0), "1"(len) :"eax")
__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")
#define TEXT16_CODE(asm_code_str)
Definition: libkir.h:217

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  )

Definition at line 95 of file fakee820.c.

95  {
98 }
unsigned long intptr_t
Definition: stdint.h:21
#define real_int15_vector
Definition: fakee820.c:33
int unhook_bios_interrupt(unsigned int interrupt, unsigned int handler, struct segoff *chain_vector)
Unhook INT vector.
Definition: biosint.c:69
void int15_fakee820()
Assembly routine in inline asm.

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

Referenced by unhide_etherboot().