zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 1 | /* |
| 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 Menzel | a46a712 | 2013-02-23 18:37:27 +0100 | [diff] [blame] | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 18 | */ |
| 19 | |
Stefan Reinauer | 24d1d4b | 2013-03-21 11:51:41 -0700 | [diff] [blame^] | 20 | #ifndef __PRE_RAM__ |
| 21 | #define __PRE_RAM__ // Use simple device model for this file even in ramstage |
| 22 | #endif |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 23 | #include <arch/io.h> |
Stefan Reinauer | 24d1d4b | 2013-03-21 11:51:41 -0700 | [diff] [blame^] | 24 | #include <reset.h> |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 25 | |
Stefan Reinauer | 24d1d4b | 2013-03-21 11:51:41 -0700 | [diff] [blame^] | 26 | #include <northbridge/amd/amdk8/reset_test.c> |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 27 | |
| 28 | void 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 | } |