blob: 315a0653807f59a7f03a4aef59c531fd4ca29210 [file] [log] [blame]
zbao246e84b2012-07-13 18:47:03 +08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2010 Advanced Micro Devices, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
Paul Menzela46a7122013-02-23 18:37:27 +010017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
zbao246e84b2012-07-13 18:47:03 +080018 */
19
Stefan Reinauer24d1d4b2013-03-21 11:51:41 -070020#ifndef __PRE_RAM__
21#define __PRE_RAM__ // Use simple device model for this file even in ramstage
22#endif
zbao246e84b2012-07-13 18:47:03 +080023#include <arch/io.h>
Stefan Reinauer24d1d4b2013-03-21 11:51:41 -070024#include <reset.h>
zbao246e84b2012-07-13 18:47:03 +080025
Stefan Reinauer24d1d4b2013-03-21 11:51:41 -070026#include <northbridge/amd/amdk8/reset_test.c>
zbao246e84b2012-07-13 18:47:03 +080027
28void hard_reset(void)
29{
30 set_bios_reset();
31 /* Try rebooting through port 0xcf9 */
32 /* Actually it is not a real hard_reset --- it only reset coherent link table, but not reset link freq and width */
33 outb((0 << 3) | (0 << 2) | (1 << 1), 0xcf9);
34 outb((0 << 3) | (1 << 2) | (1 << 1), 0xcf9);
35}