Загрузка данных



#define LMM_TRIGGER_PARM_LM_SHUTDOWN    0x00000000U  /*!< LM shutdown event */
#define LMM_TRIGGER_PARM_LM_COLD_RESET  0x00000001U  /*!< LM cold reset event */
#define LMM_TRIGGER_PARM_LM_WARM_RESET  0x00000002U  /*!< LM warm reset event */
#define LMM_TRIGGER_PARM_LM_BOOT        0x00000003U  /*!< LM boot event */
#define LMM_TRIGGER_PARM_LM_SUSPEND     0x00000004U  /*!< LM suspend (sleep) event */
#define LMM_TRIGGER_PARM_LM_WAKE        0x80000000U  /*!< LM wake (resume) event */
#define LMM_TRIGGER_PARM_SHUTDOWN       0x80000001U  /*!< LM full shutdown event */
#define LMM_TRIGGER_PARM_RESET          0x80000002U  /*!< LM full reset event */
#define LMM_TRIGGER_PARM_SUSPEND        0x80000003U  /*!< LM full suspend (sleep) event */
#define LMM_TRIGGER_PARM_WAKE           0x80000004U  /*!< LM full wake (resume) event */

#define LMM_STATE_LM_OFF      0x0U  /*!< LM off (shutdown) */
#define LMM_STATE_LM_ON       0x1U  /*!< LM on (booted/running) */
#define LMM_STATE_LM_SUSPEND  0x2U  /*!< LM suspended (asleep) */
#define LMM_STATE_LM_POWERED  0x3U  /*!< LM powered (not running) */

#define LMM_REACT_SYS_RESET     0U  /*!< System reset */
#define LMM_REACT_SYS_SHUTDOWN  1U  /*!< System shutdown */
#define LMM_REACT_GRP_RESET     2U  /*!< Group reset */
#define LMM_REACT_GRP_SHUTDOWN  3U  /*!< Group shutdown */
#define LMM_REACT_LM_RESET      4U  /*!< LM reset */
#define LMM_REACT_LM_SHUTDOWN   5U  /*!< LM shutdown */
#define LMM_REACT_BOARD         6U  /*!< Custom board handling */
#define LMM_REACT_FUSA          7U  /*!< FuSa notifications only */
#define LMM_REACT_NONE          8U  /*!< No reaction */

typedef dev_sm_rst_rec_t lmm_rst_rec_t;

extern const lmm_rst_rec_t g_swReason;

int32_t LMM_SystemInit(void);

int32_t LMM_SystemModeSelSet(uint32_t mSel);

int32_t LMM_SystemReasonNameGet(uint32_t lmId, uint32_t resetReason,
    string *reasonNameAddr, int32_t *len);

int32_t LMM_SystemRstComp(const lmm_rst_rec_t *resetRec);

int32_t LMM_SystemShutdown(uint32_t lmId, uint32_t agentId,
    bool graceful, const lmm_rst_rec_t *shutdownRec);

int32_t LMM_SystemReset(uint32_t lmId, uint32_t agentId, bool graceful,
    const lmm_rst_rec_t *resetRec);

int32_t LMM_SystemSuspend(uint32_t lmId, uint32_t agentId);

int32_t LMM_SystemWake(uint32_t lmId, uint32_t agentId);

void LM_SystemReason(uint32_t lmId, lmm_rst_rec_t *bootRec,
    lmm_rst_rec_t *shutdownRec);

int32_t LMM_SystemSleepModeSet(uint32_t lmId, uint32_t sleepMode,
    uint32_t sleepFlags);

int32_t LMM_SystemGrpBoot(uint32_t lmId, uint32_t agentId,
    const lmm_rst_rec_t *bootRec, uint8_t group);

int32_t LMM_SystemGrpShutdown(uint32_t lmId, uint32_t agentId,
    bool graceful, const lmm_rst_rec_t *shutdownRec, uint8_t group,
    bool *noReturn);

int32_t LMM_SystemGrpReset(uint32_t lmId, uint32_t agentId,
    bool graceful, const lmm_rst_rec_t *resetRec, uint8_t group,
    bool *noReturn);

int32_t LM_SystemLmStatus(uint32_t lmId, uint32_t stateLm, uint32_t *state,
    int32_t *errStatus);

int32_t LMM_SystemLmCheck(uint32_t bootLm);

bool LM_CpuCheck(uint32_t lmId, uint32_t cpuId);

int32_t LMM_SystemLmPowerOn(uint32_t lmId, uint32_t agentId, uint32_t pwrLm);

int32_t LMM_SystemLmBoot(uint32_t lmId, uint32_t agentId, uint32_t bootLm,
    const lmm_rst_rec_t *bootRec);

int32_t LMM_SystemLmShutdown(uint32_t lmId, uint32_t agentId,
    uint32_t shutdownLm, bool graceful, const lmm_rst_rec_t *shutdownRec);

int32_t LMM_SystemLmReset(uint32_t lmId, uint32_t agentId, uint32_t resetLm,
    bool warm, bool graceful, const lmm_rst_rec_t *resetRec);

int32_t LMM_SystemLmSuspend(uint32_t lmId, uint32_t agentId,
    uint32_t suspendLm);

int32_t LMM_SystemLmWake(uint32_t lmId, uint32_t agentId, uint32_t wakeLm);

int32_t LM_SystemLmReason(uint32_t lmId, uint32_t reasonLm,
    lmm_rst_rec_t *bootRec, lmm_rst_rec_t *shutdownRec);


void LMM_SystemCpuModeChanged(uint32_t cpuId);