boot: drop now-unused image_base param
This commit is contained in:
+1
-1
@@ -2775,7 +2775,7 @@ static EFI_STATUS call_image_start(
|
||||
uint32_t compat_address;
|
||||
|
||||
err = pe_kernel_info(loaded_image->ImageBase, /* ret_entry_point= */ NULL, &compat_address,
|
||||
/* ret_image_base= */ NULL, /* ret_size_in_memory= */ NULL);
|
||||
/* ret_size_in_memory= */ NULL);
|
||||
if (err != EFI_SUCCESS) {
|
||||
if (err != EFI_UNSUPPORTED)
|
||||
return log_error_status(err, "Error finding kernel compat entry address: %m");
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ EFI_STATUS linux_exec(
|
||||
assert(iovec_is_set(kernel));
|
||||
assert(iovec_is_valid(initrd));
|
||||
|
||||
err = pe_kernel_info(kernel->iov_base, &entry_point, &compat_entry_point, /* ret_image_base= */ NULL, &kernel_size_in_memory);
|
||||
err = pe_kernel_info(kernel->iov_base, &entry_point, &compat_entry_point, &kernel_size_in_memory);
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
if (err == EFI_UNSUPPORTED)
|
||||
/* Kernel is too old to support LINUX_INITRD_MEDIA_GUID, try the deprecated EFI handover
|
||||
|
||||
+1
-17
@@ -459,7 +459,7 @@ static uint32_t get_compatibility_entry_address(const DosFileHeader *dos, const
|
||||
return 0;
|
||||
}
|
||||
|
||||
EFI_STATUS pe_kernel_info(const void *base, uint32_t *ret_entry_point, uint32_t *ret_compat_entry_point, uint64_t *ret_image_base, size_t *ret_size_in_memory) {
|
||||
EFI_STATUS pe_kernel_info(const void *base, uint32_t *ret_entry_point, uint32_t *ret_compat_entry_point, size_t *ret_size_in_memory) {
|
||||
assert(base);
|
||||
|
||||
const DosFileHeader *dos = (const DosFileHeader *) base;
|
||||
@@ -470,18 +470,6 @@ EFI_STATUS pe_kernel_info(const void *base, uint32_t *ret_entry_point, uint32_t
|
||||
if (!verify_pe(dos, pe, /* allow_compatibility= */ true))
|
||||
return EFI_LOAD_ERROR;
|
||||
|
||||
uint64_t image_base;
|
||||
switch (pe->OptionalHeader.Magic) {
|
||||
case OPTHDR32_MAGIC:
|
||||
image_base = pe->OptionalHeader.ImageBase32;
|
||||
break;
|
||||
case OPTHDR64_MAGIC:
|
||||
image_base = pe->OptionalHeader.ImageBase64;
|
||||
break;
|
||||
default:
|
||||
assert_not_reached();
|
||||
}
|
||||
|
||||
/* When allocating we need to also consider the virtual/uninitialized data sections, so parse it out
|
||||
* of the SizeOfImage field in the PE header and return it */
|
||||
size_t size_in_memory = pe->OptionalHeader.SizeOfImage;
|
||||
@@ -495,8 +483,6 @@ EFI_STATUS pe_kernel_info(const void *base, uint32_t *ret_entry_point, uint32_t
|
||||
*ret_entry_point = pe->OptionalHeader.AddressOfEntryPoint;
|
||||
if (ret_compat_entry_point)
|
||||
*ret_compat_entry_point = 0;
|
||||
if (ret_image_base)
|
||||
*ret_image_base = image_base;
|
||||
if (ret_size_in_memory)
|
||||
*ret_size_in_memory = size_in_memory;
|
||||
return EFI_SUCCESS;
|
||||
@@ -511,8 +497,6 @@ EFI_STATUS pe_kernel_info(const void *base, uint32_t *ret_entry_point, uint32_t
|
||||
*ret_entry_point = 0;
|
||||
if (ret_compat_entry_point)
|
||||
*ret_compat_entry_point = compat_entry_point;
|
||||
if (ret_image_base)
|
||||
*ret_image_base = image_base;
|
||||
if (ret_size_in_memory)
|
||||
*ret_size_in_memory = size_in_memory;
|
||||
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ EFI_STATUS pe_memory_locate_sections(
|
||||
const char *const section_names[],
|
||||
PeSectionVector sections[]);
|
||||
|
||||
EFI_STATUS pe_kernel_info(const void *base, uint32_t *ret_entry_point, uint32_t *ret_compat_entry_point, uint64_t *ret_image_base, size_t *ret_size_in_memory);
|
||||
EFI_STATUS pe_kernel_info(const void *base, uint32_t *ret_entry_point, uint32_t *ret_compat_entry_point, size_t *ret_size_in_memory);
|
||||
|
||||
EFI_STATUS pe_kernel_check_no_relocation(const void *base);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user