<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i.MX233: information about SD/MMC boot from BCB in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX233-information-about-SD-MMC-boot-from-BCB/m-p/276811#M31043</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should be posted to i.MX Community and&amp;nbsp; I have moved it. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Aug 2013 01:51:59 GMT</pubDate>
    <dc:creator>PeterChan</dc:creator>
    <dc:date>2013-08-28T01:51:59Z</dc:date>
    <item>
      <title>i.MX233: information about SD/MMC boot from BCB</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX233-information-about-SD-MMC-boot-from-BCB/m-p/276809#M31041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For i.MX233, if the OTP bit HW_OCOTP_ROM0::SD_MBR_BOOT is blown, the device will boot from the Master Boot Record (MBR) on the card. If the HW_OCOTP_ROM0::SD_MBR_BOOT is NOT blown, it will boot from a Boot Control Clock (BCB) instead. By default, all i.MX233 EVK has this bit blown and the MBR is the default boot mode for SD/MMC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is because the description about BCB for SD/MMC in reference manual is not completely correct. If you need to boot from BCB, please follow the information here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When boot from BCB, you need to have a BCB on the card. The BCB is a 512 byte data block which is written to the last physical sector of the card. The BCB tells the ROM the sector address of the boot image. The format of the BCB is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;typedef struct {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t eDriveType;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t Tag;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t RegionSizeInSector;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;} media_regions_t;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;typedef struct {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t Signature;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t Version&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t NumRegions;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; media_regions_t Regions[];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;} boot_control_block_t&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ROM will first verify the Signature and Version of the BCB and then search all "NumRegions" for the firmware tag 0x00000050.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 100%; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Field&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Signature&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0x00112233&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Version&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0x00000001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Tag&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0x00000050&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To elaborate in detail, here is a sample BCB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;00000000&amp;nbsp; 33 22 11 00 01 00 00 00&amp;nbsp; 02 00 00 00 00 00 00 00&amp;nbsp; |3"..............|&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;00000010&amp;nbsp; 0a 00 00 00 24 00 00 00&amp;nbsp; 01 00 00 00 50 00 00 00&amp;nbsp; |....$.......P...|&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;00000020&amp;nbsp; 00 20 00 00 00 00 00 00&amp;nbsp; 00 00 00 00 00 00 00 00&amp;nbsp; |. ..............|&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;00000030&amp;nbsp; 00 00 00 00 00 00 00 00&amp;nbsp; 00 00 00 00 00 00 00 00&amp;nbsp; |................|&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;00000200&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Signature and Version of i.MX233 BCB must be 0x00112233 and 0x00000001 respectively. Otherwise error code 0x8020A007 will return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this BCB sample, NumRegions=2. So, we have 2 media regions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first media region always starts from physical sector 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first media region, eDriveType=0, Tag=0x0A and RegionSizeInSector=0x24. eDriveType is a reserved field which is not used in SD/MMC boot. Since the Tag here is not 0x50, ROM will skip this media region to the next. The jump here is 0x24=36 sectors. So, the second media region starts from physical sector 36.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second media region, eDriveType=1, Tag=0x50 and RegionSizeInSector=0x2000. Here 4MB had been reserved for this media region. ROM finds that the Tag is correct and it will read the .SB from physical sector 36. Boot signature and version of the .SB will be verified and error 0x80501003 will return if the verification fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, the location of the BCB varies according to the card capacity and . Compared to MBR, there is no programming tool for BCB and firmware and dd command is used to program them. Firmware space must be reserved and BCB must be prepared manually and thus it is less attractive to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 09:12:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX233-information-about-SD-MMC-boot-from-BCB/m-p/276809#M31041</guid>
      <dc:creator>PeterChan</dc:creator>
      <dc:date>2013-08-27T09:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX233: information about SD/MMC boot from BCB</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX233-information-about-SD-MMC-boot-from-BCB/m-p/276810#M31042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P&gt;Which space is your this document located?&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 09:28:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX233-information-about-SD-MMC-boot-from-BCB/m-p/276810#M31042</guid>
      <dc:creator>YixingKong</dc:creator>
      <dc:date>2013-08-27T09:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX233: information about SD/MMC boot from BCB</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX233-information-about-SD-MMC-boot-from-BCB/m-p/276811#M31043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should be posted to i.MX Community and&amp;nbsp; I have moved it. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 01:51:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX233-information-about-SD-MMC-boot-from-BCB/m-p/276811#M31043</guid>
      <dc:creator>PeterChan</dc:creator>
      <dc:date>2013-08-28T01:51:59Z</dc:date>
    </item>
  </channel>
</rss>

