Skip to content

Commit

Permalink
Include window info in data section when building binaries.
Browse files Browse the repository at this point in the history
Include window info in data section when building binaries for
AMD platforms ACP_6_3 and ACP_7_0.

Signed-off-by: SaiSurya Ch <[email protected]>
  • Loading branch information
saisurya-ch committed Dec 4, 2024
1 parent d9bef48 commit 237dcf0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/arch/xtensa/configs/acp_6_3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ CONFIG_COMP_TDFB=n
#CONFIG_COMP_MUX=n
CONFIG_COMP_SEL=n
CONFIG_COMP_MIXER=n
CONFIG_BINARY_BUILD=n
1 change: 1 addition & 0 deletions src/arch/xtensa/configs/acp_7_0_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ CONFIG_COMP_TDFB=n
#CONFIG_COMP_MUX=n
CONFIG_COMP_SEL=n
CONFIG_COMP_MIXER=n
CONFIG_BINARY_BUILD=n
7 changes: 7 additions & 0 deletions src/platform/amd/acp_6_3/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ static const struct sof_ipc_fw_ready ready
#define NUM_ACP_WINDOWS 6

const struct ext_man_windows xsram_window
#ifdef CONFIG_BINARY_BUILD
__aligned(EXT_MAN_ALIGN) __unused = {
#else
__aligned(EXT_MAN_ALIGN) __section(".fw_metadata") __unused = {
#endif
.hdr = {
.type = EXT_MAN_ELEM_WINDOW,
.elem_size = ALIGN_UP_COMPILE(sizeof(struct ext_man_windows), EXT_MAN_ALIGN),
Expand Down Expand Up @@ -189,6 +193,9 @@ int platform_boot_complete(uint32_t boot_message)
volatile acp_scratch_mem_config_t *pscratch_mem_cfg =
(volatile acp_scratch_mem_config_t *)(PU_SCRATCH_REG_BASE + SCRATCH_REG_OFFSET);
mailbox_dspbox_write(0, &ready, sizeof(ready));
#ifdef CONFIG_BINARY_BUILD
mailbox_dspbox_write(sizeof(ready), &xsram_window.window, sizeof(xsram_window.window));
#endif
pscratch_mem_cfg->acp_dsp_msg_write = 1;
acp_dsp_to_host_intr_trig();
/* Configures the trigger bit in ACP_DSP_SW_INTR_TRIG register */
Expand Down
7 changes: 7 additions & 0 deletions src/platform/amd/acp_7_0/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ static const struct sof_ipc_fw_ready ready
#define NUM_ACP_WINDOWS 6

const struct ext_man_windows xsram_window
#ifdef CONFIG_BINARY_BUILD
__aligned(EXT_MAN_ALIGN) __unused = {
#else
__aligned(EXT_MAN_ALIGN) __section(".fw_metadata") __unused = {
#endif
.hdr = {
.type = EXT_MAN_ELEM_WINDOW,
.elem_size = ALIGN_UP_COMPILE(sizeof(struct ext_man_windows), EXT_MAN_ALIGN),
Expand Down Expand Up @@ -188,6 +192,9 @@ int platform_boot_complete(uint32_t boot_message)
volatile acp_scratch_mem_config_t *pscratch_mem_cfg =
(volatile acp_scratch_mem_config_t *)(PU_SCRATCH_REG_BASE + SCRATCH_REG_OFFSET);
mailbox_dspbox_write(0, &ready, sizeof(ready));
#ifdef CONFIG_BINARY_BUILD
mailbox_dspbox_write(sizeof(ready), &xsram_window.window, sizeof(xsram_window.window));
#endif
pscratch_mem_cfg->acp_dsp_msg_write = 1;
acp_dsp_to_host_intr_trig();
/* Configures the trigger bit in ACP_DSP_SW_INTR_TRIG register */
Expand Down

0 comments on commit 237dcf0

Please sign in to comment.