![]() |
RDK Documentation (Open Sourced RDK Components)
|
Modules | |
IARM-MFR Manager internal API | |
Macros | |
#define | MFR_CRYPTO_KEY_LENGTH 16 |
#define | MFR_CRYPTO_IVEC_LENGTH 16 |
#define | IARM_BUS_MFRLIB_NAME "MFRLib" |
#define | IARM_BUS_MFRLIB_API_GetSerializedData "mfrGetSerializedData" |
#define | IARM_BUS_MFRLIB_API_SetSerializedData "mfrSetSerializedData" |
#define | IARM_BUS_MFRLIB_API_WriteImage "mfrWriteImage" |
#define | IARM_BUS_MFRLIB_API_SetImageWriteProgress "mfrSetImageWriteProgress" |
#define | IARM_BUS_MFRLIB_API_GetImageWriteProgress "mfrGetImageWriteProgress" |
#define | IARM_BUS_MFRLIB_API_DeletePDRI "mfrDeletePDRI" |
#define | IARM_BUS_MFRLIB_API_ScrubAllBanks "mfrScrubAllBanks" |
#define | IARM_BUS_MFRLIB_API_Reboot "mfrReboot" |
#define | IARM_BUS_MFRLIB_API_SetCableCardType "mfrSetCableCardType" |
#define | IARM_BUS_MFRLIB_API_SetHostFirmwareInfo "mfrSetHostFirmwareInfo" |
#define | IARM_BUS_MFRLIB_API_GetBootImageName "mfrGetBootImageName" |
#define | IARM_BUS_MFRLIB_API_GetPathConfiguration "mfrGetPathConfiguration" |
#define | IARM_BUS_MFRLIB_API_GetDFAST2Data "mfrGetDFAST2Data" |
#define | IARM_BUS_MFRLIB_COMMON_API_WriteImageCb "WriteImageCb" |
#define | IARM_BUS_MFRLIB_API_Init "mfrInit" |
#define | IARM_BUS_MFRLIB_API_Shutdown "mfrShutdown" |
#define | MAX_BUF 255 |
#define | MAX_SERIALIZED_BUF 1280 |
#define | MFR_MAX_STR_SIZE (256) |
#define | MFR_DFAST_INPUT_BYTES (16) |
#define | MFR_DFAST_OUTPUT_BYTES (16) |
#define | mfrBOOT_INSTANCE_CURRENT 0 |
#define | mfrBOOT_INSTANCE_PREVIOUS 1 |
#define | mfrBOOT_INSTANCE_UPGRADED 2 |
#define | LOG(...) printf(__VA_ARGS__) |
#define | IARM_Bus_Lock(lock) pthread_mutex_lock(&mfrLock) |
#define | IARM_Bus_Unlock(lock) pthread_mutex_unlock(&mfrLock) |
#define | RDK_MFRCRYPTOLIB_NAME "libmfrcrypto.so" |
#define | IARM_BUS_MFRLIB_NAME "MFRLib" |
#define | IARM_BUS_MFRLIB_API_GetSerializedData "mfrGetManufacturerData" |
#define | IARM_BUS_MFRLIB_API_DeletePDRI "mfrDeletePDRI" |
#define | IARM_BUS_MFRLIB_API_ScrubAllBanks "scrubAllBanks" |
#define | IARM_BUS_MFRLIB_API_WriteImage "mfrWriteImage" |
#define | IARM_BUS_MFRLIB_API_WIFI_EraseAllData "mfrWifiEraseAllData" |
#define | IARM_BUS_MFRLIB_API_WIFI_Credentials "mfrWifiCredentials" |
#define | IARM_BUS_MFRLIB_API_SetBootLoaderPattern "mfrSetBootloaderPattern" |
#define | IARM_BUS_MFRLIB_COMMON_API_WriteImageCb "WriteImageCb" |
#define | HDCP_KEY_MAX_SIZE (1280) |
#define | MAX_SERIALIZED_BUF HDCP_KEY_MAX_SIZE |
#define | MAX_BUF 255 |
#define | LOG(...) printf(__VA_ARGS__) |
#define | SAFEC_ERR_CHECK(safec_rc) |
#define | SAFEC_ERR_CHECK(safec_rc) |
Typedefs | |
typedef unsigned long | VL_MFR_DEVICE_HANDLE_t |
typedef enum _VL_MFR_API_RESULT | VL_MFR_API_RESULT |
typedef enum _VL_PLATFORM_VERSION_TYPE | VL_PLATFORM_VERSION_TYPE |
typedef enum _VL_NORMAL_NVRAM_DATA_TYPE | VL_NORMAL_NVRAM_DATA_TYPE |
typedef enum _VL_SECURE_NVRAM_DATA_TYPE | VL_SECURE_NVRAM_DATA_TYPE |
typedef enum _VL_STACK_2_MFR_EVENT_TYPE | VL_STACK_2_MFR_EVENT_TYPE |
typedef struct _VL_NVRAM_DATA | VL_NVRAM_DATA |
typedef struct _IARM_Bus_MFRLib_SerializedData_Param_t | IARM_Bus_MFRLib_SerializedData_Param_t |
typedef struct _IARM_Bus_MFRLib_WriteImage_Param_t | IARM_Bus_MFRLib_WriteImage_Param_t |
typedef struct _IARM_Bus_MFRLib_GetImageWriteProgress_Param_t | IARM_Bus_MFRLib_GetImageWriteProgress_Param_t |
typedef struct _IARM_Bus_MFRLib_SetImageWriteProgress_Param_t | IARM_Bus_MFRLib_SetImageWriteProgress_Param_t |
typedef struct _IARM_Bus_MFRLib_Reboot_Param_t | IARM_Bus_MFRLib_Reboot_Param_t |
typedef struct _IARM_Bus_MFRLib_SetCableCardType_Param_t | IARM_Bus_MFRLib_SetCableCardType_Param_t |
typedef struct _IARM_Bus_MFRLib_SetHostFirmwareInfo_Param_t | IARM_Bus_MFRLib_SetHostFirmwareInfo_Param_t |
typedef struct _IARM_Bus_MFRLib_GetBootImageName_Param_t | IARM_Bus_MFRLib_GetBootImageName_Param_t |
typedef struct _IARM_Bus_MFRLib_GetPathConfiguration_Param_t | IARM_Bus_MFRLib_GetPathConfiguration_Param_t |
typedef struct _IARM_Bus_MFRLib_GetDFAST2Data_Param_t | IARM_Bus_MFRLib_GetDFAST2Data_Param_t |
typedef struct _IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t | IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t |
typedef enum _MfrMgr_EventId_t | IARM_Bus_MfrMgr_EventId_t |
typedef struct _IARM_BUS_MfrMgr_StatusUpdate_EventData_t | IARM_BUS_MfrMgr_StatusUpdate_EventData_t |
typedef enum _mfrError_t | mfrError_t |
typedef struct _mfrSerializedData_t | mfrSerializedData_t |
typedef enum _mfrSerializedType_t | mfrSerializedType_t |
typedef enum _mfrConfigPathType_t | mfrConfigPathType_t |
typedef enum _mfrImageType_t | mfrImageType_t |
typedef enum _mfrUpgradeProgress_t | mfrUpgradeProgress_t |
typedef enum _mfrCableCardType_t | mfrCableCardType_t |
typedef struct _mfrDFAST2Params_t | mfrDFAST2Params_t |
typedef struct _mfrHostFrmwareInfo_t | mfrHostFirmwareInfo_t |
typedef struct _mfrUpgradeStatus_t | mfrUpgradeStatus_t |
typedef struct _mfrUpgradeStatusNotify_t | mfrUpgradeStatusNotify_t |
typedef mfrError_t(* | mfrEncryptFunction_t) (const mfrSerializedData_t *pClearText, mfrSerializedData_t *pCipherText) |
crypto funcionality. This function should be called to encrypt a block of data More... | |
typedef mfrError_t(* | mfrDecryptFunction_t) (const mfrSerializedData_t *pCipherText, mfrSerializedData_t *pClearText) |
crypto funcionality. This function should be called to decrypt a block of data that are encrypted by mfrEncryptFunction_t; More... | |
typedef mfrError_t(* | mfrCrypto_init_t) (const mfrSerializedData_t *) |
typedef mfrError_t(* | mfrCrypto_Encrypt_t) (const mfrSerializedData_t *, mfrSerializedData_t *) |
typedef mfrError_t(* | mfrCrypto_Decrypt_t) (const mfrSerializedData_t *, mfrSerializedData_t *) |
typedef mfrError_t(* | mfrCrypto_term_t) () |
typedef mfrError_t(* | mfr_init_t) () |
typedef mfrError_t(* | mfrGetSerializedData_t) (mfrSerializedType_t, mfrSerializedData_t *, mfrEncryptFunction_t *) |
typedef mfrError_t(* | mfrSetSerializedData_t) (mfrSerializedType_t, mfrSerializedData_t *, mfrDecryptFunction_t *) |
typedef mfrError_t(* | mfrWriteImage_t) (const char *, const char *, mfrImageType_t, mfrUpgradeStatusNotify_t) |
typedef mfrError_t(* | mfrSetImageWriteProgress_t) (const char *, mfrImageType_t, mfrUpgradeProgress_t) |
typedef mfrError_t(* | mfrGetImageWriteProgress_t) (const char *imageName, mfrImageType_t imageType, mfrUpgradeProgress_t *) |
typedef mfrError_t(* | mfrDeletePDRI_t) (void) |
typedef mfrError_t(* | mfrScrubAllBanks_t) (void) |
typedef mfrError_t(* | mfr_shutdown_t) (void) |
typedef mfrError_t(* | mfrReboot_t) (const char *) |
typedef mfrError_t(* | mfrSetCableCardType_t) (mfrCableCardType_t) |
typedef mfrError_t(* | mfrSetHostFirmwareInfo_t) (const mfrHostFirmwareInfo_t *) |
typedef mfrError_t(* | mfrGetBootImageName_t) (int, char *, int, mfrImageType_t) |
typedef mfrError_t(* | mfrGetPathConfiguration_t) (mfrConfigPathType_t, char *, int *) |
typedef mfrError_t(* | mfrGetDFAST2Data_t) (mfrDFAST2Params_t *) |
typedef enum _mfrTemperatureState_t | mfrTemperatureState_t |
typedef struct _IARM_Bus_MFRLib_GetSerializedData_Param_t | IARM_Bus_MFRLib_GetSerializedData_Param_t |
typedef struct _IARM_Bus_MFRLib_WriteImage_Param_t | IARM_Bus_MFRLib_WriteImage_Param_t |
typedef struct _IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t | IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t |
typedef enum _WifiRequestType | WifiRequestType_t |
typedef struct _IARM_BUS_MFRLIB_API_WIFI_Credentials_Param_t | IARM_BUS_MFRLIB_API_WIFI_Credentials_Param_t |
typedef struct _IARM_Bus_MFRLib_SetBLPattern_Param_t | IARM_Bus_MFRLib_SetBLPattern_Param_t |
typedef enum _mfrError_t | mfrError_t |
typedef struct _mfrSerializedData_t | mfrSerializedData_t |
typedef enum _mfrSerializedType_t | mfrSerializedType_t |
typedef enum _mfrImageType_t | mfrImageType_t |
typedef enum _mfrUpgradeProgress_t | mfrUpgradeProgress_t |
typedef enum _mfrBlPattern_t | mfrBlPattern_t |
typedef struct _mfrUpgradeStatus_t | mfrUpgradeStatus_t |
typedef struct _mfrUpgradeStatusNotify_t | mfrUpgradeStatusNotify_t |
Enumerations | |
enum | _VL_MFR_API_RESULT |
enum | _VL_PLATFORM_VERSION_TYPE |
enum | _VL_NORMAL_NVRAM_DATA_TYPE |
enum | _VL_SECURE_NVRAM_DATA_TYPE |
enum | _VL_STACK_2_MFR_EVENT_TYPE |
enum | _MfrMgr_EventId_t |
enum | _mfrError_t |
enum | _mfrSerializedType_t |
enum | _mfrConfigPathType_t |
enum | _mfrImageType_t |
enum | _mfrUpgradeProgress_t |
enum | _mfrCableCardType_t |
enum | _mfrTemperatureState_t |
enum | _WifiRequestType |
enum | _mfrError_t |
enum | _mfrSerializedType_t |
enum | _mfrImageType_t |
enum | _mfrUpgradeProgress_t |
enum | _mfrBlPattern_t |
Functions | |
static void | mfr_create_key (const mfrSerializedData_t *pSerialNumber, unsigned char *keybuf, unsigned char *ivec) |
mfrError_t | mfrCrypto_init (const mfrSerializedData_t *pSerialNumber) |
mfrError_t | mfrCrypto_term () |
mfrError_t | mfrCrypto_Encrypt (const mfrSerializedData_t *pPlainText, mfrSerializedData_t *pCipherText) |
mfrError_t | mfrCrypto_Decrypt (const mfrSerializedData_t *pCipherText, mfrSerializedData_t *pPlainText) |
int | MFR_Init (void) |
int | MFR_Shutdown (void) |
VL_MFR_API_RESULT | HAL_MFR_get_version (VL_MFR_DEVICE_HANDLE_t hMFRHandle, VL_PLATFORM_VERSION_TYPE eVersionType, char **ppString) |
VL_MFR_API_RESULT | HAL_MFR_read_normal_nvram (VL_MFR_DEVICE_HANDLE_t hMFRHandle, VL_NORMAL_NVRAM_DATA_TYPE eType, VL_NVRAM_DATA *pNvRamData) |
VL_MFR_API_RESULT | HAL_MFR_write_normal_nvram (VL_MFR_DEVICE_HANDLE_t hMFRHandle, VL_NORMAL_NVRAM_DATA_TYPE eType, const VL_NVRAM_DATA *pNvRamData) |
VL_MFR_API_RESULT | HAL_MFR_read_secure_nvram (VL_MFR_DEVICE_HANDLE_t hMFRHandle, VL_SECURE_NVRAM_DATA_TYPE eType, VL_NVRAM_DATA *pNvRamData) |
VL_MFR_API_RESULT | HAL_MFR_write_secure_nvram (VL_MFR_DEVICE_HANDLE_t hMFRHandle, VL_SECURE_NVRAM_DATA_TYPE eType, const VL_NVRAM_DATA *pNvRamData) |
VL_MFR_API_RESULT | HAL_MFR_set_mfr_data (VL_MFR_DEVICE_HANDLE_t hMFRHandle, VL_STACK_2_MFR_EVENT_TYPE eEvent, void *_pvData) |
VL_MFR_API_RESULT | HAL_MFR_get_mfr_data (VL_MFR_DEVICE_HANDLE_t hMFRHandle, VL_STACK_2_MFR_EVENT_TYPE eEvent, void *_pvData) |
mfrError_t | mfr_init (void) |
Initialize the mfr library. This function should be call once before the functions in this API can be used. More... | |
mfrError_t | mfr_shutdown (void) |
Shutdowns the mfr library. This function should be called to free resources in mfr library while shutdown. More... | |
mfrError_t | mfrGetSerializedData (mfrSerializedType_t type, mfrSerializedData_t *data, mfrEncryptFunction_t crypto) |
Retrieve Serialized Read-Only data from device. The serialized data is returned as a byte stream. It is upto the application to deserialize and make sense of the data returned. Please note that even if the serialized data returned is "string", the buffer is not required to contain the null-terminator. More... | |
mfrError_t | mfrSetSerializedData (mfrSerializedType_t type, mfrSerializedData_t *data, mfrDecryptFunction_t crypto) |
Write Serialized data to device. The serialized data written as a byte stream. The 'crypto' parameter, if not null, the implementation should used the given crypto function to decrypt the data before setting the serialize data. More... | |
mfrError_t | mfrWriteImage (const char *name, const char *path, mfrImageType_t type, mfrUpgradeStatusNotify_t notify) |
Validate and Write the image into flash. The process should follow these major steps: 1) Validate headers, manufacturer, model. 2) Perform Signature check. 3) Flash the image. 4) Perform CRC on flashed nvram. 5) Update boot params and switch banks to prepare for a reboot event. 6) All upgrades should be done in the alternate bank. The current bank should not be disturbed at any cost. i.e. a second upgrade will before a reboot will overwrite the non-current bank only. More... | |
mfrError_t | mfrSetImageWriteProgress (const char *imageName, mfrImageType_t imageType, mfrUpgradeProgress_t progress) |
Set the the progress of image upgrade. More... | |
mfrError_t | mfrGetImageWriteProgress (const char *imageName, mfrImageType_t imageType, mfrUpgradeProgress_t *progress) |
Retrieves the last/latest progress of image upgrade If the upgrade is in not progress, the progress returned should be same as the final value returned by the 'notify' function in mfrWriteImage(), or as the value set by the last invocation of mfrSetImageWriteProgress. More... | |
mfrError_t | mfrDeletePDRI (void) |
Delete the P-DRI image if it is present. More... | |
mfrError_t | mfrScrubAllBanks (void) |
Delete the platform images. More... | |
mfrError_t | mfrReboot (const char *imageName) |
Reboots the box with image of given name. More... | |
mfrError_t | mfrSetCableCardType (mfrCableCardType_t type) |
Sets the cable card type. More... | |
mfrError_t | mfrSetHostFirmwareInfo (const mfrHostFirmwareInfo_t *firmwareInfo) |
Sets the Host firmware information. More... | |
mfrError_t | mfrGetBootImageName (int bootInstance, char *bootImageName, int *len, mfrImageType_t bootImageType) |
Retrieve the image name used by box when booting up. (I.e. current active image) More... | |
mfrError_t | mfrGetPathConfiguration (mfrConfigPathType_t type, char *path, int *len) |
Retrieves the path configuration name. More... | |
mfrError_t | mfrGetDFAST2Data (mfrDFAST2Params_t *params) |
Triggers DFAST operations. More... | |
IARM_Result_t | MFRLib_Start (void) |
Starts the MFR lib. More... | |
IARM_Result_t | MFRLib_Stop (void) |
Terminates the MFR lib. More... | |
IARM_Result_t | MFRLib_Loop () |
Listens for component specific events from drivers. More... | |
int | main (int argc, char *argv[]) |
static void | _eventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
IARM_Result_t | _mfr_init (void *arg) |
IARM_Result_t | _mfr_shutdown (void *arg) |
IARM_Result_t | _mfrGetSerializedData (void *arg) |
IARM_Result_t | _mfrSetSerializedData (void *arg) |
IARM_Result_t | _mfrWriteImage (void *arg) |
IARM_Result_t | _mfrSetImageWriteProgress (void *arg) |
IARM_Result_t | _mfrGetImageWriteProgress (void *arg) |
IARM_Result_t | _mfrDeletePDRI (void *arg) |
IARM_Result_t | _mfrScrubAllBanks (void *arg) |
IARM_Result_t | _mfrReboot (void *arg) |
IARM_Result_t | _mfrSetCableCardType (void *arg) |
IARM_Result_t | _mfrSetHostFirmwareInfo (void *arg) |
IARM_Result_t | _mfrGetBootImageName (void *arg) |
IARM_Result_t | _mfrGetPathConfiguration (void *arg) |
IARM_Result_t | _mfrGetDFAST2Data (void *arg) |
void * | find_func (const char *lib_name, const char *proc_name) |
IARM_Result_t | mfrMgr_start () |
static void | writeImageCb (mfrUpgradeStatus_t status, void *cbData) |
mfrSerializedType_t | getTypeFromMenu () |
int | main () |
mfrError_t | mfrGetTemperature (mfrTemperatureState_t *state, int *temperatureValue, int *wifiTemp) |
get current temperature of the core More... | |
mfrError_t | mfrSetTempThresholds (int tempHigh, int tempCritical) |
Set temperature thresholds which will determine the state returned * from a call to mfrGetTemperature. More... | |
mfrError_t | mfrGetTempThresholds (int *tempHigh, int *tempCritical) |
Get the temperature thresholds which determine the state returned * from a call to mfrGetTemperature. More... | |
mfrError_t | mfrGetSerializedData (mfrSerializedType_t type, mfrSerializedData_t *data) |
Retrieve Serialized Read-Only data from device. The serialized data is returned as a byte stream. It is upto the application to deserialize and make sense of the data returned. Please note that even if the serialized data returned is "string", the buffer is not required to contain the null-terminator. More... | |
mfrError_t | mfrSetBootloaderPattern (mfrBlPattern_t pattern) |
Sets how the frontpanel LED(s) (and TV backlight on applicable devices) behave when running bootloader. More... | |
static IARM_Result_t | getSerializedData_ (void *arg) |
static IARM_Result_t | deletePDRI_ (void *arg) |
static IARM_Result_t | scrubAllBanks_ (void *arg) |
static IARM_Result_t | writeImage_ (void *arg) |
IARM_Result_t | setBootloaderPattern_ (void *arg) |
int | main (int argc, char **argv) |
IARM_Result_t | _callback (void *arg) |
Variables | |
static mfrSerializedData_t | serialNumber |
static char | writeImageCbModule [MAX_BUF] = "" |
static char | cliName [32] |
static mfrUpgradeStatusNotify_t | cb_notify = {0,} |
static int | m_initialized =0 |
static pthread_mutex_t | mfrLock = PTHREAD_MUTEX_INITIALIZER |
static char | writeImageCbModule [MAX_BUF] = "" |
static mfrUpgradeStatus_t | lastStatus |
static int | is_connected = 0 |
static char | writeImageCbModule [MAX_BUF] = "" |
static mfrUpgradeStatus_t | lastStatus |
struct _VL_NVRAM_DATA |
struct _IARM_Bus_MFRLib_SerializedData_Param_t |
struct _IARM_Bus_MFRLib_WriteImage_Param_t |
struct _IARM_Bus_MFRLib_GetImageWriteProgress_Param_t |
struct _IARM_Bus_MFRLib_SetImageWriteProgress_Param_t |
struct _IARM_Bus_MFRLib_Reboot_Param_t |
struct _IARM_Bus_MFRLib_SetCableCardType_Param_t |
struct _IARM_Bus_MFRLib_SetHostFirmwareInfo_Param_t |
struct _IARM_Bus_MFRLib_GetBootImageName_Param_t |
struct _IARM_Bus_MFRLib_GetPathConfiguration_Param_t |
struct _IARM_Bus_MFRLib_GetDFAST2Data_Param_t |
struct _IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t |
Data Fields | ||
---|---|---|
mfrUpgradeStatus_t | status | |
char | cbData[255] |
upgrade status, set by WriteImage callback |
struct _IARM_BUS_MfrMgr_StatusUpdate_EventData_t |
Data Fields | ||
---|---|---|
mfrUpgradeStatus_t | status |
New status |
struct _mfrSerializedData_t |
Definition at line 50 of file mfrTypes.h.
Data Fields | |
char * | buf |
size_t | bufLen |
void(* | freeBuf )(char *buf) |
struct _mfrDFAST2Params_t |
Definition at line 199 of file mfrTypes.h.
Data Fields | ||
---|---|---|
unsigned int | seedIn[(16)] | |
unsigned int | keyOut[(16)] |
struct _mfrHostFrmwareInfo_t |
Definition at line 209 of file mfrTypes.h.
Data Fields | ||
---|---|---|
char | firmwareVersion[(256)] | |
int | firmwareDay | |
int | firmwareMonth | |
int | firmwareYear |
struct _mfrUpgradeStatus_t |
Definition at line 218 of file mfrTypes.h.
Data Fields | ||
---|---|---|
mfrUpgradeProgress_t | progress | |
mfrError_t | error | |
int | percentage |
struct _mfrUpgradeStatusNotify_t |
Definition at line 225 of file mfrTypes.h.
Data Fields | |
void * | cbData |
void(* | cb )(mfrUpgradeStatus_t status, void *cbData) |
int | interval |
struct _IARM_Bus_MFRLib_GetSerializedData_Param_t |
struct _IARM_BUS_MFRLIB_API_WIFI_Credentials_Param_t |
struct _IARM_Bus_MFRLib_SetBLPattern_Param_t |
#define IARM_BUS_MFRLIB_NAME "MFRLib" |
#define IARM_BUS_MFRLIB_API_GetSerializedData "mfrGetSerializedData" |
#define IARM_BUS_MFRLIB_API_WriteImage "mfrWriteImage" |
#define IARM_BUS_MFRLIB_API_DeletePDRI "mfrDeletePDRI" |
#define IARM_BUS_MFRLIB_API_ScrubAllBanks "mfrScrubAllBanks" |
#define IARM_BUS_MFRLIB_COMMON_API_WriteImageCb "WriteImageCb" |
#define IARM_BUS_MFRLIB_NAME "MFRLib" |
#define IARM_BUS_MFRLIB_API_GetSerializedData "mfrGetManufacturerData" |
#define IARM_BUS_MFRLIB_API_DeletePDRI "mfrDeletePDRI" |
#define IARM_BUS_MFRLIB_API_ScrubAllBanks "scrubAllBanks" |
#define IARM_BUS_MFRLIB_API_WriteImage "mfrWriteImage" |
#define IARM_BUS_MFRLIB_API_SetBootLoaderPattern "mfrSetBootloaderPattern" |
#define IARM_BUS_MFRLIB_COMMON_API_WriteImageCb "WriteImageCb" |
#define HDCP_KEY_MAX_SIZE (1280) |
#define SAFEC_ERR_CHECK | ( | safec_rc | ) |
Definition at line 37 of file mfr_wifiSetCredentials.c.
#define SAFEC_ERR_CHECK | ( | safec_rc | ) |
Definition at line 37 of file test_writeImage.c.
typedef struct _IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t |
Data associated with WriteImage callback call
Event data
typedef mfrError_t(* mfrEncryptFunction_t) (const mfrSerializedData_t *pClearText, mfrSerializedData_t *pCipherText) |
crypto funcionality. This function should be called to encrypt a block of data
[in] | pClearText: uncrypted data. | |
[out] | pCipherText: crypted data. |
Definition at line 242 of file mfrTypes.h.
typedef mfrError_t(* mfrDecryptFunction_t) (const mfrSerializedData_t *pCipherText, mfrSerializedData_t *pClearText) |
crypto funcionality. This function should be called to decrypt a block of data that are encrypted by mfrEncryptFunction_t;
[in] | pCipherText: crypted data. | |
[out] | pClearText: uncrypted data. |
Definition at line 253 of file mfrTypes.h.
typedef struct _IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t |
Data associated with WriteImage callback call
enum _MfrMgr_EventId_t |
mfrError_t mfr_init | ( | void | ) |
mfrError_t mfr_shutdown | ( | void | ) |
mfrError_t mfrGetSerializedData | ( | mfrSerializedType_t | type, |
mfrSerializedData_t * | data, | ||
mfrEncryptFunction_t | crypto | ||
) |
Retrieve Serialized Read-Only data from device. The serialized data is returned as a byte stream. It is upto the application to deserialize and make sense of the data returned. Please note that even if the serialized data returned is "string", the buffer is not required to contain the null-terminator.
The 'crypto' parameter, if not null, the implementation should used the given crypto function to encrypt the data befure returning.
[in] | type | specifies the serialized data to read. |
[in] | data | contains information about the returned data (buffer location, length, and func to free the buffer). |
[in] | crypto | crypto used to protect data across MFR interface. |
mfrError_t mfrSetSerializedData | ( | mfrSerializedType_t | type, |
mfrSerializedData_t * | data, | ||
mfrDecryptFunction_t | crypto | ||
) |
Write Serialized data to device. The serialized data written as a byte stream. The 'crypto' parameter, if not null, the implementation should used the given crypto function to decrypt the data before setting the serialize data.
[in] | type | specifies the serialized data to written. |
[in] | data | contains information about the data to be written (buffer location, length, free function to be called to free buffer). |
[in] | crypto | crypto used to protect data across MFR interface. |
mfrError_t mfrWriteImage | ( | const char * | name, |
const char * | path, | ||
mfrImageType_t | type, | ||
mfrUpgradeStatusNotify_t | notify | ||
) |
Validate and Write the image into flash. The process should follow these major steps: 1) Validate headers, manufacturer, model. 2) Perform Signature check. 3) Flash the image. 4) Perform CRC on flashed nvram. 5) Update boot params and switch banks to prepare for a reboot event. 6) All upgrades should be done in the alternate bank. The current bank should not be disturbed at any cost. i.e. a second upgrade will before a reboot will overwrite the non-current bank only.
State Transition: 0) Before the API is invoked, the Upgrade process should be in PROGRESS_NOT_STARTED state. 1) After the API returnes with success, the Upgrade process moves to PROGRESS_STARTED state. 2) After the API returnew with error, the Upgrade process stays in PROGRESS_NO_STARTED state. Notify function will not be invoked. 3) The notify function is called at regular interval with proress = PROGRESS_STARTED. 4) The last invocation of notify function should have either progress = PROGRESS_COMPLETED or progress = PROGRESS_ABORTED with error code set.
Application can either rely on the 'notify' callback to monitor image write progress, or use the mfrGetImageWriteProgress()
[in] | name | the path of the image file in the STB file system. |
[in] | path | the filename of the image file. |
[in] | type | the type (e.g. format, signature type) of the image. This can dictate the handling of the image within the MFR library. |
[in] | callback | function to provide status of the image flashing process. |
State Transition: 0) Before the API is invoked, the Upgrade process should be in PROGRESS_NOT_STARTED state. 1) After the API returnes with success, the Upgrade process moves to PROGRESS_STARTED state. 2) After the API returnew with error, the Upgrade process stays in PROGRESS_NO_STARTED state. Notify function will not be invoked. 3) The notify function is called at regular interval with proress = PROGRESS_STARTED. 4) The last invocation of notify function should have either progress = PROGRESS_COMPLETED or progress = PROGRESS_ABORTED with error code set.
[in] | name | the path of the image file in the STB file system. |
[in] | path | the filename of the image file. |
[in] | type | the type (e.g. format, signature type) of the image. This can dictate the handling of the image within the MFR library. |
[in] | callback | function to provide status of the image flashing process. |
mfrError_t mfrSetImageWriteProgress | ( | const char * | imageName, |
mfrImageType_t | imageType, | ||
mfrUpgradeProgress_t | progress | ||
) |
mfrError_t mfrGetImageWriteProgress | ( | const char * | imageName, |
mfrImageType_t | imageType, | ||
mfrUpgradeProgress_t * | progress | ||
) |
Retrieves the last/latest progress of image upgrade If the upgrade is in not progress, the progress returned should be same as the final value returned by the 'notify' function in mfrWriteImage(), or as the value set by the last invocation of mfrSetImageWriteProgress.
If the upgrade is in progress, the progress returned should be the latest status when the function is called.
mfrError_t mfrDeletePDRI | ( | void | ) |
mfrError_t mfrScrubAllBanks | ( | void | ) |
mfrError_t mfrReboot | ( | const char * | imageName | ) |
mfrError_t mfrSetCableCardType | ( | mfrCableCardType_t | type | ) |
mfrError_t mfrSetHostFirmwareInfo | ( | const mfrHostFirmwareInfo_t * | firmwareInfo | ) |
mfrError_t mfrGetBootImageName | ( | int | bootInstance, |
char * | bootImageName, | ||
int * | len, | ||
mfrImageType_t | bootImageType | ||
) |
Retrieve the image name used by box when booting up. (I.e. current active image)
[in] | bootInstance | which bootup instance |
[out] | bootImageName | buffer to hold the image name |
[in] | len | : size of the output buffer |
mfrError_t mfrGetPathConfiguration | ( | mfrConfigPathType_t | type, |
char * | path, | ||
int * | len | ||
) |
mfrError_t mfrGetDFAST2Data | ( | mfrDFAST2Params_t * | params | ) |
IARM_Result_t MFRLib_Start | ( | void | ) |
Starts the MFR lib.
This function registers and connects MFR Manager to the iarm bus. Register Events that this module publishes and register APIs that can be RPCs by other entities on the bus.
IARM_RESULT_SUCCESS | on success |
IARM_Result_t MFRLib_Stop | ( | void | ) |
IARM_Result_t MFRLib_Loop | ( | ) |
mfrError_t mfrGetTemperature | ( | mfrTemperatureState_t * | state, |
int * | temperatureValue, | ||
int * | wifiTemp | ||
) |
get current temperature of the core
[out] | state | the current state of the core temperature |
[out] | temperatureValue | raw temperature value of the core in degrees Celsius |
mfrError_t mfrSetTempThresholds | ( | int | tempHigh, |
int | tempCritical | ||
) |
Set temperature thresholds which will determine the state returned * from a call to mfrGetTemperature.
[in] | tempHigh | Temperature threshold at which mfrTEMPERATURE_HIGH state will be reported. |
[in] | tempCritical | Temperature threshold at which mfrTEMPERATURE_CRITICAL state will be reported. |
mfrError_t mfrGetTempThresholds | ( | int * | tempHigh, |
int * | tempCritical | ||
) |
Get the temperature thresholds which determine the state returned * from a call to mfrGetTemperature.
[out] | tempHigh | Temperature threshold at which mfrTEMPERATURE_HIGH state will be reported. |
[out] | tempCritical | Temperature threshold at which mfrTEMPERATURE_CRITICAL state will be reported. |
mfrError_t mfrGetSerializedData | ( | mfrSerializedType_t | type, |
mfrSerializedData_t * | data | ||
) |
Retrieve Serialized Read-Only data from device. The serialized data is returned as a byte stream. It is upto the application to deserialize and make sense of the data returned. Please note that even if the serialized data returned is "string", the buffer is not required to contain the null-terminator.
[in] | type | specifies the serialized data to read. |
[in] |
mfrError_t mfrSetBootloaderPattern | ( | mfrBlPattern_t | pattern | ) |
Sets how the frontpanel LED(s) (and TV backlight on applicable devices) behave when running bootloader.
[in] | pattern | : options are defined by enum mfrBlPattern_t. |