From ba34b61dcb3c23f0363cb69a59f45700a4b92862 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 May 2025 05:12:32 -0600 Subject: [PATCH] sandbox: Enable PHYS_64BIT for 64-bit builds Sandbox is special in that we use the bitness of the host. This should extend to PHYS_64BIT as well, so enable this option when building on a 64-bit host. Update the conditions in io.h so that 64-bit access is available. Signed-off-by: Simon Glass --- Kconfig | 1 + arch/sandbox/include/asm/io.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Kconfig b/Kconfig index 589fed689c8..de9d9ad5653 100644 --- a/Kconfig +++ b/Kconfig @@ -448,6 +448,7 @@ endif # EXPERT config PHYS_64BIT bool "64bit physical address support" select FDT_64BIT + default y if HOST_64BIT help Say Y here to support 64bit physical memory address. This can be used not only for 64bit SoCs, but also for diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 3d09170063f..3c3545a2747 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -39,13 +39,13 @@ void sandbox_write(void *addr, unsigned int val, enum sandboxio_size_t size); #define readb(addr) sandbox_read((const void *)addr, SB_SIZE_8) #define readw(addr) sandbox_read((const void *)addr, SB_SIZE_16) #define readl(addr) sandbox_read((const void *)addr, SB_SIZE_32) -#ifdef CONFIG_SANDBOX64 +#ifdef CONFIG_HOST_64BIT #define readq(addr) sandbox_read((const void *)addr, SB_SIZE_64) #endif #define writeb(v, addr) sandbox_write((void *)addr, v, SB_SIZE_8) #define writew(v, addr) sandbox_write((void *)addr, v, SB_SIZE_16) #define writel(v, addr) sandbox_write((void *)addr, v, SB_SIZE_32) -#ifdef CONFIG_SANDBOX64 +#ifdef CONFIG_HOST_64BIT #define writeq(v, addr) sandbox_write((void *)addr, v, SB_SIZE_64) #endif