]> git.baikalelectronics.ru Git - uboot.git/commit
riscv: add Kconfig entries for the code model
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>
Wed, 12 Dec 2018 14:12:23 +0000 (06:12 -0800)
committerAndes <uboot@andestech.com>
Tue, 18 Dec 2018 01:56:26 +0000 (09:56 +0800)
commit4600ab3e71b75b2f533f1c535e04fb6fb153b356
tree0ac0385063b900f9b98c484266df33c164894685
parented168a92842b2951d7a415d7cc2d72eef81fc7ae
riscv: add Kconfig entries for the code model

RISC-V has two code models, medium low (medlow) and medium any (medany).
Medlow limits addressable memory to a single 2 GiB range between the
absolute addresses -2 GiB and +2 GiB. Medany limits addressable memory
to any single 2 GiB address range.

By default, medlow is selected for U-Boot on both 32-bit and 64-bit
systems.

The -mcmodel compiler flag is selected according to the Kconfig
configuration.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
[bmeng: adjust to make medlow the default code model for U-Boot]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
arch/riscv/Kconfig
arch/riscv/Makefile