Tim Chu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48886 )
Change subject: arch/x86/smbios: Update SMBIOS type 17 asset tag ......................................................................
arch/x86/smbios: Update SMBIOS type 17 asset tag
Add SMBIOS type 17 asset tag. Use dimm locator as default value.
Tested=Execute "dmidecode -t 17" to check asset tag field is correct.
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: I323e6b4cf6b11ede253d5a2a4bfc976a3f432b05 --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/include/smbios.h 3 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/48886/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index aaf989d..401935b 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -319,6 +319,7 @@
smbios_fill_dimm_manufacturer_from_id(dimm->mod_id, t); smbios_fill_dimm_serial_number(dimm, t); + smbios_fill_dimm_asset_tag(dimm, t); smbios_fill_dimm_locator(dimm, t);
/* put '\0' in the end of data */ diff --git a/src/arch/x86/smbios_defaults.c b/src/arch/x86/smbios_defaults.c index 4d8883f3..d20e4f3 100644 --- a/src/arch/x86/smbios_defaults.c +++ b/src/arch/x86/smbios_defaults.c @@ -18,6 +18,15 @@ t->bank_locator = smbios_add_string(t->eos, locator); }
+__weak void smbios_fill_dimm_asset_tag(const struct dimm_info *dimm, struct smbios_type17 *t) +{ + char buf[40]; + + snprintf(buf, sizeof(buf), "Channel-%d-DIMM-%d-AssetTag", + dimm->channel_num, dimm->dimm_num); + t->asset_tag = smbios_add_string(t->eos, buf); +} + __weak const char *smbios_mainboard_bios_version(void) { return NULL; diff --git a/src/include/smbios.h b/src/include/smbios.h index e451d17..9892d17 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -952,6 +952,8 @@
void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id, struct smbios_type17 *t); +void smbios_fill_dimm_asset_tag(const struct dimm_info *dimm, + struct smbios_type17 *t); void smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios_type17 *t);
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48886 )
Change subject: arch/x86/smbios: Update SMBIOS type 17 asset tag ......................................................................
Patch Set 1: Code-Review+1
Attention is currently required from: Tim Chu. Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48886 )
Change subject: arch/x86/smbios: Update SMBIOS type 17 asset tag ......................................................................
Patch Set 1: Code-Review+2
Attention is currently required from: Tim Chu. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48886 )
Change subject: arch/x86/smbios: Update SMBIOS type 17 asset tag ......................................................................
Patch Set 1: Code-Review+1
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48886 )
Change subject: arch/x86/smbios: Update SMBIOS type 17 asset tag ......................................................................
arch/x86/smbios: Update SMBIOS type 17 asset tag
Add SMBIOS type 17 asset tag. Use dimm locator as default value.
Tested=Execute "dmidecode -t 17" to check asset tag field is correct.
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: I323e6b4cf6b11ede253d5a2a4bfc976a3f432b05 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48886 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 M src/arch/x86/smbios_defaults.c M src/include/smbios.h 3 files changed, 12 insertions(+), 0 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 1bf62c9..4c20d52 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -283,6 +283,7 @@
smbios_fill_dimm_manufacturer_from_id(dimm->mod_id, t); smbios_fill_dimm_serial_number(dimm, t); + smbios_fill_dimm_asset_tag(dimm, t); smbios_fill_dimm_locator(dimm, t);
/* put '\0' in the end of data */ diff --git a/src/arch/x86/smbios_defaults.c b/src/arch/x86/smbios_defaults.c index 3d26bbb..c7377d6 100644 --- a/src/arch/x86/smbios_defaults.c +++ b/src/arch/x86/smbios_defaults.c @@ -18,6 +18,15 @@ t->bank_locator = smbios_add_string(t->eos, locator); }
+__weak void smbios_fill_dimm_asset_tag(const struct dimm_info *dimm, struct smbios_type17 *t) +{ + char buf[40]; + + snprintf(buf, sizeof(buf), "Channel-%d-DIMM-%d-AssetTag", + dimm->channel_num, dimm->dimm_num); + t->asset_tag = smbios_add_string(t->eos, buf); +} + __weak const char *smbios_mainboard_bios_version(void) { return NULL; diff --git a/src/include/smbios.h b/src/include/smbios.h index 5cbd3c3..91f031a 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -958,6 +958,8 @@
void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id, struct smbios_type17 *t); +void smbios_fill_dimm_asset_tag(const struct dimm_info *dimm, + struct smbios_type17 *t); void smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios_type17 *t);