~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/bcm963xx_tag.h

Version: ~ [ linux-5.3-rc5 ] ~ [ linux-5.2.9 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.67 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.139 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.189 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.189 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.72 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __LINUX_BCM963XX_TAG_H__
  2 #define __LINUX_BCM963XX_TAG_H__
  3 
  4 #include <linux/types.h>
  5 
  6 #define TAGVER_LEN              4       /* Length of Tag Version */
  7 #define TAGLAYOUT_LEN           4       /* Length of FlashLayoutVer */
  8 #define SIG1_LEN                20      /* Company Signature 1 Length */
  9 #define SIG2_LEN                14      /* Company Signature 2 Length */
 10 #define BOARDID_LEN             16      /* Length of BoardId */
 11 #define ENDIANFLAG_LEN          2       /* Endian Flag Length */
 12 #define CHIPID_LEN              6       /* Chip Id Length */
 13 #define IMAGE_LEN               10      /* Length of Length Field */
 14 #define ADDRESS_LEN             12      /* Length of Address field */
 15 #define IMAGE_SEQUENCE_LEN      4       /* Image sequence Length */
 16 #define RSASIG_LEN              20      /* Length of RSA Signature in tag */
 17 #define TAGINFO1_LEN            30      /* Length of vendor information field1 in tag */
 18 #define FLASHLAYOUTVER_LEN      4       /* Length of Flash Layout Version String tag */
 19 #define TAGINFO2_LEN            16      /* Length of vendor information field2 in tag */
 20 #define ALTTAGINFO_LEN          54      /* Alternate length for vendor information; Pirelli */
 21 
 22 #define NUM_PIRELLI             2
 23 #define IMAGETAG_CRC_START      0xFFFFFFFF
 24 
 25 #define PIRELLI_BOARDS { \
 26         "AGPF-S0", \
 27         "DWV-S0", \
 28 }
 29 
 30 /* Extended flash address, needs to be subtracted
 31  * from bcm_tag flash image offsets.
 32  */
 33 #define BCM963XX_EXTENDED_SIZE  0xBFC00000
 34 
 35 /*
 36  * The broadcom firmware assumes the rootfs starts the image,
 37  * therefore uses the rootfs start (flash_image_address)
 38  * to determine where to flash the image.  Since we have the kernel first
 39  * we have to give it the kernel address, but the crc uses the length
 40  * associated with this address (root_length), which is added to the kernel
 41  * length (kernel_length) to determine the length of image to flash and thus
 42  * needs to be rootfs + deadcode (jffs2 EOF marker)
 43 */
 44 
 45 struct bcm_tag {
 46         /* 0-3: Version of the image tag */
 47         char tag_version[TAGVER_LEN];
 48         /* 4-23: Company Line 1 */
 49         char sig_1[SIG1_LEN];
 50         /*  24-37: Company Line 2 */
 51         char sig_2[SIG2_LEN];
 52         /* 38-43: Chip this image is for */
 53         char chip_id[CHIPID_LEN];
 54         /* 44-59: Board name */
 55         char board_id[BOARDID_LEN];
 56         /* 60-61: Map endianness -- 1 BE 0 LE */
 57         char big_endian[ENDIANFLAG_LEN];
 58         /* 62-71: Total length of image */
 59         char total_length[IMAGE_LEN];
 60         /* 72-83: Address in memory of CFE */
 61         char cfe__address[ADDRESS_LEN];
 62         /* 84-93: Size of CFE */
 63         char cfe_length[IMAGE_LEN];
 64         /* 94-105: Address in memory of image start
 65          * (kernel for OpenWRT, rootfs for stock firmware)
 66          */
 67         char flash_image_start[ADDRESS_LEN];
 68         /* 106-115: Size of rootfs */
 69         char root_length[IMAGE_LEN];
 70         /* 116-127: Address in memory of kernel */
 71         char kernel_address[ADDRESS_LEN];
 72         /* 128-137: Size of kernel */
 73         char kernel_length[IMAGE_LEN];
 74         /* 138-141: Image sequence number
 75          * (to be incremented when flashed with a new image)
 76          */
 77         char image_sequence[IMAGE_SEQUENCE_LEN];
 78         /* 142-161: RSA Signature (not used; some vendors may use this) */
 79         char rsa_signature[RSASIG_LEN];
 80         /* 162-191: Compilation and related information (not used in OpenWrt) */
 81         char information1[TAGINFO1_LEN];
 82         /* 192-195: Version flash layout */
 83         char flash_layout_ver[FLASHLAYOUTVER_LEN];
 84         /* 196-199: kernel+rootfs CRC32 */
 85         __u32 fskernel_crc;
 86         /* 200-215: Unused except on Alice Gate where is is information */
 87         char information2[TAGINFO2_LEN];
 88         /* 216-219: CRC32 of image less imagetag (kernel for Alice Gate) */
 89         __u32 image_crc;
 90         /* 220-223: CRC32 of rootfs partition */
 91         __u32 rootfs_crc;
 92         /* 224-227: CRC32 of kernel partition */
 93         __u32 kernel_crc;
 94         /* 228-235: Unused at present */
 95         char reserved1[8];
 96         /* 236-239: CRC32 of header excluding last 20 bytes */
 97         __u32 header_crc;
 98         /* 240-255: Unused at present */
 99         char reserved2[16];
100 };
101 
102 #endif /* __LINUX_BCM63XX_TAG_H__ */
103 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp