mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 08:57:58 +00:00
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: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
683b09d783
commit
f2653e8dd9
2 changed files with 10 additions and 3 deletions
|
@ -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)
|
||||||
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 @@
|
||||||
|
|
||||||
config {
|
config {
|
||||||
silent_console = <0>;
|
silent_console = <0>;
|
||||||
|
u-boot,no-apm-finalize;
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
|
|
Loading…
Reference in a new issue