|
#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) |
|
|
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 |
|
|
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) |
|