From: Eduardo Bezerra <edubezval@gmail.com>
To: "Linux-omap-open-source@linux.omap.com"
<linux-omap-open-source@linux.omap.com>
Subject: Dealing with DSP Tasks from the kernel space
Date: Wed, 11 Jan 2006 11:22:51 -0400 [thread overview]
Message-ID: <a0580c510601110722u5a5aa4bdh@mail.gmail.com> (raw)
Hi all,
I'm tring to load a DSP task from the kernel space. I know that this
stuff is done by a user space utility, dspctl ou dsp_dld. However, I
want to know how to deal (load, communicate, unload, etc) with DSP tasks
from the Kernel Space. There is no much documentation about the code
found in arch/arm/plat-omap/dsp/*. Documentation about DSP Gateway
project comments more user space and "dsp space" related issues.
Nevertheless, I know that DSP code only exports its symbols if
it is built as a module. When this is done, I can access some importants
objects, such as:
extern unsigned long dspmem_base, dspmem_size,
daram_base, daram_size,
saram_base, saram_size;
extern struct clk *api_ck_handle;
extern int exmap_valid(void *vadr, size_t len);
and tranlate dsp adress space into virtual address space with:
#define dspword_to_virt(dw) ((void *)(dspmem_base + ((dw) << 1)))
with this, I can write in the dsp memory space by simple:
if (omap_dsp_request_mem() < 0)
return -EBUSY;
clk_use(api_ck_handle);
memcpy(vadr, buf, written);
omap_dsp_release_mem();
clk_unuse(api_ck_handle);
and, validate any tlb entry with: exmap_valid(vadr, len), if I need
to write in the any shared space.
I would like to know if the above information is correct and what is
wrong with the steps bellow to load a DSP task:
/*
* I need to export some symbols from the dsp code to call them here.
*/
int ret = 0;
long rstvct;
mpui_byteswap_off();
/* Do the loading here writing the section using the procedure
described above */
rstvct = load_dsptask(dspbinary, BINARY_SIZE);
if (rstvct > 0x00ffffff) {
printk("Can't determine reset vector "
"address: %lx\n", rstvct);
goto out;
}
dsp_cpustat_request(CPUSTAT_RESET);
ret = dsp_set_rstvect(rstvct);
if (ret < 0)
goto out;
dsp_cpustat_request(DSP_RUN);
ret = dspcfg();
because it hangs up when it "runs" the dsp cpu (dsp_cpustat_request).
It falls into a TLB miss.
If someone knows where I can find documentation to do this stuff (or
even deal with the DSP into kernel space) I'd appreciate.
BR,
Eduardo Bezerra Valentin
next reply other threads:[~2006-01-11 15:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-11 15:22 Eduardo Bezerra [this message]
2006-01-13 15:38 ` Dealing with DSP Tasks from the kernel space toshihiro.kobayashi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a0580c510601110722u5a5aa4bdh@mail.gmail.com \
--to=edubezval@gmail.com \
--cc=linux-omap-open-source@linux.omap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox