reserve_arch:
/* Architecture-specific memory reservation */ __weak int reserve_arch(void) { return 0; }
arch/x86/cpu/cpu.c
#ifndef CONFIG_EFI_STUB int reserve_arch(void) { #ifdef CONFIG_ENABLE_MRC_CACHE mrccache_reserve(); #endif
#ifdef CONFIG_SEABIOS high_table_reserve(); #endif
return 0; } #endif
arch/x86/lib/efi/efi.c
/* Find any available tables and copy them to a safe place */ int reserve_arch(void) { struct efi_info_hdr *hdr;
debug("table=%lx\n", gd->arch.table); if (!gd->arch.table) return 0;
hdr = (struct efi_info_hdr *)gd->arch.table;
gd->start_addr_sp -= hdr->total_size; memcpy((void *)gd->start_addr_sp, hdr, hdr->total_size); debug("Stashing EFI table at %lx to %lx, size %x\n", gd->arch.table, gd->start_addr_sp, hdr->total_size); gd->arch.table = gd->start_addr_sp;
return 0; }