Skip to content
Permalink
Browse files

Added hinote when hardinfo is not able to read full DDR4 SPD data.

  • Loading branch information...
ocerman authored and lpereira committed May 11, 2019
1 parent 89e6dbc commit ae93b3ba82423e189cc5bb0588ac10dad3238af4
Showing with 19 additions and 0 deletions.
  1. +7 −0 modules/devices.c
  2. +12 −0 modules/devices/spd-decode.c
@@ -75,6 +75,7 @@ void scan_dtree(gboolean reload);
void scan_device_resources(gboolean reload);

gboolean root_required_for_resources(void);
gboolean spd_decode_show_hinote(const char**);

gchar *hi_more_info(gchar *entry);

@@ -833,5 +834,11 @@ const gchar *hi_note_func(gint entry)
return g_strdup(_("Resource information requires superuser privileges"));
}
}
else if (entry == ENTRY_SPD){
const char *msg;
if (spd_decode_show_hinote(&msg)) {
return msg;
}
}
return NULL;
}
@@ -613,6 +613,8 @@ static const char **vendors[VENDORS_BANKS] = { vendors1, vendors2, vendors3, ven
vendors7
};

gboolean ddr4_partial_data = FALSE;

/*
* We consider that no data was written to this area of the SPD EEPROM if
* all bytes read 0x00 or all bytes read 0xff
@@ -1654,6 +1656,7 @@ static gchar *decode_dimms(GSList * dimm_list, gboolean use_sysfs, int max_size)
detailed_info = decode_ddr4_sdram(bytes, &module_size);
decode_ddr4_part_number(bytes, spd_size, part_number);
decode_ddr4_module_manufacturer(bytes, spd_size, &manufacturer);
ddr4_partial_data = ddr4_partial_data || (spd_size < 512);
break;
case DDR_SDRAM:
detailed_info = decode_ddr_sdram(bytes, &module_size);
@@ -1746,3 +1749,12 @@ void scan_spd_do(void)
_("Bank"), _("Size"), _("Manufacturer"), _("Model") );
g_free(list);
}

gboolean spd_decode_show_hinote(const char **msg){
if (ddr4_partial_data){
*msg = g_strdup(_("A current driver has provided only partial DDR4 SPD data. Please load and\nconfigure ee1004 driver to obtain additional information about DDR4 SPD."));
return TRUE;
}

return FALSE;
}

0 comments on commit ae93b3b

Please sign in to comment.
You can’t perform that action at this time.