mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'feat/support_rv_fp_retention_v5.5' into 'release/v5.5'
feat(esp_hw_support): support rv fp retention (v5.5) See merge request espressif/esp-idf!46522
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* SPDX-FileContributor: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileContributor: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
@@ -758,6 +758,21 @@ extern volatile UBaseType_t xPortSwitchFlag[portNUM_PROCESSORS];
|
||||
#define os_task_switch_is_pended(_cpu_) (false)
|
||||
#endif
|
||||
|
||||
// -------------- FPU softerware retention ------------------
|
||||
#if (SOC_CPU_COPROC_NUM > 0) && SOC_CPU_HAS_FPU && SOC_PM_FPU_RETENTION_BY_SW
|
||||
/**
|
||||
* @brief Whether the FPU context is dirty on the given core.
|
||||
*
|
||||
* Returns non-zero if any task has used the FPU, such context should be
|
||||
* saved during sleep retention.
|
||||
*
|
||||
* @param core_id Core id
|
||||
* @return pdTRUE FPU context is dirty
|
||||
* @return pdFALSE FPU was not used
|
||||
*/
|
||||
BaseType_t xPortFPUContextIsDirty(BaseType_t core_id);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* SPDX-FileContributor: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileContributor: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
@@ -886,3 +886,9 @@ void vPortCoprocUsedInISR(void* frame)
|
||||
/* ---------------------------------------------- Misc Implementations -------------------------------------------------
|
||||
*
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
#if (SOC_CPU_COPROC_NUM > 0) && SOC_CPU_HAS_FPU && SOC_PM_FPU_RETENTION_BY_SW
|
||||
BaseType_t xPortFPUContextIsDirty(BaseType_t core_id)
|
||||
{
|
||||
return (BaseType_t)(port_uxCoprocOwner[core_id][FPU_COPROC_IDX] != NULL);
|
||||
}
|
||||
#endif /* (SOC_CPU_COPROC_NUM > 0) && SOC_CPU_HAS_FPU && SOC_PM_FPU_RETENTION_BY_SW */
|
||||
|
||||
@@ -374,3 +374,5 @@ entries:
|
||||
port:xPortInterruptedFromISRContext (default)
|
||||
port:vPortYieldFromISR (default)
|
||||
port:vPortYieldOtherCore (default)
|
||||
if (SOC_CPU_COPROC_NUM > 0) && SOC_CPU_HAS_FPU && SOC_PM_FPU_RETENTION_BY_SW:
|
||||
port:xPortFPUContextIsDirty (noflash_text)
|
||||
|
||||
Reference in New Issue
Block a user