<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">cc'ing Sebastian: Looks like the ss555
      BSP is an odd case<br>
      for IRQ legacy code. Thoughts?<br>
      <br>
      On 6/15/2013 1:14 PM, Vipul Nayyar wrote:<br>
    </div>
    <blockquote
      cite="mid:1371320048.23222.YahooMailNeo@web194906.mail.sg3.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:arial,
        helvetica, sans-serif;font-size:10pt">
        <div><br>
        </div>
        <div style="font-family: arial, helvetica, sans-serif;
          font-size: 10pt;">
          <div style="font-family: 'times new roman', 'new york', times,
            serif; font-size: 12pt;">
            <div dir="ltr">
              <hr size="1"> <font size="2" face="Arial"> <b><span
                    style="font-weight:bold;">From:</span></b> Joel
                Sherrill <a class="moz-txt-link-rfc2396E" href="mailto:joel.sherrill@oarcorp.com"><joel.sherrill@oarcorp.com></a><br>
                <b><span style="font-weight: bold;">To:</span></b>
                <a class="moz-txt-link-abbreviated" href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a>; Vipul Nayyar
                <a class="moz-txt-link-rfc2396E" href="mailto:nayyar_vipul@yahoo.com"><nayyar_vipul@yahoo.com></a> <br>
                <b><span style="font-weight: bold;">Sent:</span></b>
                Saturday, 15 June 2013 10:44 PM<br>
                <b><span style="font-weight: bold;">Subject:</span></b>
                Re: Guidance required for PIC API<br>
              </font> </div>
            <div class="y_msg_container"><br>
              <div id="yiv7669754387">
                <div>
                  <div class="yiv7669754387moz-cite-prefix">Hi<br>
                    <br>
                    I hate to reply to myself but to make the work flow
                    clearer,<br>
                    here is a rough view<br>
                    <br>
                    For each area to be worked<br>
                      - identify proper usage pattern <br>
                      - document this pattern and put to rtems-devel for
                    review<br>
                         - final version with instructions goes in BSP
                    and Device Driver Guide<br>
                      - implement script to find violations of pattern<br>
                        - probably enhancements to check_subm ission or
                    successor<br>
                      - Fix violations<br>
                      - Address "enhancements" that are not standard<br>
                        - could be merged into main API/pattern<br>
                      - Submit incrementally<br>
                    <br>
                    As I mentioned for the PIC IRQ, there is a new
                    "shared generic" framework.<br>
                    I know there are BSPs which should include more in
                    their Makefile.am but don't.<br>
                    There are BSPs which use different names or have
                    content in differently named<br>
                    files.<br>
                    There is old IRQ code possibly lurking and possibly
                    used. <br>
                    SPARC has adaption of new shared PIC code
                    implemented on top of Simple<br>
                    API. That code can be made generic.</div>
                  <div class="yiv7669754387moz-cite-prefix"><br>
                  </div>
                  <div class="yiv7669754387moz-cite-prefix">Is there a
                    distinction between old & new code. How do
                    identify it ?<br>
                    <br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Yes. There were multiple iterations of old PIC code. The new PIC
    code should<br>
    all be centered around the files in c/src/lib/libbsp/shared/irq*
    with <br>
    expectations of BSP specific irq code. That's where the reference to
    <br>
    arm/lpc24xx/Makefile.am for the complete list of shared and BSP
    specific<br>
    files.<br>
    <br>
    Action: Ensure all BSPs using shared IRQ code include all files in
    their<br>
    build and use standard names.<br>
    <br>
    irq-generic.h has a list of deprecated methods. It provides
    implementations<br>
    of them in irq-legacy.c.  <br>
    <br>
    Action: Kill all legacy/deprecated API uses in the tree. Review
    where they<br>
    used and make sure we didn't miss any.<br>
    <br>
    Question: What about the ss555 BSP? CC'ed Sebastian above for
    guidance.<br>
    <br>
    FWIW I don't see what we used to call old-exceptions in the tree
    anymore.<br>
    Hopefully the irq-legacy.c methods are the ones to kill uses of.<br>
    <br>
    That should kill "legacy IRQ uses" inside the tree. irq-legacy.c
    remains for<br>
    uses outside tree.<br>
    <br>
    Phase 2: The Simple IRQ Model uses rtems_interrupt_catch in the
    cpukit and <br>
    set_vector() provided by a BSP. SPARC wraps the shared PIC IRQ code<br>
    on top of that. It would be nice on all targets. <br>
    <blockquote
      cite="mid:1371320048.23222.YahooMailNeo@web194906.mail.sg3.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:arial,
        helvetica, sans-serif;font-size:10pt">
        <div style="font-family: arial, helvetica, sans-serif;
          font-size: 10pt;">
          <div style="font-family: 'times new roman', 'new york', times,
            serif; font-size: 12pt;">
            <div class="y_msg_container">
              <div id="yiv7669754387">
                <div>
                  <div class="yiv7669754387moz-cite-prefix"> That's more
                    or less a work plan for that topic.<br>
                    <br>
                    On 6/15/2013 10:39 AM, Joel Sherrill wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <pre style="word-wrap: break-word; font-size: 10pt; font-family: Tahoma; color: black;">Unified implies all do things the same way with the same APIs, BSPs include all the proper components and implement what is expected of them in a standard way.

