ch04s15.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Boot from Host (AR7400)</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="keywords" content="Intellon, Atheros, Qualcomm, HomePlug, powerline, communications, INT6000, INT6300, INT6400, AR7400, AR7420"><link rel="home" href="index.html" title="Qualcomm Atheros Open Powerline Toolkit"><link rel="up" href="ch04.html" title="Chapter 4.  Firmware"><link rel="prev" href="ch04s14.html" title="Boot from Host (INT6400)"><link rel="next" href="ch04s16.html" title="Boot from Host (AR7420)"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">
  2. Boot from Host (AR7400)
  3. </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s14.html">Prev</a> </td><th width="60%" align="center">Chapter 4. 
  4. Firmware
  5. </th><td width="20%" align="right"> <a accesskey="n" href="ch04s16.html">Next</a></td></tr></table><hr></div><div class="section" title="Boot from Host (AR7400)"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="firmware-7400-boot"></a>
  6. Boot from Host (AR7400)
  7. </h2></div></div></div><p>
  8. The <span class="productname">AR7400</span>™ boot-from-host method downloads and executes a device configuration applet then downloads runtime parameters and firmware from a local host and starts firmware execution. This method is initiated by the <span class="application">Bootloader</span> after reset on a device having no flash memory, blank flash memory or corrupted flash memory. The method requires <span class="application">Bootloader</span> aware software running on the local host in order to complete.
  9. </p><p>
  10. The <span class="productname">AR7400</span>™ boot-from-host method is similar to the <span class="productname">INT6400</span>™ boot-from-host method but it uses the <code class="constant">VS_WRITE_AND_EXECUTE</code> message instead of the <code class="constant">VS_WR_MEM</code> message write into SDRAM and start firmware execution. This eliminates the need for the <code class="constant">VS_ST_MAC</code> message. The <code class="constant">VS_WR_MEM</code> and <code class="constant">VS_ST_MAC</code> message types will no longer be recognized by bootloaders after the <span class="productname">QCA7420</span>™ chipset.
  11. </p><p>
  12. The <span class="productname">AR7400</span>™ boot-from-host method works on <span class="productname">AR6400</span>™ and will continue to work on <span class="productname">QCA7420</span>™ and planned successors. Customers should implement this boot-from-host method now to avoid building obsolete products.
  13. </p><p>
  14. The <span class="productname">AR7400</span>™ does not have a unique hardware address until the firmware starts and assigns one read from the PIB. Until that time, the <span class="application">Bootloader</span> will only acknowledge messages addressed to 00:B0:52:00:00:01. In addition, the <span class="application">Bootloader</span> does not know the hardware address of the local host and so it addresses all <code class="constant">VS_HOST_ACTION</code> messages to FF:FF:FF:FF:FF:FF; however, these messages are not transmitted over the powerline.
  15. </p><div class="figure"><a name="idp21599024"></a><p class="title"><b>Figure 4.7. 
  16. Boot from Host (AR7400)
  17. </b></p><div class="figure-contents"><pre class="programlisting">
  18. AR7400 LOCAL-HOST
  19. [01] | |
  20. [02] |-------- VS_HOST_ACTION.IND -------&gt;| [03]
  21. [05] |&lt;------- VS_HOST_ACTION.RSP --------| [04]
  22. | | [06]
  23. |&lt;---- VS_WRITE_AND_EXECUTE.REQ -----| [07]
  24. [08] |----- VS_WRITE_AND_EXECUTE.CNF ----&gt;|
  25. |&lt;-----------------------------------| [09]
  26. [10] |-----------------------------------&gt;| [11]
  27. [12] | |
  28. [13] |-------- VS_HOST_ACTION.IND -------&gt;| [14]
  29. [16] |&lt;------- VS_HOST_ACTION.RSP --------| [15]
  30. | | [16]
  31. |&lt;-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [17]
  32. [18] |--VS_WRITE_AND_EXECUTE_APPLET.CNF -&gt;|
  33. |&lt;-----------------------------------| [19]
  34. [20] |-----------------------------------&gt;|
  35. |&lt;-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [21]
  36. [22] |--VS_WRITE_AND_EXECUTE_APPLET.CNF -&gt;|
  37. |&lt;-----------------------------------| [23]
  38. [24] |-----------------------------------&gt;|
  39. [25] | |
  40. </pre></div></div><br class="figure-break"><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
  41. The bootloader automatically starts after device reset and attempts to read the runtime firmware image from flash memory, write it into <acronym class="acronym">SDRAM</acronym> and start execution. If it succeeds then normal operation begins and no further action is required. If it fails, for any reason, then the bootloader initiates the boot-from-host sequence.
  42. </p></li><li class="listitem"><p>
  43. The bootloader broadcasts <code class="constant">VS_HOST_ACTION.IND</code> with <code class="varname">HOST_ACTION_REQ</code> set to <code class="constant">0x04</code> to indicate that it is waiting to be configured. The bootloader continues to broadcast this message message every <code class="constant">750</code> milliseconds which differs from that of other chips.
  44. </p></li><li class="listitem"><p>
  45. The local host receives the <code class="constant">VS_HOST_ACTION.IND</code> and inspects <code class="varname">HOST_ACTION_REQ</code> field to determine the required action. The local host must be programmed to listen and act appropriately.
  46. </p></li><li class="listitem"><p>
  47. The local host sends a <code class="constant">VS_HOST_ACTION.RSP</code> message with <code class="varname">MSTATUS</code> set to <code class="constant">0</code> to indicate the start of sequence.
  48. </p></li><li class="listitem"><p>
  49. The bootloader receives the <code class="constant">VS_HOST_ACTION.RSP</code> message, stops broadcasting <code class="constant">VS_HOST_ACTION.IND</code> messages and waits indefinitely for the local host to act.
  50. </p></li><li class="listitem"><p>
  51. The local host retrieves the firmware chain and extracts the configuration applet image from the chain. The firmware chain may be stored on disk or in memory depending on how the local host is programmed.
  52. </p></li><li class="listitem"><p>
  53. The local host sends a <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with <code class="varname">FLAGS</code> set to <code class="constant">2</code> and <code class="varname">ALLOWED_MEM_TYPES</code> to <code class="constant">1</code> to download the applet in absolute address mode. Alternately, setting <code class="varname">FLAGS</code> to <code class="constant">0</code> and <code class="varname">CURR_PART_OFFSET</code> to <code class="constant">0</code> will download the applet in relative address mode. The <code class="varname">TOTAL_LENGTH</code> will be the applet image header <code class="varname">IMAGELENGTH</code> but <code class="varname">CURR_PART_LENGTH</code> cannot exceed <code class="constant">1400</code> bytes.
  54. </p></li><li class="listitem"><p>
  55. The bootloader acknowledges each <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having <code class="varname">MSTATUS</code> set to <code class="constant">0</code>.
  56. </p></li><li class="listitem"><p>
  57. The local host continues to increment <code class="varname">CURR_PART_OFFSET</code> and download the configuration applet in <code class="constant">1400</code> byte blocks until the last block is reached. The local host then sets <code class="varname">START_ADDR</code> to the applet image header <code class="varname">ENTRYPOINT</code>, the <code class="varname">CHECKSUM</code> to the applet image header <code class="varname">IMAGECHECKSUM</code> and the execute bit in <code class="varname">FLAGS</code> to <code class="constant">1</code> in the last message frame.
  58. </p></li><li class="listitem"><p>
  59. The bootloader receives the last <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message, confirms the configuration applet checksum then acknowledges with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having <code class="varname">MSTATUS</code> set to <code class="constant">0</code>.
  60. </p></li><li class="listitem"><p>
  61. The local host exists the boot from host sequence and returns to listening mode.
  62. </p></li><li class="listitem"><p>
  63. The bootloader executes the configuration applet. The device hardware address is <code class="constant">00:B0:52:00:00:01</code> in this state.
  64. </p></li><li class="listitem"><p>
  65. The bootloader broadcasts a <code class="constant">VS_HOST_ACTION.IND</code> message with <code class="varname">HOST_ACTION_REQ</code> set to <code class="constant">0</code> to indicate that it is waiting for runtime parameters and firmware.
  66. </p></li><li class="listitem"><p>
  67. The local host receives a <code class="constant">VS_HOST_ACTION.IND</code> message and inspects the <code class="varname">HOST_ACTION_REQ</code> field to determine the required action. The local host must be programmed to listen and act appropriately.
  68. </p></li><li class="listitem"><p>
  69. The bootloader receives the <code class="constant">VS_HOST_ACTION.RSP</code> message, stops broadcasting <code class="constant">VS_HOST_ACTION.IND</code> messages and waits indefinitely for the local host to act.
  70. </p></li><li class="listitem"><p>
  71. The local host locates the parameter chain and firmware chain. The chains may be stored on disk or in memory depending on how the local host is programmed.
  72. </p></li><li class="listitem"><p>
  73. The local host sends a <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with <code class="varname">FLAGS</code> set to <code class="constant">2</code> and <code class="varname">ALLOWED_MEM_TYPES</code> set to <code class="constant">1</code> to download parameters in absolute address mode. Alternately, setting <code class="varname">FLAGS</code> to <code class="constant">0</code> and <code class="varname">CURR_PART_OFFSET</code> to <code class="constant">0</code> will download parameters in relative address mode. The <code class="varname">TOTAL_LENGTH</code> will be the entire parameter file length but the <code class="varname">CURR_PART_LENGTH</code> cannot exceed <code class="constant">1400</code> bytes.
  74. </p></li><li class="listitem"><p>
  75. The bootloader acknowledges each <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having <code class="varname">MSTATUS</code> set to <code class="constant">0</code>.
  76. </p></li><li class="listitem"><p>
  77. The local host continues to <code class="varname">CURR_PART_OFFSET</code> and download the parameter chain in <code class="constant">1400</code> byte blocks until the last block is reached. The local host then sets the <code class="varname">START_ADDR</code> field to the parameter image header <code class="varname">ENTRYPOINT</code>, the <code class="varname">CHECKSUM</code> to the parameter image header <code class="varname">IMAGECHECKSUM</code> and the execute bit in <code class="varname">FLAGS</code> to <code class="constant">1</code> in the last message frame.
  78. </p></li><li class="listitem"><p>
  79. The bootloader receives the last <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message, confirms the parameter chain checksum and acknowledges with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having <code class="varname">MSTATUS</code> set to <code class="constant">0</code>.
  80. </p></li><li class="listitem"><p>
  81. The local host sends a <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with <code class="varname">FLAGS</code> set to <code class="constant">2</code> and <code class="varname">ALLOWED_MEM_TYPES</code> to <code class="constant">1</code> to download firmware in absolute address mode. Alternately, setting <code class="varname">FLAGS</code> to <code class="constant">0</code> and <code class="varname">CURR_PART_OFFSET</code> to <code class="constant">0</code> will download firmware in relative address mode. The <code class="varname">TOTAL_LENGTH</code> will be the firmware image header <code class="varname">IMAGELENGTH</code> but the <code class="varname">CURR_PART_LENGTH</code> cannot exceed <code class="constant">1400</code> bytes.
  82. </p></li><li class="listitem"><p>
  83. The bootloader acknowledges each <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having the <code class="varname">MSTATUS</code> field set to <code class="constant">0</code>.
  84. </p></li><li class="listitem"><p>
  85. The local host continues to increment <code class="varname">CURR_PART_OFFSET</code> and download the parameter chain in <code class="constant">1400</code> byte blocks until the last block is reached. The local host then sets <code class="varname">START_ADDR</code> to the parameter image header <code class="varname">ENTRYPOINT</code>, the <code class="varname">CHECKSUM</code> to the parameter image header <code class="varname">IMAGECHECKSUM</code> and the execute bit in <code class="varname">FLAGS</code> to <code class="constant">1</code> in the last message frame.
  86. </p></li><li class="listitem"><p>
  87. The bootloader receives the last <code class="constant">VS_WRITE_AND_EXECUTE.REQ</code> message, confirms the firmware chain checksum and acknowledges with a <code class="constant">VS_WRITE_AND_EXECUTE.CNF</code> message having the <code class="varname">MSTATUS</code> field set to <code class="constant">0</code>.
  88. </p></li><li class="listitem"><p>
  89. The bootloader executes the runtime firmware and the device begins operation. The device hardware address will become that programmed into the parameter inforamtion block.
  90. </p></li></ol></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s14.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch04s16.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">
  91. Boot from Host (INT6400)
  92.  </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 
  93. Boot from Host (AR7420)
  94. </td></tr></table></div></body></html>