@@ -468,6 +468,7 @@ int x86_cpu_init_f(void)
if (ll_boot_init())
setup_cpu_features();
setup_identity();
+ gd->arch.phys_bits = cpu_phys_address_size();
setup_mtrr();
setup_pci_ram_top();
@@ -483,6 +484,7 @@ int x86_cpu_reinit_f(void)
long addr;
setup_identity();
+ gd->arch.phys_bits = cpu_phys_address_size();
setup_pci_ram_top();
addr = locate_coreboot_table();
if (addr >= 0) {
@@ -127,6 +127,7 @@ struct arch_global_data {
ulong table_end; /* End address of x86 tables */
ulong table_start_high; /* Start address of high x86 tables */
ulong table_end_high; /* End address of high x86 tables */
+ uint phys_bits; /* Number of physical address bits */
};
#endif
@@ -27,6 +27,7 @@ void arch_print_bdinfo(void)
bdinfo_print_num_l("table end", gd->arch.table_end);
bdinfo_print_num_l(" high start", gd->arch.table_start_high);
bdinfo_print_num_l(" high end", gd->arch.table_end_high);
+ bdinfo_print_num_l("phys bits", gd->arch.phys_bits);
if (IS_ENABLED(CONFIG_EFI_STUB))
efi_show_bdinfo();
Add this information to global_data and show it with the 'bdinfo' command. For now we use CONFIG_CPU_ADDR_BITS to control the number of bits, but this could change if needed. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v2) Changes in v2: - Add new patch to show the number of physical address bits arch/x86/cpu/i386/cpu.c | 2 ++ arch/x86/include/asm/global_data.h | 1 + arch/x86/lib/bdinfo.c | 1 + 3 files changed, 4 insertions(+)