Go back to my challenge question. The arm lpc24xx is probably a good reference. What files does it share for generic IRQ handling? What files does if provide itself? Do other BSPs using this framework on this and other architectures include all the generic files? Use the same name for BSP specific ones? 

I recall finding one BSP which did not include them all and an entire architecture which put a method in a big file which is in a separate file on other architectures. 

What are the rules for using shared generic IRQ API.. Write them down.. Automate checking them.. Present violations and fixes.

If any other implementations of PIC IRQ frameworks exist, we want to address getting rid of them. There were predecessors of current code which may hang around.

After that, SPARC has an implementation of shared IRQ PIC code for A SINGLE simple vectored architecture. That needs to be available for all simple vectored targets. It is a layer on top .. That is on.

If the Gaisler code patches have additional functionality in this area, it could be merged. But in a way that let's all targets use it.

Vipul Nayyar <a moz-do-not-send="true" rel="nofollow" class="yiv7669754387moz-txt-link-rfc2396E" ymailto="mailto:nayyar_vipul@yahoo.com" target="_blank" href="mailto:nayyar_vipul@yahoo.com"><nayyar_vipul@yahoo.com></a> wrote:

</pre>
                    <div>
                      <div style="color: rgb(0, 0, 0); background-color:
                        rgb(255, 255, 255); font-family: arial,
                        helvetica, sans-serif; font-size: 10pt;">
                        <div><span>Hello</span></div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13.63636302947998px; font-family: arial,
                          helvetica, sans-serif; background-color:
                          transparent; font-style: normal;"> <span><br>
                          </span></div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13.63636302947998px; font-family: arial,
                          helvetica, sans-serif; background-color:
                          transparent; font-style: normal;"> <span>As
                            part of my GSOC Project, I'll be
                            implementing the PIC API on simple vectored
                            architecture as a first step. I had hoped
                            that I would've been a bit ahead as of now,
                            but I'm kinda stuck in the basic stuff for
                            now. Some points which I'm having trouble
                            figuring out is :</span></div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13.63636302947998px; font-family: arial,
                          helvetica, sans-serif; background-color:
                          transparent; font-style: normal;"> <span><br>
                          </span></div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13.63636302947998px; font-family: arial,
                          helvetica, sans-serif; background-color:
                          transparent; font-style: normal;"> <span>1)
                            Which is the latest Programmable Interrupt
                            Controller API that needs to be implemented,
                            and where does it lie in the RTEMS code base
                            ?</span></div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13.63636302947998px; font-family: arial,
                          helvetica, sans-serif; background-color:
                          transparent; font-style: normal;"> <span
                            style="background-color:transparent;">2) How
                            to identify which are simple vectored
                            architectures ?</span></div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13.63636302947998px; font-family: arial,
                          helvetica, sans-serif; background-color:
                          transparent; font-style: normal;"> <span
                            style="background-color:transparent;">3)
                            Architectures like arm, i386, powerpc etc.
                            which implement the desired PIC API, do not
                            seem to have common code. I'm having trouble
                            identifying which part of code is
                            architecture dependent and which is common
                            among different architectures.</span></div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13.63636302947998px; font-family: arial,
                          helvetica, sans-serif; background-color:
                          transparent; font-style: normal;"> <span
                            style="background-color:transparent;"><br>
                          </span></div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13.63636302947998px; font-family: arial,
                          helvetica, sans-serif; background-color:
                          transparent; font-style: normal;"> <span
                            style="background-color:transparent;">I'm
                            currently going through the docs, especially
                            the BSP How to Guide, given in the docs
                            online for previous few days, but I've
                            failed to grasp answers to the above
                            questions. Thanks in advance for helping and
                            guiding me out.</span></div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13.63636302947998px; font-family: arial,
                          helvetica, sans-serif; background-color:
                          transparent; font-style: normal;"> <br>
                        </div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13px; font-family: arial, helvetica, clean,
                          sans-serif; background-color: transparent;
                          font-style: normal;"> Regards</div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          13px; font-family: arial, helvetica, clean,
                          sans-serif; background-color: transparent;
                          font-style: normal;"> <span
                            style="background-color:transparent;line-height:1.22;">Vipul

                            Nayyar </span></div>
                        <div style="color: rgb(0, 0, 0); font-size:
                          12.727272033691406px; font-family: arial,
                          helvetica, clean, sans-serif;
                          background-color: transparent; font-style:
                          normal;"> <br>
                        </div>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                  <br>
                  <pre class="yiv7669754387moz-signature">-- 
Joel Sherrill, Ph.D.             Director of Research & Development 
<a moz-do-not-send="true" rel="nofollow" class="yiv7669754387moz-txt-link-abbreviated" ymailto="mailto:joel.sherrill@OARcorp.com" target="_blank" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a>        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805 
Support Available                (256) 722-9985 </pre>
                </div>
              </div>
              <br>
              <br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Joel Sherrill, Ph.D.             Director of Research & Development 
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a>        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805 
Support Available                (256) 722-9985 </pre>
  </body>
</html>