SMM: add defines for APM_CNT register
[coreboot.git] / src / include / cpu / x86 / smm.h
index 72a4782084cf759a2ef3c75873926a526b4a2a74..5605453eabd6d8d29f27b01754dc8ccd3cfc7537 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the coreboot project.
  *
- * Copyright (C) 2008 coresystems GmbH
+ * Copyright (C) 2008-2009 coresystems GmbH
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-
-typedef uint64_t u64;
-
-/* AMD64 SMM State-Save Area 
+/* AMD64 SMM State-Save Area
  * starts @ 0x7e00
  */
 typedef struct {
@@ -118,7 +115,7 @@ typedef struct {
 } __attribute__((packed)) amd64_smm_state_save_area_t;
 
 
-/* Intel Core 2 (EM64T) SMM State-Save Area 
+/* Intel Core 2 (EM64T) SMM State-Save Area
  * starts @ 0x7d00
  */
 typedef struct {
@@ -196,7 +193,7 @@ typedef struct {
 } __attribute__((packed)) em64t_smm_state_save_area_t;
 
 
-/* Legacy x86 SMM State-Save Area 
+/* Legacy x86 SMM State-Save Area
  * starts @ 0x7e00
  */
 
@@ -251,3 +248,27 @@ typedef struct {
        };
 } smm_state_save_area_t;
 
+#define APM_CNT                0xb2
+#define APM_CNT_CST_CONTROL    0x85
+#define APM_CNT_PST_CONTROL    0x80
+#define APM_CNT_ACPI_DISABLE   0x1e
+#define APM_CNT_ACPI_ENABLE    0xe1
+#define APM_CNT_MBI_UPDATE     0xeb
+#define APM_CNT_GNVS_UPDATE    0xea
+#define APM_STS                0xb3
+
+/* SMI handler function prototypes */
+void smi_handler(u32 smm_revision);
+
+void io_trap_handler(int smif);
+int southbridge_io_trap_handler(int smif);
+int __attribute__((weak)) mainboard_io_trap_handler(int smif);
+
+void southbridge_smi_set_eos(void);
+
+void __attribute__((weak)) cpu_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
+void __attribute__((weak)) northbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
+void __attribute__((weak)) southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
+
+void __attribute__((weak)) mainboard_smi_gpi(u16 gpi_sts);
+int __attribute__((weak)) mainboard_apm_cnt(u8 data);