Jordan Crouse | 6818245 | 2007-05-03 21:36:51 +0000 | [diff] [blame] | 1 | /* |
Stefan Reinauer | 7e61e45 | 2008-01-18 10:35:56 +0000 | [diff] [blame] | 2 | * This file is part of the coreboot project. |
Jordan Crouse | 6818245 | 2007-05-03 21:36:51 +0000 | [diff] [blame] | 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. |
Jordan Crouse | 6818245 | 2007-05-03 21:36:51 +0000 | [diff] [blame] | 17 | */ |
| 18 | |
Edward O'Callaghan | cd2c124 | 2014-08-09 15:51:19 +1000 | [diff] [blame] | 19 | /** |
| 20 | * StartTimer1 |
| 21 | * |
| 22 | * Entry: none |
| 23 | * Exit: Starts Timer 1 for port 61 use |
| 24 | * Destroys: Al, |
| 25 | */ |
Stefan Reinauer | 86b6dba | 2010-03-29 21:56:26 +0000 | [diff] [blame] | 26 | static void StartTimer1(void) |
Jordan Crouse | 9934b81 | 2007-05-10 18:32:28 +0000 | [diff] [blame] | 27 | { |
Ron Minnich | 5e9dc23 | 2006-07-28 16:06:16 +0000 | [diff] [blame] | 28 | outb(0x56, 0x43); |
| 29 | outb(0x12, 0x41); |
| 30 | } |
| 31 | |
Jordan Crouse | 9934b81 | 2007-05-10 18:32:28 +0000 | [diff] [blame] | 32 | void SystemPreInit(void) |
| 33 | { |
Ron Minnich | 5e9dc23 | 2006-07-28 16:06:16 +0000 | [diff] [blame] | 34 | /* they want a jump ... */ |
Stefan Reinauer | 3e4fb9d | 2011-04-21 21:26:58 +0000 | [diff] [blame] | 35 | #if !CONFIG_CACHE_AS_RAM |
Marc Jones | bc8176c | 2007-05-04 18:24:55 +0000 | [diff] [blame] | 36 | __asm__ __volatile__("jmp .+2\ninvd\njmp .+2\n"); |
| 37 | #endif |
Ron Minnich | 5e9dc23 | 2006-07-28 16:06:16 +0000 | [diff] [blame] | 38 | StartTimer1(); |
| 39 | } |