mailman.alsa-project.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Sound-open-firmware

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
sound-open-firmware@alsa-project.org

  • 4 participants
  • 1568 discussions
[Sound-open-firmware] [PATCH] ipc: page tables; Make page table API generic for use outside IPC core
by Liam Girdwood 12 Apr '18

12 Apr '18
Allow users outside of IPC to make use of compressed host page tables. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/include/sof/intel-ipc.h | 1 - src/include/sof/ipc.h | 8 +++ src/ipc/handler.c | 143 +++----------------------------------------- src/ipc/ipc.c | 129 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 146 insertions(+), 135 deletions(-) diff --git a/src/include/sof/intel-ipc.h b/src/include/sof/intel-ipc.h index f89e9b57..a59c106f 100644 --- a/src/include/sof/intel-ipc.h +++ b/src/include/sof/intel-ipc.h @@ -38,7 +38,6 @@ struct intel_ipc_data { /* DMA */ struct dma *dmac; uint8_t *page_table; - completion_t complete; /* PM */ int pm_prepare_D3; /* do we need to prepare for D3 */ diff --git a/src/include/sof/ipc.h b/src/include/sof/ipc.h index 2e1818df..06425b34 100644 --- a/src/include/sof/ipc.h +++ b/src/include/sof/ipc.h @@ -134,6 +134,14 @@ int ipc_send_short_msg(uint32_t msg); void ipc_platform_do_cmd(struct ipc *ipc); void ipc_platform_send_msg(struct ipc *ipc); +/* create a SG page table eme list from a compressed page table */ +int ipc_parse_page_descriptors(uint8_t *page_table, + struct sof_ipc_host_buffer *ring, + struct list_item *elem_list, + uint32_t direction); +int ipc_get_page_descriptors(struct dma *dmac, uint8_t *page_table, + struct sof_ipc_host_buffer *ring); + /* * IPC Component creation and destruction. */ diff --git a/src/ipc/handler.c b/src/ipc/handler.c index 6a51765b..581ce9e7 100644 --- a/src/ipc/handler.c +++ b/src/ipc/handler.c @@ -83,134 +83,6 @@ static inline struct sof_ipc_hdr *mailbox_validate(void) return hdr; } -#ifdef CONFIG_HOST_PTABLE -static void dma_complete(void *data, uint32_t type, struct dma_sg_elem *next) -{ - struct intel_ipc_data *iipc = (struct intel_ipc_data *)data; - - if (type == DMA_IRQ_TYPE_LLIST) - wait_completed(&iipc->complete); -} - -/* - * Copy the audio buffer page tables from the host to the DSP max of 4K. - */ -static int get_page_descriptors(struct intel_ipc_data *iipc, - struct sof_ipc_host_buffer *ring) -{ - struct dma_sg_config config; - struct dma_sg_elem elem; - struct dma *dma; - int chan; - int ret = 0; - - /* get DMA channel from DMAC */ - chan = dma_channel_get(iipc->dmac, 0); - if (chan < 0) { - trace_ipc_error("ePC"); - return chan; - } - dma = iipc->dmac; - - /* set up DMA configuration */ - config.direction = DMA_DIR_HMEM_TO_LMEM; - config.src_width = sizeof(uint32_t); - config.dest_width = sizeof(uint32_t); - config.cyclic = 0; - list_init(&config.elem_list); - - /* set up DMA descriptor */ - elem.dest = (uint32_t)iipc->page_table; - elem.src = ring->phy_addr; - - /* source buffer size is always PAGE_SIZE bytes */ - /* 20 bits for each page, round up to 32 */ - elem.size = (ring->pages * 5 * 16 + 31) / 32; - list_item_prepend(&elem.list, &config.elem_list); - - ret = dma_set_config(dma, chan, &config); - if (ret < 0) { - trace_ipc_error("ePs"); - goto out; - } - - /* set up callback */ - dma_set_cb(dma, chan, DMA_IRQ_TYPE_LLIST, dma_complete, iipc); - - wait_init(&iipc->complete); - - /* start the copy of page table to DSP */ - dma_start(dma, chan); - - /* wait for DMA to complete */ - iipc->complete.timeout = PLATFORM_HOST_DMA_TIMEOUT; - ret = wait_for_completion_timeout(&iipc->complete); - - /* compressed page tables now in buffer at _ipc->page_table */ -out: - dma_channel_put(dma, chan); - return ret; -} - -/* - * Parse the host page tables and create the audio DMA SG configuration - * for host audio DMA buffer. This involves creating a dma_sg_elem for each - * page table entry and adding each elem to a list in struct dma_sg_config. - */ -static int parse_page_descriptors(struct intel_ipc_data *iipc, - struct sof_ipc_host_buffer *ring, struct list_item *elem_list, - uint32_t direction) -{ - int i; - uint32_t idx; - uint32_t phy_addr; - struct dma_sg_elem *e; - - /* the ring size may be not multiple of the page size, the last - * page may be not full used. The used size should be in range - * of (ring->pages - 1, ring->pages] * PAGES. - */ - if ((ring->size <= HOST_PAGE_SIZE * (ring->pages - 1)) || - (ring->size > HOST_PAGE_SIZE * ring->pages)) { - /* error buffer size */ - trace_ipc_error("eBs"); - return -EINVAL; - } - - for (i = 0; i < ring->pages; i++) { - idx = (((i << 2) + i)) >> 1; - phy_addr = iipc->page_table[idx] | (iipc->page_table[idx + 1] << 8) - | (iipc->page_table[idx + 2] << 16); - - if (i & 0x1) - phy_addr <<= 8; - else - phy_addr <<= 12; - phy_addr &= 0xfffff000; - - /* allocate new host DMA elem and add it to our list */ - e = rzalloc(RZONE_RUNTIME, SOF_MEM_CAPS_RAM, sizeof(*e)); - if (!e) - return -ENOMEM; - - if (direction == SOF_IPC_STREAM_PLAYBACK) - e->src = phy_addr; - else - e->dest = phy_addr; - - /* the last page may be not full used */ - if (i == (ring->pages - 1)) - e->size = ring->size - HOST_PAGE_SIZE * i; - else - e->size = HOST_PAGE_SIZE; - - list_item_append(&e->list, elem_list); - } - - return 0; -} -#endif - /* * Stream IPC Operations. */ @@ -258,7 +130,8 @@ static int ipc_stream_pcm_params(uint32_t stream) list_init(&elem_list); /* use DMA to read in compressed page table ringbuffer from host */ - err = get_page_descriptors(iipc, &pcm_params->params.buffer); + err = ipc_get_page_descriptors(iipc->dmac, iipc->page_table, + &pcm_params->params.buffer); if (err < 0) { trace_ipc_error("eAp"); goto error; @@ -268,8 +141,9 @@ static int ipc_stream_pcm_params(uint32_t stream) host = (struct sof_ipc_comp_host *)&cd->comp; ring_size = pcm_params->params.buffer.size; - err = parse_page_descriptors(iipc, &pcm_params->params.buffer, - &elem_list, host->direction); + err = ipc_parse_page_descriptors(iipc->page_table, + &pcm_params->params.buffer, + &elem_list, host->direction); if (err < 0) { trace_ipc_error("eAP"); goto error; @@ -656,7 +530,8 @@ static int ipc_dma_trace_config(uint32_t header) list_init(&elem_list); /* use DMA to read in compressed page table ringbuffer from host */ - err = get_page_descriptors(iipc, &params->buffer); + err = ipc_get_page_descriptors(iipc->dmac, iipc->page_table, + &params->buffer); if (err < 0) { trace_ipc_error("eCp"); goto error; @@ -667,8 +542,8 @@ static int ipc_dma_trace_config(uint32_t header) /* Parse host tables */ ring_size = params->buffer.size; - err = parse_page_descriptors(iipc, &params->buffer, - &elem_list, SOF_IPC_STREAM_CAPTURE); + err = ipc_parse_page_descriptors(iipc->page_table, &params->buffer, + &elem_list, SOF_IPC_STREAM_CAPTURE); if (err < 0) { trace_ipc_error("ePP"); goto error; diff --git a/src/ipc/ipc.c b/src/ipc/ipc.c index ed2cbb8e..fbb1be6c 100644 --- a/src/ipc/ipc.c +++ b/src/ipc/ipc.c @@ -39,6 +39,7 @@ #include <sof/alloc.h> #include <sof/ipc.h> #include <sof/debug.h> +#include <platform/platform.h> #include <sof/audio/component.h> #include <sof/audio/pipeline.h> #include <sof/audio/buffer.h> @@ -366,6 +367,134 @@ int ipc_comp_dai_config(struct ipc *ipc, struct sof_ipc_dai_config *config) return ret; } +#ifdef CONFIG_HOST_PTABLE +/* + * Parse the host page tables and create the audio DMA SG configuration + * for host audio DMA buffer. This involves creating a dma_sg_elem for each + * page table entry and adding each elem to a list in struct dma_sg_config. + */ +int ipc_parse_page_descriptors(uint8_t *page_table, + struct sof_ipc_host_buffer *ring, + struct list_item *elem_list, + uint32_t direction) +{ + int i; + uint32_t idx; + uint32_t phy_addr; + struct dma_sg_elem *e; + + /* the ring size may be not multiple of the page size, the last + * page may be not full used. The used size should be in range + * of (ring->pages - 1, ring->pages] * PAGES. + */ + if ((ring->size <= HOST_PAGE_SIZE * (ring->pages - 1)) || + (ring->size > HOST_PAGE_SIZE * ring->pages)) { + /* error buffer size */ + trace_ipc_error("eBs"); + return -EINVAL; + } + + for (i = 0; i < ring->pages; i++) { + idx = (((i << 2) + i)) >> 1; + phy_addr = page_table[idx] | (page_table[idx + 1] << 8) + | (page_table[idx + 2] << 16); + + if (i & 0x1) + phy_addr <<= 8; + else + phy_addr <<= 12; + phy_addr &= 0xfffff000; + + /* allocate new host DMA elem and add it to our list */ + e = rzalloc(RZONE_RUNTIME, SOF_MEM_CAPS_RAM, sizeof(*e)); + if (!e) + return -ENOMEM; + + if (direction == SOF_IPC_STREAM_PLAYBACK) + e->src = phy_addr; + else + e->dest = phy_addr; + + /* the last page may be not full used */ + if (i == (ring->pages - 1)) + e->size = ring->size - HOST_PAGE_SIZE * i; + else + e->size = HOST_PAGE_SIZE; + + list_item_append(&e->list, elem_list); + } + + return 0; +} + +static void dma_complete(void *data, uint32_t type, struct dma_sg_elem *next) +{ + completion_t *complete = data; + + if (type == DMA_IRQ_TYPE_LLIST) + wait_completed(complete); +} + +/* + * Copy the audio buffer page tables from the host to the DSP max of 4K. + */ +int ipc_get_page_descriptors(struct dma *dmac, uint8_t *page_table, + struct sof_ipc_host_buffer *ring) +{ + struct dma_sg_config config; + struct dma_sg_elem elem; + completion_t complete; + int chan; + int ret = 0; + + /* get DMA channel from DMAC */ + chan = dma_channel_get(dmac, 0); + if (chan < 0) { + trace_ipc_error("ePC"); + return chan; + } + + /* set up DMA configuration */ + config.direction = DMA_DIR_HMEM_TO_LMEM; + config.src_width = sizeof(uint32_t); + config.dest_width = sizeof(uint32_t); + config.cyclic = 0; + list_init(&config.elem_list); + + /* set up DMA descriptor */ + elem.dest = (uint32_t)page_table; + elem.src = ring->phy_addr; + + /* source buffer size is always PAGE_SIZE bytes */ + /* 20 bits for each page, round up to 32 */ + elem.size = (ring->pages * 5 * 16 + 31) / 32; + list_item_prepend(&elem.list, &config.elem_list); + + ret = dma_set_config(dmac, chan, &config); + if (ret < 0) { + trace_ipc_error("ePs"); + goto out; + } + + /* set up callback */ + dma_set_cb(dmac, chan, DMA_IRQ_TYPE_LLIST, dma_complete, &complete); + + wait_init(&complete); + + /* start the copy of page table to DSP */ + dma_start(dmac, chan); + + /* wait for DMA to complete */ + complete.timeout = PLATFORM_HOST_DMA_TIMEOUT; + ret = wait_for_completion_timeout(&complete); + + /* compressed page tables now in buffer at _ipc->page_table */ +out: + dma_channel_put(dmac, chan); + return ret; +} +#endif + int ipc_init(struct sof *sof) { int i; -- 2.14.1
2 1
0 0
[Sound-open-firmware] [PATCH] rimage: fix formatting and alignment of manifest section printf
by Liam Girdwood 12 Apr '18

