On Mon, Feb 26, 2007 at 04:24:04PM -0500, Corey Osgood wrote:
I'm currently playing with the raminit.c that I've attached, it's from one of his old posts. Uwe, have you done anything more since this? And do you have a new northbridge.c also? Mine's a hack from what was there (fixing regs, etc), I have no idea if it works right or not.
I'll post a full patch which should work out of the box (the infrastructure for building the target at least).
I did try some more things to get the code to work properly, but with no success so far. I'm pretty sure it's some small quirk I got wrong, but I haven't found out what it is, yet. Maybe a timing issue...
The code will probably not work for you as is, you must adjust it to the extact RAM you're using (and location of the RAM, i.e. in which RAM slot it is located).
Just out of curiousity, in sdram_set_registers, are those values you decided to send, or ones from a running system?
Yes, mostly. I got them from a running Linux on exactly the same system (you should not change jumpers, RAM parts, CPU, whatever, or else those values will probably also change).
You can get the northbridge values via: lspci -xxx -v -s 00:00.0
The RAM SPD-registers can be output via serial in the code. I used something like
dump_spd_registers(&cpu[0]); sdram_initialize(sizeof(cpu)/sizeof(cpu[0]), cpu); ram_check(0x0, 0x4000000);
in auto.c in the src/mainboard/... directory.
HTH, Uwe.