summaryrefslogtreecommitdiff
path: root/drivers/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-04-09 01:57:20 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-04-16 09:36:28 +0300
commit600f584d8191799acc19464c4a07f3056083057a (patch)
tree87bbba5d9ad49ad045b524d5ce9a1a8d60abd508 /drivers/cpu
parent98036fbdaf0ac1d6dc3ab3cb6db24c020bb65d6f (diff)
downloadu-boot-600f584d8191799acc19464c4a07f3056083057a.tar.xz
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')
-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 ff87e8adca..05b384f6a4 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;
}