fakee820.h File Reference

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
void fake_e820 (void)
void unfake_e820 (void)


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

void fake_e820 ( void   ) 

Definition at line 59 of file fakee820.c.

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

Referenced by hide_etherboot().

00059                         {
00060         __asm__ __volatile__ (
00061                 TEXT16_CODE ( "\nint15_fakee820:\n\t"
00062                               "pushfw\n\t"
00063                               "cmpl $0xe820, %%eax\n\t"
00064                               "jne 99f\n\t"
00065                               "cmpl $0x534d4150, %%edx\n\t"
00066                               "jne 99f\n\t"
00067                               "pushaw\n\t"
00068                               "movw %%sp, %%bp\n\t"
00069                               "andb $~0x01, 22(%%bp)\n\t" /* Clear return CF */
00070                               "leaw e820map(%%bx), %%si\n\t"
00071                               "cs rep movsb\n\t"
00072                               "popaw\n\t"
00073                               "movl %%edx, %%eax\n\t"
00074                               "addl $20, %%ebx\n\t"
00075                               "cmpl %0, %%ebx\n\t"
00076                               "jne 1f\n\t"
00077                               "xorl %%ebx,%%ebx\n\t"
00078                               "\n1:\n\t"
00079                               "popfw\n\t"
00080                               "iret\n\t"
00081                               "\n99:\n\t"
00082                               "popfw\n\t"
00083                               "ljmp *%%cs:real_int15_vector\n\t" )
00084                 : : "i" ( sizeof ( e820map ) ) );
00085 
00086         hook_bios_interrupt ( 0x15, ( unsigned int ) int15_fakee820,
00087                               &real_int15_vector );
00088 }

void unfake_e820 ( void   ) 

Definition at line 90 of file fakee820.c.

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

Referenced by unhide_etherboot().

00090                           {
00091         unhook_bios_interrupt ( 0x15, ( unsigned int ) int15_fakee820,
00092                                 &real_int15_vector );
00093 }


Generated on Tue Apr 6 20:01:12 2010 for gPXE by  doxygen 1.5.7.1