Skip to content

Commit

Permalink
Various fixes on SPD decoding algorithms (#152)
Browse files Browse the repository at this point in the history
* [DDR5] Fix rounding errors on SPD Timings

* [DDR5] Add a rounding factor of ~0.3% according to JEDEC to solve the last rounding issue found on NETAC Modules

* [DDR5] Add missing package ranks per channel parameter in total module capacity algorithm

* [DDR4] Fix rounding issues in SPD timings & frequency

* [DDR3] Fix rounding issues in SPD timings & frequency decoding. Check XMP Profile #2. Add a quirk for Kingston based on very early XMP 1.0 specs

* [DDR2] Fix CAS detection & rounding issues in SPD timings w/ EPP

* [DDR] Correct SPD timings rounding issues & add support for x.5 CAS latencies

* [SDR] Correct SPD Timings decoding due to rounding errors

* Add various JEP106 Manufacturers found while debugging

* Update timings display function to handle x.5 CAS
  • Loading branch information
x86fr committed Aug 26, 2022
1 parent 93051ad commit 0f89814
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 103 deletions.
4 changes: 2 additions & 2 deletions app/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ void post_display_init(void)
if (false) {
// Try to get RAM information from IMC (TODO)
display_spec_mode("IMC: ");
display_spec_ddr(ram.freq, ram.type, ram.tCL, ram.tRCD, ram.tRP, ram.tRAS);
display_spec_ddr(ram.freq, ram.type, ram.tCL, ram.tCL_dec, ram.tRCD, ram.tRP, ram.tRAS);
display_mode = DISPLAY_MODE_IMC;
} else if (ram.freq > 0 && ram.tCL > 0) {
// If not available, grab max memory specs from SPD
display_spec_mode("RAM: ");
if (ram.freq <= 166) {
display_spec_sdr(ram.freq, ram.type, ram.tCL, ram.tRCD, ram.tRP, ram.tRAS);
} else {
display_spec_ddr(ram.freq, ram.type, ram.tCL, ram.tRCD, ram.tRP, ram.tRAS);
display_spec_ddr(ram.freq, ram.type, ram.tCL, ram.tCL_dec, ram.tRCD, ram.tRP, ram.tRAS);
}
display_mode = DISPLAY_MODE_SPD;
} else {
Expand Down
6 changes: 3 additions & 3 deletions app/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ typedef enum {
#define display_spec_mode(mode) \
prints(8,0, mode);

#define display_spec_ddr(freq, type, cl, rcd, rp, ras) \
printf(8,5, "%uMHz (%s-%u) CAS %u-%u-%u-%u", \
freq / 2, type, freq, cl, rcd, rp, ras);
#define display_spec_ddr(freq, type, cl, cl_dec, rcd, rp, ras) \
printf(8,5, "%uMHz (%s-%u) CAS %u%s-%u-%u-%u", \
freq / 2, type, freq, cl, cl_dec?".5":"", rcd, rp, ras);

#define display_spec_sdr(freq, type, cl, rcd, rp, ras) \
printf(8,5, "%uMHz (%s PC%u) CAS %u-%u-%u-%u", \
Expand Down
52 changes: 26 additions & 26 deletions system/jedec_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x003D, "Tektronix" },
// { 0x003E, "Oracle Corporation" },
// { 0x003F, "Silicon Storage Technology" },
// { 0x0040, "ProMos/Mosel Vitelic" },
{ 0x0040, "MOSEL" },
{ 0x0041, "Infineon" },
{ 0x0042, "Macronix" },
// { 0x0043, "Xerox" },
Expand Down Expand Up @@ -161,7 +161,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0111, "DATARAM" },
// { 0x0112, "United Microelectronics Corp" },
// { 0x0113, "TCSI" },
// { 0x0114, "Smart Modular" },
{ 0x0114, "Smart Modular" },
// { 0x0115, "Hughes Aircraft" },
// { 0x0116, "Lanstar Semiconductor" },
// { 0x0117, "Qlogic" },
Expand Down Expand Up @@ -392,7 +392,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x027B, "Accelerant Networks" },
// { 0x027C, "Silicon Wave" },
// { 0x027D, "SandCraft" },
// { 0x027E, "Elpida" },
{ 0x027E, "Elpida" },
// { 0x0301, "Solectron" },
// { 0x0302, "Optosys Technologies" },
// { 0x0303, "Buffalo (Formerly Melco)" },
Expand All @@ -407,14 +407,14 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x030C, "Elite Flash Storage" },
// { 0x030D, "Mysticom" },
// { 0x030E, "LightSand Communications" },
// { 0x030F, "ATI Technologies" },
{ 0x030F, "ATI" },
// { 0x0310, "Agere Systems" },
// { 0x0311, "NeoMagic" },
// { 0x0312, "AuroraNetics" },
{ 0x0313, "Golden Empire" },
{ 0x0313, "GEIL" },
{ 0x0314, "Mushkin" },
// { 0x0315, "Tioga Technologies" },
// { 0x0316, "Netlist" },
{ 0x0316, "Netlist" },
// { 0x0317, "TeraLogic" },
// { 0x0318, "Cicada Semiconductor" },
// { 0x0319, "Centon Electronics" },
Expand Down Expand Up @@ -480,7 +480,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0355, "Silverback Systems" },
// { 0x0356, "Jade Star Technologies" },
// { 0x0357, "Pijnenburg Securealink" },
// { 0x0358, "takeMS - Ultron AG" },
{ 0x0358, "takeMS" }, // Ultron AG
// { 0x0359, "Cambridge Silicon Radio" },
{ 0x035A, "Swissbit" },
// { 0x035B, "Nazomi Communications" },
Expand Down Expand Up @@ -540,7 +540,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0413, "Digital Communications Technology Inc" },
// { 0x0414, "Silicon-Based Technology" },
// { 0x0415, "Fulcrum Microsystems" },
// { 0x0416, "Positivo Informatica Ltd" },
{ 0x0416, "Positivo" },
// { 0x0417, "XIOtech Corporation" },
// { 0x0418, "PortalPlayer" },
// { 0x0419, "Zhiying Software" },
Expand Down Expand Up @@ -585,7 +585,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0440, "Bandspeed" },
// { 0x0441, "LeWiz Communications" },
// { 0x0442, "CPU Technology" },
// { 0x0443, "Ramaxel Technology" },
{ 0x0443, "Ramaxel" },
// { 0x0444, "DSP Group" },
// { 0x0445, "Axis Communications" },
// { 0x0446, "Legacy Electronics" },
Expand Down Expand Up @@ -706,7 +706,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x053B, "Solid State System Co Ltd" },
// { 0x053C, "Kian Tech LLC" },
// { 0x053D, "Artimi" },
// { 0x053E, "Power Quotient International" },
{ 0x053E, "PQI" },
// { 0x053F, "Avago Technologies" },
// { 0x0540, "ADTechnology" },
// { 0x0541, "Sigma Designs" },
Expand All @@ -730,20 +730,20 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0553, "Velogix" },
// { 0x0554, "Montalvo Systems" },
// { 0x0555, "iVivity Inc" },
// { 0x0556, "Walton Chaintech" },
// { 0x0557, "AENEON" },
{ 0x0556, "Walton Chaintech" },
{ 0x0557, "AENEON" },
// { 0x0558, "Lorom Industrial Co Ltd" },
// { 0x0559, "Radiospire Networks" },
// { 0x055A, "Sensio Technologies Inc" },
// { 0x055B, "Nethra Imaging" },
// { 0x055C, "Hexon Technology Pte Ltd" },
{ 0x055C, "Hexon" },
// { 0x055D, "CompuStocx (CSX)" },
// { 0x055E, "Methode Electronics Inc" },
// { 0x055F, "Connect One Ltd" },
// { 0x0560, "Opulan Technologies" },
// { 0x0561, "Septentrio NV" },
// { 0x0562, "Goldenmars Technology Inc" },
// { 0x0563, "Kreton Corporation" },
{ 0x0563, "Kreton Corp." },
// { 0x0564, "Cochlear Ltd" },
// { 0x0565, "Altair Semiconductor" },
// { 0x0566, "NetEffect Inc" },
Expand Down Expand Up @@ -835,7 +835,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x063E, "Wilocity" },
// { 0x063F, "Novafora Inc" },
// { 0x0640, "iKoa Corporation" },
// { 0x0641, "ASint Technology" },
{ 0x0641, "ASint" },
{ 0x0642, "Ramtron" },
// { 0x0643, "Plato Networks Inc" },
// { 0x0644, "IPtronics AS" },
Expand Down Expand Up @@ -874,7 +874,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0666, "Netronome" },
// { 0x0667, "Zenverge Inc" },
// { 0x0668, "N-trig Ltd" },
// { 0x0669, "SanMax Technologies Inc" },
{ 0x0669, "SanMax" },
// { 0x066A, "Contour Semiconductor Inc" },
{ 0x066B, "TwinMOS" },
// { 0x066C, "Silicon Systems Inc" },
Expand Down Expand Up @@ -987,7 +987,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x075A, "Bestdon Technology Co Ltd" },
// { 0x075B, "Baysand Inc" },
// { 0x075C, "Uroad Technology Co Ltd" },
// { 0x075D, "Wilk Elektronik S.A." },
{ 0x075D, "Wilk Elektronik" },
// { 0x075E, "AAI" },
// { 0x075F, "Harman" },
// { 0x0760, "Berg Microelectronics Inc" },
Expand Down Expand Up @@ -1038,12 +1038,12 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0810, "Exelis" },
// { 0x0811, "Satixfy Ltd" },
// { 0x0812, "Galaxy Microsystems Ltd" },
// { 0x0813, "Gloway International Co Ltd" },
{ 0x0813, "Gloway" },
// { 0x0814, "Lab" },
// { 0x0815, "Smart Energy Instruments" },
// { 0x0816, "Approved Memory Corporation" },
// { 0x0817, "Axell Corporation" },
// { 0x0818, "Essencore Limited" },
{ 0x0818, "KLEVV" },
// { 0x0819, "Phytium" },
// { 0x081A, "Xi'an UniIC Semiconductors Co Ltd" },
// { 0x081B, "Ambiq Micro" },
Expand Down Expand Up @@ -1208,7 +1208,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x093F, "Pegasus Semiconductor (Shanghai) Co" },
// { 0x0940, "Mythic Inc" },
// { 0x0941, "Elmos Semiconductor AG" },
// { 0x0942, "Kllisre" },
{ 0x0942, "Kllisre" },
// { 0x0943, "Shenzhen Winconway Technology" },
// { 0x0944, "Shenzhen Xingmem Technology Corp" },
// { 0x0945, "Gold Key Technology Co Ltd" },
Expand Down Expand Up @@ -1261,7 +1261,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0974, "Hyundai Inc" },
// { 0x0975, "EXCELERAM" },
// { 0x0976, "PsiKick" },
// { 0x0977, "Netac Technology Co Ltd" },
{ 0x0977, "Netac" },
{ 0x0978, "PCCOOLER" },
// { 0x0979, "Jiangsu Huacun Electronic Technology" },
// { 0x097A, "Shenzhen Micro Innovation Industry" },
Expand Down Expand Up @@ -1335,7 +1335,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0A42, "Thermaltake Technology Co Ltd" },
// { 0x0A43, "Shenzhen O?Yang Maile Technology Ltd" },
// { 0x0A44, "UPMEM" },
// { 0x0A45, "Chun Well Technology Holding Limited" },
{ 0x0A45, "Chun Well" },
// { 0x0A46, "Astera Labs Inc" },
// { 0x0A47, "Winconway" },
// { 0x0A48, "Advantech Co Ltd" },
Expand Down Expand Up @@ -1384,7 +1384,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0A73, "MCLogic Inc" },
// { 0x0A74, "Eorex Corporation" },
// { 0x0A75, "Arm Technology (China) Co Ltd" },
// { 0x0A76, "Lexar Co Limited" },
{ 0x0A76, "Lexar" },
// { 0x0A77, "QinetiQ Group plc" },
// { 0x0A78, "Exascend" },
// { 0x0A79, "Hong Kong Hyunion Electronics Co Ltd" },
Expand All @@ -1410,7 +1410,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0B0F, "Quadratica LLC" },
// { 0x0B10, "Anpec Electronics" },
// { 0x0B11, "Xi'an Morebeck Semiconductor Tech Co" },
// { 0x0B12, "Kingbank Technology Co Ltd" },
{ 0x0B12, "Kingbank" },
// { 0x0B13, "ITRenew Inc" },
// { 0x0B14, "Shenzhen Eaget Innovation Tech Ltd" },
// { 0x0B15, "Jazer" },
Expand Down Expand Up @@ -1556,7 +1556,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0C23, "Tangem AG" },
// { 0x0C24, "FuturePath Technology (Shenzhen) Co" },
// { 0x0C25, "RC Module" },
// { 0x0C26, "Timetec International Inc" },
{ 0x0C26, "Timetec" },
// { 0x0C27, "ICMAX Technologies Co Limited" },
// { 0x0C28, "Lynxi Technologies Ltd Co" },
// { 0x0C29, "Guangzhou Taisupanke Computer Equipment" },
Expand Down Expand Up @@ -1611,7 +1611,7 @@ static const struct spd_jedec_manufacturer jep106[] = {
// { 0x0C5A, "Fraunhofer IPMS" },
// { 0x0C5B, "Shenzhen Daxinlang Electronic Tech Co" },
// { 0x0C5C, "Abacus Peripherals Private Limited" },
// { 0x0C5D, "OLOy Technology" },
{ 0x0C5D, "OLOy" },
// { 0x0C5E, "Wuhan P&S Semiconductor Co Ltd" },
// { 0x0C5F, "Sitrus Technology" },
// { 0x0C60, "AnHui Conner Storage Co Ltd" },
Expand Down

0 comments on commit 0f89814

Please sign in to comment.