2 * This file is part of the coreboot project.
4 * Copyright (C) 2006 Indrek Kruusa <indrek.kruusa@artecdesign.ee>
5 * Copyright (C) 2006 Ronald G. Minnich <rminnich@gmail.com>
6 * Copyright (C) 2006 Stefan Reinauer <stepan@coresystems.de>
7 * Copyright (C) 2006 Andrei Birjukov <andrei.birjukov@artecdesign.ee>
8 * Copyright (C) 2007 Advanced Micro Devices, Inc.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 #include <console/console.h>
26 #include <device/device.h>
27 #include <device/pci.h>
30 #include <cpu/x86/lapic.h>
31 #include <cpu/x86/cache.h>
34 static void vsm_end_post_smi(void)
36 __asm__ volatile ("push %ax\n"
38 ".byte 0x0f, 0x38\n" "pop %ax\n");
41 static void model_lx_init(device_t dev)
43 printk(BIOS_DEBUG, "model_lx_init\n");
45 /* Turn on caching if we haven't already */
48 /* Enable the local cpu apics */
54 // Set gate A20 (legacy vsm disables it in late init)
55 printk(BIOS_DEBUG, "A20 (0x92): %d\n", inb(0x92));
57 printk(BIOS_DEBUG, "A20 (0x92): %d\n", inb(0x92));
59 printk(BIOS_DEBUG, "CPU model_lx_init DONE\n");
62 static struct device_operations cpu_dev_ops = {
63 .init = model_lx_init,
66 static struct cpu_device_id cpu_table[] = {
67 {X86_VENDOR_AMD, 0x05A2},
71 static const struct cpu_driver driver __cpu_driver = {
73 .id_table = cpu_table,