quirks.c (de3fbb2aa802a267dee2213ae7d5a1e19eb4294a) | quirks.c (53ab85ebfd27cdf16c8ddc72781c072a63bef3cb) |
---|---|
1#define pr_fmt(fmt) "efi: " fmt 2 3#include <linux/init.h> 4#include <linux/kernel.h> 5#include <linux/string.h> 6#include <linux/time.h> 7#include <linux/types.h> 8#include <linux/efi.h> --- 319 unchanged lines hidden (view full) --- 328 if (md->type != EFI_BOOT_SERVICES_CODE && 329 md->type != EFI_BOOT_SERVICES_DATA) 330 continue; 331 332 already_reserved = memblock_is_region_reserved(start, size); 333 334 /* 335 * Because the following memblock_reserve() is paired | 1#define pr_fmt(fmt) "efi: " fmt 2 3#include <linux/init.h> 4#include <linux/kernel.h> 5#include <linux/string.h> 6#include <linux/time.h> 7#include <linux/types.h> 8#include <linux/efi.h> --- 319 unchanged lines hidden (view full) --- 328 if (md->type != EFI_BOOT_SERVICES_CODE && 329 md->type != EFI_BOOT_SERVICES_DATA) 330 continue; 331 332 already_reserved = memblock_is_region_reserved(start, size); 333 334 /* 335 * Because the following memblock_reserve() is paired |
336 * with free_bootmem_late() for this region in | 336 * with memblock_free_late() for this region in |
337 * efi_free_boot_services(), we must be extremely 338 * careful not to reserve, and subsequently free, 339 * critical regions of memory (like the kernel image) or 340 * those regions that somebody else has already 341 * reserved. 342 * 343 * A good example of a critical region that must not be 344 * freed is page zero (first 4Kb of memory), which may --- 14 unchanged lines hidden (view full) --- 359 360 /* 361 * We don't own the region. We must not free it. 362 * 363 * Setting this bit for a boot services region really 364 * doesn't make sense as far as the firmware is 365 * concerned, but it does provide us with a way to tag 366 * those regions that must not be paired with | 337 * efi_free_boot_services(), we must be extremely 338 * careful not to reserve, and subsequently free, 339 * critical regions of memory (like the kernel image) or 340 * those regions that somebody else has already 341 * reserved. 342 * 343 * A good example of a critical region that must not be 344 * freed is page zero (first 4Kb of memory), which may --- 14 unchanged lines hidden (view full) --- 359 360 /* 361 * We don't own the region. We must not free it. 362 * 363 * Setting this bit for a boot services region really 364 * doesn't make sense as far as the firmware is 365 * concerned, but it does provide us with a way to tag 366 * those regions that must not be paired with |
367 * free_bootmem_late(). | 367 * memblock_free_late(). |
368 */ 369 md->attribute |= EFI_MEMORY_RUNTIME; 370 } 371} 372 373void __init efi_free_boot_services(void) 374{ 375 phys_addr_t new_phys, new_size; --- 33 unchanged lines hidden (view full) --- 409 */ 410 rm_size = real_mode_size_needed(); 411 if (rm_size && (start + rm_size) < (1<<20) && size >= rm_size) { 412 set_real_mode_mem(start, rm_size); 413 start += rm_size; 414 size -= rm_size; 415 } 416 | 368 */ 369 md->attribute |= EFI_MEMORY_RUNTIME; 370 } 371} 372 373void __init efi_free_boot_services(void) 374{ 375 phys_addr_t new_phys, new_size; --- 33 unchanged lines hidden (view full) --- 409 */ 410 rm_size = real_mode_size_needed(); 411 if (rm_size && (start + rm_size) < (1<<20) && size >= rm_size) { 412 set_real_mode_mem(start, rm_size); 413 start += rm_size; 414 size -= rm_size; 415 } 416 |
417 free_bootmem_late(start, size); | 417 memblock_free_late(start, size); |
418 } 419 420 if (!num_entries) 421 return; 422 423 new_size = efi.memmap.desc_size * num_entries; 424 new_phys = efi_memmap_alloc(num_entries); 425 if (!new_phys) { --- 309 unchanged lines hidden --- | 418 } 419 420 if (!num_entries) 421 return; 422 423 new_size = efi.memmap.desc_size * num_entries; 424 new_phys = efi_memmap_alloc(num_entries); 425 if (!new_phys) { --- 309 unchanged lines hidden --- |