ARM-software / tf-issues

Issue tracking for the ARM Trusted Firmware project
37 stars 16 forks source link

Variables unnecessarily in .data section #107

Closed athoelke closed 10 years ago

athoelke commented 10 years ago

There are a significant number of variables that are declared and initialised as non-const - when they could either be uninitialised (zero init) or should be const. This will place them in .bss or .rodata sections, possibly reduce image size or memory footprint and make the code more robust.

In particular there is a lot of non-const structures in the IO framework - fixing this will require addition of const specifiers in the framework and library interfaces.

athoelke commented 10 years ago

The full list of variables currently in .data, most of which could be made const:

policies
fip_block_spec
bl2_file_spec
bl31_file_spec
bl32_file_spec
bl33_file_spec
sh_dev_info
sh_dev_funcs
sh_dev_connector
fip_dev_info
fip_dev_funcs
name_uuid
fip_dev_connector
memmap_dev_info
memmap_dev_funcs
memmap_dev_connector

fvp_plat_pm_ops

next_image_type

uart_base