View Single Post
  #1302 (permalink)  
Old 02-21-2011, 02:49 AM
natemcnutty's Avatar
natemcnutty
VIP Member
Offline
Threadstarter
 
Join Date: Nov 2009
Posts: 845
Reputation: 3070
natemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: NAND Boot Testing - 01-07: Panel power on/off fixes

Quote:
Originally Posted by Lmiller1708 View Post
Lol my wife is the same way right now too... but have to keep them happy.

Nate can you up your table... or more of your math. Remebmer the magic number is 64.
So, here's kind of breakdown of what I understand (and there's a lot I'm probably not getting fully). I just got back and I'll be starting on this soon.

Here is what we currently have:
Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
000001B0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 ................
000001C0  01 00 23 3F 01 18 02 00 00 00 3E 06 00 00 00 00  ..#?......>.....
000001D0  01 19 23 3F 01 1B 40 06 00 00 00 00 00 00 00 00  ..#?..@.........
000001E0  01 1C 25 3F 01 1C 40 06 00 00 40 00 00 00 00 00  ..%?..@...@.....
000001F0  01 1D 04 3F FF FF 80 06 00 00 00 00 00 00 55 AA  ...?ÿÿ€.......Uª
0x1BF
This is the First Head of the partition.

0x1C0-0x1C1
These are the first sector and first track. If the value of 0x1C0 is 8X, then add 200 to the value of 0x1C1. 0x1C1 is the starting partition address.

0x1C2
This is the partition type. 20 is boot, 23 is RAWFS, 25 is IMGFS, and 04 is FAT. Technically, we only need 23 and 25.

0x1C3
This is the last head.

0x1C4-0x1C5
These are the last sector and last track. If the value of 0x1C3 is 8X, then add 200 to the value of 0x1C4. 0x1C4 is the ending partition address.

0x1C6-0x1C9
This value is little endian for the starting sector. You reverse the value so that 40 06 00 00 would become 00000640. This is where XIP traditionally starts from. Also, the first partition's LBA is always 00000002, so if we remove the boot partition, XIP now starts there.

0x1CA-0x1CD
This value is also little endian for the number of sectors in the partition. For example, 3E 06 00 00 becomes 0000063E which means we have 1598 sectors. Since our MSFLASH starts at 0x800, we have 2K sector size; this means 0000063E is 3196 KB in size.

Here is what I'm thinking of right now:

Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
000001B0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ................
000001C0  01 00 23 3F 01 37 02 00 00 00 FE 06 00 00 00 00  ..#?.7....þ.....
000001D0  01 38 25 3F 01 38 00 07 00 00 40 00 00 00 00 00  .8%?.8....@.....
000001E0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000001F0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA  ..............Uª
This basically says only create 2 partitions, RAWFS starting at 00000002, having a size of 6FE (which gives us 3580 KB of XIP space) which ends at 700. Then we insert our blank IMGFS at 700 having a size of 40 which results in a total size of 128 KB for that partition.

Finally, we have to update the MSFLASH section to point to the correct location. It looks like we have this correct already, but I'm putting this here for reference. First, the code:
Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000800  4D 53 46 4C 53 48 35 30 00 00 00 00 54 00 00 00  MSFLSH50....T...
00000810  00 00 00 00 00 00 00 00 00 00 00 00 1C 00 00 00  ................
00000820  40 00 00 00 00 00 02 00 00 00 00 00 01 00 00 00  @...............
00000830  00 00 00 00 00 00 00 00 01 00 00 00 40 00 00 00  ............@...
00000840  00 00 02 00 02 00 00 00 02 00 00 00 00 00 00 00  ................
00000850  00 00 00 00 FF FF FF FF 40 00 00 00 00 00 02 00  ....ÿÿÿÿ@.......
0x800 is the start of MSFLSH50 region, so we have 800 (64 KB) for our sector block.

0x81C-0x81F
This is start block of the IMGFS which we need to set based on our partition sizes (see below the definitions).

0x820-0x823
This is little endian for the number of sectors per block. Above is 00000040.

0x824-0x828
This is little endian for the LBA restriction. Above is 00020000.

To find the Start Block of IMGFS, we need to divide the IMGFS Partition Start Address by the LBA restriction.

The IMGFS partition start address is 380000, and the LBA restriction is 20000. IMGFS/LBA = 1C

I'll be trying this in a few minutes, but I figured I'd share my "research" thus far
Reply With Quote
This post has been thanked 1 times.