aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/boot/compressed')
-rw-r--r--arch/x86/boot/compressed/eboot.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 65b6a34f56d6..2a4430a0fb03 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -457,7 +457,8 @@ struct boot_params *make_boot_params(void *handle, efi_system_table_t *_table)
457 return NULL; 457 return NULL;
458 } 458 }
459 459
460 status = low_alloc(sys_table, 0x4000, 1, (unsigned long *)&boot_params); 460 status = efi_low_alloc(sys_table, 0x4000, 1,
461 (unsigned long *)&boot_params);
461 if (status != EFI_SUCCESS) { 462 if (status != EFI_SUCCESS) {
462 efi_printk(sys_table, "Failed to alloc lowmem for boot params\n"); 463 efi_printk(sys_table, "Failed to alloc lowmem for boot params\n");
463 return NULL; 464 return NULL;
@@ -503,7 +504,7 @@ struct boot_params *make_boot_params(void *handle, efi_system_table_t *_table)
503 504
504 options_size++; /* NUL termination */ 505 options_size++; /* NUL termination */
505 506
506 status = low_alloc(sys_table, options_size, 1, 507 status = efi_low_alloc(sys_table, options_size, 1,
507 &cmdline); 508 &cmdline);
508 if (status != EFI_SUCCESS) { 509 if (status != EFI_SUCCESS) {
509 efi_printk(sys_table, "Failed to alloc mem for cmdline\n"); 510 efi_printk(sys_table, "Failed to alloc mem for cmdline\n");
@@ -537,9 +538,9 @@ struct boot_params *make_boot_params(void *handle, efi_system_table_t *_table)
537 return boot_params; 538 return boot_params;
538fail2: 539fail2:
539 if (options_size) 540 if (options_size)
540 low_free(sys_table, options_size, hdr->cmd_line_ptr); 541 efi_free(sys_table, options_size, hdr->cmd_line_ptr);
541fail: 542fail:
542 low_free(sys_table, 0x4000, (unsigned long)boot_params); 543 efi_free(sys_table, 0x4000, (unsigned long)boot_params);
543 return NULL; 544 return NULL;
544} 545}
545 546
@@ -562,7 +563,7 @@ static efi_status_t exit_boot(struct boot_params *boot_params,
562again: 563again:
563 size += sizeof(*mem_map) * 2; 564 size += sizeof(*mem_map) * 2;
564 _size = size; 565 _size = size;
565 status = low_alloc(sys_table, size, 1, (unsigned long *)&mem_map); 566 status = efi_low_alloc(sys_table, size, 1, (unsigned long *)&mem_map);
566 if (status != EFI_SUCCESS) 567 if (status != EFI_SUCCESS)
567 return status; 568 return status;
568 569
@@ -570,7 +571,7 @@ get_map:
570 status = efi_call_phys5(sys_table->boottime->get_memory_map, &size, 571 status = efi_call_phys5(sys_table->boottime->get_memory_map, &size,
571 mem_map, &key, &desc_size, &desc_version); 572 mem_map, &key, &desc_size, &desc_version);
572 if (status == EFI_BUFFER_TOO_SMALL) { 573 if (status == EFI_BUFFER_TOO_SMALL) {
573 low_free(sys_table, _size, (unsigned long)mem_map); 574 efi_free(sys_table, _size, (unsigned long)mem_map);
574 goto again; 575 goto again;
575 } 576 }
576 577
@@ -672,7 +673,7 @@ get_map:
672 return EFI_SUCCESS; 673 return EFI_SUCCESS;
673 674
674free_mem_map: 675free_mem_map:
675 low_free(sys_table, _size, (unsigned long)mem_map); 676 efi_free(sys_table, _size, (unsigned long)mem_map);
676 return status; 677 return status;
677} 678}
678 679
@@ -695,7 +696,7 @@ static efi_status_t relocate_kernel(struct setup_header *hdr)
695 EFI_ALLOCATE_ADDRESS, EFI_LOADER_DATA, 696 EFI_ALLOCATE_ADDRESS, EFI_LOADER_DATA,
696 nr_pages, &start); 697 nr_pages, &start);
697 if (status != EFI_SUCCESS) { 698 if (status != EFI_SUCCESS) {
698 status = low_alloc(sys_table, hdr->init_size, 699 status = efi_low_alloc(sys_table, hdr->init_size,
699 hdr->kernel_alignment, &start); 700 hdr->kernel_alignment, &start);
700 if (status != EFI_SUCCESS) 701 if (status != EFI_SUCCESS)
701 efi_printk(sys_table, "Failed to alloc mem for kernel\n"); 702 efi_printk(sys_table, "Failed to alloc mem for kernel\n");
@@ -743,7 +744,7 @@ struct boot_params *efi_main(void *handle, efi_system_table_t *_table,
743 } 744 }
744 745
745 gdt->size = 0x800; 746 gdt->size = 0x800;
746 status = low_alloc(sys_table, gdt->size, 8, 747 status = efi_low_alloc(sys_table, gdt->size, 8,
747 (unsigned long *)&gdt->address); 748 (unsigned long *)&gdt->address);
748 if (status != EFI_SUCCESS) { 749 if (status != EFI_SUCCESS) {
749 efi_printk(sys_table, "Failed to alloc mem for gdt\n"); 750 efi_printk(sys_table, "Failed to alloc mem for gdt\n");