Skip to content
Snippets Groups Projects
Commit f2653e8d authored by Bin Meng's avatar Bin Meng Committed by Simon Glass
Browse files

x86: coreboot: Control I/O port 0xb2 writing via device tree


Writing 0xcb to I/O port 0xb2 (Advanced Power Management Control) causes
U-Boot to hang on QEMU q35 target. We introduce a config option in the
device tree "u-boot,no-apm-finalize" under /config node if we don't want
to do that.

Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 683b09d7
Branches
Tags
No related merge requests found
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
*/ */
#include <common.h> #include <common.h>
#include <fdtdec.h>
#include <netdev.h> #include <netdev.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/msr.h> #include <asm/msr.h>
...@@ -74,10 +75,15 @@ void board_final_cleanup(void) ...@@ -74,10 +75,15 @@ void board_final_cleanup(void)
mtrr_close(&state); mtrr_close(&state);
} }
/* Issue SMI to Coreboot to lock down ME and registers */ if (!fdtdec_get_config_bool(gd->fdt_blob, "u-boot,no-apm-finalize")) {
printf("Finalizing Coreboot\n"); /*
* Issue SMI to coreboot to lock down ME and registers
* when allowed via device tree
*/
printf("Finalizing coreboot\n");
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
}
int misc_init_r(void) int misc_init_r(void)
{ {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
config { config {
silent_console = <0>; silent_console = <0>;
u-boot,no-apm-finalize;
}; };
chosen { chosen {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment