After executing MDCreateThread data abort occurs



hello experts,

I'm having problems getting WinCE to boot on an ARM920-based
target.The code under Startup and KernelStart routines are running fine
until
KernelInit. And my MMU is setup correctly and mapping is done with
respect to the configurations in OEMAddressTable, Config.bib, target
memory map.

So, it seems like everything looks ok in Page table settings. It
initializes the OEM debug serial routines (like OEMDebugInitSerial and
OEMDebugWriteString) and successfully makes it through OEMInit() When
it enters into KernelInit, it passes through

1.HeapInit
2.InitMemoryPool
3.ProcInit
and get an abort exception from SchedInit routine at 0xC200Fxxx
Tracing through the Kernel code, it looks like it's making it to the
actual loading of nk.exe. Inside SchedInit, it does DoVirtualAlloc() of
0xc2000000. MDCreateThread() immediately tries to write to this
location. As there's no physical memory location mapped with that
virtual address, i get an abort exception. The code seems to get the
base address from SECURE_VMBASE->0xc2000000 in ProcInit routine where
it equates this value to pCurProc->dwVMBase = SECURE_VMBASE;

I've tried to allocate my physical memory location to this virtual
location 0xc2000000 using OEMAddressTable but it did't seemd to work.
Page table routines in KernelStart is meant to map virtual locations
only from 0x80000000 to 0x9FFFFFFF and from 0xA0000000 to 0xBFFFFFFF.
So the Kernel is not letting this address 0xc2000000 to be programmed.

It seems like kernel correctly program the MMU and can see the kernel
page entries (e.g., exception vectors, etc.) get mapped
correctly, so I'm pretty sure our MMU routines are all ok as well as
our cache routines.

I didn't get any debug message because Iam using Retail option. I
didn't receive any retail message also.

OEM ADDRESS TABLE that I'm using:
OEMAddressTable
;;;-------------------------------------------------------------
;;; Virt Addr Phys Addr MB
;;;-------------------------------------------------------------
DCD 0x88000000, 0x08000000, 31
DCD 0x8C000000, 0x10000000, 1

DCD 0x80200000, 0x00200000, 1
DCD 0x80300000, 0x00300000, 1

DCD 0x00000000, 0x00000000, 0

END


;;;-------------------------------------------------------------
Config.BIB file That I'm using
;;;-------------------------------------------------------------

MEMORY

; RAM image
IF IMGFLASH !
NK 88200000 00100000 RAMIMAGE ;
RAM 88300000 00D00000 RAM ;
ENDIF


; Common RAM areas
DRVGLOBAL 88020000 00001000 RESERVED
EDBG 88030000 00020000 RESERVED
DMA_POOL 88050000 000B0000 RESERVED
DISPLAY 88100000 00100000 RESERVED

CONFIG
COMPRESSION=ON
KERNELFIXUPS=ON
PROFILE=OFF
ROMFLAGS=0
ROMWIDTH=32

IF IMGFLASH !
AUTOSIZE=ON ; Use Autosize to utilize unused RAM for
NK.BIN
ROMSIZE =00100000 ; Change this size if your image is bigger
ROMSTART=88200000 ; Run for SDRAM Version
FSRAMPERCENT=0x80808080
ROMOFFSET=80000000
ENDIF


IF IMGPROFILER
PROFILE=ON
ENDIF


IF WINCEDEBUG
FSRAMPERCENT=0x20202020
ENDIF

;
; ROMFLAGS is a bitmask of options for the kernel
; ROMFLAGS 0x0001 Disallow Paging
; ROMFLAGS 0x0002 Not all KMode
; ROMFLAGS 0x0004 CELog enable
;
IF IMGCELOGENABLE !
IF IMGNOTALLKMODE
ROMFLAGS=2
ENDIF
IF IMGNOTALLKMODE !
ROMFLAGS=0
ENDIF
ENDIF

IF IMGCELOGENABLE
IF IMGNOTALLKMODE
ROMFLAGS=6
ENDIF
IF IMGNOTALLKMODE !
ROMFLAGS=4
ENDIF
ENDIF


;;;--------------------------------------------------------------------


Is there any other solution or we are missing something?


When we are working to troubleshoot we found that exception vectors
are not working properly due to our debugger. We have fixed that
problem now ( we are using rowley cross studio development tools). As
per documentation, when MDCreateThread() immediately tries to write at
0xC200xxxx, exception vector for data abort should occur and
OEMDataAbortHanlder should be called, which happens as required. In
DataAbortHandler, when CommonHandler is called, again data abort occurs
(pc switches to exception vector). iam not able to return form the
handler.
Can you please guide me in this regards. as my project is in very
critical situation, iam in a postion to solve the problem in all means.


Thanks & Regards
Subramaniam.P
Project Manager
Trioz Technologies India (P) Ltd.
Rathinam Techno Park
Echanari
Coimbatore
Tamil Nadu
India - 641021

Ph - +914222673750
Fax - +914222679845
web - www.trioztech.com

.



Relevant Pages

  • Re: After executing MDCreateThread data abort occurs
    ... This is almost always RAM configuration, memory map, or cache problems. ... target.The code under Startup and KernelStart routines are running fine ... So the Kernel is not letting this address 0xc2000000 to be programmed. ...
    (microsoft.public.windowsce.embedded)
  • Linux Kernel Security - Can it ever be 100%
    ... Linux kernel will ever be as good as I would like it to be. ... am still hoping kernel security will eventually be as good as the security ... read input from a user process, or can we say that 95% of user inputs can ... standardized validation routines with no ...
    (Debian-User)
  • Re: Linux Kernel Security - Can it ever be 100%
    ... > Linux kernel will ever be as good as I would like it to be. ... > of a typical microprocessor instruction set. ... It depends on your workload, but under most, yes, syscalls are very ... > limited to just those routines where this transaction was time-critical, ...
    (Debian-User)
  • Re: [PATCH 12/39] NLKD/i386 - time adjustment
    ... >>I really do not see the relavence of the run time library patches ... > these routines must not be used by code outside of the debugger (and the ... > they'd be hidden from the rest of the kernel (and also so that they'd ...
    (Linux-Kernel)
  • Re: Win32 API and Kernel
    ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... >>> Now inside the kernel, there is a set of Kernel Support Routines ... >>> that allow programming of device drivers, ...
    (microsoft.public.win32.programmer.kernel)

Loading