QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1294|回复: 3

未定义指令

[复制链接]
发表于 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支援浮点处理吗?还是说这个例子有问题?
 楼主| 发表于 2005-10-28 15:11:04 | 显示全部楼层
我在试用自己编译的lubbock Kernel影像时,遇到相若的问题,有条指令0xee151f10被指为未定义指令,但那是

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


原来的讯息:

SKYEYE ARMul_MRC,CANT UndefInstr  CPnum 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 : c02efed8  ip : c02eff48  fp : c02eff44
r10: c01e5460  r9 : 60000013  r8 : c01e55ec
r7 : 00000002  r6 : 00000000  r5 : c02eff0c  r4 : ffffffff
r3 : 60000013  r2 : c001620c  r1 : 60000000  r0 : c02eff20
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  Segment kernel
Control: 3937  Table: A0004000  DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc02ee194)
回复

使用道具 举报

 楼主| 发表于 2005-10-28 17:48:24 | 显示全部楼层
查看代码时发现有些问题,在ARMul_MRC()里,会呼叫state->MRC来处理各个Coprocessor的指令,而CP15实际上由xscale_mmu_mrc()处理。

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

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

[code:1]xscale_mmu_mrc():

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

  return data;[/code:1]

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

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

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

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

使用道具 举报

发表于 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.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-23 14:57 , Processed in 0.037876 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表