📄 imginfo.h
字号:
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2006-2007 MStar Semiconductor, Inc.
// All rights reserved.
//
// Unless otherwise stipulated in writing, any and all information contained
// herein regardless in any format shall remain the sole proprietary of
// MStar Semiconductor Inc. and be kept in strict confidence
// (¨MStar Confidential Information〃) by the recipient.
// Any unauthorized act including without limitation unauthorized disclosure,
// copying, use, reproduction, sale, distribution, modification, disassembling,
// reverse engineering and compiling of the contents of MStar Confidential
// Information is unlawful and strictly prohibited. MStar hereby reserves the
// rights to any and all damages, losses, costs and expenses resulting therefrom.
//
////////////////////////////////////////////////////////////////////////////////
#ifndef _IMGINFO_H_
#define _IMGINFO_H_
#include "DataType.h"
#ifdef IMGINFO_C
#define INTERFACE
#else
#define INTERFACE extern
#endif
#define IMG_TYPE_NONE 0x00
#define IMG_TYPE_BOOT 0x01
#define IMG_TYPE_APP 0x02
#define IMG_TYPE_BOTH (IMG_TYPE_BOOT | IMG_TYPE_APP)
#define IMG_INFO_OFFSET 0x100 // Must be the same as that in *.lin (ATSC_S2.lin, DVB_S2.lin ...)
// Magic numbers. Don't change them! The numbers are also used externally.
#define MAGIC_BOOTLOADER 0x55AA1234 // Used by: (1) ISP tool. (2) CRC32 tool
#define MAGIC_APP 0x55AA5678 // Used by: (1) Bootloader for integrity check. (2) ISP tool. (3) CRC32 tool
#define MAGIC_IMAGE_END 0x55AAABCD // At the end of a image (see packlist.txt and the file MagicNum55AAABCD.bin). Mainly for detection of programming failure.
#define IMG_MODEL_NAME_LEN 9
#define IMG_PANEL_NAME_LEN 19
typedef struct
{
U32 u32SourceSize; // Source size in bytes
U32 u32FlashOffset; // Flash offset (relative to a image) of the source.
U32 u32DramAdr; // DRAM start address to be loaded at.
} MS_MEMORY_INFO;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Any change of MS_IMG_INFO may not be backward compatible with external tool and previously released bootloader
// External tools include ISP and CreateImage
typedef struct
{
U32 u32Magic; // Magic number
U32 u32CRC; // CRC32 of the image (code + pack). Filled by external tool
U32 u32ImageSize; // Image size (code + pack). Filled by external tool
U32 u32PackInfoFlashOffset; // Flash offset of pack information
MS_MEMORY_INFO MCU8051Code; // Memory information of MCU8051 code
MS_MEMORY_INFO AEONCode; // Memory information of AEON code
MS_MEMORY_INFO Database; // Memory information of database
U8 u8BL_VerMajor; // Major number of bootloader version
U8 u8BL_VerMinor; // Minor number of bootloader version
U8 u8BL_VerRev; // Revision number of bootloader version
U8 u8SW_VerMajor; // Major number of SW version
U8 u8SW_VerMinor; // Minor number of SW version
U8 u8SW_VerRev; // Revision number of SW version
U8 u8HW_Ver; // Hardware version number
U8 u8BoardType; // Board type
U8 u8ModelName[IMG_MODEL_NAME_LEN+1]; // Model name
U8 u8PanelName[IMG_PANEL_NAME_LEN+1]; // Panel name
U8 u8PanelType;
//U8 u8Reserved[32]; // Reserved for future use
} MS_IMG_INFO;
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
INTERFACE BOOLEAN MApp_ImgInfo_IsBootImage(MS_IMG_INFO *pImgInfo);
INTERFACE BOOLEAN MApp_ImgInfo_IsAppImage(MS_IMG_INFO *pImgInfo);
INTERFACE void MApp_ImgInfo_GetBootInfo(MS_IMG_INFO *pImgInfo);
INTERFACE void MApp_ImgInfo_GetAppInfo(MS_IMG_INFO *pImgInfo);
INTERFACE void MApp_ImgInfo_GetCurModel(U8 *pModel);
INTERFACE BOOLEAN MApp_ImgInfo_IsSameModelAndPanelType(MS_IMG_INFO *pImgInfo, U8 *pModel);
#if (BOOTLOADER_SYSTEM)
INTERFACE void MApp_ImgInfo_VersionToString(U8 u8Major, U8 u8Minor, U8 *pBuffer);
INTERFACE BOOLEAN MApp_ImgInfo_GetBootVersion(U8 *pBuffer);
INTERFACE BOOLEAN MApp_ImgInfo_GetAppVersion(U8 *pBuffer);
#else
INTERFACE void MApp_ImgInfo_VersionToString(U8 u8Major, U8 u8Minor, U16 *pBuffer);
INTERFACE BOOLEAN MApp_ImgInfo_GetBootVersion(U16 *pBuffer);
INTERFACE BOOLEAN MApp_ImgInfo_GetAppVersion(U16 *pBuffer);
#endif
#undef INTERFACE
#endif // _IMGINFO_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -