[Blackfin] arch: This allows XIP to work with FD-PIC.

Previously, init failed to do anything meaningful;
it turns out that the reason is that FD-PIC has a readonly data
section which can be located in the XIP filesystem, and various address checks
in the kernel reject such addresses for syscall arguments.  Hence, init's
  execve ("/bin/sh", ...)
failed with error code EFAULT.

There's room for improvement here: in case people want to have filesystems
on flash rather than in main memory, _access_ok should be modified to
allow this.

This bug fix is also dedicated to Michael Hennerich.

Signed-off-by: Bernd Schmidt <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
This commit is contained in:
Bernd Schmidt 2008-04-24 03:06:15 +08:00 • committed by Bryan Wu
commit d5adb029ef
2 changed files with 9 additions and 2 deletions

View file

@ -26,9 +26,10 @@ static inline void wrusp(unsigned long usp)
/*
* User space process size: 1st byte beyond user address space.
* Fairly meaningless on nommu. Parts of user programs can be scattered
* in a lot of places, so just disable this by setting it to 0xFFFFFFFF.
*/
extern unsigned long memory_end;
#define TASK_SIZE (memory_end)
#define TASK_SIZE 0xFFFFFFFF
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE