00001 /***************************************************************************** 00002 *! 00003 *! FILE NAME : fwinfo_data.h 00004 *! 00005 *! DESCRIPTION: Data structures and definitions for firmware image info. 00006 *! 00007 *! --------------------------------------------------------------------------- 00008 *! (C) Copyright 2006-2007, Axis Communications AB, LUND, SWEDEN 00009 *! 00010 *! This program is free software; you can redistribute it and/or modify 00011 *! it under the terms of the GNU General Public License as published by 00012 *! the Free Software Foundation; either version 2 of the License, or 00013 *! (at your option) any later version. 00014 *! 00015 *! This program is distributed in the hope that it will be useful, 00016 *! but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 *! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 *! GNU General Public License for more details. 00019 *! 00020 *! You should have received a copy of the GNU General Public License 00021 *! along with this program; if not, write to the Free Software 00022 *! Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00023 *! 00024 *!***************************************************************************/ 00025 00026 #ifndef _FWINFO_DATA_H 00027 #define _FWINFO_DATA_H 00028 00029 #define FWINFO_LOCATION 2048 /* after first NAND page in small chips */ 00030 /*#define FWINFO_LOCATION 4096*/ /* after first NAND page in small chips */ 00031 /*#define FWINFO_LOCATION 2048*/ /* after first NAND page in small chips */ 00032 /*#define FWINFO_LOCATION (2048 * 4)*/ /* after first NAND page in small chips */ 00033 #define FWINFO_MAXSIZE 128 /* arbitrary, reasonable */ 00034 00035 #define FWINFO_MAGIC_UNINITIALIZED 0xBFD0573A 00036 #define FWINFO_MAGIC_INITIALIZED 0xA930EBF3 00037 00038 #define FWINFO_MAJOR 1 00039 #define FWINFO_MINOR 1 00040 00041 #define FWINFO_MEDIA_TYPE_NORFLASH 1 00042 #define FWINFO_MEDIA_TYPE_NANDFLASH 2 00043 00044 #define FWINFO_HWID_LENGTH 8 00045 00046 #ifndef __ASSEMBLY__ 00047 00048 struct fwinfo { 00049 unsigned long magic; 00050 unsigned long major; 00051 unsigned long minor; 00052 unsigned long bootblkpar_flash_addr; 00053 unsigned long bootblkpar_flash_end; 00054 unsigned long ptable_flash_addr; 00055 unsigned long ptable_img_addr; 00056 unsigned long media_type; 00057 unsigned long media_erasesize; 00058 unsigned long media_pagesize; 00059 unsigned long media_totalsize_mb; 00060 char hwids[FWINFO_HWID_LENGTH]; /* space padded */ 00061 }; 00062 00063 #else 00064 00065 /* to use macro, -D[efine] constants on command line (or elsewhere), 00066 * then call macro at appropriate place in program. 00067 */ 00068 .macro INITIALIZE_FWINFO_AREA 00069 .dword FWINFO_MAGIC_INITIALIZED 00070 .dword FWINFO_MAJOR 00071 .dword FWINFO_MINOR 00072 .dword FWINFO_BBP_ADDR 00073 .dword FWINFO_BBP_END 00074 .dword FWINFO_PTABLE_MEDIA_ADDR 00075 .dword FWINFO_PTABLE_IMG_ADDR 00076 .dword FWINFO_MEDIA_TYPE 00077 .dword FWINFO_MEDIA_ERASESIZE 00078 .dword FWINFO_MEDIA_PAGESIZE 00079 .dword FWINFO_MEDIA_TOTALSIZE_MB 00080 1: 00081 .ascii FWINFO_HWID 00082 .org 1b + FWINFO_HWID_LENGTH, ' ' 00083 .endm 00084 00085 #endif /* !__ASSEMBLY__ */ 00086 00087 #endif /* _FWINFO_DATA_H */ 00088 00089 /******************************* END OF FILE ********************************/