drm/amdgpu: Interpret IPMI data for product information (v2)
authorLuben Tuikov <luben.tuikov@amd.com>
Tue, 15 Nov 2022 05:23:14 +0000 (00:23 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Nov 2022 23:07:26 +0000 (18:07 -0500)
commit0dbf2c56262532fbd498f590c91c4085413b8829
treec4c00adc8c20c221201a3047e01c39713e3645c8
parentafbe5d1e4bd7c798bf5ea53f79ce7f9e59f60301
drm/amdgpu: Interpret IPMI data for product information (v2)

Don't assume FRU MCU memory locations for the FRU data fields, or their sizes,
instead read and interpret the IPMI data, as stipulated in the IPMI spec
version 1.0 rev 1.2.

Extract the Product Name, Product Part/Model Number, and the Product Serial
Number by interpreting the IPMI data.

Check the checksums of the stored IPMI data to make sure we don't read and
give corrupted data back the the user.

Eliminate small I2C reads, and instead read the whole Product Info Area in one
go, and then extract the information we're seeking from it.

Eliminates a whole function, making this file smaller.

v2: Clarify changes in the commit message.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Kent Russell <kent.russell@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Tested-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c