On Wed, 25 Aug 1999, Wang Yong wrote:
>   do u have some idea on how to port linux to chips without virtual mode MMU
> such as PPC401GF? how to implement memory protection and multi-task, both
> seem so hard on chips withour address translation?

you can forget memory protection, but multitasking has nothing to do with
MM so that is no problem. the problem is how to implement the unix
semantics of fork(), and other MM tricks like demand loading and sharing
of text/data that support the multitasking model.

>   I was told 3com's palm pilot has got a 68328 without MMU. Does anyone know
> something about the solution from uclinux for 68328?

linux itself works fine without MM (since the kernel is mostly linearly
mapped anyway) but fork() can only make a new thread, not a new MM, so the
child will share data with the parent. you need to take this into
consideration when writing applications for uclinux (and other MMU-less
linuxes) as well as that there are limitations in the MM API (mmap et al) 

you also need to either relocate all loaded text or compile it as position
independent code (since you can't put all segments at their original
VMA's). we relocate, i think uclinux uses PIC.

so to recap, the kernel itself is _comparatively_ easy to remove MM from,
compared to the problems you'll get with shared libraries, ill-behaved
programs, buggy programs, and programs that want to use fork() and MM.

oh yeah, one other big issue is memory fragmentation. you can't map
together pages spread in memory, you need consecutive pages for loading
executables etc. and it's no fun trying to allocate, say, 200 KB after
you've run a linux box for a while using page cache and buffer caches
spread all over memory.

/Bjorn Wesen

--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.

Reply via email to