Skip to contentSkip to conversation

Q: boot time memory region recognition and clearing.

DISCUSSION Chiaki 2 participants 4 messages Jul 13, 2002 – Jul 14, 2002

lore
Share & tools
lore

Chiaki

author
#0 lore raw
Quoted 7 lines
Quoted 7 lines

I have found that the particular motherboard (and memory sticks)
that I use at home tends to generate bogus memory problem warning messages when I use ecc module. Motherboard is Gigabyte 7XIE4 that uses AMD751.
(Yes, AMD has now provides AMD76x series chipset for
newer CPUs.)

Quoted 9 lines
Quoted 3 lines

I say "bogus" because I have tested the hardware many times using memtest86 and found that it doesn't detect any memory errors even

memtest86 isnt (except on the very very latest versions) aware of ECC. It sees the memory after the ECC rescues minor errors so if the RAM has

errors but ECC just about saves you it will show up clean

Thank you for the info on the latest memtest86.
I will check out.

It might as well be the case that memtest86 (previous versions) was not quite ECC-aware.

I was not clear on the type of error messages
I received from ecc.o module.
I got both SBE (single bit error detected and corrected) and MBE (multiple bits error detected,
which presumably was not correctable!).

My point was that there is something amiss
if memtest86 doesn't report errors due to
underlying (hardware) ECC fix,
but the why ecc.o module does.

In any case, I will run memtest86 (the latest version). Thank you again for the info.

In the meantime, after posting the previous message I read the Documentation/i386/boot.txt, etc..

It seems that by the time setup.c was called the kernel was already 32bit linear addressing mode. The table I mentioned as BIOS-supplied was not quite directly supplied by BIOS.
The table was supplied by the routines that collect BIOS data and the routines are in setup.S. The collected information is placed in a memory area which is passed from the early boot code to the following boot pass: it seems that the triplet-table I metioned is placed in the so called zero-page during the whole boot process.

What I would probably need is to hack boot/setup.S and if that may have a danger of making setup.S too large (and I think so considering what setup.c does to clean up bogus BIOS-supplied memory info), I would need to tinker with one of the two hooks mentioned in the boot.txt by letting loader (my case being loadlin.exe under DOS ) to prepare a hook to do the kind of writing I have in mind.

But this is not going to be a weekend job that I hope it would be. I would need to tinker with two different programs: loader and kernel startup code.

But any comment to my original post and other avenue to achieve similar result welcome.
(Maybe the high reliability computing people have a better idea short of replacement BIOS or even have some prototype code working on this? Hmm. Come to think of it, maybe I can take the part of free BIOS and see if it will not enlarge setup.S too large, etc.. But thinking of various proprietary chipsets, I would hope that I can insert a short C routine somewhere in the boot chain, preferably on the kernel side, to accomplish my objective.)

#1 lore raw
Quoted 27 lines · Chiaki
Quoted 10 lines
Quoted 9 lines

I have found that the particular motherboard (and memory sticks) that I use at home tends to generate bogus memory problem warning messages when I use ecc module.
Motherboard is Gigabyte 7XIE4 that uses AMD751.
(Yes, AMD has now provides AMD76x series chipset for
newer CPUs.)
I say "bogus" because I have tested the hardware
many times using memtest86 and found that it doesn't
detect any memory errors even

Quoted 5 lines

memtest86 isnt (except on the very very latest versions) aware of ECC. It sees the memory after the ECC rescues minor errors so if the RAM has

errors but ECC just about saves you it will show up clean

Thank you for the info on the latest memtest86.
I will check out.

It might as well be the case that memtest86 (previous versions) was not quite ECC-aware.

I was not clear on the type of error messages
I received from ecc.o module.
I got both SBE (single bit error detected and corrected) and MBE (multiple bits error detected,
which presumably was not correctable!).

Quoted 7 lines

My point was that there is something amiss
if memtest86 doesn't report errors due to
underlying (hardware) ECC fix,
but the why ecc.o module does.

In any case, I will run memtest86 (the latest version). Thank you again for the info.

Note. The hardware ECC support in memtest86 3.0 is limited, so I would check to make certain your chipset is supported..

Quoted 4 lines

But any comment to my original post and other avenue to achieve similar result welcome.
(Maybe the high reliability computing people have a better idea short of replacement BIOS or

Quoted 8 lines

even have some prototype code working on this?
Hmm. Come to think of it, maybe I can take
the part of free BIOS and see if it will not
enlarge setup.S too large, etc.. But thinking of
various proprietary chipsets, I would hope that
I can insert a short C routine somewhere in the
boot chain, preferably on the kernel side, to
accomplish my objective.)

Your objective is misguided. Even with a bios that
is slightly buggy in initializing the ECC bits, what you want is scrubbing. Then if the error disappears after 5 minutes of uptime you can ignore it. And if it comes back you know you really have something to worry about. At least for single bit errors this should fix the whole problem with something that is useful for other purposes.

Eric

author
#2 lore raw
Quoted 4 lines · Eric W. Biederman

