ch04s16.html 14 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Boot from Host (AR7420)</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="ch04s15.html" title="Boot from Host (AR7400)"><link rel="next" href="ch04s17.html" title="Flash Memory (AR6410/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 (AR7420)
  3. </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s15.html">Prev</a> </td><th width="60%" align="center">Chapter 4. 
  4. Firmware
  5. </th><td width="20%" align="right"> <a accesskey="n" href="ch04s17.html">Next</a></td></tr></table><hr></div><div class="section" title="Boot from Host (AR7420)"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="firmware-7420-boot"></a>
  6. Boot from Host (AR7420)
  7. </h2></div></div></div><p>
  8. The <code class="constant">VS_WRITE_AND_EXECUTE</code> message is now the only way to write runtime parameters and firmware into volatile memory. The legacy <code class="constant">VS_RD_MEM</code>, <code class="constant">VS_WR_MEM</code> and <code class="constant">VS_ST_MAC</code> are deprecated and will no longer be supported by the bootloader. This means that some customers must re-write their applications to boot newer powerline devices.
  9. </p><div class="figure"><a name="idp21657080"></a><p class="title"><b>Figure 4.8. 
  10. Boot from Host (AR6410/AR7420)
  11. </b></p><div class="figure-contents"><pre class="programlisting">
  12. AR7420 LOCAL-HOST
  13. [01] | |
  14. [02] |-------- VS_HOST_ACTION.IND -------&gt;| [03]
  15. [05] |&lt;------- VS_HOST_ACTION.RSP --------| [04]
  16. | | [06]
  17. |&lt;---- VS_WRITE_AND_EXECUTE.REQ -----| [07]
  18. [08] |----- VS_WRITE_AND_EXECUTE.CNF ----&gt;|
  19. |&lt;-----------------------------------| [09]
  20. [10] |-----------------------------------&gt;| [11]
  21. [12] | |
  22. [13] |-------- VS_HOST_ACTION.IND -------&gt;| [14]
  23. [16] |&lt;------- VS_HOST_ACTION.RSP --------| [15]
  24. | | [16]
  25. |&lt;-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [17]
  26. [18] |--VS_WRITE_AND_EXECUTE_APPLET.CNF -&gt;|
  27. |&lt;-----------------------------------| [19]
  28. [20] |-----------------------------------&gt;|
  29. |&lt;-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [21]
  30. [22] |--VS_WRITE_AND_EXECUTE_APPLET.CNF -&gt;|
  31. |&lt;-----------------------------------| [23]
  32. [24] |-----------------------------------&gt;|
  33. [25] | |
  34. </pre></div></div><br class="figure-break"><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
  35. The bootloader enters boot-from-host mode based on the hardware strapping or failure to load runtime firmware from flash memory. The device hardware address is <code class="constant">00:B0:52:00:00:01</code> in this state.
  36. </p></li><li class="listitem"><p>
  37. 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">4</code> to indicate that it is waiting to be configured. The bootloader will continue to broadcast the <code class="constant">VS_HOST_ACTION.IND</code> message every <code class="constant">750</code>ms until it receives a <code class="constant">VS_HOST_ACTION.RSP</code> message from the local host. The BootROM does not know the local host hardware address at this stage so indications are broadcast, not addressed.
  38. </p></li><li class="listitem"><p>
  39. The local host receives a <code class="constant">VS_HOST_ACTION.IND</code> message 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. The first indcation requests device configuration.
  40. </p></li><li class="listitem"><p>
  41. 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 a willingness and ability to service the request.
  42. </p></li><li class="listitem"><p>
  43. 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.
  44. </p></li><li class="listitem"><p>
  45. 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.
  46. </p></li><li class="listitem"><p>
  47. 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>, <code class="varname">ALLOWED_MEM_TYPES</code> to <code class="constant">1</code>, <code class="varname">CURR_PART_OFFSET</code> to the applet image header <code class="varname">IMAGEADDRESS</code> and <code class="varname">CURR_PART_LENGTH</code> to the applet image header <code class="varname">IMAGELENGTH</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.
  48. </p></li><li class="listitem"><p>
  49. 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>.
  50. </p></li><li class="listitem"><p>
  51. The local host continues to download the configuration applet in <code class="constant">1400</code> byte blocks until the last block is reached. The local host sets <code class="varname">START_ADDR</code> to the applet image header <code class="varname">ENTRYPOINT</code>, <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>.
  52. </p></li><li class="listitem"><p>
  53. 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>.
  54. </p></li><li class="listitem"><p>
  55. The local host exists the boot from host sequence and returns to listening mode.
  56. </p></li><li class="listitem"><p>
  57. The bootloader executes the configuration applet. The device hardware address is <code class="constant">00:B0:52:00:00:01</code> in this state.
  58. </p></li><li class="listitem"><p>
  59. 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.
  60. </p></li><li class="listitem"><p>
  61. 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.
  62. </p></li><li class="listitem"><p>
  63. 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.
  64. </p></li><li class="listitem"><p>
  65. 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.
  66. </p></li><li class="listitem"><p>
  67. 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>, <code class="varname">ALLOWED_MEM_TYPES</code> set to <code class="constant">1</code>, <code class="varname">CURR_PART_OFFSET</code> to the parameter image header <code class="varname">IMAGEADDRESS</code> and <code class="varname">CURR_PART_LENGTH</code> to the entire parameter image chain length 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.
  68. </p></li><li class="listitem"><p>
  69. 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>.
  70. </p></li><li class="listitem"><p>
  71. The local host continues to 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>, <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>.
  72. </p></li><li class="listitem"><p>
  73. 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>.
  74. </p></li><li class="listitem"><p>
  75. 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>, <code class="varname">ALLOWED_MEM_TYPES</code> to <code class="constant">1</code>, <code class="varname">CURR_PART_OFFSET</code> to the firmware image header <code class="varname">IMAGEADDRESS</code> and <code class="varname">CURR_PART_LENGTH</code> to the firmware image header <code class="varname">IMAGELENGTH</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.
  76. </p></li><li class="listitem"><p>
  77. 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>.
  78. </p></li><li class="listitem"><p>
  79. The local host continues to 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>, <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>.
  80. </p></li><li class="listitem"><p>
  81. 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>.
  82. </p></li><li class="listitem"><p>
  83. The bootloader executes the runtime firmware and the device begins operation. The device hardware address will become that programmed into the parameter inforamtion block.
  84. </p></li></ol></div><p>
  85. At this point, runtime firmware is executing in volatile memory with runtime parameters. If the power is reset at this point then all would be lost. If the device has dedicated flash memory attached then we may want to write runtime parameters and firmware to flash memory so that the device can boot from flash in case of a power failure or reset.
  86. </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s15.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="ch04s17.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">
  87. Boot from Host (AR7400)
  88.  </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 
  89. Flash Memory (AR6410/AR7420)
  90. </td></tr></table></div></body></html>