[U-Boot] [PATCH v2 07/29] riscv: add Kconfig entries for the code model
Bin Meng
bmeng.cn at gmail.com
Wed Oct 31 02:13:54 UTC 2018
Hi Lukas,
On Tue, Oct 30, 2018 at 8:57 PM Lukas Auer
<lukas.auer at aisec.fraunhofer.de> wrote:
>
> 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 on 32-bit systems and medany on 64-bit
> systems. This matches the configuration in Linux.
>
> The -mcmodel compiler flag is selected according to the Kconfig
> configuration.
>
> Signed-off-by: Lukas Auer <lukas.auer at aisec.fraunhofer.de>
> ---
>
> Changes in v2:
> - Change ISA string construction, as suggested by Bin Meng
>
> arch/riscv/Kconfig | 19 +++++++++++++++++++
> arch/riscv/Makefile | 9 ++++++++-
> 2 files changed, 27 insertions(+), 1 deletion(-)
>
I had a further look at this, and I suspect we should stick to medlow
for U-Boot, even for 64-bit. As U-Boot will be only running within the
low 4GB memory space even for 64-bit. Adding medany seems unnecessary.
Regards,
Bin
More information about the U-Boot
mailing list