diff options
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r-- | include/linux/efi.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index bd3837022307..d87acf62958e 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -1579,9 +1579,22 @@ char *efi_convert_cmdline(efi_system_table_t *sys_table_arg, | |||
1579 | efi_status_t efi_get_memory_map(efi_system_table_t *sys_table_arg, | 1579 | efi_status_t efi_get_memory_map(efi_system_table_t *sys_table_arg, |
1580 | struct efi_boot_memmap *map); | 1580 | struct efi_boot_memmap *map); |
1581 | 1581 | ||
1582 | efi_status_t efi_low_alloc_above(efi_system_table_t *sys_table_arg, | ||
1583 | unsigned long size, unsigned long align, | ||
1584 | unsigned long *addr, unsigned long min); | ||
1585 | |||
1586 | static inline | ||
1582 | efi_status_t efi_low_alloc(efi_system_table_t *sys_table_arg, | 1587 | efi_status_t efi_low_alloc(efi_system_table_t *sys_table_arg, |
1583 | unsigned long size, unsigned long align, | 1588 | unsigned long size, unsigned long align, |
1584 | unsigned long *addr); | 1589 | unsigned long *addr) |
1590 | { | ||
1591 | /* | ||
1592 | * Don't allocate at 0x0. It will confuse code that | ||
1593 | * checks pointers against NULL. Skip the first 8 | ||
1594 | * bytes so we start at a nice even number. | ||
1595 | */ | ||
1596 | return efi_low_alloc_above(sys_table_arg, size, align, addr, 0x8); | ||
1597 | } | ||
1585 | 1598 | ||
1586 | efi_status_t efi_high_alloc(efi_system_table_t *sys_table_arg, | 1599 | efi_status_t efi_high_alloc(efi_system_table_t *sys_table_arg, |
1587 | unsigned long size, unsigned long align, | 1600 | unsigned long size, unsigned long align, |
@@ -1592,7 +1605,8 @@ efi_status_t efi_relocate_kernel(efi_system_table_t *sys_table_arg, | |||
1592 | unsigned long image_size, | 1605 | unsigned long image_size, |
1593 | unsigned long alloc_size, | 1606 | unsigned long alloc_size, |
1594 | unsigned long preferred_addr, | 1607 | unsigned long preferred_addr, |
1595 | unsigned long alignment); | 1608 | unsigned long alignment, |
1609 | unsigned long min_addr); | ||
1596 | 1610 | ||
1597 | efi_status_t handle_cmdline_files(efi_system_table_t *sys_table_arg, | 1611 | efi_status_t handle_cmdline_files(efi_system_table_t *sys_table_arg, |
1598 | efi_loaded_image_t *image, | 1612 | efi_loaded_image_t *image, |