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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47508 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Jonathan Zhang <jonzhang@fb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
f7cdb8e3c6
commit
a96eaf8700
|
@ -463,6 +463,12 @@ static int get_socket_type(void)
|
||||||
return 0x02; /* Unknown */
|
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)
|
unsigned int __weak smbios_processor_external_clock(void)
|
||||||
{
|
{
|
||||||
return 0; /* Unknown */
|
return 0; /* Unknown */
|
||||||
|
@ -1035,8 +1041,7 @@ static int smbios_write_type16(unsigned long *current, int *handle)
|
||||||
|
|
||||||
t->location = MEMORY_ARRAY_LOCATION_SYSTEM_BOARD;
|
t->location = MEMORY_ARRAY_LOCATION_SYSTEM_BOARD;
|
||||||
t->use = MEMORY_ARRAY_USE_SYSTEM;
|
t->use = MEMORY_ARRAY_USE_SYSTEM;
|
||||||
t->memory_error_correction = meminfo->ecc_capable ?
|
t->memory_error_correction = smbios_memory_error_correction_type(meminfo);
|
||||||
MEMORY_ARRAY_ECC_SINGLE_BIT : MEMORY_ARRAY_ECC_NONE;
|
|
||||||
|
|
||||||
/* no error information handle available */
|
/* no error information handle available */
|
||||||
t->memory_error_information_handle = 0xFFFE;
|
t->memory_error_information_handle = 0xFFFE;
|
||||||
|
|
|
@ -57,6 +57,7 @@ const char *smbios_processor_serial_number(void);
|
||||||
|
|
||||||
void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision);
|
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_external_clock(void);
|
||||||
unsigned int smbios_processor_characteristics(void);
|
unsigned int smbios_processor_characteristics(void);
|
||||||
struct cpuid_result;
|
struct cpuid_result;
|
||||||
|
|
Loading…
Reference in New Issue