aboutsummaryrefslogtreecommitdiff
path: root/drivers/cpu/cpu_sandbox.c
diff options
context:
space:
mode:
authorSimon Glass2020-04-08 16:57:20 -0600
committerBin Meng2020-04-16 14:36:28 +0800
commit600f584d8191799acc19464c4a07f3056083057a (patch)
tree87bbba5d9ad49ad045b524d5ce9a1a8d60abd508 /drivers/cpu/cpu_sandbox.c
parent98036fbdaf0ac1d6dc3ab3cb6db24c020bb65d6f (diff)
cpu: Support querying the address width
Different CPUs may support different address widths, meaning the amount of memory they can address. Add a property for this to the cpu_info struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/cpu/cpu_sandbox.c')
-rw-r--r--drivers/cpu/cpu_sandbox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cpu/cpu_sandbox.c b/drivers/cpu/cpu_sandbox.c
index ff87e8adca3..05b384f6a45 100644
--- a/drivers/cpu/cpu_sandbox.c
+++ b/drivers/cpu/cpu_sandbox.c
@@ -19,6 +19,7 @@ int cpu_sandbox_get_info(struct udevice *dev, struct cpu_info *info)
{
info->cpu_freq = 42 * 42 * 42 * 42 * 42;
info->features = 0x42424242;
+ info->address_width = IS_ENABLED(CONFIG_PHYS_64BIT) ? 64 : 32;
return 0;
}