mirror of https://github.com/thesofproject/sof.git
platform: cavs: add config item for IMR restore feature
Add kconfig item CAVS_IMR_D3_PERSISTENT to denote if IMR restore feature will be used on an Intel cAVS platform. It will be disabled by default, please only enable it where IMR content is persistent when DSP in D3, as enabling it means we don't need to re-downloading firmware binary to DSP SRAM so fast D3->D0 transition will be supported. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This commit is contained in:
parent
292395a503
commit
b7a469e884
|
@ -35,8 +35,7 @@
|
|||
SOF_IPC_INFO_BUILD | \
|
||||
(IS_ENABLED(CONFIG_DEBUG_LOCKS) ? SOF_IPC_INFO_LOCKS : 0) | \
|
||||
(IS_ENABLED(CONFIG_DEBUG_LOCKS_VERBOSE) ? SOF_IPC_INFO_LOCKSV : 0) | \
|
||||
(IS_ENABLED(CONFIG_GDB_DEBUG) ? SOF_IPC_INFO_GDB : 0) | \
|
||||
(IS_ENABLED(CONFIG_CAVS) ? SOF_IPC_INFO_D3_PERSISTENT : 0) \
|
||||
(IS_ENABLED(CONFIG_GDB_DEBUG) ? SOF_IPC_INFO_GDB : 0) \
|
||||
)
|
||||
|
||||
/* dump file and line to start of mailbox or shared memory */
|
||||
|
@ -127,8 +126,7 @@
|
|||
( \
|
||||
(IS_ENABLED(CONFIG_DEBUG_LOCKS) ? SOF_IPC_INFO_LOCKS : 0) | \
|
||||
(IS_ENABLED(CONFIG_DEBUG_LOCKS_VERBOSE) ? SOF_IPC_INFO_LOCKSV : 0) | \
|
||||
(IS_ENABLED(CONFIG_GDB_DEBUG) ? SOF_IPC_INFO_GDB : 0) | \
|
||||
(IS_ENABLED(CONFIG_CAVS) ? SOF_IPC_INFO_D3_PERSISTENT : 0) \
|
||||
(IS_ENABLED(CONFIG_GDB_DEBUG) ? SOF_IPC_INFO_GDB : 0) \
|
||||
)
|
||||
|
||||
#define dbg() do {} while (0)
|
||||
|
|
|
@ -431,6 +431,18 @@ config CAVS_USE_LPRO_IN_WAITI
|
|||
After waiti exit clock source will be restored.
|
||||
Choose n if unclear.
|
||||
|
||||
config CAVS_IMR_D3_PERSISTENT
|
||||
bool "Intel IMR content persistent on DSP in D3"
|
||||
depends on CAVS
|
||||
default n
|
||||
help
|
||||
Select this if the Intel cAVS platform can keep the
|
||||
IMR (Isolated Memory Region) content persistent when
|
||||
the DSP is in power off (D3) mode, which means we
|
||||
don't need to re-downloading firmware binary to DSP
|
||||
SRAM so fast D3->D0 transition can be supported.
|
||||
Choose n if unclear.
|
||||
|
||||
# TODO: it should just take manifest version and offsets
|
||||
config RIMAGE_SIGNING_SCHEMA
|
||||
string "Rimage firmware signing schema name"
|
||||
|
|
|
@ -74,7 +74,11 @@ static const struct sof_ipc_fw_ready ready
|
|||
.abi_version = SOF_ABI_VERSION,
|
||||
.src_hash = SOF_SRC_HASH,
|
||||
},
|
||||
#if CONFIG_CAVS_IMR_D3_PERSISTENT
|
||||
.flags = DEBUG_SET_FW_READY_FLAGS | SOF_IPC_INFO_D3_PERSISTENT,
|
||||
#else
|
||||
.flags = DEBUG_SET_FW_READY_FLAGS,
|
||||
#endif
|
||||
};
|
||||
|
||||
#if CONFIG_MEM_WND
|
||||
|
@ -549,6 +553,7 @@ void platform_wait_for_interrupt(int level)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_CAVS_IMR_D3_PERSISTENT
|
||||
/* These structs and macros are from from the ROM code header
|
||||
* on cAVS platforms, please keep them immutable
|
||||
*/
|
||||
|
@ -594,10 +599,19 @@ static void imr_layout_update(void *vector)
|
|||
imr_layout->imr_state.header.imr_restore_vector = vector;
|
||||
dcache_writeback_region(imr_layout, sizeof(*imr_layout));
|
||||
}
|
||||
#endif
|
||||
|
||||
int platform_context_save(struct sof *sof)
|
||||
{
|
||||
#if CONFIG_CAVS_IMR_D3_PERSISTENT
|
||||
/*
|
||||
* Both runtime PM and S2Idle suspend works on APL, while S3 ([deep])
|
||||
* doesn't. Only support IMR restoring on cAVS 1.8 and onward at the
|
||||
* moment.
|
||||
* TODO: Root cause of why IMR restore doesn't work on APL during S3
|
||||
* cycle.
|
||||
*/
|
||||
imr_layout_update((void *)IMR_BOOT_LDR_TEXT_ENTRY_BASE);
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue