blob: 70aed9818b1ddbd0892066e21e0c97878ff08730 [file] [log] [blame]
Timothy Pearson4b373c92015-04-05 17:54:08 -05001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2008-2009 coresystems GmbH
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.
Timothy Pearson4b373c92015-04-05 17:54:08 -050014 */
15
16#include <arch/io.h>
17#include <console/console.h>
18#include <cpu/x86/smm.h>
19#include <southbridge/intel/i82801ix/nvs.h>
20#include <southbridge/intel/i82801ix/i82801ix.h>
21#include <ec/acpi/ec.h>
22
23void mainboard_smi_gpi(u32 gpi_sts)
24{
25 if (gpi_sts & (1 << 1)) {
26 printk(BIOS_DEBUG, "EC/SMI\n");
27 /* TODO */
28 }
29}
30
31int mainboard_smi_apmc(u8 apmc)
32{
33 switch (apmc) {
34 case APM_CNT_ACPI_ENABLE:
35 send_ec_command(0x05); /* Set_SMI_Disable */
36 send_ec_command(0xaa); /* Set_ACPI_Enable */
37 break;
38
39 case APM_CNT_ACPI_DISABLE:
40 send_ec_command(0x04); /* Set_SMI_Enable */
41 send_ec_command(0xab); /* Set_ACPI_Disable */
42 break;
43 }
44 return 0;
45}