Switchtec Userspace  PROJECT_NUMBER = PROJECT_NUMBER=PROJECT_NUMBER = 2.2
Functions
mfg.c File Reference

Switchtec core library functions for mfg operations. More...

#include "switchtec_priv.h"
#include "switchtec/switchtec.h"
#include "switchtec/mfg.h"
#include "switchtec/errors.h"
#include "switchtec/endian.h"
#include "switchtec/mrpc.h"
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include "lib/crc.h"
#include "config.h"
Include dependency graph for mfg.c:

Go to the source code of this file.

Functions

int switchtec_sn_ver_get (struct switchtec_dev *dev, struct switchtec_sn_ver_info *info)
 Get serial number and security version. More...
 
int switchtec_security_config_get (struct switchtec_dev *dev, struct switchtec_security_cfg_state *state)
 Get secure boot configurations. More...
 
int switchtec_mailbox_to_file (struct switchtec_dev *dev, int fd)
 Retrieve mailbox entries. More...
 
int switchtec_security_config_set (struct switchtec_dev *dev, struct switchtec_security_cfg_set *setting)
 Set secure settings. More...
 
int switchtec_active_image_index_get (struct switchtec_dev *dev, struct switchtec_active_index *index)
 Get active image index. More...
 
int switchtec_active_image_index_set (struct switchtec_dev *dev, struct switchtec_active_index *index)
 Set active image index. More...
 
int switchtec_fw_exec (struct switchtec_dev *dev, enum switchtec_bl2_recovery_mode recovery_mode)
 Execute the transferred firmware. More...
 
int switchtec_boot_resume (struct switchtec_dev *dev)
 Resume device boot. Note that after calling this function, the current 'dev' pointer is no longer valid. Before making further calls to switchtec library functions, be sure to close this pointer and get a new one by calling switchtec_open(). Also be sure to check the return value of switchtec_open() for error, as the device might not be immediately accessible after normal boot process. More...
 
int switchtec_secure_state_set (struct switchtec_dev *dev, enum switchtec_secure_state state)
 Set device secure state. More...
 
int switchtec_dbg_unlock (struct switchtec_dev *dev, uint32_t serial, uint32_t ver_sec_unlock, struct switchtec_pubkey *public_key, struct switchtec_signature *signature)
 Unlock firmware debug features. More...
 
int switchtec_dbg_unlock_version_update (struct switchtec_dev *dev, uint32_t serial, uint32_t ver_sec_unlock, struct switchtec_pubkey *public_key, struct switchtec_signature *signature)
 Update firmware debug secure unlock version number. More...
 
int switchtec_read_sec_cfg_file (FILE *setting_file, struct switchtec_security_cfg_set *set)
 Read security settings from config file. More...
 
int switchtec_kmsk_set (struct switchtec_dev *dev, struct switchtec_pubkey *public_key, struct switchtec_signature *signature, struct switchtec_kmsk *kmsk)
 Set KMSK entry KMSK stands for Key Manifest Secure Key. It is a key used to verify Key Manifest partition, which contains keys to verify all other partitions. More...
 
int switchtec_read_kmsk_file (FILE *kmsk_file, struct switchtec_kmsk *kmsk)
 Read KMSK data from KMSK file. More...
 
int switchtec_read_signature_file (FILE *sig_file, struct switchtec_signature *signature)
 Read signature data from signature file. More...
 
int switchtec_security_state_has_kmsk (struct switchtec_security_cfg_state *state, struct switchtec_kmsk *kmsk)
 Check if secure config already has a KMSK entry KMSK stands for Key Manifest Secure Key. It is a key used to verify Key Manifest partition, which contains keys used to verify all other partitions. More...
 

Detailed Description

Switchtec core library functions for mfg operations.

Definition in file mfg.c.