This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: Network driver problem only with larger programs (cache issues?)
- From: "Joe Porthouse" <jporthouse at toptech dot com>
- To: <jay at systech dot com>, <ecos-discuss-return-35956-jporthouse=toptech dot com at ecos dot sourceware dot org>, <ecos-discuss-return-35843-jporthouse=toptech dot com at ecos dot sourceware dot org>
- Cc: <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 31 Aug 2006 00:18:36 -0400
- Subject: RE: [ECOS] Network driver problem only with larger programs (cache issues?)
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=toptech.com; s=MDaemon; t=1156997932; x=1158207532; q=dns; h=DomainKey-Signature: Received:Reply-To:From:To:Cc:Subject:Date:Organization: MIME-Version:Content-Type:Content-Transfer-Encoding:Thread-Index: In-Reply-To:Message-ID; b=SWYX2ddTHyoDt8TKOSdfQ7NVlrkXN4n8CygGby 24eV+eoEuOqxfE3uC817rbN03fzHfy1BAJLLQ+3ho2bfyoZ5/zTxloc/NxpF3+vk yyZaEwqk1u128DT2Gu79EHrgx7o2U8ePo5vDDpdxJgZqEb6kkNdyQ/TLVT/iUe7K 3vJy8=
- Reply-to: <jporthouse at toptech dot com>
Ok, I'm positive I'm going nuts now.... Code seems good, if I can only get
the processor to correctly execute it.
Started seeing the code lock up after 10-30 minutes without a JTAG attached
so I started to look further into the possible cache issues.
Attaching the JTAG and again the code can not make it through the
cyg_do_net_init(). Same problem, a jump to address 0x0100330 from a place
in the code that it should not occur.
Next I modified the platform setup code to never enable the ICache and
DCache. Code runs slower, but same problem.
Next modified the MMU tables to make the FLASH and SDRAM _UNCACHED and
_NOBUF. Still the same problem.
In the trace I noticed DABORT, UNDEF, and PABORT states. I did not know if
this was a byproduct of setting break points (also saw FIRQs when I don't
use them). To help rule out memory timing issues, I modified the platform
setup to including the max timing parameters on all memory and I/O selects
(0x7ff0, 0x7ff4, 0x7ffc, etc). Still the same problem.
Upon a closer look at the trace I see the jump is now going to 0x010032c
(data not code) from a slightly different place in the code, but further
into the cyg_do_net_init() routine.
Below in the trace with a breakpoint set at 0x0010032c. Notice that just
before -00018 the "BL cyg_callout_init" instruction is not executed and
instead execution simply falls through to the next address. I also see
UNDEF, PABORT, DABORT and IBRA states. Are these my problem? What else
should I do to try to eliminate them?
Any help would be greatly appreciated.
-00020 IBRA 07 001003F0 000FFAAC
000FFAAC e91ba870 LDMDB R11,{R4-R6,R11,SP,PC}
timeout.c Line 274 (cyg_timeout)
274 for (e = _timeouts, i = 0; i < NTIMEOUTS;
i++, e++) {
001003F0 e59f4060 LDR R4,00100458
timeout.c Line 273 (cyg_timeout)
273 stamp = 0; // Assume no slots available
001003F4 e3a05000 MOV R5,#00000000
001003F8 e1a06000 MOV R6,R0
001003FC e1a02005 MOV R2,R5
timeout.c Line 275 (cyg_timeout)
275 if ((e->flags & CALLOUT_PENDING) == 0) {
00100400 e5943014 LDR R3,[R4,#014]
00100404 e2822001 ADD R2,R2,#00000001
00100408 e3130004 TST R3,#00000004
-00019 DBRA 02 00000000 0010040C
0010040C 0a000006 BEQ cyg_timeout+58
timeout.c Line 277 (cyg_timeout)
277 callout_init(e);
0010042C e1a00004 MOV R0,R4
00100430 eb000009 BL cyg_callout_init
-00018 DBRA 03 00000000 00000000
-00017 00 00000000 00000000
-00016 UNDEF 00 00000000 00000000
-00015 00 00000000 00000000
-00014 PABORT 00 00000000 00000000
-00013 IBRA 00 00100438 00100434
timeout.c Line 278 (cyg_timeout)
278 e->flags = CALLOUT_LOCAL;
00100434 e3a0c001 MOV R12,#00000001
-00012 DBRA 03 00000000 00000000
-00011 00 00000000 00000000
-00010 UNDEF 00 00000000 00000000
-00009 00 00000000 00000000
-00008 PABORT 00 00000000 00000000
-00007 IBRA 00 0010043C 00100438
timeout.c Line 279 (cyg_timeout)
279 callout_reset(e, delta, fun, arg);
00100438 e1a01007 MOV R1,R7
-00006 DBRA 03 00000000 00000000
-00005 00 00000000 00000000
-00004 UNDEF 00 00000000 00000000
-00003 00 00000000 00000000
-00002 DABORT 00 00000000 00000000
-00001 IBRA 00 00100440 0010043C
0010043C e1a02008 MOV R2,R8
TRIG DBRA 00 00000000 00000000
PC is now 0x0010032c!!!
Thanks,
Joe Porthouse
Toptech Systems, Inc.
Longwood, FL 32750
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss