On Mon, 12 Mar 2001, Chris Sears wrote:
>
> Linux has some support for ECC error detection:
>
> http://www.anime.net/~goemon/linux-ecc/
>
> I've ported ECC 0.12 to a FreeBSD kld and it seems to work.
>
> A couple of minor changes:
>
> commented out probe_450gx because the compiler was
> giving some plausible warnings
>
> check if ecc_mode == ECC_NONE before installing the timer
>
> I've attached it and would welcome any comments. I've also
> posted it back to the Linux ECC people.
Excellent!! I've just compiled it and loaded it on my 4.2-STABLE
system with a 440BX-based board. I even have an enhancement already,
which is pretty much just a cut-n-paste from the Linux bits with a
little bit of style enhancement, though you'll want to change it to
your liking, and since I'm not an avid C programmer, make sure I've
done the right stuff... (it DOES work, at least):
--- ecc.c.orig Tue Mar 13 15:17:57 2001
+++ ecc.c Tue Mar 13 16:31:02 2001
@@ -1040,6 +1040,26 @@
int type,
void* data)
{
+ char *ecc[] = {
+ "None",
+ "Reserved",
+ "Parity checking",
+ "ECC detection",
+ "ECC detection and correction",
+ "ECC with hardware scrubber"
+ };
+ char *dram[] = {
+ "Empty",
+ "Reserved",
+ "FPM",
+ "EDO",
+ "BEDO",
+ "SDR",
+ "DDR",
+ "RDR"
+ };
+ unsigned long mem_end = 0;
+ unsigned long last_mem = 0;
static int attached = 0;
int loop;
@@ -1068,6 +1088,25 @@
if (cs.ecc_mode == ECC_NONE) {
printf("ECC: no ECC memory\n");
return -ENODEV;
+ } else {
+ printf("ECC: Chipset ECC capability - %s\n",
+ ecc[cs.ecc_cap]);
+ printf("ECC: Current ECC mode - %s\n",
+ ecc[cs.ecc_mode]);
+ printf("ECC:\tBank\tSize\tType\tECC\tSBE\tMBE\n");
+ for (loop = 0; loop < 8; loop++) {
+ last_mem = bank[loop].endaddr;
+ if (last_mem > mem_end) {
+ printf("ECC:\t%d\t", loop);
+ printf("%dM\t", (int)(last_mem - mem_end) /
+1048576);
+ printf("%s\t", dram[bank[loop].mtype]);
+ printf("%s\t", bank[loop].eccmode ? "Y" : "N");
+ printf("%d\t", bank[loop].sbecount);
+ printf("%d\n", bank[loop].mbecount);
+ mem_end = last_mem;
+ }
+ }
+ printf("ECC: Total\t%dM\n", (int)mem_end / 1048576);
}
attached = 1;
break;
I also have something that I can hopefully just plug the bits into to
get this working for the ServerWorks III chipset, as well, assuming I
can find the right info about it...
-- Chris Dillon - [EMAIL PROTECTED] - [EMAIL PROTECTED]
FreeBSD: The fastest and most stable server OS on the planet.
For IA32 and Alpha architectures. IA64, PPC, and ARM under development.
http://www.freebsd.org
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message