eurus13 / T440P-32GB

Work on getting the Thinkpad T440P to boot with 32GB ram (16GB x 2)
4 stars 2 forks source link

16GB Module Work #1

Open BayLee4 opened 4 years ago

BayLee4 commented 4 years ago

Hi, would be easier to answer here I guess :)

You were right about me using a DDR3L module, this module to be exact. (They removed it from their website, had to use the wayback machine, the reference is Crucial CT204864BF160B 16Go)

I dumped the SPD some times ago, here is the result :

92 13 0b 03 05 22 02 09 03 52 01 08 0a 00 fc 00
69 78 69 3c 69 11 18 81 f0 0a 3c 3c 01 40 83 05
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 0f 11 62 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 85 9b 00 00 00 a0 1e 7f fe ca 2b
43 54 32 30 34 38 36 34 42 46 31 36 30 42 2e 31
36 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Also, I think spoofing the SPD to simulate a LPDDR3 would unfortunately not work, unless I misunderstood something, looking at the AddrDecode/Encode code, it looks like the MRC is using some kind of hacks to works with the eventual use of an 11 column, this code for instance seems to assume that the LPDDR3 will not use more than 15 row : but any 16GB module will use 16 row.

I tried to modify the code in order to enable the use of an 11 column for DRR3/L (diff.txt attached to this post), but I made a mistake : you will notice that in the file MrcHswMcAddrDecode.c I do some modification in a else statement which only concern "single rank or no rank interleaving", which my module is not (it has rank interleaving). I did not understand fully the logic of encoding/decoding the memory address there, and I am not able to build the BIOS on my own (I do not own the necessary proprietary Visual eBIOS tool to do that): I was relying on the good will of a chinese manufacturer of which I bought an Haswell SBC running a AMI Bios similar to the one that leaked.

diff.txt

eurus13 commented 4 years ago

Hope this message finds you well. Sorry for the slow reply, I started to type out of response and realized I needed to add that info to the Github, so I wanted to only write it once.

I agree, it seems spoofing won't work for a lot of reasons.

I found theMicron (MT16KTF2G64HZ) Data sheet. It's my understanding Crucial is their retail division.

I added what I've found to the Github. Looks like we had some of the same solutions in the MRC address decode file, but diverged on some others. I am not fluent in C so I will want to double check before it's implemented.

Here are my suggestions as well as the notes I added for myself

if (!get_lpddr_mode(MAD_CHNL) { return (dimm_rank_size_as_cl == HSW_MC_16GB_AS_CL) ? 11 : 10; <----------------- 11 else 10

//the condition would be read aa if not lpddr and if rank_size_as_cl = 16gb then col = 11, otherwise col = 10

// remove this two lines below

// after removed leave the following bracket

}

// LPDDR3 is only soldered aka memory down and which will never be the case for T440p <--- notes

// If we got past the above line, we are LPDDR

width = get_dimm_a_width(MAD_CHNL, MAD_DIMM);

BayLee4 commented 4 years ago

Hi ! No worries :)

Mhh, the code/note you posted is not really readable haha :') I do not see any difference with the diff.txt I posted above on those part of the code (which is by the way meant to be use with patch -p1 < diff.txt in the root folder of the just cloned repo)

And I could be wrong, but I think what's remaining here is really only having a good understanding of the MrcHswEncode and the MrcHswDecode functions, there is almost surely something in those two functions that prevents the patch from working. After having identified what is wrong in those two functions and finding a potential fix, the next step would be to identify where they are located in the reverse-engineered MRC code, and also apply the fix there.

Do you have any idea ?