Re: kernel memory mapping problem

From
ZhongJun Zhou <hidden>
Date
2003-08-07 15:49:23
Reply to
Peter Barada, 2003-08-07
Thanks very much.

But my functions are serial running on PPC82xx, its
means that when I mapped the the address using __pa(
(void *)tmp) to bd_address, then reading the BD's
status and control registers, if OK, then return from
this function. Is it OK with this method? Next, if I
use "kmalloc" to get the buffer and map it to CPM with
__pa() function, that can be run, is right?  any other
functions can finish this mapping action ? or give me
any good documents for my reading?

thanks in advance!
--- Peter Barada <pbarada@mail.wm.sps.mot.com>
quoted
when run this module( lsmod mymodule.o ), kernel is always dead. Are
there any errors of this function ?
What are you doing with the physical address of a varaible that is on
the *stack*? If you let some hardware modify that value, then you can
easily trash your stack if the hardware modifies this value *after*
this function exits since tmp will go out of scope.

I'd suggest that you move tmp outside of func for starters.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Thread (7 messages) 7 messages, 6 authors, last reply 2003-08-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help