source: svn/trunk/newcon3bcm2_21bu/dta/src/bootloader7574/ramheader.h @ 23

Last change on this file since 23 was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 2.9 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2010, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: $
11 * $brcm_Revision: $
12 * $brcm_Date: $
13 *
14 * Module Description: ram executable image header
15 *
16 * Revision History:
17 *
18 * $brcm_Log: $q
19 *
20 *
21 ***************************************************************************/
22
23#if !defined(__RAMHEADER_H__)
24#define __RAMHEADER_H__
25
26#define DTA_MAGIC 0x41544448
27#define SCM_MAGIC 0x4c4d4353
28#define FMAP_MAGIC 0x50414d46
29#define BHDR_MAGIC 0x52444842
30
31#define CHIP_ID 0x7574
32
33#if !defined(__ASSEMBLY__)
34/* software image boot header */
35typedef struct boot_header_t {
36        unsigned long boot_order;       /* updated by application before storing */
37        unsigned long chip_id;
38        unsigned long bhdr_magic;
39        unsigned long dummy;            /* filler to align to 0x10 */
40} boot_header_t;
41
42typedef struct application_info_header_t {
43        unsigned long image_size;       /* size of image, must be multiple of 0x40 */
44        unsigned long epoch;            /* epoch number */
45        unsigned long chip_id;          /* chip id to recognize image version */
46        unsigned long dta_magic;        /* HDTA - 0x41544448 */
47        unsigned char version[64];      /* version string */
48        unsigned long dummy[12];        /* pad to 0x40 boundary */
49} application_info_header_t;
50
51typedef struct scm_info_header_t {
52        unsigned long image_size;       /* size of the image */
53        unsigned long epoch;            /* epoch */
54        unsigned long chip_id;          /* chip id */
55        unsigned long scm_magic;        /* SCML - 0x4c4d4353 */
56        unsigned long dummy[12];        /* pad to 0x40 boundary */
57} scm_info_header_t;
58
59typedef struct flash_map_info_t {
60        unsigned long fmap_magic;
61        unsigned long image0_offset;
62        unsigned long image1_offset;
63        unsigned long settings_offset;
64        unsigned long settings_size;
65} flash_map_info_t;
66
67#endif
68
69/* Flash map section (may be moved to separate file in the future) */
70/* (FLASH_BOOTLOADER_SIZE+FLASH_DATA_SIZE/2) must be divisible by 0x10000
71   to fit on one erasable flash block (64K) */
72#define FLASH_BASE 0xbec00000
73#define FLASH_SIZE 0xC00000
74#define FLASH_BOOTLOADER_START FLASH_BASE
75#define FLASH_BOOTLOADER_SIZE 0x30000
76#define FLASH_APP0_START (FLASH_BOOTLOADER_START + FLASH_BOOTLOADER_SIZE)
77#define FLASH_APP0_SIZE ((FLASH_SIZE - (FLASH_BOOTLOADER_SIZE + FLASH_DATA_SIZE))/2)
78#define FLASH_APP1_START (FLASH_APP0_START + FLASH_APP0_SIZE)
79#define FLASH_APP1_SIZE FLASH_APP0_SIZE
80#define FLASH_DATA_START (FLASH_APP1_START + FLASH_APP1_SIZE)
81#define FLASH_DATA_SIZE 0x30000
82
83#define FMAP_APP0_OFFSET FLASH_BOOTLOADER_SIZE
84#define FMAP_APP1_OFFSET (FMAP_APP0_OFFSET + FLASH_APP0_SIZE)
85#define FMAP_DATA_OFFSET (FMAP_APP1_OFFSET + FLASH_APP1_SIZE)
86#define FMAP_DATA_SIZE FLASH_DATA_SIZE
87#endif
Note: See TracBrowser for help on using the repository browser.