2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-27 11:28:02 +00:00

Add serial field from SPD

Add serial number data from SPD to standard SPD decode

Change-Id: I380d6a36726daf0a9c23ab0bf8245f4b8c975658
This commit is contained in:
Jarrod Johnson 2015-06-03 13:04:14 -04:00
parent 25edd1ac31
commit 728969a7bf

View File

@ -742,6 +742,8 @@ class SPD(object):
self.info['manufacturer'] = decode_manufacturer(spd[117], spd[118])
self.info['manufacture_location'] = spd[119]
self.info['manufacture_date'] = decode_spd_date(spd[120], spd[121])
self.info['serial'] = struct.unpack(
'>I', struct.pack('4B', *spd[122:126]))[0]
self.info['model'] = struct.pack('18B', *spd[128:146])
def _decode_ddr4(self):
@ -765,4 +767,6 @@ class SPD(object):
self.info['manufacturer'] = decode_manufacturer(spd[320], spd[321])
self.info['manufacture_location'] = spd[322]
self.info['manufacture_date'] = decode_spd_date(spd[323], spd[324])
self.info['serial'] = struct.unpack(
'>I', struct.pack('4B', *spd[325:329]))[0]
self.info['model'] = struct.pack('18B', *spd[329:347])