<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 09/25/2012 10:47 AM, Tryout check wrote:
    <blockquote
cite="mid:CAC3BPdOeAsvrsYAQhZoSPuiWURnnoTi2wJEUfASg=97akAnp2A@mail.gmail.com"
      type="cite">Hello,<br>
      Thanks for your response. <br>
      <br>
      But can you suggest me a way to debug the start_kernel function
      because i am not getting any console output or printk present in
      start_kernel function. Because of this i debug the kernel startup
      procedure through serial port. And here i am getting logs till mmu
      on stage.<br>
      Can you please suggest any method to debug this, except JTAG.<br>
    </blockquote>
    <br>
       Try  early_printk(), if your serial driver has hooks for usage
    with this function you'll be able to see something.<br>
        Put early_printk call at the beginning of start_kernel().<br>
    <br>
       Also look for fun putc(), this one can print one character only.
    Yet it's even more reliable and I guess it writes directly to the
    serial port register or something likes that.<br>
       After all you can clone putc() to your own my_putc() function,
    where you can use UART data register physical address befor MMU is
    on and<br>
       the virtual address it mapped to after turning MMU on.<br>
       There must be some code arount the putc() functions which
    verifieds if MMU is on, so that putc() may use the correct address
    (physical or virtual),<br>
         depending on MMU state.<br>
    <br>
        The putc(char c) may be also called from assembly whcih run just
    before turning on MMU, there must  be examples of such call in
    head.S and tarmpolino;) file, ones likes this:<br>
    <br>
          mov r0, ='c'<br>
          bl   putc<br>
    <br>
        the argument, a single character, is put into register r0 with
    some special syntax I just mmicing when write out th efirst line of
    assmbly above<br>
    <br>
    <br>
    <blockquote
cite="mid:CAC3BPdOeAsvrsYAQhZoSPuiWURnnoTi2wJEUfASg=97akAnp2A@mail.gmail.com"
      type="cite"><br>
      Thank & Regards<br>
      Girish<br>
      <br>
      On Monday, September 24, 2012, Russell King - ARM Linux <<a
        moz-do-not-send="true" href="mailto:linux@arm.linux.org.uk">linux@arm.linux.org.uk</a>>

      wrote:<br>
      > On Mon, Sep 24, 2012 at 02:32:49PM +0530, Tryout check wrote:<br>
      >> Hi,<br>
      >><br>
      >><br>
      >> I am trying to Boot Linux kernel 3.0.1 on a custom
      hardware.<br>
      >><br>
      >> I am able to debug the Linux Kernel 3.0.1 boot process
      till<br>
      >> __enable_mmufunction defined in head.S, using serial
      port.<br>
      >><br>
      >> But as soon as __turn_mmu_on function is performed I am
      not able to debug<br>
      >> the boot process.<br>
      >><br>
      >> I have gone through linux-arm-kernel mailing list
      archives & i have tried<br>
      >> their printascii() work around. But still I am not able
      to see any boot<br>
      >> logs on serial console after __turn_mmu_on.<br>
      >><br>
      >> Here I am able to get logs before __turn_mmu_on so my
      serial console port<br>
      >> is working fine.<br>
      >><br>
      >> And one more thing - I don't have JTAG.<br>
      >><br>
      >> Can anyone provide the solution how to debug Linux kernel
      Boot process<br>
      >> after turn MMU on?<br>
      >><br>
      >> Thank you for the support.<br>
      ><br>
      > Please post to the linux-arm-kernel list.<br>
      ><br>
      > Debugging in this area is extremely fraught to the extreme.
       Most peoples<br>
      > attempts at debugging this result in total failure (as yours
      is) because<br>
      > their debugging code creates more problems than it solves.<br>
      ><br>
      > Moreover, using debuggers in this area also seems to cause
      more problems.<br>
      ><br>
      > The advice I've always given people is: remove all your
      debugging, and<br>
      > check whether you get into the C code - start_kernel().  Most
      people who<br>
      > do that are surprised, because they find that they are
      getting there.<br>
      ><br>
      > That's because the early assembly code has been well tested
      over the<br>
      > years and is almost never a problem.  To reiterate the point
      - most<br>
      > problems in this code come down to people modifying it
      through their<br>
      > own "debugging" attempts.<br>
      > <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
linux-arm mailing list
<a class="moz-txt-link-abbreviated" href="mailto:linux-arm@lists.infradead.org">linux-arm@lists.infradead.org</a>
<a class="moz-txt-link-freetext" href="http://lists.infradead.org/mailman/listinfo/linux-arm">http://lists.infradead.org/mailman/listinfo/linux-arm</a>
</pre>
    </blockquote>
  </body>
</html>