Tim Chu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47156 )
Change subject: arch/x86/smbios: Update memory_array_handle for SMBIOS type 19 ......................................................................
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 --- M src/arch/x86/smbios.c 1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/47156/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 2995ece..e50e5ae 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -1023,7 +1023,7 @@ 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); @@ -1039,6 +1039,7 @@ 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) { @@ -1290,7 +1291,7 @@ 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,
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47156 )
Change subject: arch/x86/smbios: Update memory_array_handle for SMBIOS type 19 ......................................................................
Patch Set 1: Code-Review+1
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47156 )
Change subject: arch/x86/smbios: Update memory_array_handle for SMBIOS type 19 ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47156 )
Change subject: arch/x86/smbios: Update memory_array_handle for SMBIOS type 19 ......................................................................
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 --- M src/arch/x86/smbios.c 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, but someone else must approve Jonathan Zhang: Looks good to me, approved
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 19b6f5d..dc676cf 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -1068,7 +1068,7 @@ 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 @@ 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 @@ 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,