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>
diff --git a/include/cpu.h b/include/cpu.h
index 28dd48f..6b1b6b3 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -44,10 +44,12 @@
*
* @cpu_freq: Current CPU frequency in Hz
* @features: Flags for supported CPU features
+ * @address_width: Width of the CPU address space in bits (e.g. 32)
*/
struct cpu_info {
ulong cpu_freq;
ulong features;
+ uint address_width;
};
struct cpu_ops {