blob: 7e3ddb1613cbde6772dc4a95b68cd78a26ab6f04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/io.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
int apm_control(u8 cmd)
{
if (!CONFIG(HAVE_SMI_HANDLER))
return -1;
switch (cmd) {
case APM_CNT_CST_CONTROL:
break;
case APM_CNT_PST_CONTROL:
break;
case APM_CNT_ACPI_DISABLE:
printk(BIOS_DEBUG, "Disabling ACPI via APMC.\n");
break;
case APM_CNT_ACPI_ENABLE:
printk(BIOS_DEBUG, "Enabling ACPI via APMC.\n");
break;
case APM_CNT_FINALIZE:
printk(BIOS_DEBUG, "Finalizing SMM.\n");
break;
case APM_CNT_ELOG_GSMI:
break;
case APM_CNT_SMMSTORE:
break;
case APM_CNT_SMMINFO:
break;
default:
break;
}
/* Now raise the SMI. */
outb(cmd, APM_CNT);
printk(BIOS_DEBUG, "APMC done.\n");
return 0;
}
|