Revert "elfloader/shoehorn: cleanup sel4test fudge factor hack" This reverts commit 1a1c2c7e5bcbe9744afc1bbc3e25271af7c763c8. Change-Id: Icef1dd9698f504680f147764557775123404a44d
diff --git a/cmake-tool/helpers/shoehorn.py b/cmake-tool/helpers/shoehorn.py index e6dcee0..0bba19b 100755 --- a/cmake-tool/helpers/shoehorn.py +++ b/cmake-tool/helpers/shoehorn.py
@@ -126,11 +126,6 @@ default=False, action='store_true', help='assume ELF-loader will put rootservers at top of' ' memory') - parser.add_argument('--fudge-factor', - dest='fudge_factor', - type=int, - nargs='?', - help='Extra space to make room for (bytes)') parser.add_argument('platform_filename', nargs=1, type=str, help='YAML description of platform parameters (e.g.,' ' platform_gen.yaml)') @@ -143,7 +138,6 @@ image_size = os.path.getsize(image) do_load_rootservers_high = args.load_rootservers_high platform = platform_sift.load_data(args.platform_filename[0]) - fudge_factor = args.fudge_factor rootservers = [] is_dtb_present = False @@ -208,12 +202,11 @@ marker += elf_sift.get_memory_usage(elf, align=True) debug_marker_set(marker, 'end of rootserver') - if fudge_factor: - # Note: sel4test_driver eats (almost) 4 more MiB than it claims to. - # Fixing this is JIRA SELFOUR-2335. - # fudge_factor = 4 * 1024 * 1024 - marker += elf_sift.get_aligned_size(fudge_factor) - debug_marker_set(marker, 'end of (aligned) fudge factor') + # Note: sel4test_driver eats (almost) 4 more MiB than it claims to. + # Fixing this is JIRA SELFOUR-2335. + fudge_factor = 4 * 1024 * 1024 + marker += elf_sift.get_aligned_size(fudge_factor) + debug_marker_set(marker, 'end of (aligned) fudge factor') image_start_address = marker
diff --git a/elfloader-tool/CMakeLists.txt b/elfloader-tool/CMakeLists.txt index e83987d..8ee1244 100644 --- a/elfloader-tool/CMakeLists.txt +++ b/elfloader-tool/CMakeLists.txt
@@ -91,12 +91,6 @@ DEPENDS KernelArchArmV8a ) -config_option( - ElfLoaderFudgeFactor ELFLOADER_FUDGE_FACTOR - "Additional space for shoehorn to reserve" - DEFAULT OFF -) - add_config_library(elfloader "${configure_string}") add_compile_options(-D_XOPEN_SOURCE=700 -ffreestanding -Wall -Werror -W -Wextra) @@ -300,9 +294,6 @@ set(PLATFORM_SIFT "${CMAKE_TOOL_HELPERS_DIR}/platform_sift.py") set(ELF_SIFT "${CMAKE_TOOL_HELPERS_DIR}/elf_sift.py") set(SHOEHORN "${CMAKE_TOOL_HELPERS_DIR}/shoehorn.py") - if(ElfloaderFudgeFactor) - set(SHOEHORN_OPTIONS "--fudge-factor=${ElfloaderFudgeFactor}") - endif() set(ARCHIVE_O "${CMAKE_CURRENT_BINARY_DIR}/archive.o") add_custom_command( OUTPUT "${IMAGE_START_ADDR_H}" "${PLATFORM_INFO_H}" @@ -318,7 +309,7 @@ # The `shoehorn` tool computes a reasonable image start address. It calls # `elf_sift` to obtain details about where the extracted payloads will be # and how big they are. - "${SHOEHORN}" ${SHOEHORN_OPTIONS} "${platform_yaml}" "${ARCHIVE_O}" > "${IMAGE_START_ADDR_H}" + "${SHOEHORN}" "${platform_yaml}" "${ARCHIVE_O}" > "${IMAGE_START_ADDR_H}" VERBATIM DEPENDS # First command's dependencies
diff --git a/elfloader-tool/helpers.cmake b/elfloader-tool/helpers.cmake index ce1b2ae..ec97df5 100644 --- a/elfloader-tool/helpers.cmake +++ b/elfloader-tool/helpers.cmake
@@ -11,8 +11,3 @@ function(SetElfloaderRootserversLast) set(ElfloaderRootserversLast ON CACHE BOOL "" FORCE) endfunction() - -# Hook for sel4test to effect shoehorn work. -function(SetElfloaderFudgeFactor FUDGE) - set(ElfloaderFudgeFactor ${FUDGE} CACHE STRING "" FORCE) -endfunction()