haswell: add CBMEM_MEMINFO table when initing RAM

Populate a memory_info struct with PEI and SPD data,
in order to inject the CBMEM_INFO table necessary to
populate a type17 SMBIOS table.

On Broadwell, this is done by the MRC binary, but the older
Haswell MRC binary doesn't populate the pei_data struct with
all the info needed, so we have to pull it from the SPD.

Some values are hardcoded based on platform specifications.

Change-Id: Iea837d23f2c9c1c943e0db28cf81b265f054e9d1
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/19958
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Matt DeVillier
2016-09-02 13:29:17 -05:00
committed by Martin Roth
parent f739e7f56a
commit 5aaa8ce21c
4 changed files with 71 additions and 0 deletions

View File

@@ -32,6 +32,19 @@
#include <stdint.h>
#include <spd.h>
/**
* Convenience definitions for SPD offsets
*
* @{
*/
#define SPD_DIMM_MOD_ID1 117
#define SPD_DIMM_MOD_ID2 118
#define SPD_DIMM_SERIAL_NUM 122
#define SPD_DIMM_SERIAL_LEN 4
#define SPD_DIMM_PART_NUM 128
#define SPD_DIMM_PART_LEN 18
/** @} */
/**
* \brief Convenience definitions for TCK values
*