Tim Chu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47508 )
Change subject: arch/x86/smbios: Update SMBIOS type 16 error correction type ......................................................................
arch/x86/smbios: Update SMBIOS type 16 error correction type
Add weak function for 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: I85b37e9cfd22a78544d03e5506ff92b1f2404f8e --- M src/arch/x86/smbios.c M src/include/smbios.h 2 files changed, 8 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/47508/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index dc676cf..f22e7e7 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -463,6 +463,12 @@ return 0x02; /* Unknown */ }
+unsigned int __weak smbios_memory_error_correction_type(struct memory_info *meminfo) +{ + return meminfo->ecc_capable ? + MEMORY_ARRAY_ECC_SINGLE_BIT : MEMORY_ARRAY_ECC_NONE; +} + unsigned int __weak smbios_processor_external_clock(void) { return 0; /* Unknown */ @@ -1025,8 +1031,7 @@
t->location = MEMORY_ARRAY_LOCATION_SYSTEM_BOARD; t->use = MEMORY_ARRAY_USE_SYSTEM; - t->memory_error_correction = meminfo->ecc_capable ? - MEMORY_ARRAY_ECC_SINGLE_BIT : MEMORY_ARRAY_ECC_NONE; + t->memory_error_correction = smbios_memory_error_correction_type(meminfo);
/* no error information handle available */ t->memory_error_information_handle = 0xFFFE; diff --git a/src/include/smbios.h b/src/include/smbios.h index 6a19655..0800289 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -56,6 +56,7 @@
void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision);
+unsigned int smbios_memory_error_correction_type(struct memory_info *meminfo); unsigned int smbios_processor_external_clock(void); unsigned int smbios_processor_characteristics(void); struct cpuid_result;