常用全局变量
max_pfn
max_pfn = e820__end_of_ram_pfn();MAX_PHYSMEM_BITS
# define MAX_PHYSMEM_BITS (pgtable_l5_enabled() ? 52 : 46)phys_base
SYM_DATA(phys_base, .quad 0x0)
EXPORT_SYMBOL(phys_base) /*
* Compute the delta between the address I am compiled to run at
* and the address I am actually running at.
*/
load_delta = physaddr - (unsigned long)(_text - __START_KERNEL_map);
RIP_REL_REF(phys_base) = load_delta;Last updated