On 08/23/2010 01:18 PM, Mike Frysinger wrote:
On Monday, August 23, 2010 14:16:30 Steve Longerbeam wrote:
On 08/23/2010 10:47 AM, Steve Longerbeam wrote:
On 08/22/2010 05:20 PM, Mike Frysinger wrote:
>> the common code changes will need justification as to why they exist
at all.
we're doing MPU on Blackfin/nommu today without any of these. we
support
pretty much all the same features of a MMU system short of virtual
memory --
4k pages, RWX granularity, process to process protection, process to
kernel
protection (include kernel modules), kernel XIP, and userspace XIP.
further, why did you go with CONFIG_CPU_CP15_MPU ? there is already a
CONFIG_MPU option that is used in common nommu code.
which tree has CONFIG_MPU, and the MPU support for blackfin? There is
no such thing in the 888 uclinux release tree.
sorry, I see CONFIG_MPU under blackfin in the 888 release.
I'm not familiar with the blackfin arch, but my patches of course are
specific to ARM MPU's.
i dont see how the processor matters. you're running Linux without virtual
memory support (CONFIG_MMU=n) and you want to do memory protection
(CONFIG_MPU=y). there is no need to stick a specific cpu name in there.
after all, the option is CONFIG_MPU and not CONFIG_BFIN_MPU because all the
changes we made (which were few) to common code were processor independent
(exactly like all changes to common code should be). we specifically left the
door open for other processors to support MMU=n MPU=y without an ifdef mess.
-mike
Hi Mike, I don't disagree with what you're saying, but I was a bit
confused because in the 888 kernel I was looking at, the common MPU code
didn't exist yet.
But looking at the 20100628 release, I can see mm/nommu:protect_vma(),
that calls the common MPU API's protect_page() and update_protections().
Apparently the ARM MPU's are not nearly as capable as the blackfin MPU.
The ARM MPU deals with whole regions, and typically only up to 8 memory
regions can be controlled by the MPU at any one time, each region having
one protection setting (r/w/x for kernel mode, r/w/x for user mode). Not
nearly as fine grained as per-page.
So ARM could use something higher-level than protect_page(), something
like protect_region(start, end, flags), or just all of protect_vma()
could be moved to include/asm/mmu_context.h. That way ARM can operate on
the whole region, while blackfin would add protection for every page in
the VMA as it is doing now.
I'll work on another patch that better merges my original ARM MPU work
into the blackfin work, and resubmit.
Btw, I probably should be working in whatever git tree people are
submitting patches against, rather than the 20100628 release. Which git
tree should I submit against?
Steve
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev