Make AMD SMM SMP aware
[coreboot.git] / src / include / cpu / x86 / smm.h
index c05536488e65ed3cbf590866dae3dd4f3a10d7f3..c314c3971ac8b0f73f5e133de235de126a2f2cac 100644 (file)
 /* AMD64 SMM State-Save Area
  * starts @ 0x7e00
  */
+
+#ifndef CPU_X86_SMM_H
+#define CPU_X86_SMM_H
+
+/* used only by C programs so far */
+#define SMM_BASE 0xa0000
+
+#include <types.h>
 typedef struct {
        u16     es_selector;
        u16     es_attributes;
@@ -248,13 +256,21 @@ 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 mainboard_io_trap_handler(int smif);
+int __attribute__((weak)) mainboard_io_trap_handler(int smif);
 
 void southbridge_smi_set_eos(void);
 
@@ -263,4 +279,7 @@ void __attribute__((weak)) northbridge_smi_handler(unsigned int node, smm_state_
 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);
+void smi_release_lock(void);
 
+#endif