Allow manually setting the AArch32 instruction set
At the moment the AArch32 instruction set isn't specified in the command line, which means that the compiler is free to choose the one it sees fit. This decision may change between compiler versions, so it is better to specify it manually. The build option AARCH32_INSTRUCTION_SET has been introduced for this reason. This option can be set to T32 or A32 to pass the correct flags to the compiler. The current behaviour is to default to T32 due to it's smaller size. Change-Id: I02297eb1d9404b5868ff7c054fbff9b3cda7fdb6 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
This commit is contained in:
parent
2a7c9e15c2
commit
8fd9d4d58a
8
Makefile
8
Makefile
|
@ -166,6 +166,14 @@ TF_CFLAGS_aarch64 = -march=armv8-a
|
||||||
LD = $(LINKER)
|
LD = $(LINKER)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (${AARCH32_INSTRUCTION_SET},A32)
|
||||||
|
TF_CFLAGS_aarch32 += -marm
|
||||||
|
else ifeq (${AARCH32_INSTRUCTION_SET},T32)
|
||||||
|
TF_CFLAGS_aarch32 += -mthumb
|
||||||
|
else
|
||||||
|
$(error Error: Unknown AArch32 instruction set ${AARCH32_INSTRUCTION_SET})
|
||||||
|
endif
|
||||||
|
|
||||||
TF_CFLAGS_aarch32 += -mno-unaligned-access
|
TF_CFLAGS_aarch32 += -mno-unaligned-access
|
||||||
TF_CFLAGS_aarch64 += -mgeneral-regs-only -mstrict-align
|
TF_CFLAGS_aarch64 += -mgeneral-regs-only -mstrict-align
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ In addition, the following optional packages and tools may be needed:
|
||||||
|
|
||||||
- To create and modify the diagram files included in the documentation, `Dia`_.
|
- To create and modify the diagram files included in the documentation, `Dia`_.
|
||||||
This tool can be found in most Linux distributions. Inkscape is needed to
|
This tool can be found in most Linux distributions. Inkscape is needed to
|
||||||
generate the actual *.png files.
|
generate the actual \*.png files.
|
||||||
|
|
||||||
Getting the TF-A source code
|
Getting the TF-A source code
|
||||||
----------------------------
|
----------------------------
|
||||||
|
@ -212,6 +212,10 @@ performed.
|
||||||
Common build options
|
Common build options
|
||||||
^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
- ``AARCH32_INSTRUCTION_SET``: Choose the AArch32 instruction set that the
|
||||||
|
compiler should use. Valid values are T32 and A32. It defaults to T32 due to
|
||||||
|
code having a smaller resulting size.
|
||||||
|
|
||||||
- ``AARCH32_SP`` : Choose the AArch32 Secure Payload component to be built as
|
- ``AARCH32_SP`` : Choose the AArch32 Secure Payload component to be built as
|
||||||
as the BL32 image when ``ARCH=aarch32``. The value should be the path to the
|
as the BL32 image when ``ARCH=aarch32``. The value should be the path to the
|
||||||
directory containing the SP source, relative to the ``bl32/``; the directory
|
directory containing the SP source, relative to the ``bl32/``; the directory
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
# poised to handle dependencies, as all build variables would have a default
|
# poised to handle dependencies, as all build variables would have a default
|
||||||
# value by then.
|
# value by then.
|
||||||
|
|
||||||
|
# Use T32 by default
|
||||||
|
AARCH32_INSTRUCTION_SET := T32
|
||||||
|
|
||||||
# The AArch32 Secure Payload to be built as BL32 image
|
# The AArch32 Secure Payload to be built as BL32 image
|
||||||
AARCH32_SP := none
|
AARCH32_SP := none
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue