benlau 发表于 2005-10-27 23:04:52

未定义指令

大家好,

我在下载并编辑好了skyeye 1.0.0后,用testsuite 2.0测试,可是在PXA那个例子里跑/bin/same/same时遇到这个错误讯息:

cd testsuite/2.0/pxa/2.6.x
skyeye -e vmlinux

[删除]

/> /bin/same/same
MiniGUI: in src/main/main.c:main()
MiniGUI: in src/kernel/init.c:InitGUI()
SKYEYE ARMul_STC,NOT ALLOW, undefinstr,CPnum is 2, instr eca0420c, addr be8d0c58
SKYEYE ARMul_STC,NOT ALLOW, undefinstr,CPnum is 2, instr eca0420c, addr be8d0b04
SKYEYE ARMul_LDC,NOT ALLOW, underinstr, CPnum is 2, instr ecbc420c, addr be8d0b04
SKYEYE ARMul_LDC,NOT ALLOW, underinstr, CPnum is 2, instr ecbc420c, addr be8d0c58
SKYEYE ARMul_STC,NOT ALLOW, undefinstr,CPnum is 2, instr eca0420c, addr be8d0c58
SKYEYE ARMul_STC,NOT ALLOW, undefinstr,CPnum is 2, instr eca0420c, addr be8d0b04
SKYEYE ARMul_LDC,NOT ALLOW, underinstr, CPnum is 2, instr ecbc420c, addr be8d0b04
SKYEYE ARMul_LDC,NOT ALLOW, underinstr, CPnum is 2, instr ecbc420c, addr be8d0c58

MiniGUI: in src/gal/gal.c:InitGAL()

MiniGUI: in src/ial/ial.c: InitIAL() !
!!!enter ts_open
drivers/misc/skyeye_ts_drv.c: IRQ 15 attached to touch screen

ICPR=0
skyeye touch screen driver: init hardware done..


MiniGUI: Init IAL engine success !
MiniGUI: Please wait for the end of initialization !

MiniGUI: initialization has finished and will enter MninGUIMain()!
MiniGUI: Please wait for one minute, the speed is slow. We will optimize it !


然之后程式就此挂掉,没有GUI的图像出现。

至於那句underinstr提及的ecbc420c是指sfm指令,skyeye支援浮点处理吗?还是说这个例子有问题?

benlau 发表于 2005-10-28 15:11:04

我在试用自己编译的lubbock Kernel影像时,遇到相若的问题,有条指令0xee151f10被指为未定义指令,但那是

mrc   15, 0, r1, cr5, cr0, {0}

原来的讯息:


SKYEYE ARMul_MRC,CANT UndefInstrCPnum is f, instr ee151f10
Internal error: Oops - undefined instruction: 0 [#1]
Modules linked in:
CPU: 0
PC is at v5t_early_abort+0x0/0x2c
LR is at __dabt_svc+0x30/0x60
pc : [<c0025180>]    lr : [<c001c890>]    Not tainted
sp : c02efed8ip : c02eff48fp : c02eff44
r10: c01e5460r9 : 60000013r8 : c01e55ec
r7 : 00000002r6 : 00000000r5 : c02eff0cr4 : ffffffff
r3 : 60000013r2 : c001620cr1 : 60000000r0 : c02eff20
Flags: nZCvIRQs offFIQs onMode SVC_32Segment kernel
Control: 3937Table: A0004000DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc02ee194)

benlau 发表于 2005-10-28 17:48:24

查看代码时发现有些问题,在ARMul_MRC()里,会呼叫state->MRC来处理各个Coprocessor的指令,而CP15实际上由xscale_mmu_mrc()处理。

ARMul_MRC():
....
cpab = (state->MRC[CPNum]) (state, ARMul_FIRST, instr, &result);
....

在我遇到问题的那条指令,作用是去CP15里拿fault status的状态,然后

xscale_mmu_mrc():

....
case MMU_FAULT_STATUS:
//      printf("mmu_mrc read FSR      \n");
      data = state->mmu.fault_status;
      break;
....

return data;

可是在返回到ARMul_MRC()时,它会把返馈的结果当作错误代码处理:


if (cpab == ARMul_CANT)
    {
      printf ("SKYEYE ARMul_MRC,CANT UndefInstrCPnum is %x, instr %x\n",
            CPNum, instr);
      ARMul_Abort (state, ARMul_UndefinedInstrV);
      /* Parent will destroy the flags otherwise.*/
      result = ECC;
    }

Fault Status并没有相应关於未定义指令的代码,但若刚才那个回馈值与ARMul_CANT(即1)相同的话就会产生这个错误,我把这段代码删除了就能成功运行kernel。

可以请开发者们看一看吗?

ksh 发表于 2005-11-2 21:56:02

Please report a bug on http://gro.clinux.org/tracker/?atid=981&group_id=327&func=browse. Thanks a lot for your help.
页: [1]
查看完整版本: 未定义指令