6/01/2012

Qualcomm DBL format

DBL is combined by three images. 1. dbl.bin raw DBL image 2. dbl.hd dbl header image 3. dbl_preamble.mbn the preamble image with following format ------------- |Dbl-preamble| ------------- |Dbl-header | -------------- |Dbl.bin | -------------- PBL is using the dbl_preamble to detect the NAND page size.the NAND controller can detect 512byte and 2Kbyte page size automatically, but for NAND page size more than 2K ,PBL needs preamble to determine the page size. so for 512/2K NAND,eMMC,eSD,oneNAND , the preamble is optional. For the dbl_preamable , the first two words are same as dbl header , they are codeword and magic, ref image_header.c data_ptr = autodetectpage; *data_ptr = sbl_header.codeword; data_ptr++; *data_ptr = sbl_header.magic; data_ptr++; *data_ptr = AUTODETECT_PAGE_SIZE_MAGIC_NUM; the third one is auto page size detection magic number. The usage of the auto detection magic number is as below description To understand this more clearly, for example ,if the dbl_preamble is 8KB. When we detect the NAND page size > 2KB, we will set the default page size as 2K, then try to read the preamble image from NAND flash, in case the page size is 4KB, when read, can get 2 magic number in 8K size because page size will increase with 4K byte steps, so page size is detected and that is 8K/2 = 4. For the 8K page NAND, 1 magic number is read from the 8K size preamble image, so the page size will be 8K/1 = 8K. Dbl_preamble layout 0-------------------------------------------------- | codeword|magic|autodetection_ magic|............| 2K------------------------------------------------| | codeword|magic|autodetection_ magic|............| 4K------------------------------------------------| | codeword|magic|autodetection_ magic|............| 6K------------------------------------------------| | codeword|magic|autodetection_ magic|............| 8K------------------------------------------------| | codeword|magic|autodetection_ magic|............| |-------------------------------------------------|

No comments:

Post a Comment