]> git.neil.brown.name Git - history.git/commitdiff
[ARM] Fix ARM module support
authorRussell King <rmk@flint.arm.linux.org.uk>
Thu, 21 Nov 2002 00:04:45 +0000 (00:04 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Thu, 21 Nov 2002 00:04:45 +0000 (00:04 +0000)
This cset allows ARM modules to work again.  The solution was
suggested by Andi Kleen.

We shrink the available user space size by 16MB, thereby opening up
a window in virtual memory space between user space and the kernel
direct mapped RAM.  We place modules into this space, and, since the
kernel image is always at the bottom of kernel direct mapped RAM, we
can be assured that any 24-bit PC relocations (which have a range
of +/- 32MB) will always be able to reach the kernel.

34 files changed:
arch/arm/kernel/module.c
include/asm-arm/arch-adifcc/memory.h
include/asm-arm/arch-adifcc/vmalloc.h
include/asm-arm/arch-anakin/memory.h
include/asm-arm/arch-anakin/vmalloc.h
include/asm-arm/arch-cl7500/memory.h
include/asm-arm/arch-cl7500/vmalloc.h
include/asm-arm/arch-clps711x/memory.h
include/asm-arm/arch-clps711x/vmalloc.h
include/asm-arm/arch-ebsa110/memory.h
include/asm-arm/arch-ebsa110/vmalloc.h
include/asm-arm/arch-ebsa285/memory.h
include/asm-arm/arch-ebsa285/vmalloc.h
include/asm-arm/arch-epxa10db/memory.h
include/asm-arm/arch-epxa10db/vmalloc.h
include/asm-arm/arch-integrator/memory.h
include/asm-arm/arch-integrator/vmalloc.h
include/asm-arm/arch-iop310/memory.h
include/asm-arm/arch-iop310/vmalloc.h
include/asm-arm/arch-l7200/memory.h
include/asm-arm/arch-l7200/vmalloc.h
include/asm-arm/arch-nexuspci/memory.h
include/asm-arm/arch-nexuspci/vmalloc.h
include/asm-arm/arch-pxa/memory.h
include/asm-arm/arch-pxa/vmalloc.h
include/asm-arm/arch-rpc/memory.h
include/asm-arm/arch-rpc/vmalloc.h
include/asm-arm/arch-sa1100/memory.h
include/asm-arm/arch-sa1100/vmalloc.h
include/asm-arm/arch-shark/memory.h
include/asm-arm/arch-shark/vmalloc.h
include/asm-arm/arch-tbox/memory.h
include/asm-arm/arch-tbox/vmalloc.h
include/linux/elf.h

index 0b2a59f487dc3f4518da07962e17c986fb095766..41ab5fc3544317df5e65a6536d380e680db165b2 100644 (file)
@@ -7,27 +7,59 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- *  This code is currently broken.  We need to allocate a jump table
- *  for out of range branches.  We'd really like to be able to allocate
- *  a jump table and share it between modules, thereby reducing the
- *  cache overhead associated with the jump tables.
+ * Module allocation method suggested by Andi Kleen.
  */
-#warning FIXME
-
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/elf.h>
 #include <linux/vmalloc.h>
+#include <linux/slab.h>
 #include <linux/fs.h>
 #include <linux/string.h>
 
+#include <asm/pgtable.h>
+
 void *module_alloc(unsigned long size)
 {
-       return NULL; /* disabled */
+       struct vm_struct *area;
+       struct page **pages;
+       unsigned int array_size, i;
+
+       size = PAGE_ALIGN(size);
+       if (!size)
+               goto out_null;
+
+       area = __get_vm_area(size, VM_ALLOC, MODULE_START, MODULE_END);
+       if (!area)
+               goto out_null;
+
+       area->nr_pages = size >> PAGE_SHIFT;
+       array_size = area->nr_pages * sizeof(struct page *);
+       area->pages = pages = kmalloc(array_size, GFP_KERNEL);
+       if (!area->pages) {
+               remove_vm_area(area->addr);
+               kfree(area);
+               goto out_null;
+       }
+
+       memset(pages, 0, array_size);
+
+       for (i = 0; i < area->nr_pages; i++) {
+               pages[i] = alloc_page(GFP_KERNEL);
+               if (unlikely(!pages[i])) {
+                       area->nr_pages = i;
+                       goto out_no_pages;
+               }
+       }
+
+       if (map_vm_area(area, PAGE_KERNEL, &pages))
+               goto out_no_pages;
+       return area->addr;
 
-       if (size == 0)
-               return NULL;
-       return vmalloc(size);
+ out_no_pages:
+       vfree(area->addr);
+ out_null:
+       return NULL;
 }
 
 void module_free(struct module *module, void *region)
@@ -59,8 +91,6 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
        Elf32_Rel *rel = (void *)relsec->sh_offset;
        unsigned int i;
 
-       printk("Applying relocations for section %u\n", relsec->sh_info);
-
        for (i = 0; i < relsec->sh_size / sizeof(Elf32_Rel); i++, rel++) {
                unsigned long loc;
                Elf32_Sym *sym;
@@ -81,18 +111,15 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
                }
 
                if (rel->r_offset < 0 || rel->r_offset > dstsec->sh_size - sizeof(u32)) {
-                       printk(KERN_ERR "%s: out of bounds relocation, section %d reloc %d "
-                               "offset %d size %d\n",
-                               module->name, relindex, i, rel->r_offset, dstsec->sh_size);
+                       printk(KERN_ERR "%s: out of bounds relocation, "
+                               "section %d reloc %d offset %d size %d\n",
+                               module->name, relindex, i, rel->r_offset,
+                               dstsec->sh_size);
                        return -ENOEXEC;
                }
 
                loc = dstsec->sh_offset + rel->r_offset;
 
-               printk("%s: rel%d: at 0x%08lx [0x%08lx], symbol '%s' value 0x%08lx =>",
-                       module->name, i, loc, *(u32 *)loc, strtab + sym->st_name,
-                       sym->st_value);
-
                switch (ELF32_R_TYPE(rel->r_info)) {
                case R_ARM_ABS32:
                        *(u32 *)loc += sym->st_value;
@@ -104,9 +131,12 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
                                offset -= 0x04000000;
 
                        offset += sym->st_value - loc;
-                       if (offset & 3 || offset <= 0xfc000000 || offset >= 0x04000000) {
-                               printk(KERN_ERR "%s: unable to fixup relocation: out of range\n",
-                                       module->name);
+                       if (offset & 3 ||
+                           offset <= (s32)0xfc000000 ||
+                           offset >= (s32)0x04000000) {
+                               printk(KERN_ERR "%s: unable to fixup "
+                                      "relocation: out of range\n",
+                                      module->name);
                                return -ENOEXEC;
                        }
 
@@ -117,11 +147,10 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
                        break;
 
                default:
-                       printk("\n" KERN_ERR "%s: unknown relocation: %u\n",
-                               module->name, ELF32_R_TYPE(rel->r_info));
+                       printk(KERN_ERR "%s: unknown relocation: %u\n",
+                              module->name, ELF32_R_TYPE(rel->r_info));
                        return -ENOEXEC;
                }
-               printk("[0x%08lx]\n", *(u32 *)loc);
        }
        return 0;
 }
