blob: 2a78f578dee3976e4295a02b15a270f86f444d58 [file] [log] [blame]
Simon Glass567dfef2021-09-24 18:30:21 -06001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * x86-specific information for the 'bd' command
4 *
5 * Copyright 2021 Google LLC
6 */
7
Simon Glass567dfef2021-09-24 18:30:21 -06008#include <efi.h>
9#include <init.h>
Simon Glass40b8afe2023-03-10 12:47:14 -080010#include <asm/cpu.h>
Simon Glass567dfef2021-09-24 18:30:21 -060011#include <asm/efi.h>
12#include <asm/global_data.h>
13
14DECLARE_GLOBAL_DATA_PTR;
15
16void arch_print_bdinfo(void)
17{
18 bdinfo_print_num_l("prev table", gd->arch.table);
Simon Glass40b8afe2023-03-10 12:47:14 -080019 bdinfo_print_num_l("clock_rate", gd->arch.clock_rate);
20 bdinfo_print_num_l("tsc_base", gd->arch.tsc_base);
21 bdinfo_print_num_l("vendor", gd->arch.x86_vendor);
Simon Glass6ab545b2024-08-27 19:44:24 -060022 if (!IS_ENABLED(CONFIG_X86_64)) {
23 char vendor_name[16];
24
25 x86_cpu_vendor_info(vendor_name);
26 bdinfo_print_str(" name", vendor_name);
27 }
Simon Glass40b8afe2023-03-10 12:47:14 -080028 bdinfo_print_num_l("model", gd->arch.x86_model);
Simon Glass633af112023-07-15 21:38:42 -060029 bdinfo_print_num_l("phys_addr in bits", cpu_phys_address_size());
Simon Glass6a324892023-07-15 21:39:10 -060030 bdinfo_print_num_l("table start", gd->arch.table_start);
31 bdinfo_print_num_l("table end", gd->arch.table_end);
32 bdinfo_print_num_l(" high start", gd->arch.table_start_high);
33 bdinfo_print_num_l(" high end", gd->arch.table_end_high);
Simon Glass567dfef2021-09-24 18:30:21 -060034
35 if (IS_ENABLED(CONFIG_EFI_STUB))
36 efi_show_bdinfo();
37}