Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
bcm963xx_tag.h
Go to the documentation of this file.
1 #ifndef __BCM963XX_TAG_H
2 #define __BCM963XX_TAG_H
3 
4 #define TAGVER_LEN 4 /* Length of Tag Version */
5 #define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */
6 #define SIG1_LEN 20 /* Company Signature 1 Length */
7 #define SIG2_LEN 14 /* Company Signature 2 Length */
8 #define BOARDID_LEN 16 /* Length of BoardId */
9 #define ENDIANFLAG_LEN 2 /* Endian Flag Length */
10 #define CHIPID_LEN 6 /* Chip Id Length */
11 #define IMAGE_LEN 10 /* Length of Length Field */
12 #define ADDRESS_LEN 12 /* Length of Address field */
13 #define DUALFLAG_LEN 2 /* Dual Image flag Length */
14 #define INACTIVEFLAG_LEN 2 /* Inactie Flag Length */
15 #define RSASIG_LEN 20 /* Length of RSA Signature in tag */
16 #define TAGINFO1_LEN 30 /* Length of vendor information field1 in tag */
17 #define FLASHLAYOUTVER_LEN 4 /* Length of Flash Layout Version String tag */
18 #define TAGINFO2_LEN 16 /* Length of vendor information field2 in tag */
19 #define ALTTAGINFO_LEN 54 /* Alternate length for vendor information; Pirelli */
20 
21 #define NUM_PIRELLI 2
22 #define IMAGETAG_CRC_START 0xFFFFFFFF
23 
24 #define PIRELLI_BOARDS { \
25  "AGPF-S0", \
26  "DWV-S0", \
27 }
28 
29 /*
30  * The broadcom firmware assumes the rootfs starts the image,
31  * therefore uses the rootfs start (flash_image_address)
32  * to determine where to flash the image. Since we have the kernel first
33  * we have to give it the kernel address, but the crc uses the length
34  * associated with this address (root_length), which is added to the kernel
35  * length (kernel_length) to determine the length of image to flash and thus
36  * needs to be rootfs + deadcode (jffs2 EOF marker)
37 */
38 
39 struct bcm_tag {
40  /* 0-3: Version of the image tag */
42  /* 4-23: Company Line 1 */
43  char sig_1[SIG1_LEN];
44  /* 24-37: Company Line 2 */
45  char sig_2[SIG2_LEN];
46  /* 38-43: Chip this image is for */
48  /* 44-59: Board name */
50  /* 60-61: Map endianness -- 1 BE 0 LE */
52  /* 62-71: Total length of image */
54  /* 72-83: Address in memory of CFE */
56  /* 84-93: Size of CFE */
58  /* 94-105: Address in memory of image start
59  * (kernel for OpenWRT, rootfs for stock firmware)
60  */
62  /* 106-115: Size of rootfs */
64  /* 116-127: Address in memory of kernel */
66  /* 128-137: Size of kernel */
68  /* 138-139: Unused at the moment */
70  /* 140-141: Unused at the moment */
72  /* 142-161: RSA Signature (not used; some vendors may use this) */
74  /* 162-191: Compilation and related information (not used in OpenWrt) */
76  /* 192-195: Version flash layout */
78  /* 196-199: kernel+rootfs CRC32 */
80  /* 200-215: Unused except on Alice Gate where is is information */
82  /* 216-219: CRC32 of image less imagetag (kernel for Alice Gate) */
84  /* 220-223: CRC32 of rootfs partition */
86  /* 224-227: CRC32 of kernel partition */
88  /* 228-235: Unused at present */
89  char reserved1[8];
90  /* 236-239: CRC32 of header excluding last 20 bytes */
92  /* 240-255: Unused at present */
93  char reserved2[16];
94 };
95 
96 #endif /* __BCM63XX_TAG_H */