commonlib/memory_info: Introduce new fields to memory_info structure
Some silcon initialization modules may provide more detailed information about the DIMMs, like type details or voltages. Extend the memory_info structure with type_detail and max/min voltage. Use the new fields when producing SMBIOS tables if their value is non-zero. Otherwise, keep previous behavior. Change-Id: I01ae8ea1f5a8fec53e151c040d893376c3d23be2 Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/89483 Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
abe1ac0744
commit
273a41c4d9
2 changed files with 32 additions and 5 deletions
|
|
@ -71,6 +71,27 @@ struct dimm_info {
|
|||
* e.g., SPD_RDIMM, SPD_SODIMM, SPD_MICRO_DIMM
|
||||
*/
|
||||
uint8_t mod_type;
|
||||
/*
|
||||
* SMBIOS Type 17 Type Detail field:
|
||||
*
|
||||
* Bit 0 Reserved, set to 0
|
||||
* Bit 1 Other
|
||||
* Bit 2 Unknown
|
||||
* Bit 3 Fast-paged
|
||||
* Bit 4 Static column
|
||||
* Bit 5 Pseudo-static
|
||||
* Bit 6 RAMBUS
|
||||
* Bit 7 Synchronous
|
||||
* Bit 8 CMOS
|
||||
* Bit 9 EDO
|
||||
* Bit 10 Window DRAM
|
||||
* Bit 11 Cache DRAM
|
||||
* Bit 12 Non-volatile
|
||||
* Bit 13 Registered (Buffered)
|
||||
* Bit 14 Unbuffered (Unregistered)
|
||||
* Bit 15 LRDIMM
|
||||
*/
|
||||
uint16_t type_detail;
|
||||
/*
|
||||
* SPD bus width.
|
||||
*
|
||||
|
|
@ -95,6 +116,8 @@ struct dimm_info {
|
|||
* Voltage Level
|
||||
*/
|
||||
uint16_t vdd_voltage;
|
||||
uint16_t vdd_min_voltage;
|
||||
uint16_t vdd_max_voltage;
|
||||
/*
|
||||
* Max speed in MT/s
|
||||
* If the value is 0, ddr_frequency should be used instead.
|
||||
|
|
|
|||
|
|
@ -272,14 +272,18 @@ static int create_smbios_type17_for_dimm(struct dimm_info *dimm,
|
|||
|
||||
/* Voltage Levels */
|
||||
t->configured_voltage = dimm->vdd_voltage;
|
||||
t->minimum_voltage = dimm->vdd_voltage;
|
||||
t->maximum_voltage = dimm->vdd_voltage;
|
||||
t->minimum_voltage = dimm->vdd_min_voltage ? dimm->vdd_min_voltage : dimm->vdd_voltage;
|
||||
t->maximum_voltage = dimm->vdd_max_voltage ? dimm->vdd_max_voltage : dimm->vdd_voltage;
|
||||
|
||||
/* Fill in type detail */
|
||||
t->type_detail = info.type_detail;
|
||||
if (dimm->type_detail != 0) {
|
||||
t->type_detail = dimm->type_detail;
|
||||
} else {
|
||||
t->type_detail = info.type_detail;
|
||||
/* Synchronous = 1 */
|
||||
t->type_detail |= MEMORY_TYPE_DETAIL_SYNCHRONOUS;
|
||||
}
|
||||
|
||||
/* Synchronous = 1 */
|
||||
t->type_detail |= MEMORY_TYPE_DETAIL_SYNCHRONOUS;
|
||||
/* no handle for error information */
|
||||
t->memory_error_information_handle = 0xFFFE;
|
||||
t->attributes = dimm->rank_per_dimm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue