Marc Jones | 3b0a626 | 2015-09-15 23:05:00 -0600 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2008-2009 coresystems GmbH |
| 5 | * Copyright (C) 2013 Sage Electronic Engineering, LLC. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc. |
| 19 | */ |
| 20 | |
| 21 | #include <arch/io.h> |
| 22 | #include <console/console.h> |
| 23 | #include <cpu/x86/smm.h> |
| 24 | #include <southbridge/intel/fsp_i89xx/nvs.h> |
| 25 | #include <southbridge/intel/fsp_i89xx/pch.h> |
| 26 | #include <southbridge/intel/fsp_i89xx/me.h> |
| 27 | #include <northbridge/intel/fsp_sandybridge/sandybridge.h> |
| 28 | #include <cpu/intel/fsp_model_206ax/model_206ax.h> |
| 29 | |
| 30 | void mainboard_smi_sleep(u8 slp_typ) |
| 31 | { |
| 32 | u8 reg8; |
| 33 | |
| 34 | switch (slp_typ) { |
| 35 | case SLP_TYP_S3: |
| 36 | case SLP_TYP_S4: |
| 37 | case SLP_TYP_S5: |
| 38 | break; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | |
| 43 | static int mainboard_finalized = 0; |
| 44 | |
| 45 | int mainboard_smi_apmc(u8 apmc) |
| 46 | { |
| 47 | switch (apmc) { |
| 48 | case APM_CNT_FINALIZE: |
| 49 | if (mainboard_finalized) { |
| 50 | printk(BIOS_DEBUG, "SMI#: Already finalized\n"); |
| 51 | return 0; |
| 52 | } |
| 53 | |
| 54 | intel_me_finalize_smm(); |
| 55 | intel_pch_finalize_smm(); |
| 56 | intel_sandybridge_finalize_smm(); |
| 57 | intel_model_206ax_finalize_smm(); |
| 58 | |
| 59 | mainboard_finalized = 1; |
| 60 | break; |
| 61 | } |
| 62 | return 0; |
| 63 | } |