A couple of weeks ago I have posted the following question to this
group:
http://groups.google.com/group/microsoft.public.windowsce.platbuilder/browse_thread/thread/575eef4c5487fa21
However, I have now found out that one reason for this problem is that
the TLB is not written with the right alignment:
Here are some lines of armtrap.s in the private section of the kernel
code
WINCE500\PRIVATE\WINCEOS\COREOS\NK\KERNEL\ARM:
KDataArea
PTs % 0x4000 ; space for first-level page table
ExceptionVectors
% 0x0400 ; space for exception vectors
% 0x0400 ; space for interrupt stack
% 0x0100 ; space for FIQ stack
% 0x0700 ; space for Abort stack
KPage % 0x0c00 ; space for kernel stack & KDataStruct
HighPT % 0x0400 ; space for 2nd level page table to map
0xFFF00000
KDEnd % 0
The Array PTs is reserved for the TLB. According to the PXA255 Manual,
the CP15 Register TTBR can only hold addresses which define the upper
18 Bits (16 k alignment), but the base address passed to the CP15_TTBR
is 0xA05BB000, which is rounded down to 16k Alignment 0xA05B8000. This
of yourse fails while executing.
NK.exe .pdata starts at 8eb3b000, which is probably the reason why the
misalignment occures.
My question: How can I force 16 k alignment of the Arrays without
having to compile private code ?
Has anyone discovered the same problems with PB5.0 on XScale platforms
?
After trying to place the array to a properly aligned memory region, I
retried ... the TLB then was in place but however, the TURN ON of the
MMU failed again.
There is an issue within the help topics of PB:
"If a device with an XScale CPU hangs when executing the instruction
that enables MMU, you can attempt to isolate the problem by including
an identity mapping for FLASH memory in OEMAddressTable. If the
identity mapping allows execution to continue past the failed MMU
instruction, then this indicates that the problem is specific to the
XScale CPU. Although the identity mapping can get you past the MMU
enable instruction, it is likely to cause the system to crash later in
the boot process when virtual memory is accessed.
Once you identify that this is the XScale specific issue, you can
workaround this problem by performing the following steps:
1. Create the identity mapping in the first call to OEMARMCacheMode.
You can determine if it is the first call by testing whether the
instruction counter is a physical address, in which case MMU is not
enabled yet.
2. In OEMInitDebugSerial, remove the identity mapping.
"
We use strataflash (two 16 MB units) and I remapped it onto itself, but
it failed again.
I am completely stuck now and need some advice.
Thank you.