[Sound-open-firmware] [PATCH] Removing unneeded XTOS sections from boot_ldr and main fw.
From: Marcin Maka marcin.maka@linux.intel.com
Signed-off-by: Marcin Maka marcin.maka@linux.intel.com --- rimage/elf.c | 10 +++++++--- rimage/manifest.c | 5 +++++ src/arch/xtensa/Makefile.am | 6 ------ 3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/rimage/elf.c b/rimage/elf.c index 6c7e3da..4efed7a 100644 --- a/rimage/elf.c +++ b/rimage/elf.c @@ -77,9 +77,12 @@ static int elf_read_sections(struct image *image, struct module *module) /* find manifest module data */ man_section_idx = elf_find_section(image, module, ".bss"); if (man_section_idx < 0) { - return -EINVAL; + /* no bss - it is OK for boot_ldr */ + module->bss_start = 0; + module->bss_end = 0; + } else { + module->bss_index = man_section_idx; } - module->bss_index = man_section_idx;
fprintf(stdout, " BSS module metadata section at index %d\n", man_section_idx); @@ -325,7 +328,8 @@ static void elf_module_limits(struct image *image, struct module *module) uint32_t valid = (SHF_WRITE | SHF_ALLOC | SHF_EXECINSTR); int i;
- module->text_start = module->data_start = module->bss_start = 0xffffffff; + module->text_start = module->data_start = 0xffffffff; + module->bss_start = 0; module->text_end = module->data_end = module->bss_end = 0;
fprintf(stdout, " Found %d sections, listing valid sections......\n", diff --git a/rimage/manifest.c b/rimage/manifest.c index 6bb4ad3..257aa0d 100644 --- a/rimage/manifest.c +++ b/rimage/manifest.c @@ -400,6 +400,11 @@ static int man_module_create(struct image *image, struct module *module, if ((module->bss_end - module->bss_start) % MAN_PAGE_SIZE) pages += 1; man_module->segment[SOF_MAN_SEGMENT_BSS].flags.r.length = pages; + if (pages == 0) { + man_module->segment[SOF_MAN_SEGMENT_BSS].flags.ul = 0; + man_module->segment[SOF_MAN_SEGMENT_BSS].flags.r.type = + SOF_MAN_SEGMENT_EMPTY; + }
fprintf(stdout, "\tNo\tAddress\t\tSize\t\tFile\tType\n");
diff --git a/src/arch/xtensa/Makefile.am b/src/arch/xtensa/Makefile.am index 9f53e88..eafde0d 100644 --- a/src/arch/xtensa/Makefile.am +++ b/src/arch/xtensa/Makefile.am @@ -61,7 +61,6 @@ sof_LDADD = \ ../../audio/libaudio.a \ ../../math/libsof_math.a \ ../../drivers/libdrivers.a \ - libreset.a \ xtos/libxtos.a \ xtos/libxlevel2.a \ xtos/libxlevel3.a \ @@ -111,11 +110,6 @@ boot_ldr_CCASFLAGS = \ boot_ldr_LDADD = \ hal/libhal.a \ libreset.a \ - xtos/libxtos.a \ - xtos/libxlevel2.a \ - xtos/libxlevel3.a \ - xtos/libxlevel4.a \ - xtos/libxlevel5.a \ -lgcc
boot_ldr_LDFLAGS = \
From: Marcin Maka marcin.maka@linux.intel.com
A non-platform define may be easily shared by other platforms without adding || define(CONFIG_...) in the arch code.
Signed-off-by: Marcin Maka marcin.maka@linux.intel.com --- src/arch/xtensa/include/arch/wait.h | 2 +- src/platform/cannonlake/include/platform/platform.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/arch/xtensa/include/arch/wait.h b/src/arch/xtensa/include/arch/wait.h index 2f6e4f5..e1cca01 100644 --- a/src/arch/xtensa/include/arch/wait.h +++ b/src/arch/xtensa/include/arch/wait.h @@ -30,7 +30,7 @@
#include <xtensa/xtruntime.h>
-#if defined(CONFIG_CANNONLAKE) +#if defined(PLATFORM_WAITI_DELAY)
static inline void arch_wait_for_interrupt(int level) { diff --git a/src/platform/cannonlake/include/platform/platform.h b/src/platform/cannonlake/include/platform/platform.h index c5bf42a..5853614 100644 --- a/src/platform/cannonlake/include/platform/platform.h +++ b/src/platform/cannonlake/include/platform/platform.h @@ -39,6 +39,8 @@
struct sof;
+#define PLATFORM_WAITI_DELAY 1 + #define PLATFORM_SSP_COUNT 3 #define MAX_GPDMA_COUNT 2
On Tue, 2018-05-22 at 17:07 +0100, Liam Girdwood wrote:
From: Marcin Maka marcin.maka@linux.intel.com
Signed-off-by: Marcin Maka marcin.maka@linux.intel.com
Both applied. This one needed a little manual merging to apply.
Thanks
Liam
participants (1)
-
Liam Girdwood