* XIP fails on kernels 2.6.12 and higher @ 2005-09-22 16:08 Korolev, Alexey 2005-09-22 17:20 ` Nicolas Pitre 2005-10-05 11:45 ` Konstantin Kletschke 0 siblings, 2 replies; 10+ messages in thread From: Korolev, Alexey @ 2005-09-22 16:08 UTC (permalink / raw) To: linux-mtd Hi all, I can't bootup XIP linux kernel on Mainstone platform (based on PXA270 processor). I tried several different kernel versions 2.6.9, 2.6.11 - bootup with enabled XIP kernel feature fine. But 2.6.12 and 2.6.13 - faults at the start of booting. I found very big changes between 2.6.12 and 2.6.11 in memory management code. I suspect it brokes XIP. Do you know this problem? Has XIP been broken on all platforms or just on Mainstone platform only? Here is kernel failure log. (It's rather short :-) ) Linux version 2.6.13.2 (root@localhost.localdomain) (gcc version 3.4.3) #7 Thu S ep 22 19:51:25 MSD 2005 CPU: XScale-PXA270 [69054114] revision 4 (ARMv5TE) Machine: Intel HCDDBBVA0 Development Platform (aka Mainstone) Memory policy: ECC disabled, Data cache writeback Run Mode clock: 208.00MHz (*16) Turbo Mode clock: 416.00MHz (*2.0, active) Memory clock: 104.00MHz (/2) System bus clock: 104.00MHz CPU0: D VIVT undefined 5 cache CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets Built 1 zonelists Kernel command line: console=ttyS1,115200 mem=64M mtdparts=phys_mapped_flash:512 k(blob)ro,2m(kernel)ro,16m(root),10m(vol1) rootfstype=jffs2 root=31:02 ro PID hash table entries: 512 (order: 9, 8192 bytes) Console: colour dummy device 80x30 Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Unhandled fault: imprecise external abort (0x406) at 0x00000000 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: XIP fails on kernels 2.6.12 and higher 2005-09-22 16:08 XIP fails on kernels 2.6.12 and higher Korolev, Alexey @ 2005-09-22 17:20 ` Nicolas Pitre 2005-09-29 22:51 ` Jared Hulbert 2005-10-05 11:45 ` Konstantin Kletschke 1 sibling, 1 reply; 10+ messages in thread From: Nicolas Pitre @ 2005-09-22 17:20 UTC (permalink / raw) To: Korolev, Alexey; +Cc: linux-mtd On Thu, 22 Sep 2005, Korolev, Alexey wrote: > Hi all, > > I can't bootup XIP linux kernel on Mainstone platform (based on PXA270 > processor). I tried several different kernel versions > 2.6.9, 2.6.11 - bootup with enabled XIP kernel feature fine. > But 2.6.12 and 2.6.13 - faults at the start of booting. > I found very big changes between 2.6.12 and 2.6.11 in memory management > code. I suspect it brokes XIP. If you can find the exact intermediate release between 2.6.11 and 2.6.12 that broke it that would be extrelely helpful. > Do you know this problem? It has been reported in the past. > Has XIP been broken on all platforms or just on Mainstone platform only? This is generic code so probably on all platforms. Nicolas ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: XIP fails on kernels 2.6.12 and higher 2005-09-22 17:20 ` Nicolas Pitre @ 2005-09-29 22:51 ` Jared Hulbert 2005-10-05 11:42 ` Konstantin Kletschke 2005-10-12 19:05 ` Jared Hulbert 0 siblings, 2 replies; 10+ messages in thread From: Jared Hulbert @ 2005-09-29 22:51 UTC (permalink / raw) To: Nicolas Pitre; +Cc: Korolev, Alexey, linux-mtd > If you can find the exact intermediate release between 2.6.11 and 2.6.12 > that broke it that would be extrelely helpful. 2.6.11.12 works and 2.6.12 does not. I'll see if I can't find an intermediate release. > This is generic code so probably on all platforms. In mm/bootmem.c free_all_bootmem_core() does not return. It seems after i hits 288 if I step I get a imprecise data abort. It seems to occur at the __ClearPageReserved() which is an inlined __clear_bit() from include/asm/bitops.h. It does this at somewhere around page=0xC0042400 which seems perfectly normal and is readable/writeable with the JTAG debugger. Its really hard to replicate but it seems like a LDR op code is always at fault. I've tried 2 different toolchains and compiling with -O0, while the LDR command was always a little different it was basically a read to the same address range. It is really baffling me. Nothing seems wrong with what it is doing. I almost suspect hardware. I'm also testing on a Mainstone2 like Alexey. My OSK got destroyed. Can somebody confirm xipImage of 2.6.12 fails to boot where 2.6.11 runs on a different hardware platform? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: XIP fails on kernels 2.6.12 and higher 2005-09-29 22:51 ` Jared Hulbert @ 2005-10-05 11:42 ` Konstantin Kletschke 2005-10-12 19:05 ` Jared Hulbert 1 sibling, 0 replies; 10+ messages in thread From: Konstantin Kletschke @ 2005-10-05 11:42 UTC (permalink / raw) To: linux-mtd * Jared Hulbert <jaredeh@gmail.com> [Thu, Sep 29, 2005 at 03:51:50PM -0700]: > Alexey. My OSK got destroyed. Can somebody confirm xipImage of > 2.6.12 fails to boot where 2.6.11 runs on a different hardware > platform? http://lists.infradead.org/pipermail/linux-mtd/2005-September/013536.html Is about the same. I can't get it running on 2.6.13. I dont know anymore how I got 2.6.12 working or digged around the problems but IIRC there where several regarding the XIP stuff. Konsti ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: XIP fails on kernels 2.6.12 and higher 2005-09-29 22:51 ` Jared Hulbert 2005-10-05 11:42 ` Konstantin Kletschke @ 2005-10-12 19:05 ` Jared Hulbert 2005-10-12 20:23 ` Nicolas Pitre 1 sibling, 1 reply; 10+ messages in thread From: Jared Hulbert @ 2005-10-12 19:05 UTC (permalink / raw) To: Nicolas Pitre; +Cc: Korolev, Alexey, linux-mtd On 9/29/05, Jared Hulbert <jaredeh@gmail.com> wrote: > > If you can find the exact intermediate release between 2.6.11 and 2.6.12 > > that broke it that would be extrelely helpful. I found it. This is the change that was causing my problem ----------------------------------------------------------------------------------- commit 3871b11e8c07c9e6652f81ae5afc1ae3bb120c40 Author: mpm <mpm> Date: Tue Mar 8 18:05:40 2005 +0000 [PATCH] lib/sort: Replace insertion sort in exception tables Replace exception table insertion sort with lib/sort Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> BKrev: 422de974WUZpIt5eM36-PMJe_h6Nfg ----------------------------------------------------------------------------------- The following is the diff from the old git repository. Unpatching this in the 2.6.14-rc4 kernel made the xipImage work. What is going on??? Index: lib/extable.c =================================================================== --- lib/extable.c (revision 29) +++ lib/extable.c (revision 28) @@ -13,6 +13,7 @@ #include <linux/config.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/sort.h> #include <asm/uaccess.h> extern struct exception_table_entry __start___ex_table[]; @@ -25,26 +26,17 @@ * This is used both for the kernel exception table and for * the exception tables of modules that get loaded. */ +static int cmp_ex(const void *a, const void *b) +{ + const struct exception_table_entry *x = a, *y = b; + return x->insn - y->insn; +} + void sort_extable(struct exception_table_entry *start, struct exception_table_entry *finish) { - struct exception_table_entry el, *p, *q; - - /* insertion sort */ - for (p = start + 1; p < finish; ++p) { - /* start .. p-1 is sorted */ - if (p[0].insn < p[-1].insn) { - /* move element p down to its right place */ - el = *p; - q = p; - do { - /* el comes before q[-1], move q[-1] up one */ - q[0] = q[-1]; - --q; - } while (q > start && el.insn < q[-1].insn); - *q = el; - } - } + sort(start, finish - start, sizeof(struct exception_table_entry), + cmp_ex, NULL); } #endif ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: XIP fails on kernels 2.6.12 and higher 2005-10-12 19:05 ` Jared Hulbert @ 2005-10-12 20:23 ` Nicolas Pitre 2005-10-12 20:49 ` Konstantin Kletschke 2005-10-12 21:22 ` Jared Hulbert 0 siblings, 2 replies; 10+ messages in thread From: Nicolas Pitre @ 2005-10-12 20:23 UTC (permalink / raw) To: Jared Hulbert; +Cc: Korolev, Alexey, linux-mtd On Wed, 12 Oct 2005, Jared Hulbert wrote: > On 9/29/05, Jared Hulbert <jaredeh@gmail.com> wrote: > > > If you can find the exact intermediate release between 2.6.11 and 2.6.12 > > > that broke it that would be extrelely helpful. > > I found it. This is the change that was causing my problem > ----------------------------------------------------------------------------------- > commit 3871b11e8c07c9e6652f81ae5afc1ae3bb120c40 > Author: mpm <mpm> > Date: Tue Mar 8 18:05:40 2005 +0000 > > [PATCH] lib/sort: Replace insertion sort in exception tables > > Replace exception table insertion sort with lib/sort Are you using JFFS2? Does it still crash if you don't? Nicolas ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: XIP fails on kernels 2.6.12 and higher 2005-10-12 20:23 ` Nicolas Pitre @ 2005-10-12 20:49 ` Konstantin Kletschke 2005-10-12 21:22 ` Jared Hulbert 1 sibling, 0 replies; 10+ messages in thread From: Konstantin Kletschke @ 2005-10-12 20:49 UTC (permalink / raw) To: Nicolas Pitre; +Cc: Korolev, Alexey, linux-mtd At Wed, 12 Oct 2005 16:23:37 -0400 (EDT), Nicolas Pitre <nico@cam.org> wrote: > Are you using JFFS2? > > Does it still crash if you don't? I am curious if both times yes, could this be related to http://lists.infradead.org/pipermail/linux-mtd/2005-September/013882.html ? I will try out tomorrow... Konsti -- GPG KeyID EF62FCEF Fingerprint: 13C9 B16B 9844 EC15 CC2E A080 1E69 3FDA EF62 FCEF ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: XIP fails on kernels 2.6.12 and higher 2005-10-12 20:23 ` Nicolas Pitre 2005-10-12 20:49 ` Konstantin Kletschke @ 2005-10-12 21:22 ` Jared Hulbert 1 sibling, 0 replies; 10+ messages in thread From: Jared Hulbert @ 2005-10-12 21:22 UTC (permalink / raw) To: Nicolas Pitre; +Cc: Korolev, Alexey, linux-mtd > Are you using JFFS2? > > Does it still crash if you don't? No. Opps, this is on the wrong list, I'm not even building with the MTD. I meant to post this on arm-linux. Watch for it there, please. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: XIP fails on kernels 2.6.12 and higher 2005-09-22 16:08 XIP fails on kernels 2.6.12 and higher Korolev, Alexey 2005-09-22 17:20 ` Nicolas Pitre @ 2005-10-05 11:45 ` Konstantin Kletschke 2005-10-06 13:31 ` Konstantin Kletschke 1 sibling, 1 reply; 10+ messages in thread From: Konstantin Kletschke @ 2005-10-05 11:45 UTC (permalink / raw) To: linux-mtd * Korolev, Alexey <alexey.korolev@intel.com> [Thu, Sep 22, 2005 at 08:08:39PM +0400]: > Linux version 2.6.13.2 (root@localhost.localdomain) (gcc version 3.4.3) > #7 Thu S > ep 22 19:51:25 MSD 2005 > CPU: XScale-PXA270 [69054114] revision 4 (ARMv5TE) > Machine: Intel HCDDBBVA0 Development Platform (aka Mainstone) > Memory policy: ECC disabled, Data cache writeback > Run Mode clock: 208.00MHz (*16) > Turbo Mode clock: 416.00MHz (*2.0, active) > Memory clock: 104.00MHz (/2) > System bus clock: 104.00MHz > CPU0: D VIVT undefined 5 cache > CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets > CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets > Built 1 zonelists > Kernel command line: console=ttyS1,115200 mem=64M > mtdparts=phys_mapped_flash:512 > k(blob)ro,2m(kernel)ro,16m(root),10m(vol1) rootfstype=jffs2 root=31:02 > ro > PID hash table entries: 512 (order: 9, 8192 bytes) > Console: colour dummy device 80x30 > Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) > Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) > Unhandled fault: imprecise external abort (0x406) at 0x00000000 My 2.6.13 breaks near the same location: Linux version 2.6.13-imx1 (konsti@synertronixx3) (gcc version 3.3.5) #58 Wed Oct 5 11:38:26 CEST 2005 CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T) Machine: synertronixx scb9328 Memory policy: ECC disabled, Data cache writeback CPU0: D VIVT write-back cache CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets Built 1 zonelists Kernel command line: console=ttySMX0,115200n8 root=/dev/mtdblock3 rootfstype=jffs2 mtdparts=scb9328_flash:128k(U-boot)ro,128k(U-boot_env),2m(kernel),5m(root),-(fs) board=evb9328 evb9328 board found scb9328_init_irq PID hash table entries: 128 (order: 7, 2048 bytes) Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) K ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: XIP fails on kernels 2.6.12 and higher 2005-10-05 11:45 ` Konstantin Kletschke @ 2005-10-06 13:31 ` Konstantin Kletschke 0 siblings, 0 replies; 10+ messages in thread From: Konstantin Kletschke @ 2005-10-06 13:31 UTC (permalink / raw) To: linux-mtd * Konstantin Kletschke <lists@ku-gbr.de> [Wed, Oct 05, 2005 at 01:45:11PM +0200]: > My 2.6.13 breaks near the same location: In order to try debugging this I found out, that ther Kernel boots if I disable jffs2 support ... weird... K ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-10-12 21:22 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-09-22 16:08 XIP fails on kernels 2.6.12 and higher Korolev, Alexey 2005-09-22 17:20 ` Nicolas Pitre 2005-09-29 22:51 ` Jared Hulbert 2005-10-05 11:42 ` Konstantin Kletschke 2005-10-12 19:05 ` Jared Hulbert 2005-10-12 20:23 ` Nicolas Pitre 2005-10-12 20:49 ` Konstantin Kletschke 2005-10-12 21:22 ` Jared Hulbert 2005-10-05 11:45 ` Konstantin Kletschke 2005-10-06 13:31 ` Konstantin Kletschke
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox