diff options
author | Tim Chu <Tim.Chu@quantatw.com> | 2020-11-02 21:33:52 -0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-16 11:03:37 +0000 |
commit | e41f595310d6e74ba8ca67c87abfa2fed790428f (patch) | |
tree | ec33fa62332e5c65bd366bc42f78b5a3ac2b9f67 /src/arch | |
parent | 726504a61a83b12a72fca40c88c7fee1c40b54ad (diff) |
arch/x86/smbios: Update memory_array_handle for SMBIOS type 19
Update memory array handle for SMBIOS type 19.
TEST=Execute "dmidecode -t 19" to check if memory array handle is correct.
Signed-off-by: Tim Chu <Tim.Chu@quantatw.com>
Change-Id: I49078b870bac3c6162913b91651ec09632800f1f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47156
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/smbios.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 19b6f5d989..dc676cf141 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -1068,7 +1068,7 @@ static int smbios_write_type17(unsigned long *current, int *handle, int type16) return totallen; } -static int smbios_write_type19(unsigned long *current, int *handle) +static int smbios_write_type19(unsigned long *current, int *handle, int type16) { struct smbios_type19 *t = (struct smbios_type19 *)*current; int len = sizeof(struct smbios_type19); @@ -1084,6 +1084,7 @@ static int smbios_write_type19(unsigned long *current, int *handle) t->type = SMBIOS_MEMORY_ARRAY_MAPPED_ADDRESS; t->length = len - 2; t->handle = *handle; + t->memory_array_handle = type16; for (i = 0; i < meminfo->dimm_cnt && i < ARRAY_SIZE(meminfo->dimm); i++) { if (meminfo->dimm[i].dimm_size > 0) { @@ -1335,7 +1336,7 @@ unsigned long smbios_write_tables(unsigned long current) const int type16 = handle; update_max(len, max_struct_size, smbios_write_type16(¤t, &handle)); update_max(len, max_struct_size, smbios_write_type17(¤t, &handle, type16)); - update_max(len, max_struct_size, smbios_write_type19(¤t, &handle)); + update_max(len, max_struct_size, smbios_write_type19(¤t, &handle, type16)); update_max(len, max_struct_size, smbios_write_type32(¤t, handle++)); update_max(len, max_struct_size, smbios_walk_device_tree(all_devices, |