2 * This file is part of the coreboot project.
4 * Copyright (C) 2012 Google Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include <console/console.h>
23 #include "southbridge/intel/bd82x6x/pch.h"
25 #include <arch/romcc_io.h>
26 #include "sandybridge.h"
28 static void report_cpu_info(void)
30 struct cpuid_result cpuidr
;
32 char cpu_string
[50]; /* 48 bytes are reported */
34 const char *mode
[] = {"NOT ", ""};
37 cpuidr
= cpuid(index
);
38 if (cpuidr
.eax
< 0x80000004) {
39 strcpy(cpu_string
, "Platform info not available");
41 u32
*p
= (u32
*) cpu_string
;
42 for (i
= 2; i
<= 4 ; i
++) {
43 cpuidr
= cpuid(index
+ i
);
51 printk(BIOS_DEBUG
, "CPU id(%x): %s\n", cpuidr
.eax
, cpu_string
);
52 aes
= (cpuidr
.ecx
& (1 << 25)) ? 1 : 0;
53 txt
= (cpuidr
.ecx
& (1 << 6)) ? 1 : 0;
54 vt
= (cpuidr
.ecx
& (1 << 5)) ? 1 : 0;
55 printk(BIOS_DEBUG
, "AES %ssupported, TXT %ssupported, VT %ssupported\n",
56 mode
[aes
], mode
[txt
], mode
[vt
]);
59 /* The PCI id name match comes from Intel document 472178 */
64 {0x1E41, "Desktop Sample"},
72 {0x1E42, "Mobile Sample"},
78 {0x1E43, "SFF Sample"},
82 static void report_pch_info(void)
85 u16 dev_id
= pci_read_config16(PCH_LPC_DEV
, 2);
88 const char *pch_type
= "Unknown";
89 for (i
= 0; i
< ARRAY_SIZE(pch_table
); i
++) {
90 if (pch_table
[i
].dev_id
== dev_id
) {
91 pch_type
= pch_table
[i
].dev_name
;
95 printk (BIOS_DEBUG
, "PCH type: %s rev id %x\n",
96 pch_type
, pci_read_config8(PCH_LPC_DEV
, 8));
99 void report_platform_info(void)