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 <sjg@chromium.org>
This commit is contained in:
1
Kconfig
1
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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user