<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3314" name=GENERATOR>
<STYLE>@font-face {
        font-family: 宋体;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="FONT-SIZE: 10pt; FONT-FAMILY: verdana">
<DIV><FONT face=Verdana color=#000080 size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#000080 size=2>hi.how can i get the documents 
about the fault tolerrance utility(eg EDAC)in rtems?</FONT></DIV>
<DIV><FONT face=Verdana color=#000080 size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#c0c0c0 size=2>2008-06-04 </FONT></DIV><FONT 
face=Verdana color=#000080 size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>
</FONT>
<DIV><FONT face=Verdana color=#c0c0c0 size=2><SPAN>
<DIV>
<DIV><FONT face=Verdana size=2>best wishes<IMG 
src="cid:__0@Foxmail.net"></FONT></DIV></DIV></SPAN></FONT></DIV><FONT 
face=Verdana color=#000080 size=2>
<HR>
</FONT>
<DIV><FONT face=Verdana size=2><STRONG>发件人:</STRONG> Teng Chee Wan Philip 
</FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>发送时间:</STRONG> 2008-06-03  13:00:18 
</FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>收件人:</STRONG> rtems-users@rtems.org; 
Nicolas Horro </FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>抄送:</STRONG> </FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>主题:</STRONG> RE: ERC32 EDAC Driver 
</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>
<DIV>Hi Nicolas,</DIV>
<DIV> </DIV>
<DIV>Why are you modifying the checkbits for the EDAC test (ie, instead of</DIV>
<DIV>0xC, you use 0xD)?  By doing so, the processor may detect that there are</DIV>
<DIV>more than 1 bit of error in the data word.  You should be loading 0xC as</DIV>
<DIV>the checkbits, and write 0x0000 0002 as the data word (which means 1 bit</DIV>
<DIV>error in the data word, since 0xC is the correct checkbits pattern for</DIV>
<DIV>0x0000 0001).</DIV>
<DIV> </DIV>
<DIV>If there are more than 1 bit of error, the processor will generate a</DIV>
<DIV>non-correctable error in the memory, which is 0x9 Data Access trap.</DIV>
<DIV>That is probably what you are observing.</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Philip</DIV>
<DIV> </DIV>
<DIV>========================================================================</DIV>
<DIV>====</DIV>
<DIV>Date: Mon, 2 Jun 2008 16:13:16 -0300</DIV>
<DIV>From: "Nicolas Horro"  <nhorro@gmail.com ></DIV>
<DIV>Subject: ERC32 EDAC Driver</DIV>
<DIV>To: rtems-users@rtems.org</DIV>
<DIV>Message-ID:</DIV>
<DIV><48cfa58b0806021213n5d6b1f30jfba9d1afba14b1ff@mail.gmail.com ></DIV>
<DIV>Content-Type: text/plain; charset="iso-8859-1"</DIV>
<DIV> </DIV>
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I'm working on a simple EDAC driver for ERC32. Tests running on SIS do</DIV>
<DIV>nothing and tests running on real hardware produce trap 0x9 (not 0x16,</DIV>
<DIV>as it</DIV>
<DIV>would be expected).</DIV>
<DIV> </DIV>
<DIV>Driver (basically) does the following:</DIV>
<DIV> </DIV>
<DIV>1. Ensure EDAC is turned on in MEMCFR:</DIV>
<DIV> </DIV>
<DIV>ERC32_MEC.Memory_Configuration |= 0x00004000;</DIV>
<DIV> </DIV>
<DIV>2. Install ISR handler:</DIV>
<DIV> </DIV>
<DIV>/* EDAC_Correction_Handler */</DIV>
<DIV>rtems_isr EDAC_Correction_Handler( rtems_vector_number vector ) {</DIV>
<DIV>    ++_Sram_Edac.errorCount;</DIV>
<DIV>    *( (uint32_t*)ERC32_MEC.First_Failing_Address) =</DIV>
<DIV>        *( (uint32_t*)ERC32_MEC.First_Failing_Address);</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>(...)</DIV>
<DIV> </DIV>
<DIV>/* install handler */</DIV>
<DIV>rtems_interrupt_catch( EDAC_Correction_Handler,</DIV>
<DIV> </DIV>
<DIV>ERC32_TRAP_TYPE(ERC32_INTERRUPT_CORRECTABLE_MEMORY_ERROR),</DIV>
<DIV>                       &old );</DIV>
<DIV> </DIV>
<DIV>For testing, I'm using a function to write a value with checkbits and</DIV>
<DIV>another to read it and produce EDAC trap if checkbits are wrong:</DIV>
<DIV> </DIV>
<DIV>--- file: EDACTest.c --</DIV>
<DIV> </DIV>
<DIV>(...)</DIV>
<DIV> </DIV>
<DIV>uint32_t a;</DIV>
<DIV> </DIV>
<DIV>/* Intentionally write value with wrong CheckBits (Correct CB: 0x2C) */</DIV>
<DIV>writeValueWithCheckBits(&a, 0x01, 0x2D):</DIV>
<DIV> </DIV>
<DIV>/* Attempt to read so Trap 0x16 occurs */</DIV>
<DIV>readAddress(&a);</DIV>
<DIV> </DIV>
<DIV>(...)</DIV>
<DIV> </DIV>
<DIV>/***********************************************************************</DIV>
<DIV>******/</DIV>
<DIV>void writeValueWithCheckBits(uint32_t* address,</DIV>
<DIV>                             uint32_t value,</DIV>
<DIV>                             uint32_t checkbits )</DIV>
<DIV>/***********************************************************************</DIV>
<DIV>******/</DIV>
<DIV>{</DIV>
<DIV>    // Enable EDAC Test Mode in TESTCTR</DIV>
<DIV>    printf("EDAC Test$ Enabling EDAC Test Mode in Test Control</DIV>
<DIV>Register.\n");</DIV>
<DIV>    ERC32_MEC.Test_Control = 0x20000;</DIV>
<DIV> </DIV>
<DIV>    // Setting check bits</DIV>
<DIV>    printf("EDAC Test$ Writing check bits.\n");</DIV>
<DIV>    ERC32_MEC.Test_Control |= checkbits;</DIV>
<DIV> </DIV>
<DIV>    // Write value affected by check bits</DIV>
<DIV>    printf("EDAC Test$ Writing '0x%08x' at address '0x%08x'.\n", value,</DIV>
<DIV>address);</DIV>
<DIV>    *address = value;</DIV>
<DIV> </DIV>
<DIV>    // Disable EDAC Test Mode in TESTCTR</DIV>
<DIV>    printf("EDAC Test$ Disabling EDAC Test Mode in Test Control</DIV>
<DIV>Register.\n");</DIV>
<DIV>    ERC32_MEC.Test_Control &= ~0x20000;</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>/***********************************************************************</DIV>
<DIV>******/</DIV>
<DIV>void readAddress(uint32_t* address)</DIV>
<DIV>/***********************************************************************</DIV>
<DIV>******/</DIV>
<DIV>{</DIV>
<DIV>    uint32_t tmp;</DIV>
<DIV> </DIV>
<DIV>    // Read address</DIV>
<DIV>    printf("EDAC Test$ Reading address '0x%08x'. If wrong checkbits,</DIV>
<DIV>EDAC</DIV>
<DIV>trap should occur.\n", address);</DIV>
<DIV>    tmp = address;</DIV>
<DIV> </DIV>
<DIV>    printf("EDAC Test$ Address content is: '0x%08x'.\n", tmp);</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>(...)</DIV>
<DIV> </DIV>
<DIV>Any suggestion? Obviously I'm doing something wrong, but I can't figure</DIV>
<DIV>out</DIV>
<DIV>what it is.</DIV>
<DIV> </DIV>
<DIV>Greetings and thanks!</DIV>
<DIV> </DIV>
<DIV>Nicol?s Eduardo Horro</DIV>
<DIV>-------------- next part --------------</DIV>
<DIV>An HTML attachment was scrubbed...</DIV>
<DIV>URL:</DIV>
<DIV><A 
href="http://rtems.rtems.org/pipermail/rtems-users/attachments/20080602/ecb164">http://rtems.rtems.org/pipermail/rtems-users/attachments/20080602/ecb164</A></DIV>
<DIV>42/attachment-0001.html </DIV>
<DIV> </DIV>
<DIV>_______________________________________________</DIV>
<DIV>rtems-users mailing list</DIV>
<DIV>rtems-users@rtems.com</DIV>
<DIV><A 
href="http://rtems.rtems.org/mailman/listinfo/rtems-users">http://rtems.rtems.org/mailman/listinfo/rtems-users</A></DIV></FONT></DIV></BODY></HTML>