4df30f4b8a1309a255bdeb22fdc9a5b6482e5107
[coreboot.git] / src / cpu / amd / model_lx / syspreinit.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2006 Indrek Kruusa <indrek.kruusa@artecdesign.ee>
5  * Copyright (C) 2006 Ronald G. Minnich <rminnich@gmail.com>
6  * Copyright (C) 2007 Advanced Micro Devices, Inc.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
21  */
22
23 /* ***************************************************************************/
24 /* **/
25 /* *    StartTimer1*/
26 /* **/
27 /* *    Entry: none*/
28 /* *    Exit: Starts Timer 1 for port 61 use*/
29 /* *    Destroys: Al,*/
30 /* **/
31 /* ***************************************************************************/
32 void StartTimer1(void)
33 {
34         outb(0x56, 0x43);
35         outb(0x12, 0x41);
36 }
37
38 void SystemPreInit(void)
39 {
40
41         /* they want a jump ... */
42 #ifndef USE_DCACHE_RAM
43         __asm__ __volatile__("jmp .+2\ninvd\njmp .+2\n");
44 #endif
45         StartTimer1();
46 }