From 600f584d8191799acc19464c4a07f3056083057a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 8 Apr 2020 16:57:20 -0600 Subject: 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 Reviewed-by: Bin Meng --- drivers/cpu/cpu_sandbox.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/cpu') diff --git a/drivers/cpu/cpu_sandbox.c b/drivers/cpu/cpu_sandbox.c index ff87e8a..05b384f 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; } -- cgit v1.1