blob: 4a59d02c66dab70a98d6ca057ae4e2b6c9eec769 [file] [log] [blame]
Jordan Crouse68182452007-05-03 21:36:51 +00001/*
Stefan Reinauer7e61e452008-01-18 10:35:56 +00002 * This file is part of the coreboot project.
Jordan Crouse68182452007-05-03 21:36:51 +00003 *
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 Crouse68182452007-05-03 21:36:51 +000017 */
18
Edward O'Callaghancd2c1242014-08-09 15:51:19 +100019/**
20 * StartTimer1
21 *
22 * Entry: none
23 * Exit: Starts Timer 1 for port 61 use
24 * Destroys: Al,
25 */
Stefan Reinauer86b6dba2010-03-29 21:56:26 +000026static void StartTimer1(void)
Jordan Crouse9934b812007-05-10 18:32:28 +000027{
Ron Minnich5e9dc232006-07-28 16:06:16 +000028 outb(0x56, 0x43);
29 outb(0x12, 0x41);
30}
31
Jordan Crouse9934b812007-05-10 18:32:28 +000032void SystemPreInit(void)
33{
Ron Minnich5e9dc232006-07-28 16:06:16 +000034 /* they want a jump ... */
Stefan Reinauer3e4fb9d2011-04-21 21:26:58 +000035#if !CONFIG_CACHE_AS_RAM
Marc Jonesbc8176c2007-05-04 18:24:55 +000036 __asm__ __volatile__("jmp .+2\ninvd\njmp .+2\n");
37#endif
Ron Minnich5e9dc232006-07-28 16:06:16 +000038 StartTimer1();
39}