Note. The hardware ECC support in memtest86 3.0 is limited, so I would check to make certain your chipset is supported..

Well, I read controller.c source file, and found that amd751 is supported according to the info in AMD751 documentation.
(This is the same documentatin I used when I hacked early ecc.c source file.)

I ran memtest v3 on the motherboard, and it didn't find any errors when I ran it overnight.

Quoted 4 lines

Your objective is misguided. Even with a bios that
is slightly buggy in initializing the ECC bits, what you want is scrubbing. Then if the error disappears after 5 minutes of uptime you can ignore it.

I see. Then the problem would boil down whether AMD751 supports scrubbingat the hardware level. It reports that it saw correctable single bit error, and I take it to mean that the chip itself has fixed the single bit error.
Am I too optimistic to expect this?

The problem, though, is this.
According to the AMD751 documentation, we
can clear the memory error info in the chip register, by writing to a certain location of the PCI space. However, when one error get reported on my motherboard, it would NOT go away and I think there is something amiss about this.
I am not sure if the AMD doc is correct about this now. from controller.c of memtest86.

                /* Clear the error status */
                pci_conf_write(ctrl.bus, ctrl.dev, ctrl.fn, 0x58, 2, 0);
Quoted 1 line

From locally hacked ecc.c:

/*
* clear error flag bits that were set by writing 0 to
them

                 * we hope the error was a fluke or something :)
                 */
                /* int value = eccstat & 0xFCFF; */
                /* pci_write_config_word(bridge, 0x58, value); */
                pci_write_config_byte(bridge, 0x58, 0x0);
                pci_write_config_byte(bridge, 0x59, 0x0);

BTW, I tried both the byte and word write to 0x58, but it never seemd to clear the error status.
(It is possible that the error is real, but again the error is reported always in the first bank even if I rotate the memry sticks...)

Quoted 6 lines

And if it comes back you know you really have
something to worry about. At least for single bit errors this should fix the whole problem with something that is useful for other purposes.

Eric

Thank you for your feedback. I noticed that you
contributed to linuxBIOS and memtest86.
Please keep the good work going!

Chiaki

PS: I am wondering when we can have a reasonably good ECC support on desktop PC...
(A la Sun pizza boxes, that is.)

#3 lore raw
Quoted 7 lines · Ishikawa
Quoted 4 lines · Eric W. Biederman

Note. The hardware ECC support in memtest86 3.0 is limited, so I would check to make certain your chipset is supported..

Quoted 8 lines

Well, I read controller.c source file, and found that amd751 is supported according to the info in AMD751 documentation.
(This is the same documentatin I used when I hacked early ecc.c source file.)

I ran memtest v3 on the motherboard, and it didn't find any errors when I ran it overnight.

I wasn't able to verify it so the AMD751 was disabled by default.

Quoted 6 lines
Quoted 5 lines

Your objective is misguided. Even with a bios that
is slightly buggy in initializing the ECC bits, what you want is scrubbing. Then if the error disappears after 5 minutes of uptime you can ignore it.

Quoted 6 lines

I see. Then the problem would boil down whether AMD751 supports scrubbingat the hardware level. It reports that it saw correctable single bit error, and I take it to mean that the chip itself has fixed the single bit error.
Am I too optimistic to expect this?

The single bit error has been corrected in only one direction, in the data going to the cpu. The data remaining in memory was not corrected.

Quoted 7 lines

The problem, though, is this.
According to the AMD751 documentation, we
can clear the memory error info in the chip register, by writing to a certain location of the PCI space. However, when one error get reported on my motherboard, it would NOT go away and I think there is something amiss about this.

That the location is frequently read and there is no hardware scrubbing (writing the correct value back to ram).

Quoted 10 lines

I am not sure if the AMD doc is correct about this now. from controller.c of memtest86.

                /* Clear the error status */
                pci_conf_write(ctrl.bus, ctrl.dev, ctrl.fn, 0x58, 2, 0);
Quoted 1 line

From locally hacked ecc.c:

/*
* clear error flag bits that were set by writing 0 to
them

Quoted 6 lines
                 * we hope the error was a fluke or something :)
                 */
                /* int value = eccstat & 0xFCFF; */
                /* pci_write_config_word(bridge, 0x58, value); */
                pci_write_config_byte(bridge, 0x58, 0x0);
                pci_write_config_byte(bridge, 0x59, 0x0);

Both of which match.

Quoted 5 lines

BTW, I tried both the byte and word write to 0x58, but it never seemd to clear the error status.
(It is possible that the error is real, but again the error is reported always in the first bank even if I rotate the memry sticks...)

Sounds like a questionable bit of documentation.

Quoted 10 lines
Quoted 6 lines

And if it comes back you know you really have
something to worry about. At least for single bit errors this should fix the whole problem with something that is useful for other purposes.

Eric

Thank you for your feedback. I noticed that you contributed to linuxBIOS and memtest86. Please keep the good work going!

Hopefully we can get the problems well enough understood in the community that we can actually get some of this code fixed up and working well.

Eric