memory epia-m 127M != 512M

Ian Smith ian at abelon.com
Thu Sep 25 03:54:01 CEST 2003


Hi Niki,

I was looking at this as well and I think there may be a couple of problems 
here.

The first is that I think the comments in the code may be a bit misleading 
(apologies to the original author!)

AIUI the registers at 0x56 and 0x57 (and 0x5E and 0x5F as well) should be 
set to the same value as 0x5D i.e. the DRAM ending address for your highest 
populated bank of memory.

Looking through northbridge/via/vt8623/raminit.inc it looks like 0x56 and 
0x56 are set to 0x10, which I think would equate to 128MB as you are seeing.

I think if you possibly remove the references to 0x56 and 0x57 in 
northbridge.c (and set the number of banks to 4), then set the values in 
raminit.inc to what you want i.e.

0x5A = 0x20
0x5B = 0x40
0x5C = 0x40
0x5D = 0x40
0x56 = 0x40
0x57 = 0x40

then the size detect code might just work.

Of course if your 512MB module actually has two banks of memory then you 
might need to add some extra code to initialise the second bank (not sure 
about this though.

I need to get this working for the project I'm working on (as well as 
getting banks 2 and 3 going too), but at the moment I'm trying to get the 
VGA working so it might be a few days before I will the time to do some 
proper investigation.

Hope this helps anyway

Cheers

Ian

At 13:14 24/09/2003, Niki Waibel wrote:
>i use a 512MByte mem module in the epia-m 600mhz and linuxbios sayes:
>===
>totalram: 127M
>===
>
>i modified src/northbridge/via/vt8623/northbridge.c
>===
>diff -u -N -r 
>freebios-20030924.old/src/northbridge/via/vt8623/northbridge.c 
>freebios-20030924/src/northbridge/via/vt8623/north
>bridg
>e.c
>--- 
>freebios-20030924.old/src/northbridge/via/vt8623/northbridge.c 
>2003-06-29 18:23:58.000000000 +0200
>+++ freebios-20030924/src/northbridge/via/vt8623/northbridge.c  2003-09-24 
>14:10:22.025680920 +0200
>@@ -9,10 +9,14 @@
>  {
>         unsigned long totalmem;
>         unsigned char bank, mem, prevmem;
>+#if 0
>         // fix me later -- there are two more banks at 0x56 and 0x57
>         unsigned long firstbank = 0x5a, lastbank = 0x5d;
>+#endif
>+       unsigned long banks[] = { 0x56, 0x57, 0x5a, 0x5b, 0x5c, 0x5d };
>+       const unsigned long nbanks = 6;
>+       unsigned long i;
>         u8 sma_status, sma_size, sma_size_bits;
>-       u8 val;
>
>          struct pci_dev *pcidev;
>
>@@ -28,8 +32,9 @@
>         else
>                 sma_size = 0x01 << sma_size_bits;
>
>-       for(totalmem = mem = prevmem = 0, bank = firstbank;
>-           bank <= lastbank; bank++) {
>+       totalmem = mem = prevmem = 0;
>+       for(i=0; i<nbanks; i++) {
>+               bank = banks[i];
>                 pci_read_config_byte(pcidev, bank, &mem);
>                 // sanity check. If the mem value is < prevmem,
>                 // that is an error, so skip this step.
>@@ -41,7 +46,7 @@
>                         totalmem += (mem - prevmem) * 16;
>                 prevmem = mem;
>         }
>-
>+
>         totalmem -= sma_size;
>         totalmem *= 1024;
>  #if 0
>===
>
>but that did not help.
>
>this is no urgent problem, because 128M is enough for the system i want
>to build. but it could be a problem for other people.
>
>niki
>_______________________________________________
>Linuxbios mailing list
>Linuxbios at clustermatic.org
>http://www.clustermatic.org/mailman/listinfo/linuxbios




More information about the coreboot mailing list