blob: 124058442c55a096b97c37790c01eaabaf33fd8b [file] [log] [blame]
Simon Glass912e06f2021-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
8#include <common.h>
9#include <efi.h>
10#include <init.h>
Simon Glass3a127252023-03-10 12:47:14 -080011#include <asm/cpu.h>
Simon Glass912e06f2021-09-24 18:30:21 -060012#include <asm/efi.h>
13#include <asm/global_data.h>
14
15DECLARE_GLOBAL_DATA_PTR;
16
17void arch_print_bdinfo(void)
18{
19 bdinfo_print_num_l("prev table", gd->arch.table);
Simon Glass3a127252023-03-10 12:47:14 -080020 bdinfo_print_num_l("clock_rate", gd->arch.clock_rate);
21 bdinfo_print_num_l("tsc_base", gd->arch.tsc_base);
22 bdinfo_print_num_l("vendor", gd->arch.x86_vendor);
23 bdinfo_print_str(" name", cpu_vendor_name(gd->arch.x86_vendor));
24 bdinfo_print_num_l("model", gd->arch.x86_model);
Simon Glass1c26e962023-07-15 21:38:42 -060025 bdinfo_print_num_l("phys_addr in bits", cpu_phys_address_size());
Simon Glass66ca25c2023-07-15 21:39:10 -060026 bdinfo_print_num_l("table start", gd->arch.table_start);
27 bdinfo_print_num_l("table end", gd->arch.table_end);
28 bdinfo_print_num_l(" high start", gd->arch.table_start_high);
29 bdinfo_print_num_l(" high end", gd->arch.table_end_high);
Simon Glass912e06f2021-09-24 18:30:21 -060030
31 if (IS_ENABLED(CONFIG_EFI_STUB))
32 efi_show_bdinfo();
33}