2 * This file is part of the coreboot project.
4 * Copyright (C) 2008-2009 coresystems GmbH
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.
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.
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
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 /* AMD64 SMM State-Save Area
120 } __attribute__((packed)) amd64_smm_state_save_area_t;
123 /* Intel Core 2 (EM64T) SMM State-Save Area
153 u16 autohalt_restart;
198 } __attribute__((packed)) em64t_smm_state_save_area_t;
201 /* Legacy x86 SMM State-Save Area
210 u16 autohalt_restart;
238 } __attribute__((packed)) legacy_smm_state_save_area_t;
248 save_state_type_t type;
250 amd64_smm_state_save_area_t *amd64_state_save;
251 em64t_smm_state_save_area_t *em64t_state_save;
252 legacy_smm_state_save_area_t *legacy_state_save;
254 } smm_state_save_area_t;
257 #define APM_CNT_CST_CONTROL 0x85
258 #define APM_CNT_PST_CONTROL 0x80
259 #define APM_CNT_ACPI_DISABLE 0x1e
260 #define APM_CNT_ACPI_ENABLE 0xe1
261 #define APM_CNT_MBI_UPDATE 0xeb
262 #define APM_CNT_GNVS_UPDATE 0xea
265 /* SMI handler function prototypes */
266 void smi_handler(u32 smm_revision);
268 void io_trap_handler(int smif);
269 int southbridge_io_trap_handler(int smif);
270 int __attribute__((weak)) mainboard_io_trap_handler(int smif);
272 void southbridge_smi_set_eos(void);
274 void __attribute__((weak)) cpu_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
275 void __attribute__((weak)) northbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
276 void __attribute__((weak)) southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
278 void __attribute__((weak)) mainboard_smi_gpi(u16 gpi_sts);
279 int __attribute__((weak)) mainboard_apm_cnt(u8 data);
280 void smi_release_lock(void);