33 #define real_int15_vector __use_text16 ( real_int15_vector ) 45 #define E820_TYPE_RAM 1 46 #define E820_TYPE_RSVD 2 47 #define E820_TYPE_ACPI 3 48 #define E820_TYPE_NVS 4 52 { 0x00000000ULL, ( 0x000a0000ULL - 0x00000000ULL ),
E820_TYPE_RAM },
53 { 0x00100000ULL, ( 0xcfb50000ULL - 0x00100000ULL ),
E820_TYPE_RAM },
54 { 0xcfb50000ULL, ( 0xcfb64000ULL - 0xcfb50000ULL ),
E820_TYPE_RSVD },
55 { 0xcfb64000ULL, ( 0xcfb66000ULL - 0xcfb64000ULL ),
E820_TYPE_RSVD },
56 { 0xcfb66000ULL, ( 0xcfb85c00ULL - 0xcfb66000ULL ),
E820_TYPE_ACPI },
57 { 0xcfb85c00ULL, ( 0xd0000000ULL - 0xcfb85c00ULL ),
E820_TYPE_RSVD },
58 { 0xe0000000ULL, ( 0xf0000000ULL - 0xe0000000ULL ),
E820_TYPE_RSVD },
59 { 0xfe000000ULL, (0x100000000ULL - 0xfe000000ULL ),
E820_TYPE_RSVD },
60 {0x100000000ULL, (0x230000000ULL -0x100000000ULL ),
E820_TYPE_RAM },
62 #define e820map __use_text16 ( e820map ) 68 "cmpl $0xe820, %%eax\n\t" 70 "cmpl $0x534d4150, %%edx\n\t" 74 "andb $~0x01, 22(%%bp)\n\t" 75 "leaw e820map(%%bx), %%si\n\t" 78 "movl %%edx, %%eax\n\t" 82 "xorl %%ebx,%%ebx\n\t" 88 "ljmp *%%cs:real_int15_vector\n\t" )
89 : :
"i" (
sizeof (
e820map ) ) );
#define E820_TYPE_ACPI
ACPI reclaim memory.
unsigned long long uint64_t
static struct segoff __text16(real_int15_vector)
Original INT 15 handler.
#define real_int15_vector
void hook_bios_interrupt(unsigned int interrupt, unsigned int handler, struct segoff *chain_vector)
Hook INT vector.
int unhook_bios_interrupt(unsigned int interrupt, unsigned int handler, struct segoff *chain_vector)
Unhook INT vector.
uint64_t start
Start of region.
#define __used
Declare a function as used.
An INT 15,e820 memory map entry.
uint64_t len
Length of region.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
void int15_fakee820()
Assembly routine in inline asm.
__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))
static struct e820_entry __text16_array(e820map)
Fake e820 map.
uint32_t type
Type of region.
__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 E820_TYPE_RAM
Normal memory.
#define E820_TYPE_RSVD
Reserved and unavailable.
struct e820_entry __attribute__((packed))
#define TEXT16_CODE(asm_code_str)