forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
soc: intel_adsp: cavs: add simple IMR functionality
Add simple mechanism to load the image from IMR memory. Basically we are only setting a flag in power off for the next boot to jump to existing image in IMR. Signed-off-by: Jaska Uimonen <[email protected]>
1 parent
a13157f
commit a8b28f1
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
soc/xtensa/intel_adsp/cavs/include/intel_tgl_adsp/adsp_imr_layout.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* Copyright (c) 2023 Intel Corporation | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
#ifndef ZEPHYR_SOC_INTEL_ADSP_TGL_IMR_LAYOUT_H_ | ||
#define ZEPHYR_SOC_INTEL_ADSP_TGL_IMR_LAYOUT_H_ | ||
|
||
/* These structs and macros are from the ROM code header | ||
* on cAVS platforms, please keep them immutable. | ||
* | ||
* The ROM structs and code is lifted from: | ||
* https://github.com/thesofproject/sof | ||
* 6c0db22c65 - platform: cavs: configure resume from IMR | ||
*/ | ||
|
||
/* | ||
* A magic that tells ROM to jump to imr_restore_vector instead of normal boot | ||
*/ | ||
#define ADSP_IMR_MAGIC_VALUE 0x02468ACE | ||
|
||
struct imr_header { | ||
uint32_t adsp_imr_magic; | ||
uint32_t structure_version; | ||
uint32_t structure_size; | ||
uint32_t imr_state; | ||
uint32_t imr_size; | ||
void (*imr_restore_vector)(void); | ||
}; | ||
|
||
struct imr_state { | ||
struct imr_header header; | ||
uint8_t reserved[0x1000 - sizeof(struct imr_header)]; | ||
}; | ||
|
||
struct imr_layout { | ||
uint8_t css_reserved[0x1000]; | ||
struct imr_state imr_state; | ||
}; | ||
|
||
#endif /* ZEPHYR_SOC_INTEL_ADSP_TGL_IMR_LAYOUT_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters