summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/inc
diff options
context:
space:
mode:
authorSimon Rettberg2022-07-07 15:27:21 +0200
committerSimon Rettberg2022-07-07 15:27:21 +0200
commitc30c23e609bfd14463ffdce8a24112339bc0fb4e (patch)
treeefb1920427aaf90be13ea688276e46e1b4c3879b /modules-available/statistics/inc
parent[dnbd3] Set default sort order for numeric columns to DESC (diff)
downloadslx-admin-c30c23e609bfd14463ffdce8a24112339bc0fb4e.tar.gz
slx-admin-c30c23e609bfd14463ffdce8a24112339bc0fb4e.tar.xz
slx-admin-c30c23e609bfd14463ffdce8a24112339bc0fb4e.zip
[statistics] Decode SPD JEDEC manufacturer IDs
Diffstat (limited to 'modules-available/statistics/inc')
-rw-r--r--modules-available/statistics/inc/hardwareparser.inc.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/modules-available/statistics/inc/hardwareparser.inc.php b/modules-available/statistics/inc/hardwareparser.inc.php
index 2a2f1f24..2afd0564 100644
--- a/modules-available/statistics/inc/hardwareparser.inc.php
+++ b/modules-available/statistics/inc/hardwareparser.inc.php
@@ -60,6 +60,42 @@ class HardwareParser
if (array_key_exists('bank' . $bank, $data) && array_key_exists('id' . $id, $data['bank' . $bank]))
return $data['bank' . $bank]['id' . $id];
}
+ } elseif (preg_match('/Unknown.{0,16}[\[(](?:0x)?([0-9a-fA-F]+)[\])]/', $string, $out)) {
+ // Seems to be yet another encoding, from SPD, but somehow related to JEDEC too.
+ // Saw this in two machines' dmidecode output, found the table you see here
+ // at https://review.coreboot.org/plugins/gitiles/coreboot/+/HEAD/src/device/dram/spd.c
+ $id = hexdec($out[1]);
+ switch ($id) {
+ case 0x9b85:
+ return "Crucial";
+ case 0x4304:
+ return "Ramaxel";
+ case 0x4f01:
+ return "Transcend";
+ case 0x9801:
+ return "Kingston";
+ case 0x987f:
+ case 0xad00:
+ return "Hynix";
+ case 0x9e02:
+ return "Corsair";
+ case 0xb004:
+ return "OCZ";
+ case 0xad80:
+ return "Hynix/Hyundai";
+ case 0x3486:
+ return "Super Talent";
+ case 0xcd04:
+ return "GSkill";
+ case 0xce80:
+ case 0xce00:
+ return "Samsung";
+ case 0xfe02:
+ return "Elpida";
+ case 0x2c80:
+ case 0x2c00:
+ return "Micron";
+ }
}
return $string;
}