直接按复位按键进入:
--- High Performance Frequecy is 32768 khz---
Changed KITL zone mask to 0x00008001
ERROR: OALKitlInit: No supported KITL device at interface 0 bus 0 location 0x 8x
-OEMInit
Error Reporting Memory Reserved, dump size = 0004b000
Setting up softlog at 0x92fb1000 for 0x800 entries
Booting Windows CE version 6.00 for (ARM)
&pTOC = 8602fc1c, pTOC = 85fc1578, pTOC->ulRamFree = 86034000, MemForPT = 00001000
Booting kernel with existing memory configuration:
Memory Sections:
[0] : start: 86036000, extension: 0001a000, length: 0cf61000
NK Kernel: DEBUGCHK failed in file C:/yzkiqfe/private/winceos/COREOS/nk/kernel/nknormal/../vm.c at line 3377
冷启动进入:
--- High Performance Frequecy is 32768 khz---
Changed KITL zone mask to 0x00008001
ERROR: OALKitlInit: No supported KITL device at interface 0 bus 0 location 0x 8x
-OEMInit
Error Reporting Memory Reserved, dump size = 0004b000
Setting up softlog at 0x92fb1000 for 0x800 entries
Booting Windows CE version 6.00 for (ARM)
&pTOC = 8602fc1c, pTOC = 85fc1578, pTOC->ulRamFree = 86034000, MemForPT = 00001000
Old or invalid version stamp in kernel structures - starting clean!
Configuring: Primary pages: 53089, Secondary pages: 0, Filesystem pages = 26544
Booting kernel with clean memory configuration:
Memory Sections:
[0] : start: 86036000, extension: 0001a000, length: 0cf61000
NKStartup done, starting up kernel.
Windows CE KernelInit
Reserve VM for kernel XIP DLls, first = c0010000, last = c1210000
g_pprcNK == 0x8602daa0
Updated eptr->e32_vsize to = 0003b000
Initializing Memory Mapped File Support
Scheduling the first thread.
Detecting VFP... VFP Found!
LoaderInit: Initialing loader
Updated eptr->e32_vsize to = 0003b000
Updated eptr->e32_vsize to = 000a2000
Updated eptr->e32_vsize to = 00023000
PGPOOL: Reserved 768 pages for Loader pool
PGPOOL: Reserved 256 pages for File pool
OSAXST0: Platform Name = EVM3530
正常进入界面。
这下面有一段解释:
Inside Cold and Warm Reboot
Inside Cold and Warm RebootSubmitted by: Nat Frampton, Windows Embedded MVP Issue: When doing a reboot for Windows CE 3.0 the following debug messages are displayed:
Occasionally when doing a cold boot, the 'existing' message is displayed. When this happens, systems lock up. How does CE determine whether or not to use the existing memory configuration? Is there a method by which you can ensure that the existing memory configuration is not used? We would like to determine in OEMInit() if we are performing a warm boot and then not hook the OEMReadRegistry function. How does filesys determine whether or not the registry resides in RAM? Here's the TipWhen booting, the Kernel is looking for a signature in the ROMHDR data structure to determine if you are performing a cold or warm boot. You will need to include the ROMldr.h file into your OEM code. The cold boot or warm boot is determined by looking for a three DWORD signature at the ulRAMFree member of the ROMHDR data structure. Include the Romldr.h file in your OAL code. Declare the following variable in your OAL:
The occasional warm boot during a cold boot is because the memory was not cleared. You will need to add a clearing of the data structure into your shutdown code. That part of memory that held the signature was not refreshed and it still has the old value you in. If you unsure by zeroing the signature during a shutdown you shouldn't have this problem again.
You can test this on your own platform. If you see the signature then you can then determine if you want to hook the cduring the OEMInit call. |
这里就是说因为内存没有清除,导致存在pTOC指针的值,认为是热复位!
查找源码看到:如果不是fForceCleanBoot和LogPtr->magic1 != LOG_MAGIC则认为是热启动,这样就会pTOC的值。
如果这时,部分RAM内容被更改,则直接导致错误,不能启动。我这Eboot运行时即从nand拷贝入RAM,区域处于CE的RAM段内部,这样导致了对里面对象存储等的更改,故启动不起来了。
解决办法要么是强制干净启动屏蔽热启动,在OEMInit里面增加NKForceCleanBoot,或者将eboot空间独立开来,直接就实现热启动!
看看:
void NKForceCleanBoot (void)
{
fForceCleanBoot = TRUE;
if (LogPtr)
LogPtr->magic1 = 0;
}
就知道,作用就是清除pTOC指向的标记或者设置强制干净启动。