/*
 *               Copyright (C) 2005-2006, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 */

/*
 * Defines for the NV data generation used by the manufacturing server
 *
 * All offsets (*_OFF) and sizes (*_SIZE) are in bytes
 *
 *
 * RVL NV (eFuse/EEPROM) data format definition
 *
 * NOTE: For RVL all multi-byte fields are stored as big endian
 * eFuse is accessed 32 bits at a time from RVL for read
 */
#define NV_RVL_EFUSE_SIZE 128

#define NV_RVL_BOOT1_HASH_OFF         0
#define NV_RVL_BOOT1_HASH_SIZE       20
#define NV_RVL_COMMON_AES_KEY_OFF    20
#define NV_RVL_COMMON_AES_KEY_SIZE   16
#define NV_RVL_DEVICE_ID_OFF         36  
#define NV_RVL_DEVICE_ID_SIZE         4
#define NV_RVL_DEVICE_ECDH_KEY_OFF   40
#define NV_RVL_DEVICE_ECDH_KEY_SIZE  30
#define NV_RVL_SFS_HMAC_KEY_OFF      70
#define NV_RVL_SFS_HMAC_KEY_SIZE     20
#define NV_RVL_SFS_AES_KEY_OFF       90
#define NV_RVL_SFS_AES_KEY_SIZE      16
/* Some empty area in here -- fill with randoms */
#define NV_RVL_JTAG_ENABLE_OFF      124
#define NV_RVL_JTAG_ENABLE_SIZE       4

#define NV_RVL_EEPROM_OFF           128
#define NV_RVL_EEPROM_SIZE          256

#define NV_RVL_MFR_ID_OFF           128
#define NV_RVL_MFR_ID_SIZE            4
#define NV_RVL_CA_ID_OFF            132
#define NV_RVL_CA_ID_SIZE             4
#define NV_RVL_MFR_DATE_OFF         136
#define NV_RVL_MFR_DATE_SIZE          4
#define NV_RVL_MFR_SIGN_OFF         140
#define NV_RVL_MFR_SIGN_SIZE         60

/* Area with Version numbers starts -- fill with zeroes */
/*
 * END of RVL NV Definition
 */


/*
 * NC NV (Kilopass XPM) data format definition
 *
 * NOTE: For NC all multi-byte fields are in little endian
 * and bytes are stored as little endian (LSB first)
 */
#define NV_NC_KP_SIZE 8192

#define NV_NC_BOOT1_HASH_OFF          0
#define NV_NC_BOOT1_HASH_SIZE        20
#define NV_NC_BOOT1_HASHC_OFF        20
#define NV_NC_BOOT1_HASHC_SIZE       20
#define NV_NC_COMMON_AES_KEY_OFF     40
#define NV_NC_COMMON_AES_KEY_SIZE    16
#define NV_NC_COMMON_AES_KEYC_OFF    56
#define NV_NC_COMMON_AES_KEYC_SIZE   16
#define NV_NC_DEVICE_ID_OFF          72
#define NV_NC_DEVICE_ID_SIZE          4
#define NV_NC_DEVICE_IDC_OFF         76  
#define NV_NC_DEVICE_IDC_SIZE         4

#define NV_NC_DEVICE_ECDH_KEY_OFF    80
#define NV_NC_DEVICE_ECDH_KEY_SIZE   30
#define NV_NC_SFS_HMAC_KEY_OFF      110 
#define NV_NC_SFS_HMAC_KEY_SIZE      20
#define NV_NC_SFS_AES_KEY_OFF       130
#define NV_NC_SFS_AES_KEY_SIZE       16

#define NV_NC_MFR_ID_OFF            146
#define NV_NC_MFR_ID_SIZE             4
#define NV_NC_CA_ID_OFF             150
#define NV_NC_CA_ID_SIZE              4
#define NV_NC_MFR_DATE_OFF          154
#define NV_NC_MFR_DATE_SIZE           4
#define NV_NC_MFR_SIGN_OFF          158
#define NV_NC_MFR_SIGN_SIZE          60
/* Write protect area extends to 512 bytes
 * Fill with randoms */
#define NV_NC_RAND_OFF              218
#define NV_NC_RAND_SIZE             (512-218)


