soc/intel/fsp_broadwell_de: Fix TSEG size computation

The address bits 19:0 of TSEG_LIMIT read as zero, but are ignored on
comparison. The result is that the limit is effectively FFFFFh.

Add one MiB to the register value to make TSEG 8MiB instead of 7MiB.
Fixes a crash related to SMRR not matching the TSEG region.

Change-Id: I1a625f7bb53a3e90d3cbc0ce16021892861367d8
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/30932
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
This commit is contained in:
Patrick Rudolph 2019-01-15 10:58:30 +01:00 committed by Patrick Rudolph
parent d44fd0d04d
commit 7ace555cc1
1 changed files with 5 additions and 1 deletions

View File

@ -220,9 +220,13 @@ static void fill_in_relocation_params(pci_devfn_t dev,
* encompasses the SMRAM range as well as the IED range.
* However, the SMRAM available to the handler is 4MiB since the IEDRAM
* lives TSEG_BASE + 4MiB.
*
* Note that address bits 19:0 are ignored and not compared.
* The result is that BASE[19:0] is effectively 00000h and LIMIT is
* effectively FFFFFh.
*/
tseg_base = northbridge_get_base_reg(dev, TSEG_BASE);
tseg_limit = northbridge_get_base_reg(dev, TSEG_LIMIT);
tseg_limit = northbridge_get_base_reg(dev, TSEG_LIMIT) + 1 * MiB;
tseg_size = tseg_limit - tseg_base;
params->smram_base = tseg_base;