diff options
-rw-r--r-- | src/arch/x86/smbios.c | 1 | ||||
-rw-r--r-- | src/arch/x86/smbios_defaults.c | 9 | ||||
-rw-r--r-- | src/include/smbios.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 1bf62c9993..4c20d52dfd 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -283,6 +283,7 @@ static int create_smbios_type17_for_dimm(struct dimm_info *dimm, 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 3d26bbbd85..c7377d6284 100644 --- a/src/arch/x86/smbios_defaults.c +++ b/src/arch/x86/smbios_defaults.c @@ -18,6 +18,15 @@ __weak void smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios 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 5cbd3c3e97..91f031ae94 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -958,6 +958,8 @@ struct smbios_type127 { 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); |