Hello all!
Excuse for my bad English.
My board on ARM920 processor has 64M SDRAM begins at 30000000. I have
very simple address table:
DCD 0x80000000, 0x30000000, 64 ; 64 MB SDRAM
DCD MEMCTRL_BASE, BWSCON, 1 ; Memory control register
DCD USBHOST_BASE, USBHOSTBASE, 1 ; USB Host register
DCD INT_BASE, SRCPND, 1 ; Interrupt Control register
DCD DMA_BASE, DISRC0, 1 ; DMA control register
DCD CLKPWR_BASE, LOCKTIME, 1 ; Clock & Power register
DCD LCD_BASE, LCDCON1, 1 ; LCD control register
DCD NAND_BASE, NFCONF, 1 ; NAND flash control register
DCD UART0_BASE, ULCON0, 1 ; UART control register
DCD PWM_BASE, TCFG0, 1 ; PWM timer register
DCD USBDEV_BASE, 0x52000000, 1 ; USB device register
DCD WATCH_BASE, WTCON, 1 ; Watchdog Timer register
DCD IIC_BASE, IICCON, 1 ; IIC control register
DCD IIS_BASE, IISCON, 1 ; IIS control register
DCD IOP_BASE, PCONA, 1 ; I/O Port register
DCD RTC_BASE, 0x57000000, 1 ; RTC control register
DCD ADC_BASE, ADCCON, 1 ; A/D convert register
DCD SSP_BASE, SPCON0, 1 ; SPI register
DCD SD_BASE, SDICON, 1 ; SD Interface register
DCD 0x00000000, 0x00000000, 0 ; End of Table (MB MUST BE ZERO!)
Virtual addresses of registers are in range 0x90800000....0x91A00000.
And simple config.bib:
#define CHAIN_ADDRESS 80400000
CHAIN $(CHAIN_ADDRESS) 00001000 RESERVED
pdwXIPLoc 00000000 $(CHAIN_ADDRESS) FIXUPVAR
NK 80000000 00400000 RAMIMAGE
CHAIN 80400000 00001000 RESERVED
DRIVERS 80401000 001BF000 RAMIMAGE
RAM 805C0000 03840000 RAM
It seems, that here all is correct.
In bootloader I load kernel image from NAND flash into SDRAM and then
jump to it. But at system startup I see the following output (my own
comments is in () ):
Booting Windows CE version 4.20 for (ARM)
&pTOC = 8000942c, pTOC = 80119908, pTOC->ulRamFree = 805f2000, MemForPT
= 00000000
Configuring: Primary pages: 14345, Secondary pages: 0, Filesystem pages
= 7172
Booting kernel with clean memory configuration:
Memory Sections:
[0] : start: 805f3000, extension: 00004000, length: 03809000
Sp=ffffc7cc
ARMInit done.
.............
.....(loading nk.exe)......
.....(loading coredll.dll)......
.....(loading filesys.dll)......
............
0x83def6cc LoadOneLibraryPart2: coredll.dll, 0, 0x0
0x83def6cc: LoadOneLibrary coredll.dll (coredll.dll)
0x83def6cc: OpenExe: coredll.dll
0x83def6cc: OpenExe: plain name coredll.dll
0x83def6cc: OpenExe coredll.dll: ROM: 8011999c
0x83def6cc: (10) o32rp->o32_realaddr = 03f91000
0x83def6cc: ChkDebug returns 1
0x83def6cc: lpszFileName = 'coredll.dll', pMod->bTrustLevel = 2
0x83def6cc: BasePtr is 03f90000
0x83def6cc: LoadO32 : section 0
0x83def6cc: (2) o32rp->o32_realaddr = 03f91000
0x83def6cc: virtualcopying 03f91000 <- 800b3000 (65a6b)!
0x83def6cc: VirtualCopy 03f91000 <= 800b3000 size=65a6b prot=20
0x83def6cc: MakePagePerms: 00000020 returns 0000000e
0x83def6cc: Scanning 102 pages. ixFirB=ffff83df, dwVMBase = 02000000
0x83def6cc: Scanning block 83dfc398 (ffff83df), ix=1 cPgScan=102
0x83def6cc: Scanning block 83dfc3a8 (0), ix=0 cPgScan=102
0x83def6cc: ScanRegion failed err=87
0x83def6cc: VirtualCopy failed.
0x83def6cc: LoadO32 Failed
0x83def6cc: LoadO32 failed 0x0000000e
0x83def6cc: LoadOneLibraryPart2: COREDLL.dll, 0, 0x0
0x83def6cc: LoadOneLibrary COREDLL.dll (COREDLL.dll)
0x83def6cc: OpenExe: COREDLL.dll
0x83def6cc: OpenExe: plain name COREDLL.dll
0x83def6cc: OpenExe COREDLL.dll: ROM: 8011999c
0x83def6cc: (10) o32rp->o32_realaddr = 03f91000
0x83def6cc: ChkDebug returns 1
0x83def6cc: lpszFileName = 'COREDLL.dll', pMod->bTrustLevel = 2
0x83def6cc: BasePtr is 03f90000
0x83def6cc: LoadO32 : section 0
0x83def6cc: (2) o32rp->o32_realaddr = 03f91000
0x83def6cc: virtualcopying 03f91000 <- 800b3000 (65a6b)!
0x83def6cc: VirtualCopy 03f91000 <= 800b3000 size=65a6b prot=20
0x83def6cc: MakePagePerms: 00000020 returns 0000000e
0x83def6cc: Scanning 102 pages. ixFirB=ffff83df, dwVMBase = 02000000
0x83def6cc: Scanning block 83dfc398 (ffff83df), ix=1 cPgScan=102
0x83def6cc: Scanning block 83dfc3a8 (0), ix=0 cPgScan=102
0x83def6cc: ScanRegion failed err=87
0x83def6cc: VirtualCopy failed.
0x83def6cc: LoadO32 Failed
0x83def6cc: LoadO32 failed 0x0000000e
0x83def6cc: VirtualFree @03f90000 size=6e000 freetype=4000
0x83def6cc: VirtualFree decommitting block 1f9 page 0.
0x83def6cc: Scanning 110 pages. ixFirB=ffff83df, dwVMBase = 02000000
0x83def6cc: Scanning block 83dfc398 (ffff83df), ix=0 cPgScan=110
0x83def6cc: Scanning block 83dfc3a8 (0), ix=0 cPgScan=110
0x83def6cc: VirtualFree failed.
0x83def6cc: DoImport Failed! Unable to import Library 'COREDLL.dll' for
'filesys.exe'
0x83def6cc: CreateNewProc failure!
...................
0x83def6cc: Data Abort: Thread=83def6cc Proc=805e8578 'filesys.exe'
.................
0x83def6cc: NKDispatchException(c204f960): Proc=805e8578
ControlPc=00000000 SP=c204fee0, PSR = 2000001f
0x83def6cc: CHECKTAKECRITSEC: Violation of critical section ordering at
index 7, lpcs 805e8460
0x83def6cc: NK Kernel: DEBUGCHK failed in file
d:\mckendric\private\winceos\coreos\nk\kernel\schedule.c at line 3865
0x83def6cc: ExceptionDispatch: pexi=c204f6e4 Pc=8002f394
0x83def6cc: addr 43800ae, id 1, sp c204f738, fsr=00000007, BVA =
8002f394
0x83def6cc: DEBUG_BREAK @8002f394 MD=1f Ignored.
0x83def6cc: NKDispatchException: returning failure. Flags=0
0x83def6cc:
Unhandled exception c0000005:
0x83def6cc: Terminating thread 83def6cc
0x83def6cc: GuardCommit 043800ae
0x83def6cc: ExceptionDispatch: pexi=c204fce4 Pc=03fa5e04
0x83def6cc: addr 5fff7ec, id 4, sp c204fd0c, fsr=00000007, BVA =
03fa5e04
0x83def6cc: Auto-committing 05fff7ec
0x83def6cc: ExD: ID_DATA_ABORT
0x83def6cc: ExD: addr = 05fff7ec
0x83def6cc: ProcessPageFault: Read @05fff7ec, InSysCall() = 0
............
0x83def6cc:
Unhandled exception c0000005:
0x83def6cc: Exception 'Data Abort' Thread=83def6cc AKY=00000003
PC=2000001f BVA=05fff7ec
0x83def6cc: R0=8002fa7c R1=00000020 R2=ffffcbac R3=04060000
0x83def6cc: R4=00000000 R5=00000000 R6=00000000 R7=00000000
0x83def6cc: R8=00000000 R9=00000000 R10=00000000 R11=00000000
0x83def6cc: R12=c204fd68 SP=8002f9f0 Lr=03fa5dc8 Psr=2000001f
0x83def6cc: Can't terminate thread 83def6cc, sleeping forever
........
NK Kernel: DEBUGCHK failed in file
d:\mckendric\private\winceos\coreos\nk\kernel\schedule.c at line 4214
Who can explain me why filesys.exe can't load coredll.dll? I think that
this error causes the next following exceptions and system hang. Or
this is normal situation? But then whence occur data aborts? Some
errors causes in VirtualCopy.It means that I have incorrect memory
configuration?... As you saw, my address table and config.bib is very
simple - there is no place to take a mistake!.. I tried to
enable/disable data cache, set various combinations of C and B bits for
cache configure - all this has not helped. How to correct this errors?
Thanks for your help!
Regards,
Sergey.