Hi all, <br><br>I&#39;m porting u-boot to my board. There&#39;s the mpc8548cds that matches close to my board in u-boot 1.1.6. My board, however, has 1 Gigabit of flash, 128MB. So this section is the cds code init.S : <br>

<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * TLB 0:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16M&nbsp;&nbsp;&nbsp;&nbsp; Non-cacheable, guarded<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * 0xff000000&nbsp;&nbsp; 16M&nbsp;&nbsp;&nbsp;&nbsp; FLASH<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * Out of reset this entry is only 4K.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS0(1, 0, 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_16M)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS2(E500_TLB_EPN(CFG_FLASH_BASE), 0,0,0,0,1,0,1,0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS3(E500_TLB_RPN(CFG_FLASH_BASE), 0,0,0,0,0,1,0,1,0,1)<br><br>And the LAW code is commented as: <br>* 0xff00_0000&nbsp;&nbsp;&nbsp;&nbsp; 0xff7f_ffff&nbsp;&nbsp;&nbsp;&nbsp; FLASH (2nd bank)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8M
<br>* 0xff80_0000&nbsp;&nbsp;&nbsp;&nbsp; 0xffff_ffff&nbsp;&nbsp;&nbsp;&nbsp; FLASH (boot bank)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8M<br><br>My board has only the boot bank - no 2nd bank. <br><br>What&#39;s confusing me is there is no constant BOOKE_PAGESZ_128M. For example, the cds board has 128MB of SDRAM (my board has no SDRAM) . So the way the cds code allocates the 128MB 
<br>for sdram is: <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * TLB 6:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 64M&nbsp;&nbsp;&nbsp;&nbsp; Cacheable, non-guarded<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * 0xf000_0000&nbsp; 64M&nbsp;&nbsp;&nbsp;&nbsp; LBC SDRAM<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS0(1, 6, 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_64M)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS2(E500_TLB_EPN(CFG_LBC_SDRAM_BASE), 0,0,0,0,0,0,0,0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS3(E500_TLB_RPN(CFG_LBC_SDRAM_BASE), 0,0,0,0,0,1,0,1,0,1)<br><br><br>With LAW comments: <br><br>* 0xf000_0000&nbsp;&nbsp;&nbsp;&nbsp; 0xf7ff_ffff&nbsp;&nbsp;&nbsp;&nbsp; SDRAM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 128M
<br><br>I&#39;m thinking this is because the TLB size can be allocated as 64MB for the 128MB of flash, and then the LAW code needs to allocate the full 128MB for flash. So in preparation for my boards arrival, I&#39;m thinking I can do this for the flash: 
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * TLB 0:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 64M&nbsp;&nbsp;&nbsp;&nbsp; Non-cacheable, guarded<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * 0xff000000&nbsp;&nbsp; 64M&nbsp;&nbsp;&nbsp;&nbsp; FLASH<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * Out of reset this entry is only 4K.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS0(1, 0, 0)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_64M)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS2(E500_TLB_EPN(CFG_FLASH_BASE), 0,0,0,0,1,0,1,0)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .long TLB1_MAS3(E500_TLB_RPN(CFG_FLASH_BASE), 0,0,0,0,0,1,0,1,0,1)<br>
<br>&nbsp;* 0xff00_0000&nbsp;&nbsp;&nbsp;&nbsp; 0xf7ff_ffff &nbsp;&nbsp;&nbsp; FLASH (boot bank)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 128M<br><br>Yet the LAW comments say this: <br><br>*&nbsp;&nbsp;&nbsp; If flash is 8M at default position (last 8M), no LAW needed.<br><br>So since my board has no SDRAM, I&#39;m thinking I can do this: 
<br><br>/* LBC window - maps 256M 0xf0000000 -&gt; 0xffffffff */<br>
#define LAWBAR5 ((CFG_FLASH_BASE&gt;&gt;12) &amp; 0xfffff)<br>#define LAWAR5&nbsp; (LAWAR_EN | LAWAR_TRGT_IF_LBC | (LAWAR_SIZE &amp; LAWAR_SIZE_256M))<br><br>I&#39;ve been staring at this code for days so I thought I&#39;d ask here. Any ideas? 
<br>Robert <br><br>