12 Apr '18
Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- rimage/manifest.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rimage/manifest.c b/rimage/manifest.c index f3f85600..87f80d7c 100644 --- a/rimage/manifest.c +++ b/rimage/manifest.c @@ -163,7 +163,7 @@ static int man_copy_sram(struct image *image, Elf32_Shdr *section, if (end > image->image_end) image->image_end = end; - fprintf(stdout, "\t%d\t0x%x\t0x%x\t0x%x\t%s\n", section_idx, + fprintf(stdout, "\t%d\t0x%x\t0x%x\t\t0x%x\t%s\n", section_idx, section->sh_addr, section->sh_size, offset, seg_type == SOF_MAN_SEGMENT_TEXT ? "TEXT" : "DATA"); @@ -349,15 +349,15 @@ static int man_module_create(struct image *image, struct module *module, fprintf(stdout, "\n\tTotals\tStart\t\tEnd\t\tSize"); - fprintf(stdout, "\n\tTEXT\t0x%x\t0x%x\t0x%x\n", - module->text_start, module->text_end, - module->text_end - module->text_start); - fprintf(stdout, "\tDATA\t0x%x\t0x%x\t0x%x\n", - module->data_start, module->data_end, - module->data_end - module->data_start); - fprintf(stdout, "\tBSS\t0x%x\t0x%x\t0x%x\n\n ", - module->bss_start, module->bss_end, - module->bss_end - module->bss_start); + fprintf(stdout, "\n\tTEXT\t0x%8.8x\t0x%8.8x\t0x%x\n", + module->text_start, module->text_end, + module->text_end - module->text_start); + fprintf(stdout, "\tDATA\t0x%8.8x\t0x%8.8x\t0x%x\n", + module->data_start, module->data_end, + module->data_end - module->data_start); + fprintf(stdout, "\tBSS\t0x%8.8x\t0x%8.8x\t0x%x\n\n ", + module->bss_start, module->bss_end, + module->bss_end - module->bss_start); /* main module */ /* text section is first */ @@ -401,7 +401,7 @@ static int man_module_create(struct image *image, struct module *module, pages += 1; man_module->segment[SOF_MAN_SEGMENT_BSS].flags.r.length = pages; - fprintf(stdout, "\tNo\tAddress\t\tSize\tFile\tType\n"); + fprintf(stdout, "\tNo\tAddress\t\tSize\t\tFile\tType\n"); /* validate segments */ if (man_module_validate(man_module) < 0) -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH] host: string: remove xthal references.
by Liam Girdwood 12 Apr '18

12 Apr '18
xthal only needed for xtensa arch. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/arch/host/include/arch/string.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/arch/host/include/arch/string.h b/src/arch/host/include/arch/string.h index 56258b34..6b2755dc 100644 --- a/src/arch/host/include/arch/string.h +++ b/src/arch/host/include/arch/string.h @@ -32,9 +32,7 @@ #ifndef __INCLUDE_ARCH_STRING_SOF__ #define __INCLUDE_ARCH_STRING_SOF__ -void *xthal_memcpy(void *dst, const void *src, size_t len); - #define arch_memcpy(dest, src, size) \ - xthal_memcpy(dest, src, size) + memcpy(dest, src, size) #endif -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH] host: build fix for missing string.h
by Liam Girdwood 12 Apr '18

12 Apr '18
Add string.h for host build. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/arch/host/include/arch/sof.h | 3 --- src/arch/host/include/arch/string.h | 40 +++++++++++++++++++++++++++++++++++ src/library/include/platform/memory.h | 5 +++++ 3 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 src/arch/host/include/arch/string.h diff --git a/src/arch/host/include/arch/sof.h b/src/arch/host/include/arch/sof.h index 75d0b25d..ce2bd698 100644 --- a/src/arch/host/include/arch/sof.h +++ b/src/arch/host/include/arch/sof.h @@ -42,9 +42,6 @@ /* architecture specific stack frames to dump */ #define ARCH_STACK_DUMP_FRAMES 32 -#define arch_memcpy(dest, src, size) \ - memcpy(dest, src, size) - static inline void *arch_get_stack_ptr(void) { void *frames[ARCH_STACK_DUMP_FRAMES]; diff --git a/src/arch/host/include/arch/string.h b/src/arch/host/include/arch/string.h new file mode 100644 index 00000000..56258b34 --- /dev/null +++ b/src/arch/host/include/arch/string.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2018, Intel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the Intel Corporation nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Author: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> + * + */ + +#ifndef __INCLUDE_ARCH_STRING_SOF__ +#define __INCLUDE_ARCH_STRING_SOF__ + +void *xthal_memcpy(void *dst, const void *src, size_t len); + +#define arch_memcpy(dest, src, size) \ + xthal_memcpy(dest, src, size) + +#endif diff --git a/src/library/include/platform/memory.h b/src/library/include/platform/memory.h index ed7de103..4e5cc700 100644 --- a/src/library/include/platform/memory.h +++ b/src/library/include/platform/memory.h @@ -86,4 +86,9 @@ (DRAM0_SIZE - HEAP_MOD_SIZE - HEAP_BUF_SIZE) #endif + +#define MAILBOX_DSPBOX_BASE 0 +#define MAILBOX_HOSTBOX_BASE 0 +#define MAILBOX_BASE 0 + #endif -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH] core: sof.h: remove unused code.
by Liam Girdwood 12 Apr '18

12 Apr '18
Code is not used or referenced anywhere. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/include/sof/sof.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/include/sof/sof.h b/src/include/sof/sof.h index d1c6452a..b9d7aff0 100644 --- a/src/include/sof/sof.h +++ b/src/include/sof/sof.h @@ -44,18 +44,6 @@ struct sa; ({const typeof(((type *)0)->member) *__memberptr = (ptr); \ (type *)((char *)__memberptr - offsetof(type, member));}) -/* C memcpy for arch that dont have arch_memcpy() */ -void cmemcpy(void *dest, void *src, size_t size); - -// TODO: add detection for arch memcpy -#if 1 -#define rmemcpy(dest, src, size) \ - arch_memcpy(dest, src, size) -#else -#define rmemcpy(dest, src, size) \ - cmemcpy(dest, src, size) -#endif - /* general firmware context */ struct sof { /* init data */ @@ -70,10 +58,6 @@ struct sof { /* DMA for Trace*/ struct dma_trace_data *dmat; - - /* private data */ - void *arch_private; - void *plat_private; }; #endif -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH] rimage: display ELF section names.
by Liam Girdwood 12 Apr '18

12 Apr '18
Display the name of each ELF section to aid build and debug. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- rimage/elf.c | 36 +++++++++++++++++++++++++++++++----- rimage/rimage.h | 1 + 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/rimage/elf.c b/rimage/elf.c index 78f6d57d..b1a1861b 100644 --- a/rimage/elf.c +++ b/rimage/elf.c @@ -51,6 +51,29 @@ static int elf_read_sections(struct image *image, struct module *module) return -errno; } + /* read in strings */ + module->strings = calloc(1, section[hdr->e_shstrndx].sh_size); + if (!module->strings) { + fprintf(stderr, "error: failed %s to read ELF strings for %d\n", + module->elf_file, -errno); + return -errno; + } + + ret = fseek(module->fd, section[hdr->e_shstrndx].sh_offset, SEEK_SET); + if (ret < 0) { + fprintf(stderr, "error: can't seek to %s stringss %d\n", + module->elf_file, ret); + return ret; + } + + count = fread(module->strings, 1, section[hdr->e_shstrndx].sh_size, + module->fd); + if (count != section[hdr->e_shstrndx].sh_size) { + fprintf(stderr, "error: failed to read %s strings %d\n", + module->elf_file, -errno); + return -errno; + } + /* find manifest module data */ man_section_idx = elf_find_section(image, module, ".bss"); if (man_section_idx < 0) { @@ -233,7 +256,7 @@ static void elf_module_size(struct image *image, struct module *module, if (module->text_end < section->sh_addr + section->sh_size) module->text_end = section->sh_addr + section->sh_size; - fprintf(stdout, "\tTEXT\n"); + fprintf(stdout, "\tTEXT\t"); } else { /* initialized data, also calc the writable sections */ if (module->data_start > section->sh_addr) @@ -241,7 +264,7 @@ static void elf_module_size(struct image *image, struct module *module, if (module->data_end < section->sh_addr + section->sh_size) module->data_end = section->sh_addr + section->sh_size; - fprintf(stdout, "\tDATA\n"); + fprintf(stdout, "\tDATA\t"); } break; case SHT_NOBITS: @@ -250,9 +273,9 @@ static void elf_module_size(struct image *image, struct module *module, /* updated the .bss segment */ module->bss_start = section->sh_addr; module->bss_end = section->sh_addr + section->sh_size; - fprintf(stdout, "\tBSS\n"); + fprintf(stdout, "\tBSS\t"); } else { - fprintf(stdout, "\tHEAP\n"); + fprintf(stdout, "\tHEAP\t"); } break; default: @@ -272,7 +295,7 @@ static void elf_module_limits(struct image *image, struct module *module) fprintf(stdout, " Found %d sections, listing valid sections......\n", module->hdr.e_shnum); - fprintf(stdout, "\tNo\tStart\t\tEnd\t\tBytes\tType\n"); + fprintf(stdout, "\tNo\tStart\t\tEnd\t\tBytes\tType\tName\n"); /* iterate all sections and get size of segments */ for (i = 0; i < module->hdr.e_shnum; i++) { @@ -296,6 +319,8 @@ static void elf_module_limits(struct image *image, struct module *module) /* text or data section */ elf_module_size(image, module, section, i); + /* section name */ + fprintf(stdout, "%s\n", module->strings + section->sh_name); } fprintf(stdout, "\n"); @@ -528,5 +553,6 @@ void elf_free_module(struct image *image, int module_index) free(module->prg); free(module->section); + free(module->strings); fclose(module->fd); } diff --git a/rimage/rimage.h b/rimage/rimage.h index 654ba90f..8b46766d 100644 --- a/rimage/rimage.h +++ b/rimage/rimage.h @@ -53,6 +53,7 @@ struct module { Elf32_Ehdr hdr; Elf32_Shdr *section; Elf32_Phdr *prg; + char *strings; uint32_t text_start; uint32_t text_end; -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH] lib: string: Add rstrcmp() string compare.
by Liam Girdwood 12 Apr '18

12 Apr '18
Add strcmp() equivalent. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/include/sof/alloc.h | 1 + src/lib/lib.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/include/sof/alloc.h b/src/include/sof/alloc.h index d87795d2..d5fc1c2d 100644 --- a/src/include/sof/alloc.h +++ b/src/include/sof/alloc.h @@ -113,6 +113,7 @@ void *rballoc(int zone, uint32_t flags, size_t bytes); void bzero(void *s, size_t n); void *memset(void *s, int c, size_t n); int rstrlen(const char *s); +int rstrcmp(const char *s1, const char *s2); /* Heap save/restore contents and context for PM D0/D3 events */ uint32_t mm_pm_context_size(void); diff --git a/src/lib/lib.c b/src/lib/lib.c index 5aa194c8..79198fd9 100644 --- a/src/lib/lib.c +++ b/src/lib/lib.c @@ -106,3 +106,20 @@ int rstrlen(const char *s) while(*p++ != 0); return (p - s) - 1; } + +/* generic string compare */ +int rstrcmp(const char *s1, const char *s2) +{ + while (*s1 != 0 && *s2 != 0) { + if (*s1 < *s2) + return -1; + if (*s1 > *s2) + return 1; + s1++; + s2++; + } + + /* match */ + return 0; +} + -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH] dist: fix make dist compiling issue for HSW, APL and CNL
by Keqiao.Zhang 11 Apr '18

11 Apr '18
Signed-off-by: Keqiao.Zhang <keqiao.zhang(a)linux.intel.com> --- src/arch/xtensa/include/arch/Makefile.am | 1 + src/arch/xtensa/xtos/Makefile.am | 1 + src/audio/Makefile.am | 4 ++++ src/include/sof/Makefile.am | 2 ++ src/platform/apollolake/Makefile.am | 2 ++ src/platform/cannonlake/Makefile.am | 4 ++++ src/platform/cannonlake/include/xtensa/config/Makefile.am | 1 + src/platform/haswell/Makefile.am | 2 ++ src/platform/haswell/include/xtensa/config/Makefile.am | 1 + 9 files changed, 18 insertions(+) diff --git a/src/arch/xtensa/include/arch/Makefile.am b/src/arch/xtensa/include/arch/Makefile.am index 779e449..8e08ff5 100644 --- a/src/arch/xtensa/include/arch/Makefile.am +++ b/src/arch/xtensa/include/arch/Makefile.am @@ -6,4 +6,5 @@ noinst_HEADERS = \ spinlock.h \ task.h \ timer.h \ + string.h \ wait.h diff --git a/src/arch/xtensa/xtos/Makefile.am b/src/arch/xtensa/xtos/Makefile.am index 2e855e7..46a3dfe 100644 --- a/src/arch/xtensa/xtos/Makefile.am +++ b/src/arch/xtensa/xtos/Makefile.am @@ -3,6 +3,7 @@ noinst_HEADERS = \ xtos-params.h \ interrupt-pri.h \ window-vectors-new.S \ + int-highpri-dispatcher.S \ int-medpri-dispatcher.S noinst_LIBRARIES = \ diff --git a/src/audio/Makefile.am b/src/audio/Makefile.am index 8a0415e..5f69b65 100644 --- a/src/audio/Makefile.am +++ b/src/audio/Makefile.am @@ -2,6 +2,10 @@ includedir = $(prefix)/include/sof/audio include_HEADERS = \ eq_iir.h \ + iir.h \ + fir.h \ + src_config.h \ + src.h \ eq_fir.h COMP_SRC = \ diff --git a/src/include/sof/Makefile.am b/src/include/sof/Makefile.am index f620835..b667459 100644 --- a/src/include/sof/Makefile.am +++ b/src/include/sof/Makefile.am @@ -33,4 +33,6 @@ include_HEADERS = \ timer.h \ trace.h \ wait.h \ + string.h \ + hda-dma.h \ work.h diff --git a/src/platform/apollolake/Makefile.am b/src/platform/apollolake/Makefile.am index 8b441b8..fcf321e 100644 --- a/src/platform/apollolake/Makefile.am +++ b/src/platform/apollolake/Makefile.am @@ -1,5 +1,7 @@ SUBDIRS = include +EXTRA_DIST = apollolake.x.in + noinst_LIBRARIES = libplatform.a libplatform_a_SOURCES = \ diff --git a/src/platform/cannonlake/Makefile.am b/src/platform/cannonlake/Makefile.am index 3fe45ac..503271c 100644 --- a/src/platform/cannonlake/Makefile.am +++ b/src/platform/cannonlake/Makefile.am @@ -1,5 +1,9 @@ SUBDIRS = include +EXTRA_DIST = \ + cannonlake.x.in \ + boot_ldr.x.in + noinst_LIBRARIES = libplatform.a libplatform_a_SOURCES = \ diff --git a/src/platform/cannonlake/include/xtensa/config/Makefile.am b/src/platform/cannonlake/include/xtensa/config/Makefile.am index 99c21a5..bfca58b 100644 --- a/src/platform/cannonlake/include/xtensa/config/Makefile.am +++ b/src/platform/cannonlake/include/xtensa/config/Makefile.am @@ -5,4 +5,5 @@ noinst_HEADERS = \ specreg.h \ system.h \ tie.h \ + core-isa-boot.h \ tie-asm.h diff --git a/src/platform/haswell/Makefile.am b/src/platform/haswell/Makefile.am index 59c33b3..4591c12 100644 --- a/src/platform/haswell/Makefile.am +++ b/src/platform/haswell/Makefile.am @@ -1,5 +1,7 @@ SUBDIRS = include +EXTRA_DIST = haswell.x.in + noinst_LIBRARIES = libplatform.a libplatform_a_SOURCES = \ diff --git a/src/platform/haswell/include/xtensa/config/Makefile.am b/src/platform/haswell/include/xtensa/config/Makefile.am index 99c21a5..2404f99 100644 --- a/src/platform/haswell/include/xtensa/config/Makefile.am +++ b/src/platform/haswell/include/xtensa/config/Makefile.am @@ -5,4 +5,5 @@ noinst_HEADERS = \ specreg.h \ system.h \ tie.h \ + core-isa-hsw.h \ tie-asm.h -- 2.11.0
2 1
0 0
[Sound-open-firmware] [PATCH v2] Makefile: fix the make clean issue at the top-level directory
by Keqiao.Zhang 11 Apr '18

11 Apr '18
make clean done at the top-level does not clean the topology/test directory, use clean-local instead of clean Signed-off-by: Keqiao.Zhang <keqiao.zhang(a)linux.intel.com> --- topology/Makefile.am | 2 +- topology/test/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/topology/Makefile.am b/topology/Makefile.am index a7e86fd..31d266e 100644 --- a/topology/Makefile.am +++ b/topology/Makefile.am @@ -42,7 +42,7 @@ MACHINES = \ all: ${MACHINES} -clean: +clean-local: rm -f *.conf rm -f *.tplg diff --git a/topology/test/Makefile.am b/topology/test/Makefile.am index 49f2240..d4f1722 100644 --- a/topology/test/Makefile.am +++ b/topology/test/Makefile.am @@ -17,7 +17,7 @@ DEPS = \ all : *.m4 ${DEPS} ./tplg-build.sh -clean: +clean-local: rm -f *.conf rm -f *.tplg -- 2.11.0
3 2
0 0
[Sound-open-firmware] [PATCH] dist: fix make dist for tone topology M4
by Keqiao.Zhang 11 Apr '18

11 Apr '18
Signed-off-by: Keqiao.Zhang <keqiao.zhang(a)linux.intel.com> --- topology/test/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/topology/test/Makefile.am b/topology/test/Makefile.am index 49f2240..565f222 100644 --- a/topology/test/Makefile.am +++ b/topology/test/Makefile.am @@ -25,5 +25,6 @@ clean: EXTRA_DIST = \ test-capture-ssp.m4 \ test-playback-ssp.m4 \ + test-tone-playback-ssp.m4 \ test-ssp.m4 \ tplg-build.sh -- 2.11.0
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • ...
  • 157
  • Older →

HyperKitty Powered by HyperKitty version 1.3.8.