UPSTREAM: amd/pi/hudson: Move APIC enable to CPU file
Relocate the enabling of the LAPIC out of the southbridge source and
surround it with a check for CONFIG_UDELAY_LAPIC (typical for AMD
systems). The LAPIC is now enabled for all cores; not only the BSP,
and not only when the UART is used.
This solves the problem of APs not having their APICs enabled when
the timer is expected to be functional, e.g. verstage often uses
do_printk_va_list() instead of do_printk() which exits early for
APs when CONFIG_SQUELCH_EARLY_SMP=y.
The changes were tested with two Gardenia builds, one using verstage
and another with CONFIG_SQUELCH_EARLY_SMP=n.
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-by: Marc Jones <marcj303@gmail.com>
(cherry picked from commit 93ffc311165f19d4192a5489051fa4264cd8e0ad)
BUG=none
BRANCH=none
TEST=none
Change-Id: I3b2cf63f46cb63e46ddc916f399de7f9e76759e1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 03e6a455a3
Original-Change-Id: Ieaecc0bf921ee0d2691a8082f2431ea4d0c33749
Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18436
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/451427
This commit is contained in:
parent
50307a2d54
commit
f3f98c0cce
5 changed files with 24 additions and 4 deletions
|
|
@ -77,4 +77,10 @@ void amd_initmmio(void)
|
|||
LibAmdMsrWrite (0x20C, &MsrReg, &StdHeader);
|
||||
MsrReg = ((1ULL << CONFIG_CPU_ADDR_BITS) - CACHE_ROM_SIZE) | 0x800ull;
|
||||
LibAmdMsrWrite (0x20D, &MsrReg, &StdHeader);
|
||||
|
||||
if (IS_ENABLED(CONFIG_UDELAY_LAPIC)){
|
||||
LibAmdMsrRead(0x1B, &MsrReg, &StdHeader);
|
||||
MsrReg |= 1 << 11;
|
||||
LibAmdMsrWrite(0x1B, &MsrReg, &StdHeader);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,4 +84,10 @@ void amd_initmmio(void)
|
|||
LibAmdMsrWrite (0x20C, &MsrReg, &StdHeader);
|
||||
MsrReg = ((1ULL << CONFIG_CPU_ADDR_BITS) - CACHE_ROM_SIZE) | 0x800ull;
|
||||
LibAmdMsrWrite (0x20D, &MsrReg, &StdHeader);
|
||||
|
||||
if (IS_ENABLED(CONFIG_UDELAY_LAPIC)){
|
||||
LibAmdMsrRead(0x1B, &MsrReg, &StdHeader);
|
||||
MsrReg |= 1 << 11;
|
||||
LibAmdMsrWrite(0x1B, &MsrReg, &StdHeader);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,4 +88,10 @@ void amd_initmmio(void)
|
|||
MsrReg = ((1ULL << CONFIG_CPU_ADDR_BITS) - CACHE_ROM_SIZE) | \
|
||||
0x800ull;
|
||||
LibAmdMsrWrite(0x20D, &MsrReg, &StdHeader);
|
||||
|
||||
if (IS_ENABLED(CONFIG_UDELAY_LAPIC)){
|
||||
LibAmdMsrRead(0x1B, &MsrReg, &StdHeader);
|
||||
MsrReg |= 1 << 11;
|
||||
LibAmdMsrWrite(0x1B, &MsrReg, &StdHeader);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,4 +89,10 @@ void amd_initmmio(void)
|
|||
LibAmdMsrWrite (0x20C, &MsrReg, &StdHeader);
|
||||
MsrReg = ((1ULL << CONFIG_CPU_ADDR_BITS) - CACHE_ROM_SIZE) | 0x800ull;
|
||||
LibAmdMsrWrite (0x20D, &MsrReg, &StdHeader);
|
||||
|
||||
if (IS_ENABLED(CONFIG_UDELAY_LAPIC)){
|
||||
LibAmdMsrRead(0x1B, &MsrReg, &StdHeader);
|
||||
MsrReg |= 1 << 11;
|
||||
LibAmdMsrWrite(0x1B, &MsrReg, &StdHeader);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,12 +34,8 @@
|
|||
|
||||
void configure_hudson_uart(void)
|
||||
{
|
||||
msr_t msr;
|
||||
u8 byte;
|
||||
|
||||
msr = rdmsr(0x1B);
|
||||
msr.lo |= 1 << 11;
|
||||
wrmsr(0x1B, msr);
|
||||
byte = read8((void *)ACPI_MMIO_BASE + AOAC_BASE + FCH_AOAC_REG56 + CONFIG_UART_FOR_CONSOLE * 2);
|
||||
byte |= 1 << 3;
|
||||
write8((void *)ACPI_MMIO_BASE + AOAC_BASE + FCH_AOAC_REG56 + CONFIG_UART_FOR_CONSOLE * 2, byte);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue