#include <realmode.h>#include <biosint.h>Go to the source code of this file.
Data Structures | |
| struct | e820_entry |
| An INT 15,e820 memory map entry. More... | |
Defines | |
| #define | real_int15_vector __use_text16 ( real_int15_vector ) |
| #define | E820_TYPE_RAM 1 |
| Normal memory. | |
| #define | E820_TYPE_RSVD 2 |
| Reserved and unavailable. | |
| #define | E820_TYPE_ACPI 3 |
| ACPI reclaim memory. | |
| #define | E820_TYPE_NVS 4 |
| ACPI NVS memory. | |
| #define | e820map __use_text16 ( e820map ) |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| void | int15_fakee820 () |
| Assembly routine in inline asm. | |
| static struct segoff | __text16 (real_int15_vector) |
| Original INT 15 handler. | |
| static struct e820_entry | __text16_array (e820map) |
| Fake e820 map. | |
| void | fake_e820 (void) |
| void | unfake_e820 (void) |
Variables | |
| struct e820_entry | packed |
| An INT 15,e820 memory map entry. | |
| #define real_int15_vector __use_text16 ( real_int15_vector ) |
| #define E820_TYPE_RAM 1 |
Normal memory.
Definition at line 40 of file fakee820.c.
Referenced by __text16_array(), and meme820().
| #define E820_TYPE_RSVD 2 |
| #define E820_TYPE_ACPI 3 |
| #define E820_TYPE_NVS 4 |
| #define e820map __use_text16 ( e820map ) |
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| void int15_fakee820 | ( | ) |
| static struct segoff __text16 | ( | real_int15_vector | ) | [static, read] |
Original INT 15 handler.
| static struct e820_entry __text16_array | ( | e820map | ) | [static, read] |
Fake e820 map.
Definition at line 46 of file fakee820.c.
References E820_TYPE_ACPI, E820_TYPE_RAM, and E820_TYPE_RSVD.
00046 { 00047 { 0x00000000ULL, ( 0x000a0000ULL - 0x00000000ULL ), E820_TYPE_RAM }, 00048 { 0x00100000ULL, ( 0xcfb50000ULL - 0x00100000ULL ), E820_TYPE_RAM }, 00049 { 0xcfb50000ULL, ( 0xcfb64000ULL - 0xcfb50000ULL ), E820_TYPE_RSVD }, 00050 { 0xcfb64000ULL, ( 0xcfb66000ULL - 0xcfb64000ULL ), E820_TYPE_RSVD }, 00051 { 0xcfb66000ULL, ( 0xcfb85c00ULL - 0xcfb66000ULL ), E820_TYPE_ACPI }, 00052 { 0xcfb85c00ULL, ( 0xd0000000ULL - 0xcfb85c00ULL ), E820_TYPE_RSVD }, 00053 { 0xe0000000ULL, ( 0xf0000000ULL - 0xe0000000ULL ), E820_TYPE_RSVD }, 00054 { 0xfe000000ULL, (0x100000000ULL - 0xfe000000ULL ), E820_TYPE_RSVD }, 00055 {0x100000000ULL, (0x230000000ULL -0x100000000ULL ), E820_TYPE_RAM }, 00056 };
| 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 }
| struct e820_entry packed |
An INT 15,e820 memory map entry.
1.5.7.1