index 5178f33b2bdfd2fe05617b978362208486808df1..31b21bc3287d9bab4752ee2f170f6a051fe5512c 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index 0bcc35c827b3683f8fa8bd4d8dee1517060b3cbb..c97b56b30d97fcf3110e733b2e3ab83e6210e373 100644 (file)
@@ -14,3 +14,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (0xe8000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index b58762157b632d3c3321136ae22f8b7cf4294fa5..554b292c89355cd34be2bc646cf3ce978f54fcf4 100644 (file)
@@ -14,9 +14,9 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define TASK_SIZE              (3u * 1024 * 1024 * 1024)
+#define TASK_SIZE              (0xbf000000)
 #define TASK_SIZE_26           (64u * 1024 * 1024)
-#define TASK_UNMAPPED_BASE     (1u * 1024 * 1024 * 1024)
+#define TASK_UNMAPPED_BASE     (0x40000000)
 
 #define PAGE_OFFSET            0xc0000000
 #define PHYS_OFFSET            0x20000000
index 1812fbab58e6268839d6580babc6bd92b88dff15..913837cc41c9fbcea08013425c204de6ed0d0c3a 100644 (file)
@@ -23,4 +23,7 @@
 #define VMALLOC_START          ((VMALLOC_VMADDR(high_memory) + VMALLOC_ARCH_OFFSET) & ~(VMALLOC_ARCH_OFFSET - 1))
 #define VMALLOC_END            (PAGE_OFFSET + 0x10000000)
 
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
+
 #endif
index 56e1d3bfcb62e8ba59ad552ebb1bc58f75842ee1..b074792de5c9b19d170df73d5aa409c69c66e613 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index 1654e6c3fc01e81f875233d7815b6c1bd55ff4f2..0e7e4b55270bfd10542d96b2049dd4e4d402110d 100644 (file)
@@ -14,3 +14,7 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (PAGE_OFFSET + 0x1c000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
+
index 52b38ebea23b2bfd2525af43c3930ba1a1c36450..317fd2c22dd5f0207df64d52c392eed730c4fc75 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index 5d8324ac39b7817682921606f362c237c7b317c0..b5d34fcb7ea0bbdea0b87df33aa27839aed83ab9 100644 (file)
@@ -30,3 +30,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (PAGE_OFFSET + 0x10000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index b8f8e211dac20e115c79de33b92df9fc8998fffd..146855ded3372a2765edd44e42e414e6822fa1f5 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index da319920a2ad58b87034149f898362601de031cc..6b6b233de95aa67b851482f327364c5ee922a7fb 100644 (file)
@@ -20,3 +20,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (PAGE_OFFSET + 0x1f000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index 41e730ceaf0ef6e9d34720ca06b3983aecedd833..42912ef0555177612bb501edadc9abc583b6019b 100644 (file)
@@ -48,13 +48,13 @@ extern unsigned long __bus_to_virt(unsigned long);
 #if defined(CONFIG_ARCH_FOOTBRIDGE)
 
 /* Task size and page offset at 3GB */
-#define TASK_SIZE              (0xc0000000UL)
+#define TASK_SIZE              (0xbf000000UL)
 #define PAGE_OFFSET            (0xc0000000UL)
 
 #elif defined(CONFIG_ARCH_CO285)
 
 /* Task size and page offset at 1.5GB */
-#define TASK_SIZE              (0x60000000UL)
+#define TASK_SIZE              (0x5f000000UL)
 #define PAGE_OFFSET            (0x60000000UL)
 
 #else
@@ -70,7 +70,7 @@ extern unsigned long __bus_to_virt(unsigned long);
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
 
 /*
  * The DRAM is always contiguous.
index c66b7fa88da85885d29a50a6d181406966232af0..31b2c671562043ebdbd490aa75efd7c57b335542 100644 (file)
@@ -25,3 +25,6 @@
 #else
 #define VMALLOC_END       (PAGE_OFFSET + 0x20000000)
 #endif
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index 132eab6ad9d038e4a8ba359518a99d3761895087..3af88af12e74fb6016795a6015714473e377f93f 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index 71b1a6229cb4ccaa0ee9d46e9f3be9b8b4e5ffa5..d6961cf7569998b77e1934bc5201cba24fb3c14c 100644 (file)
@@ -30,3 +30,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (PAGE_OFFSET + 0x10000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index 45605011117c8dba74a211e3d6f4d0702f4e3576..25df3f54107a48c805c61d2c657e02fb7564d640 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index ec8f98d3fa5bfe8d9ea0174f784e11cc0ca70472..41b5a1b84b11c7b41f931381bc1066f8f3b2ee74 100644 (file)
@@ -30,3 +30,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (PAGE_OFFSET + 0x10000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index e413a04823a914daa11bfd3ea74e15b33826887a..e61bc5ddc48a85b925bf5686e88dc3c5d8efbcd4 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index 07c8ee7037504f8f167b485e325a75fbedadbfc2..0b481a541443caa476656ca502c2b8ebd0b1dff1 100644 (file)
@@ -14,3 +14,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (0xe8000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index a34a0f9a41bba89481dc7c3ed8d987041a59b45b..12f8ad8c25ba92cf56010322187f4a0689c7629e 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE       (0xc0000000UL)
+#define TASK_SIZE       (0xbf000000UL)
 #define TASK_SIZE_26    (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index 04fa07e7cbf51fa409766c24f58a15f1db311006..7c19757c1b008f2b41e4e4b16a584eacab7e438a 100644 (file)
@@ -14,3 +14,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (PAGE_OFFSET + 0x10000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index a7e644257805c52e438d85695c1907bd45e441d2..89423f082126da63a13095f8e3efcff1a06aa30a 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index 5c8d17dd7f5b611881972784f03d4e23097a877f..877a164f56683c845d261e079fb625076e602e00 100644 (file)
@@ -14,3 +14,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (PAGE_OFFSET + 0x20000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index 24e133caf425f6dae3eb7ec96cbc5f78e6e7dbb8..65cc8c434e6a64634d368779f0fb0384f0390272 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index a75e7b7593ea5b917e0f422d38cfbee258a14e38..a3a19b8100c4fad86f66428a7b814a45d4c094fa 100644 (file)
@@ -21,3 +21,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (0xe8000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index cf562f87f7b5a83fcdf156020ce813351a9aabe1..c6c147ef6685b3bea2484d8c03d467e24e2b155b 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index 579bd11904af0dcb9c7f2fc1f6276869a209c2bf..f47bed41b2bb22de02513015d12633ee7f1330bb 100644 (file)
@@ -20,3 +20,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (PAGE_OFFSET + 0x1c000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index 1f7c463b32b133b776a729854e45ea24c58fd920..04df58feeabc059e7e01eca047e55c89e31a33f6 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index 82c5ce9b6acc550c476a1a33f71c62b889d4a91e..35c2f3fe740e891bbe67a8f6b1aeae98d621fa9c 100644 (file)
@@ -14,3 +14,6 @@
 #define VMALLOC_START    (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (0xe8000000)
+
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index 39f1671760119228978311e925c3874434eebe51..47dc994b8b2d97d4ef544989145d91c13f5507ad 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: = 3GB
index 31fe3e777083f54a2f47c8519c4bc339140e72d2..8a45e9d954c6b946a5276f04034e335bde406d0a 100644 (file)
@@ -15,3 +15,5 @@
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (PAGE_OFFSET + 0x10000000)
 
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index e93d0afb176f5ddf5de695be408fa35b5cea05c2..7fc1c3032e3017020874fff5eeb5ea8f25afce93 100644 (file)
 /*
  * Task size: 3GB
  */
-#define TASK_SIZE      (0xc0000000UL)
+#define TASK_SIZE      (0xbf000000UL)
 #define TASK_SIZE_26   (0x04000000UL)
 
 /*
  * This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE (0x40000000)
 
 /*
  * Page offset: 3GB
index c2e21d5dedd6ee10f0ec12283199a0d128028c1f..c620d349a698e91ecdb525fd52bbd3293a30e3d4 100644 (file)
@@ -15,3 +15,5 @@
 #define VMALLOC_VMADDR(x) ((unsigned long)(x))
 #define VMALLOC_END       (PAGE_OFFSET + 0x10000000)
 
+#define MODULE_START   (PAGE_OFFSET - 16*1048576)
+#define MODULE_END     (PAGE_OFFSET)
index 0fc8629ac459f16b193c4389da8fecc80eda4289..04a7ae9a30a212d3a3e26b08ab408d8e971449aa 100644 (file)
@@ -200,6 +200,10 @@ typedef struct {
 #define ELF64_R_SYM(i)                 ((i) >> 32)
 #define ELF64_R_TYPE(i)                        ((i) & 0xffffffff)
 
+#define R_ARM_NONE     0
+#define R_ARM_PC24     1
+#define R_ARM_ABS32    2
+
 #define R_386_NONE     0
 #define R_386_32       1
 #define R_386_PC32     2