Tim Chu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47509 )
Change subject: mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled ......................................................................
mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled
Use RasModesEnabled from SystemMemoryMapHob to define SMBIOS type 16 error correction type
Tested=Execute "dmidecode -t 16" to check if error correction type is correct.
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: I3636fcc4a874261cf484c10e2db15015ac5d7e68 --- M src/mainboard/ocp/deltalake/ramstage.c 1 file changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/47509/1
diff --git a/src/mainboard/ocp/deltalake/ramstage.c b/src/mainboard/ocp/deltalake/ramstage.c index 9d57090..fc5994d 100644 --- a/src/mainboard/ocp/deltalake/ramstage.c +++ b/src/mainboard/ocp/deltalake/ramstage.c @@ -23,9 +23,44 @@
#define SLOT_ID_LEN 2
+/* Bit definitions for RasModes */ +#define CH_INDEPENDENT 0 +#define FULL_MIRROR_1LM BIT0 +#define FULL_MIRROR_2LM BIT1 +#define CH_LOCKSTEP BIT2 +#define RK_SPARE BIT3 +#define PARTIAL_MIRROR_1LM BIT5 +#define PARTIAL_MIRROR_2LM BIT6 +#define STAT_VIRT_LOCKSTEP BIT7 + extern struct fru_info_str fru_strings; static char slot_id_str[SLOT_ID_LEN];
+/* Override SMBIOS type 16 error correction type. */ +unsigned int smbios_memory_error_correction_type(struct memory_info *meminfo) +{ + const struct SystemMemoryMapHob *hob; + + hob = get_system_memory_map(); + assert(hob != NULL); + + switch(hob->RasModesEnabled) { + case CH_INDEPENDENT: + return MEMORY_ARRAY_ECC_SINGLE_BIT; + case FULL_MIRROR_1LM: + case PARTIAL_MIRROR_1LM: + case FULL_MIRROR_2LM: + case PARTIAL_MIRROR_2LM: + return MEMORY_ARRAY_ECC_MULTI_BIT; + case RK_SPARE: + return MEMORY_ARRAY_ECC_SINGLE_BIT; + case CH_LOCKSTEP: + return MEMORY_ARRAY_ECC_SINGLE_BIT; + default: + return MEMORY_ARRAY_ECC_MULTI_BIT; + } +} + /* * Update SMBIOS type 0 ec version. * In deltalake, BMC version is used to represent ec version.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47509 )
Change subject: mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47509/1/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/47509/1/src/mainboard/ocp/deltalake... PS1, Line 47: switch(hob->RasModesEnabled) { space required before the open parenthesis '('
Tim Chu has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/47509 )
Change subject: mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled ......................................................................
mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled
Use RasModesEnabled from SystemMemoryMapHob to define SMBIOS type 16 error correction type
Tested=Execute "dmidecode -t 16" to check if error correction type is correct.
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: I3636fcc4a874261cf484c10e2db15015ac5d7e68 --- M src/mainboard/ocp/deltalake/ramstage.c 1 file changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/47509/2
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47509 )
Change subject: mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled ......................................................................
Patch Set 2: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/47509/2/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/47509/2/src/mainboard/ocp/deltalake... PS2, Line 34: #define STAT_VIRT_LOCKSTEP BIT7 These definitions come from FSP. They should be added to HOB header file.
Hello Philipp Deppenwiese, build bot (Jenkins), Jonathan Zhang, Ryback Hung, Johnny Lin, Christian Walter, Angel Pons, Bryant Ou, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47509
to look at the new patch set (#3).
Change subject: mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled ......................................................................
mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled
Use RasModesEnabled from SystemMemoryMapHob to define SMBIOS type 16 error correction type
Tested=Execute "dmidecode -t 16" to check if error correction type is correct.
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: I3636fcc4a874261cf484c10e2db15015ac5d7e68 --- M src/mainboard/ocp/deltalake/ramstage.c 1 file changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/47509/3
Tim Chu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47509 )
Change subject: mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47509/2/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/47509/2/src/mainboard/ocp/deltalake... PS2, Line 34: #define STAT_VIRT_LOCKSTEP BIT7
These definitions come from FSP. They should be added to HOB header file.
Done. Have moved these definitions to CB:47505. Thanks.
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47509 )
Change subject: mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled ......................................................................
Patch Set 3: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47509 )
Change subject: mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled ......................................................................
mb/ocp/deltalake: Define SMBIOS type 16 error correction type by RasModesEnabled
Use RasModesEnabled from SystemMemoryMapHob to define SMBIOS type 16 error correction type
Tested=Execute "dmidecode -t 16" to check if error correction type is correct.
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: I3636fcc4a874261cf484c10e2db15015ac5d7e68 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47509 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Jonathan Zhang jonzhang@fb.com --- M src/mainboard/ocp/deltalake/ramstage.c 1 file changed, 25 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Jonathan Zhang: Looks good to me, approved
diff --git a/src/mainboard/ocp/deltalake/ramstage.c b/src/mainboard/ocp/deltalake/ramstage.c index 52c55b8..96b0060 100644 --- a/src/mainboard/ocp/deltalake/ramstage.c +++ b/src/mainboard/ocp/deltalake/ramstage.c @@ -26,6 +26,31 @@ extern struct fru_info_str fru_strings; static char slot_id_str[SLOT_ID_LEN];
+/* Override SMBIOS type 16 error correction type. */ +unsigned int smbios_memory_error_correction_type(struct memory_info *meminfo) +{ + const struct SystemMemoryMapHob *hob; + + hob = get_system_memory_map(); + assert(hob != NULL); + + switch (hob->RasModesEnabled) { + case CH_INDEPENDENT: + return MEMORY_ARRAY_ECC_SINGLE_BIT; + case FULL_MIRROR_1LM: + case PARTIAL_MIRROR_1LM: + case FULL_MIRROR_2LM: + case PARTIAL_MIRROR_2LM: + return MEMORY_ARRAY_ECC_MULTI_BIT; + case RK_SPARE: + return MEMORY_ARRAY_ECC_SINGLE_BIT; + case CH_LOCKSTEP: + return MEMORY_ARRAY_ECC_SINGLE_BIT; + default: + return MEMORY_ARRAY_ECC_MULTI_BIT; + } +} + /* * Update SMBIOS type 0 ec version. * In deltalake, BMC version is used to represent ec version.