复位SDRAM未清空导致热启动失败

直接按复位按键进入:

--- 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

这里就是说因为内存没有清除,导致存在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指向的标记或者设置强制干净启动。

你可能感兴趣的:(Wince)