cpu/x86/smi_trigger: use call_smm

Use call_smm instead of writing the command number directly to the APMC
SMI command IO port.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iefbdb3d17932d6db6a17b5771436ede220c714fb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79828
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Held 2024-01-04 18:31:35 +01:00
parent c6322e1f82
commit c0a4c895e9
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
#include <arch/io.h> #include <arch/io.h>
#include <console/console.h> #include <console/console.h>
#include <cpu/x86/smm.h> #include <cpu/x86/smm.h>
#include <smm_call.h>
#include <stdint.h> #include <stdint.h>
static void apmc_log(const char *fn, u8 cmd) static void apmc_log(const char *fn, u8 cmd)
@ -38,7 +39,7 @@ enum cb_err apm_control(u8 cmd)
apmc_log(__func__, cmd); apmc_log(__func__, cmd);
/* Now raise the SMI. */ /* Now raise the SMI. */
outb(cmd, pm_acpi_smi_cmd_port()); call_smm(cmd, 0, NULL);
printk(BIOS_DEBUG, "APMC done.\n"); printk(BIOS_DEBUG, "APMC done.\n");
return CB_SUCCESS; return CB_SUCCESS;