cpu/intel/haswell: Add delay for TPM before Flex Ratio reboot
Commit 542307b815
(broadwell: Add small delay before Flex Ratio reboot)
introduced a workaround for Broadwell. Implement it on Haswell as well.
Since this is only necessary when a TPM is present on a system, only do
the delay (which is not that small, to be honest) on TPM-enabled builds.
Change-Id: Id8b58e9fa2a1c81989305f5b4b765b82c01e1596
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46941
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
242fd2810c
commit
9dd1eb6fde
|
@ -4,6 +4,7 @@
|
||||||
#include <arch/bootblock.h>
|
#include <arch/bootblock.h>
|
||||||
#include <cpu/x86/msr.h>
|
#include <cpu/x86/msr.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
#include <delay.h>
|
||||||
#include <halt.h>
|
#include <halt.h>
|
||||||
|
|
||||||
#include "haswell.h"
|
#include "haswell.h"
|
||||||
|
@ -50,6 +51,10 @@ static void set_flex_ratio_to_tdp_nominal(void)
|
||||||
/* Set soft reset control to use register value */
|
/* Set soft reset control to use register value */
|
||||||
RCBA32_OR(SOFT_RESET_CTRL, 1);
|
RCBA32_OR(SOFT_RESET_CTRL, 1);
|
||||||
|
|
||||||
|
/* Delay before reset to avoid potential TPM lockout */
|
||||||
|
if (CONFIG(TPM1) || CONFIG(TPM2))
|
||||||
|
mdelay(30);
|
||||||
|
|
||||||
/* Issue warm reset, will be "CPU only" due to soft reset data */
|
/* Issue warm reset, will be "CPU only" due to soft reset data */
|
||||||
outb(0x0, 0xcf9);
|
outb(0x0, 0xcf9);
|
||||||
outb(0x6, 0xcf9);
|
outb(0x6, 0xcf9);
|
||||||
|
|
Loading…
Reference in New Issue