blob: 801aea91b049d073da5b36de9e8c23a528775216 [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
Kyösti Mälkki13a500a2018-06-04 08:01:09 +030019#include <arch/io.h>
20#include <cpu/amd/lxdef.h>
21
Edward O'Callaghancd2c1242014-08-09 15:51:19 +100022/**
23 * StartTimer1
24 *
25 * Entry: none
26 * Exit: Starts Timer 1 for port 61 use
27 * Destroys: Al,
28 */
Stefan Reinauer86b6dba2010-03-29 21:56:26 +000029static void StartTimer1(void)
Jordan Crouse9934b812007-05-10 18:32:28 +000030{
Ron Minnich5e9dc232006-07-28 16:06:16 +000031 outb(0x56, 0x43);
32 outb(0x12, 0x41);
33}
34
Jordan Crouse9934b812007-05-10 18:32:28 +000035void SystemPreInit(void)
36{
Ron Minnich5e9dc232006-07-28 16:06:16 +000037 /* they want a jump ... */
Martin Roth5f46af62017-06-24 13:24:26 -060038#if !IS_ENABLED(CONFIG_CACHE_AS_RAM)
Marc Jonesbc8176c2007-05-04 18:24:55 +000039 __asm__ __volatile__("jmp .+2\ninvd\njmp .+2\n");
40#endif
Ron Minnich5e9dc232006-07-28 16:06:16 +000041 StartTimer1();
42}