2 * From Coreboot src/northbridge/intel/sandybridge/report_platform.c
4 * Copyright (C) 2012 Google Inc.
6 * SPDX-License-Identifier: GPL-2.0
12 #include <asm/arch/pch.h>
13 #include <asm/arch/sandybridge.h>
15 static void report_cpu_info(void)
17 char cpu_string[CPU_MAX_NAME_LEN], *cpu_name;
18 const char *mode[] = {"NOT ", ""};
19 struct cpuid_result cpuidr;
24 cpuidr = cpuid(index);
25 if (cpuidr.eax < 0x80000004) {
26 strcpy(cpu_string, "Platform info not available");
27 cpu_name = cpu_string;
29 cpu_name = cpu_get_name(cpu_string);
33 debug("CPU id(%x): %s\n", cpuidr.eax, cpu_name);
34 aes = (cpuidr.ecx & (1 << 25)) ? 1 : 0;
35 txt = (cpuidr.ecx & (1 << 6)) ? 1 : 0;
36 vt = (cpuidr.ecx & (1 << 5)) ? 1 : 0;
37 debug("AES %ssupported, TXT %ssupported, VT %ssupported\n",
38 mode[aes], mode[txt], mode[vt]);
41 /* The PCI id name match comes from Intel document 472178 */
46 {0x1E41, "Desktop Sample"},
47 {0x1E42, "Mobile Sample"},
48 {0x1E43, "SFF Sample"},
67 static void report_pch_info(struct udevice *dev)
69 const char *pch_type = "Unknown";
74 dm_pci_read_config16(dev, 2, &dev_id);
75 for (i = 0; i < ARRAY_SIZE(pch_table); i++) {
76 if (pch_table[i].dev_id == dev_id) {
77 pch_type = pch_table[i].dev_name;
81 dm_pci_read_config8(dev, 8, &rev_id);
82 debug("PCH type: %s, device id: %x, rev id %x\n", pch_type, dev_id,
86 void report_platform_info(struct udevice *dev)