device/dram: Move SPD manufacturer names out of arch/x86
Move SPD manufacturer ID decoding to device/dram. Will be used by the following patch outside of SMBIOS scope as well. Change-Id: Iec175cd6ab1d20761da955785e4bc0e87ae02dbb Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50544 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
committed by
Angel Pons
parent
20eb3506ca
commit
ff251d21d0
@@ -1,3 +1,3 @@
|
||||
romstage-y += ddr4.c ddr3.c ddr2.c ddr_common.c
|
||||
|
||||
ramstage-y += ddr4.c ddr3.c ddr2.c ddr_common.c
|
||||
ramstage-y += ddr4.c ddr3.c ddr2.c ddr_common.c spd.c
|
||||
|
37
src/device/dram/spd.c
Normal file
37
src/device/dram/spd.c
Normal file
@@ -0,0 +1,37 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include <device/dram/spd.h>
|
||||
|
||||
const char *spd_manufacturer_name(const uint16_t mod_id)
|
||||
{
|
||||
switch (mod_id) {
|
||||
case 0x9b85:
|
||||
return "Crucial";
|
||||
case 0x4304:
|
||||
return "Ramaxel";
|
||||
case 0x4f01:
|
||||
return "Transcend";
|
||||
case 0x9801:
|
||||
return "Kingston";
|
||||
case 0x987f:
|
||||
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:
|
||||
return "Samsung";
|
||||
case 0xfe02:
|
||||
return "Elpida";
|
||||
case 0x2c80:
|
||||
return "Micron";
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user