trap exceptions in user
Quoted 10 lines
Quoted 6 lines
It's a long story... I know anonymous mapping is better but I have need physical contiguos memory (not for the test of course). The binary blob has fixed addresses between 1 to 16 MB so I have mapped the
To do this with RTDM, you should use
rtdm_mmap_to_user, notrtdm_iomap_to_user. And to do this with an anonymous mapping, you simply need to pass the address where you want the mmap to occur to mmap, and passMAP_FIXEDto mmap flags, this is all documented in mmap manual.
I did't specify I have passed mem=xxx to kernel to take the upper 16MB so I have to use rtdm_iomap_to_user. I think the RTDM mapping works.
Quoted 5 lines
Quoted 1 line
I start UD from the terminal and the terminal always report the right error.
Ok. Probably the I-pipe patch only calls your callback for real-time tasks. Is the thread which runs the binary blob created with xenomai services ?
my_rt_task_func()
{
int 3 // This is trapped by the custom exception routine (forwarded to xenomai handler). The terminal write
// trace/breakpoint trap
}
my_rt_task_func()
{
call *asm_part
}
asm_part --- (it has been copied in the first 16 MB of user task mapped to the 16 MB kernel memory)
int 3 // This is not trapped by the custom exception routine however the a trace/breakpoint trap is raised and
// it is written in terminal
---
Gabriele
Scopri il blog di Yahoo! Mail:
Trucchi, novità e scrivi la tua opinione.
http://www.ymailblogit.com/blog
Quoted 18 lines · Gabriele Moabiti
Quoted 9 lines
Quoted 5 lines
It's a long story... I know anonymous mapping is better but I have need physical contiguos memory (not for the test of course). The binary blob has fixed addresses between 1 to 16 MB so I have mapped the
To do this with RTDM, you should use
rtdm_mmap_to_user, notrtdm_iomap_to_user. And to do this with an anonymous mapping, you simply need to pass the address where you want the mmap to occur to mmap, and passMAP_FIXEDto mmap flags, this is all documented in mmap manual.I did't specify I have passed mem=xxx to kernel to take the upper 16MB so I have to use
rtdm_iomap_to_user. I think the RTDM mapping works.Quoted 4 lines
Quoted 1 line
I start UD from the terminal and the terminal always report the right error.
Ok. Probably the I-pipe patch only calls your callback for real-time tasks. Is the thread which runs the binary blob created with xenomai services ?
Quoted 5 lines
my_rt_task_func()
{
int 3 // This is trapped by the custom exception routine (forwarded to xenomai handler). The terminal write
// trace/breakpoint trap
}
This does not tell me how the thread running "my_rt_task_func" is created.
Signature · 1 line
Gilles.
Quoted 5 lines · Gabriele Moabiti
Quoted 5 lines
Quoted 5 lines
It's a long story... I know anonymous mapping is better but I have need physical contiguos memory (not for the test of course). The binary blob has fixed addresses between 1 to 16 MB so I have mapped the
Quoted 7 lines
Quoted 4 lines
To do this with RTDM, you should use
rtdm_mmap_to_user, notrtdm_iomap_to_user. And to do this with an anonymous mapping, you simply need to pass the address where you want the mmap to occur to mmap, and passMAP_FIXEDto mmap flags, this is all documented in mmap manual.I did't specify I have passed mem=xxx to kernel to take the upper 16MB so I have to use
rtdm_iomap_to_user. I think the RTDM mapping works.
Yes, but I still think this is useless. If your user-space code expects to be running from 1MB to 16MB, it expects this for virtual addresses, not for physical addresses. So, I really think you should mmap the 1MB to 16MB region by passing the start address to mmap with the MMAP_FIXED flag.
Quoted 17 lines
Quoted 5 lines
Quoted 2 lines
I start UD from the terminal and the terminal always report the right error.
Ok. Probably the I-pipe patch only calls your callback for real-time tasks. Is the thread which runs the binary blob created with xenomai services ?
my_rt_task_func()
{
int 3 // This is trapped by the custom exception routine (forwarded to xenomai handler). The terminal write
// trace/breakpoint trap
}
my_rt_task_func()
{
call*asm_part
}
Quoted 4 lines
asm_part--- (it has been copied in the first 16 MB of user task mapped to the 16 MB kernel memory)int 3 // This is not trapped by the custom exception routine however the a trace/breakpoint trap is raised and
// it is written in terminal
You should trace the exception path in the I-pipe patch to find the point where your exception handling callback is not called.
Signature · 1 line
Gilles.