skyeye 时钟频率
内核版本,2.6.14 和 2.6.35.4都遇到相同的问题,在start_kernel函数里面 执行到 local_irq_enable(),也就是打开中断后,就回不来了,似乎一直在执行中断。个人怀疑是 skyeye模拟的 arm 时钟频率太慢,导致指令执行过慢,甚至 连中断 任务都无法完成。我的配置文件如下
cpu:arm920t
mach: s3c2410x
#physical memory
#mem_bank: map=M, type=RW, addr=0x000000, size=0x0008000
mem_bank: map=M, type=RW, addr=0x00000000, size=0x00080000, file=./u-boot.bin, boot=yes
#mem_bank: map=M, type=RW, addr=0x00000000, size=0x00080000
mem_bank: map=M, type=RW, addr=0x30000000, size=0x04000000
mem_bank: map=M, type=RW, addr=0xc0000000, size=0x04000000
#mem_bank: map=M, type=RW, addr=0xc1000000, size=0x00600000, file=./initrd.img
#mem_bank: map=M, type=RW, addr=0xc1600000, size=0x00a00000
#all peripherals I/O mapping area
#mem_bank: map=I, type=RW, addr=0xfefa0000, size=0x00060000
mem_bank: map=I, type=RW, addr=0x48000000, size=0x20000000
mem_bank: map=I, type=RW, addr=0x19000300, size=0x00000020
net: type=cs8900a, base=0x19000300, size=0x20,int=9, mac=0:4:3:2:1:f, ethmod=tuntap, hostip=10.0.0.1
uart: mod=term
nandflash: type=s3c2410x,name=K9F1208U0B,dump=./nand.dump
[ 本帖最后由 playerthinker 于 2013-5-20 21:50 编辑 ] 目前执行2410 的时钟只实现了timer4,linux内核里面应该用的也是timer4。代码如下:
static void s3c2410x_timer_callback(generic_arch_t* arch_instance)
{
RW_WRLOCK(lock);
#if 0
io.timer.tcnt = io.timer.tcntb;
/*timer 4 hasn't tcmp */
//io.timer.tcmp = io.timer.tcmpb;
io.timer.tcnto = io.timer.tcntb;
io.srcpnd |= INT_TIMER4;
s3c2410x_update_int (arch_instance);
#endif
io.timer.tcnt -= 100;
if (io.timer.tcnt < 0) {
io.timer.tcnt = io.timer.tcntb;
/*timer 4 hasn't tcmp */
//io.timer.tcmp = io.timer.tcmpb;
io.timer.tcnto = io.timer.tcntb;
io.srcpnd |= INT_TIMER4;
s3c2410x_update_int (arch_instance);
}
RW_UNLOCK(lock);
}
每次tcnt自减100,来判断是否达到需要触发中断的条件。
-- ksh 不知能否 帮助定位问题
页:
[1]