Simon Glass | 912e06f | 2021-09-24 18:30:21 -0600 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * x86-specific information for the 'bd' command |
| 4 | * |
| 5 | * Copyright 2021 Google LLC |
| 6 | */ |
| 7 | |
Simon Glass | 912e06f | 2021-09-24 18:30:21 -0600 | [diff] [blame] | 8 | #include <efi.h> |
| 9 | #include <init.h> |
Simon Glass | 3a12725 | 2023-03-10 12:47:14 -0800 | [diff] [blame] | 10 | #include <asm/cpu.h> |
Simon Glass | 912e06f | 2021-09-24 18:30:21 -0600 | [diff] [blame] | 11 | #include <asm/efi.h> |
| 12 | #include <asm/global_data.h> |
| 13 | |
| 14 | DECLARE_GLOBAL_DATA_PTR; |
| 15 | |
| 16 | void arch_print_bdinfo(void) |
| 17 | { |
| 18 | bdinfo_print_num_l("prev table", gd->arch.table); |
Simon Glass | 3a12725 | 2023-03-10 12:47:14 -0800 | [diff] [blame] | 19 | 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); |
| 22 | bdinfo_print_str(" name", cpu_vendor_name(gd->arch.x86_vendor)); |
| 23 | bdinfo_print_num_l("model", gd->arch.x86_model); |
Simon Glass | 1c26e96 | 2023-07-15 21:38:42 -0600 | [diff] [blame] | 24 | bdinfo_print_num_l("phys_addr in bits", cpu_phys_address_size()); |
Simon Glass | 66ca25c | 2023-07-15 21:39:10 -0600 | [diff] [blame] | 25 | bdinfo_print_num_l("table start", gd->arch.table_start); |
| 26 | bdinfo_print_num_l("table end", gd->arch.table_end); |
| 27 | bdinfo_print_num_l(" high start", gd->arch.table_start_high); |
| 28 | bdinfo_print_num_l(" high end", gd->arch.table_end_high); |
Simon Glass | 912e06f | 2021-09-24 18:30:21 -0600 | [diff] [blame] | 29 | |
| 30 | if (IS_ENABLED(CONFIG_EFI_STUB)) |
| 31 | efi_show_bdinfo(); |
| 32 | } |