-
Notifications
You must be signed in to change notification settings - Fork 2
/
log201001vimicro.txt
2762 lines (2429 loc) · 148 KB
/
log201001vimicro.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
10:51 2010-1-2
时间管理
0, 9:45
1, 计划
1), VC0816, 量产, 今天一定要完成tag测试代码 code. 明天完成测试. 然后讨论机台程序包括哪些东西.
2), perl学习. 希望可以完成section搜索.
"19:05 2009-12-31"的流程还可以优化. 发现没有state都要先检查是否是"section start"
2, 执行
1), 20' perl学习. 见"11:16 2010-1-2"
2), VC0816, 量产, cache tag测试, 见"11:27 2010-1-2"
3), arm arm 7-ar
3, 次日计划<转移>
1), 除了VC0816和perl学习. 每天浏览一章arm arm 7-ar.
2), VC0816, 实验修改tlb后原有程序能否正常继续运行. 如果可以, 希望明天完成VC0816量产测试编写和测试.
3), 别忘了填加班记录, 报销打车费.
11:16 2010-1-2
软件技巧, 正则表达式, editplus, 搜索, perl, logAssistant, 续
1, 发现12月31日的脚本只搜索第一个文件. 原因是当前文件结束时直接用了"exit"退出整个程序.
2, perl中单词边界是"\b", 不是"\<", "\>".
11:27 2010-1-2
VC0816, SV, 量产, cache测试, tag, arm学习, mmu, tlb, tlb lockdown, 续
1, 目的: 测试cache tag读写.
clock: arm: 336, bus: 168.
tag写: 访问没有在cache里面的数据/指令, cache 读入新的数据/指令时更新tag.
tag读: 访问已经在cache里面的数据/指令.
2, 分析:
高速只有sram可用, 所以只能是把sram空间(全部?部分?)重新映射.
不论怎样映射, 映射表都有变化, 我们的页表在sdram中, 高频时没有sdram, 所以只能利用cp15 c15寄存器修改tlb.
由于要修改tlb, 不清楚修改tlb时是否可以关mmu时修改. 感觉可能不行, mmu关闭的时候映射表可能不能访问. 如果是开mmu时修改tlb. 修改tlb后立刻生效, 程序如果正在修改的tlb位置恐怕会出问题(因为pc没变). 所以需要1k的细表.
(17:15 2010-1-2)虽然pc没变, 但是修改tlb后arm指令会在新地址继续运行, 也应该没什么问题, 明天实验"17:15 2010-1-2"end
3, 所以难点是
tlb修改和做细表映射. 而且所有映射内容都在tlb中. 不知道是否可以.
15:09 2010-1-2
VC1600, VC0882, VC718, arm SOC, BSP, cortex-a8, TI OMAP3530, DVSDK: Linux PSP
1, PSP下载:
release代码可以从TI官网OMAP3530 Linux dvsdk下载. 最新代码参见"15:47 2009-11-27"2
2, Linux PSP包括xloader, u-boot, kernel三部分.
3, signGP:
"OMAP35x-PSP-SDK-02.01.03.11/host-tools/src/signGP.c", 把一级boot xloader的长度和加载地址(各占一个word)写在xloader bin前面. 并把新文件命名为xloader.bin.ift
4, 简单看了看Linux中与cortex-a8相关启动代码. 感觉和arm926没有什么区别. cortex-a8与arm926的差异可能还要认真看trm.
16:22 2010-1-2
arm, 网站, 登录名, 密码
zhangjian@vimicro.com
zhangjianZJ!
16:33 2010-1-2
VC1600, VC0882, VC0718, arm architecture, cortex-a8, ARM ARM 7-AR, armv7与armv6, armv4/v5差异
1, 下载了"DDI0406B_arm_architecture_reference_manual_errata_markup_4_0.pdf". 下载这个文档是注册用于就可以下载.
附录D是cortex-a8去掉的feature, G和H是armv7与armv6, armv4/v5差异. 这些很有用.
2, armv6, v7都有APSR. APSR是application level CPSR的别名. ARMv7-AR的APSR其实就是PSR但是APSR只能访问condition flag(arm指令的N, Z, C, V, Q, DSP指令的GE[3:0]):
In ARMv7-A and ARMv7-R, the APSR is the same register as the CPSR, but the APSR must be used only to access the N, Z, C, V, Q, and GE[3:0] bits. For more information, see Program Status Registers (PSRs) on page B1-14.
3, armv6 add:
— the ARM SIMD instructions to improve execution of multimedia and other DSP applications
— instructions for improved context switching.
用于改进的上下文切换的指令: Linux kernel中可能会用到, 需要关注.
4, Instruction set state:
ARMv7的ThumbEE在armv4, v5中没有. armv4, v5中只有armv5tej有jazelle状态.
5, Alignment: v4,v5和v7有差异. \todo 细看.
6, Endian support: 小端相同. 大端v4,v5是BE32与v7BE不同.
所谓BE就是任何情况下都是按byre为单位, 在类型长度内按大端排列. 例如如果是byte类型(byte寻址)be和le完全一样. 如果是word寻址. be和le取的word整体一致, 但内部byte排列顺序相反.
所谓BE32(big endian 32)是指任何情况下都按32bit方式组织的大端方式. 这样LE和BE32不对齐访问的行为就一致了:
In ARMv7, all big endian accesses return the same bytes of data from memory as the corresponding little endian accesses. It is only the byte order in the returned value that is different. 由于armv4, v5本来就不允许不对齐访问. 所以不会有问题. p2021有区分不同endian的示例:
Memory access: Bytes accessed in endian format:
Size Address LE BE BE-32
Doubleword A ZYXWVUTS STUVWXYZ VUTSZYXW
Word A VUTS STUV VUTS
Word A+4 ZYXW WXYZ ZYXW
Halfword A TS ST VU
Halfword A+2 VU UV TS
Halfword A+4 XW WX ZY
Halfword A+6 ZY YZ XW
Byte A S S V
Byte A+1 T T U
Byte A+2 U U T
Byte A+3 V V S
Byte A+4 W W Z
Byte A+5 X X Y
Byte A+6 Y Y X
Byte A+7 Z Z W
7, 异常处理
1), The ARM abort model
v7出现data abort时, load/store 基址寄存器的值会恢复到load/store操作前.
ARMv6 and ARMv7 use a Base Restored Abort Model (BRAM). However, in ARMv5 and ARMv4 it is IMPLEMENTATION DEFINED whether this model, or a Base Updated Abort Model (BUAM) is used.
8, system level memory
1), armv4, v5:
When a virtual to physical address mapping changes, caches must be cleaned and invalidated accordingly.
2), Only ARMv4 and ARMv5 support tiny (1KB) pages.
8, (16:39 2010-1-3)上下文切频
armv7中快速上下文切频(FCSE)是可选的.
armv6, v7引入了VMSA(Virtual Memory System Architecture), 机制本身支持全局entry和进程entry. \todo 研究机制. 看Linux中是否使用. 见"17:00 2010-1-3"
9, (11:28 2010-1-4)Appendix D Deprecated and Obsolete Features:
sp, pc两个寄存器不像原来那样可以完全当作通用寄存器使用. Liaozhicheng当初用rvds3.0编译时发现有条没问题的pc指令现在不行了. \todo 细看.
11:12 2010-1-3
时间管理
0, 10:35-
1, 计划
1), 除了VC0816和perl学习. 每天浏览一章arm arm 7-ar.
2), VC0816, 实验修改tlb后原有程序能否正常继续运行. 如果可以, 希望明天完成VC0816量产测试编写和测试.
3), 别忘了填加班记录, 报销打车费. <DONE>
2, 执行
1), VC0882 coding kickoff. 见"11:19 2010-1-3"1,2.
2), VC0882 arm环境计划. 见"11:19 2010-1-3"3
11:19 2010-1-3
(11:20 2010-1-4)
VC1600, VC0882, 882 coding kick off, arm环境, rvds4.0目录: 编译器, 工具, rvds4.0环境设置; Linux, rvct, armcc
1, Aiguo邮件"882 coding kick off"20100103_1001
因598,830和816的项目,882项目的进度一直很缓慢,从下个礼拜一开始,我们要进入实质性阶段,大家严格按照进度来规划:
1), zhangjian尽快熟悉A8,下个礼拜TI的转接板回来了,我们要开始尝试搭建环境,编写A8初始化汇编代码,建立A8的最小环境(bootloader),beizhan帮忙在882项目下面建立一个panda的目录,这个是882第一步调试环境,不考虑os,只需要有aasp就可以了,因此zhangjian需要熟悉一下598的环境;
2), liaozhicheng,编写timer,interrupt的driver,这个按照598的规范来做,interrupt统一用os来管理;
3), yinxingjie,开始编写CIF的driver,先熟悉一下598 IPP的driver,这个和598基本一致;(1月初步完成)
4), shuyu,开始编写DE driver;(1月初步完成)
5), sunguangyue,开始编写host driver,你来制定一个计划,我们review一下;
6), beizhan,598的sd driver整理后移植到882下,暂时的文件系统就和598一致,保证大家的使用,如果觉的需要改进,尽快提出来;
7), beizhan和caijin,开始熟悉GPU,确定验证方向,两个方向:其一是在PC下跑emulater,理解GC430的流程,其二理解linux或者windows ce下的driver,我们的目标是在nuclues下实现最基本的验证,后面我们找vivante交流一下,希望他们提供最简单的driver。
882 FPGA大概在1.15开始,时间很紧了,因此大家一定抓紧时间。
Beizhan,你帮忙礼拜一上午订一个会议室,我们召集email中人讨论882的项目安排,其他人等到598 code freeze后加入882。
2, zhangjian, LiaoZhiCheng cortex-a8现有情况和计划:
0), VC0882相关arm文档放在"D:\VC0882\document\arm": 包括cortex-a8 TRM, ARM_ARM_7AR.
1), cortex-a8最小环境(1月15日之前完成):
(1), 初始化代码: 比较xloader和Linux中arm926和cortex-a8启动代码. 初步看没有什么差异.
\\10.0.2.36\sqmshare\Document\SOC\TI OMAP3530\TI资料\Linux\PSP: 有xloader, u-boot, kernel OMAP3530移植.
(2), armcc aasp环境. 参考VC0598.
2), 比较cortex-a8与arm926差异. DDI0406B_arm_architecture_reference_manual.pdf(ARM_ARM_7AR)的附录D是cortex-a8去掉的feature, G和H是armv7与armv6, armv4/v5差异. 我目前的阅读笔记在"armv7与armv6, armv4/v5差异.txt"
3), 调试环境: RVI正版只有五套, 还需要其它调试环境.
(1), RVDS4.0评估版过期后用新邮箱重新申请license就可以使用.
如果是这样将来上FPGA的人多了, 大家在自己工位上面可能用gcc更方便.
查gcc最低版本: 从"17:30 2009-10-28""cortex-a8, arm11, x86性能比较"看, gcc从4.3开始就可以支持了.
(2), 评估华恒Hammer-a8和openocd.
A, 华恒Hammer-a8: 只实验过omap3530, 这和openocd是一样的.
B, zhangjian: 调试环境如果rvi不能用可以先用openocd代替. 找xuelian帮忙做短点的线试试. RVI和openocd各做一根.
4), 是否需要armcc和gcc两套环境.
其它调试环境不支持armcc编译的映像.
5), rvds4.0编译器目录: C:\Program Files\ARM\RVCT\Programs\4.0\400\win_32-pentium. 包括: armcc, armar, armasm, fromelf, armlink. 头文件目录"C:\Program Files\ARM\RVCT\Data\4.0\400\include\windows"
arm提供make有两个(不清楚是否是rvds4.0自带的, 还是3.0的), 都是3.81:
C:\Program Files\ARM\bin\win_32-pentium
C:\Program Files\ARM\OpenSource\gnumake\3.81\4\win_32-pentium\bin
6), rvds3.1开始用armenv设置环境. Linux有"source RVDS40env.posh"调用armenv设置. 会设置rvct bin目录到path, 加入RVCT40BIN, RVCT40INC, RVCT40LIB等环境变量.
例如我的电脑windows和Linux RVCT40INC分别是:
C:\Program Files\ARM\RVCT\Data\4.0\400\include\windows
/usr/src/embedded_dev/software/ARM/RVCT/Data/4.0/400/include/unix
3, zhangjian计划:
1), 周二把VC0816的代码完成.
2), 周三比较cortex-a8和arm926启动代码. rvds3.0编译通过后上传CVS.
3), 周四周五看VC0598 aasp环境, 希望本周完成移植.
4), 其它:
(1), rvds4.0+omap3530实验.
(2), 调试器评估: 华恒, openocd
(3), 找cortex-a8其它代码: 例如mmu, cache操作, 进程切换.
(4), 继续分析cortex-a8与arm926差异及其对OS的影响. 例如进程切换的差异.
15:31 2010-1-3
VC0816, SV, 量产, cache测试, tag, arm学习, mmu, tlb, tlb lockdown, 续
1, VC0816, JMP10是lcd_d6(strap pin[6]是是否打印. 0(默认): 不打印. 1: 打印.
17:00 2010-1-3
VC1600, VC0882, arm architecture, armv7, cortex-a8, Linux, 进程切换
1, 进程切换参考"http://blog.chinaunix.net/u1/38994/showart_342896.html":
在调用__switch_to之前,linux会先调用switch_mm()进行进程页表切换,当然如果next->mm==0,即next为内核线程切换,那不会调用switch_mm()函数,而是直接使用prev的进程地址空间,next->mm!=0,即next为普通进程切换,使用switch_mm()函数将prev的进程空间换出,换入next进程空间;
/include/asm-arm/Mmu_context.h->switch_mm()->/include/asm-arm/Cpu-single.h->cpu_switch_mm(pgd,tsk)将pgd设置生效
具体操作参见《linux2.4.19下__ioremap函数中remap_area_pages虚拟地址映射建立函数的代码分析》.
2, cpu_switch_mm()分析:
proc-fns.h:226:
#define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm)
cpu-single.h:
#define cpu_do_switch_mm __cpu_fn(CPU_NAME,_switch_mm)
宏"__cpu_fn"把CPU_NAME和_switch_mm链接到一起.
CPU_NAME同样定义在"proc-fns.h":
CPU_NAME cpu_arm926
CPU_NAME cpu_v7
对于arm926来说, cpu_arm926_switch_mm(pgd)(arch/arm/mm/proc-arm926.S)表明是直接把pgd中描述的page table pointer写入到translation table base.
armv7也是cpu_arm7_switch_mm()(arch/arm/mm/proc-arm6_7.S). 只是比arm926代码少了清cache, tlb的工作.
但, 我同时还找到"cpu_v7_switch_mm()(proc-v7.S)", 里面使用了CONTEXT ID:
ENTRY(cpu_v7_switch_mm)
#ifdef CONFIG_MMU
mov r2, #0
ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id
orr r0, r0, #TTB_FLAGS
mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID
isb
1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0
isb
mcr p15, 0, r1, c13, c0, 1 @ set context ID
isb
#endif
我的android编译的是"proc-v7.S". 说明Linux中armv7的进程切换是VMSA推荐的方式. 这个需要详细看.
11:33 2010-1-4
时间管理
1, 计划
继续完成"11:19 2010-1-3"
12:36 2010-1-4
gmail:
姓: arm
名: test0104
用户名, 密码: armtest0104
arm passwd: Armtest010$
14:00 2010-1-4
绩效, 2009-12-16--2010-1-15, 加班
17, 23, 23, 29, 30, 31
15:16 2010-1-4
长途, ip, 96446
16:40 2010-1-4
同事信息, 江海宗, 中星电子, 安防, 监控
1, HR邮件
江海宗先生就任中星微—中星电子副总裁一职,直接向公司总裁金兆玮汇报工作。江先生毕业于中国人民大学工业经济学专业;曾任职于松下电器(中国)有限公司、GE、CSST等著名公司的高层管理职务,行业经验和企业管理经验丰富;他的办公电话是:010-68948888-8807 Email:jianghaizong@vimicro.com; jiang.haizong@vimicro.com。
2, CSST
CSST: 中国安防技术有限公司(China Security & Surveillance Technology, Inc. 英文简称:CSST),是一家同时在纽约证券交易所和纳斯达克迪拜上市的公司。股票交易代码:CSR。
根据"http://www.cf1688.com/news_info.asp?id=331"资料, 江海宗
2008年12月任命为安防科技(中国) 有限公司常务副总裁(兼)。
3, GE资料未找到.
4, 松下:
根据"http://info.secu.hc360.com/list/zhibo.shtml"在2005年3月以松下电器(中国)有限公司系统销售公司副总经理身份参加了"全国首届安防行业优秀工程商大会"
17:58 2010-1-4
VC1600, VC0882, arm architecture, arm cortex-a8, arm7, arm9, pc的产生
参见ARM SOC体系结构p65, p68的"PC的产生"
所有arm的读pc行为都规定是pc=当前指令地址+8.
1, arm7
arm7和arm7之前的arm都是三级流水线, 在第三级执行时取操作数, 此时的pc是实际地址+8.
取指-译码-执行
取指-译码-执行
取指-译码-执行
2, arm9, arm9的5级流水线中在第二级"译码"有三个操作数读取端口, 所以大多数arm指令可以在译码阶段取操作数, 这样pc实际就是+4了. 为了和三级流水线一致. 5级流水线对此有特殊处理保证仍然是+8(zhangjian: 具体没看懂, 见p68和p66图4.4)
取指-译码-执行-缓冲/数据-回写
3, cortex-a8: 从ARM_ARM_7AR中知道pc仍然是+8. 具体原因没写.
11:16 2010-1-5
时间管理
1, 计划
1), VC0816量产.
2), check "11:19 2010-1-3"3计划.
11:20 2010-1-5
VC1600, VC0882, arm环境
1, 项目当前计划和zhangjian工作计划见"11:19 2010-1-3"
2, 目前的需要看xloader和u-boot代码, 前者适合入门, 后者更适合移植. 因为后者更全.
3, 学习arm pb a8 selftest的编程风格.
11:35 2010-1-5
perl学习, editplus
"editplus -cursor a:b -e filename"可以定位光标. 这样就可以直接定位日期了.
user tool argument中"$(AppDir)"表示editplus目录.
17:37 2010-1-5
(14:36 2010-1-6)
公司, 工卡, id号(19314260), 同事信息(HR), SunMin, 5171, 可以查工卡编号
18:58 2010-1-5
VC0830, SV, 结构体, 代码修改后未统一编译
caijin遇到结构体变量赋值后结构体内发现数据变化. 后来发现是头文件修改后, 有文件没有重新编译.
10:21 2010-1-6
时间管理
0, 10:00
1, 计划
1), VC0816量产. 最近4天都没什么进展, 争取今天有一定进展, 明天完成. 见"14:38 2010-1-6"
2), check "11:19 2010-1-3"3计划. 看1月4日, 1月3日计划.
14:38 2010-1-6
VC0816, SV, 量产, cache测试, tag, arm学习, mmu, tlb, tlb lockdown, 续
1, 实验daichunquan的tag测试程序. 看看能不能修改sram映射区域且指令可以继续执行.
// modify lock tlb
tlb_victim = 0x00000000;
tlb_new_pa = 0x00200000;
asm volatile (
"MCR p15,0,%0,c15,c1,0 ;" \
"MRC p15,4,%1,c15,c2,1 ;" \
"MCR p15,4,%1,c15,c3,1 ;" \
"MRC p15,4,%2,c15,c4,1 ;" \
"ORR %2, # 0x00200000 ;" \
"MCR p15,4,%2,c15,c5,1 ;" \
"MCR p15,4,%0,c15,c7,1 ;" \
: \
:"r"(tlb_victim),"r"(tlb_tag),"r"(tlb_old_pa)
);
2, 看tlb操作文档(arm926 trm r0p5: p238)和daichunquan代码时看translation table格式. 发现自己原来理解错了. 表中写的地址是物理地址, 不是虚地址.
3, 测试替换映射表后能否程序执行是否正常
;copy from kernel proc_arm926.S
ldr r0, =TTB_MODIFY
;#ifdef CONFIG_MMU
; mov ip, #0
;#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
mcr p15, 0, ip, c7, c6, 0 ; invalidate D cache
;#else
;@ && 'Clean & Invalidate whole DCache'
con_clean
mrc p15, 0, r15, c7, c14, 3 ; test,clean,invalidate
bne con_clean
;#endif
mcr p15, 0, ip, c7, c5, 0 ; invalidate I cache
mcr p15, 0, ip, c7, c10, 4 ; drain WB
mcr p15, 0, r0, c2, c0, 0 ; load page table pointer
mcr p15, 0, ip, c8, c7, 0 ; invalidate I & D TLBs
;#endif
; mov pc, lr
结果映射表更新正确. 但是程序跑飞. 因为pc指针不会变. 所以只能是做1k page映射了.
4, 和zhicheng讨论, zhicheng提醒可以把0x2000000映射到不同地址, 这样就简单多了.
1), 映射到0x55500000, 0xaaa00000, 简单实验, 是可以的.
2), 改写程序, 在上面两个地址各运行一次, 比对数据.
16:02 2010-1-6
VC1600, VC0882, VC0718, arm debug, arm SOC, cortex-a8, omap3530, 华恒科技 hammer-a8
1, 提供20pin转14pin转接板.
2, zhangjian发送邮件"答复: Fw: 仿真器技术手册"
方工:
我们目前在评估不同厂商omap3530调试工具. 发现大家用法有些不同, 担心影响调试环境性能或稳定性, 所以和你确定如下问题:
1), 支持omap3530是通过ads/rvds 脚本支持还是软件写死. 我们将来也可能会使用其它cortex-a8方案. 希望调试环境是对cortex-a8通用的.
2), 对rvds支持如何(具体支持哪些版本?), 是否支持elf文件. 我们希望能用rvds3.0调试.
3), 能否通过mem_ap下载映像到memory.
4), 是否支持non-invasive debug.
5), 仿真器最大clock.
6), 连接问题
(1), emu0, emu1两个pin如何使用. 我们omap3530板子是上拉的. 会不会有影响?
(2), nTRST是直连的还是经过缓冲的?
(3), 仿真器是否使用rtck.
谢谢
17:42 2010-1-6
VC1600, VC0882, VC0718, arm SOC, cortex-a8, TI OMAP3530
1, zhangjian发wangfeng邮件
我们查到的TI OMAP3530有TI EVM, beagleboard, 瑞泰, 天漠等板子.
文件位置: "H:\36服务器porting资料备份\SOC\TI OMAP3530\OMAP3530开发板.xls"
硬件资源 支持的软件资源 提供软件 价格 联系方式 备注
TI EVM 多 "Linux, WinCE6.0R3" -
Beagleboard 基本资源 "Linux(android, angstrom…)" 同左 149$
北京瑞泰minilcd 同beagleboard "Linux(android, angstrom…), WinCE6.0R3" angstrom 1000-3000 62105690 赵晓燕 "beagleboard""抄板"",可以使用beagleboard软件, TI WinCE移植"
深圳天漠DevKit8000 同上 同上 angstrom+android+TI DVSDK image 2100 0755-25500944 / 0755-25631357 "beagleboard""抄板"",可以使用beagleboard软件, TI WinCE移植"
北京瑞泰evm 多 - - 12800
注:深圳天漠是英倍特子公司.
我们买的是北京瑞泰的minilcde, 感觉天漠提供的资料相对多一些. 附件是beagleboard, 瑞泰, 天漠三家板子介绍及北京瑞泰minilcde使用手册
我们下载了beagleboard android源代码并编译运行成功. 运行TI WinCE demo成功.
附件: DevKit8000_Overview_Cn.pdf, BBSRM_latest.pdf, ICETEK-OMAP3530产品.pdf, ICETEK-OMAP3530-Mini使用手册.pdf
2, 参考liaozhicheng
开发板选型邮件(LiaoZhiCheng邮件"答复: 开发板和JLinkv7的购买"20091105_1839)
Hi, xiaoduan:
我和zhangjian商量后,觉得还是一次买好点,最终的决定如下配置:
1) arm11板子选用:
公司:友坚恒天
网址:http://www.urbetter.com/ProductShow.asp?ID=167
联系电话:0755-86217140
需要购买的产品型号:UT-S3C6410 + 7寸LCD + WIFI模块 + Camera模块 + GPS模块
2) cortex板子选用:
公司:瑞泰创新
网址:http://www.realtimedsp.com.cn
联系电话:62105690 赵晓燕
需要购买的产品型号:ICTEK-OMAP3530- minilcde v3(注:新出的,网上还没更新,这板已包括 三合一扩展子板支持LCD,VGA,NET.) + 单买A(母口)转miniA线
3) 就用最新的jlink v8.0吧。
Thanks.
17:49 2010-1-6
问问caijin下午看的什么demo.
(17:04 2010-12-16)是MIPS演示, 声称性能超过Cortex-A8.
9:54 2010-1-7
时间管理
0, 9:21
1, 计划<DONEor转移>
1), 简单试试转接板.
2), VC0816 5个片子实验. 发信.
3), VC1600 review clkrst. 1月5日zhicheng发过信. 忘了看. 今天下午先看这个.
2, 执行
1), 9:55-11:31, OMAP3530 jtag转接板, 见"9:55 2010-1-7"
2), -12:42 午饭
3), 12:50-13:40 VC0882 arm最小环境计划, 见"13:13 2010-1-7"
4), 13:41-15:10 VC0882 mas review: clkrst 本来计划一下看完的, 发现比VC0718要复杂, 只好晚上继续看了.
5), openocd. 见"16:12 2010-1-7"
3, 次日计划<转移>
openocd加上eclipse实验稳定性. 如果基本可用, openocd就暂告段落了. 明天会继续做VC0816 cache tag和VC0882 mas review: clkrst.
另外给arm发信问rvi问题. 见"16:12 2010-1-7"4
9:55 2010-1-7
VC1600, VC0882, VC0718, arm debug, cortex-a8, SOC: OMAP3530 jtag转接板
1, 简单试试转接板.
1), 查原理图, 检查连通性.
发现lvhaifang把TI jtag这边pin画反了. 只能是反着插, 剩下三根偶数线飞线.
2), openocd还是不稳定, 时间稍长一点就"Warn : Invalid ACK in SWJDP transaction", 下午试试降速, 查这个warning的含义. 另外试试rvi.
12:42 2010-1-7
VC1600, VC0882, VC0718, arm debug, SOC: OMAP3530, jtag: codehammer-a for cortex-a8
1, 连接omap3530时有转接板. 从工程师回答看是通过脚本配置icepick.
2, ZhangJian至Aiguo邮件"申请购买华恒codehammer-a for cortex-a8仿真器"20100107_1105
华恒的a8仿真器只测过rvds2, 我们用应该没问题. 价格是3000元.
网址: http://www.hhcn.com/chinese/develop-tool/codehammera8.htm
据销售说节前没什么货, 现在只有一套了.
联系人: 华恒科技市场部 方成俊 5325173
-----邮件原件-----
发件人: 华恒科技 市场部 [mailto:market@hhcn.com]
发送时间: 2010年1月7日 10:37
收件人: Zhangjian
主题: Re: 答复: Fw: 仿真器技术手册
张工,您好!
关于您邮件中的问题做以下回复:
1), 支持omap3530是通过ads/rvds 脚本支持还是软件写死. 我们将来也可能会使用其
它cortex-a8方案. 希望调试环境是对cortex-a8通用的.
软件是写死的,不能保证支持其他cortex-a8
2), 对rvds支持如何(具体支持哪些版本?), 是否支持elf文件. 我们希望能用rvds3.0
调试.
支持 elf文件,测试过rvds2.0
3), 能否通过mem_ap下载映像到memory.
可以
4), 是否支持non-invasive debug.
不支持
5), 仿真器最大clock.
12M
6), 连接问题
(1), emu0, emu1两个pin如何使用. 我们omap3530板子是上拉的. 会不会有影响?
不使用这两个pin,不影响
(2), nTRST是直连的还是经过缓冲的?
直连
(3), 仿真器是否使用rtck.
不使用
13:13 2010-1-7
VC1600, VC0882, arm最小环境, cortex-a8, SOC: omap3530
1, 参"11:19 2010-1-3"3和"11:20 2010-1-5", 总的来说三个事情, 建立最小环境, 学习cortex-a8变化, 建立/评估调试环境. 相比1月3日的计划进展比较慢.
2, 建立/评估调试环境:
1), 目标: 建立两套比较可靠的调试环境: 一是rvi, 二是openocd或codehammer.
2), 已有进展: openocd可以调试omap3530, 但是不太稳定. RVI暂时没连上omap3530.
3), 计划:
(1), 其实计划实验4套. 除了前面三个还有qemu模拟omap3530和realview板子. 今天回家下载qemu.
(2), 今天实验openocd稳定性问题和RVI连接OMAP3530. 如果两个都可以jtag暂时如此. 明天再加入eclipse.
3, 建立最小环境:
1), 目标: 建立VC0882最小环境, 初期只包括c语言启动环境(汇编), 库的桩脚函数, uart. 为了便于实验, uart需要支持VC0882和TI OMAP3530.
2), 已有进展: 目前只简单看了xloader代码.
3), 下一步: (依赖: 有好用的调试环境)
(1), 明天开始详细看xloader代码和u-boot代码. 还是希望本周完成TI OMAP3530可以跑的aasp.
(2), cache, mmu, 进程切换等其它操作函数.
依赖: 详细学习cortex-a8变化.
4, 学习cortex-a8变化
1), 目标: 熟悉cortex-a8与v7差异. v7与v5差异. 为搭建最小环境做准备.
2), 进展: 初步分析了差异, log见"16:33 2010-1-2"armv7与armv6, armv4/v5差异.
3), 计划: 继续分析cortex-a8与arm926差异及其对OS的影响. 例如进程切换的差异.
16:12 2010-1-7
VC1600, VC0882, VC0718, arm debug, jtag: openocd/RVI, SOC: OMAP3530
1, 现有问题: icache:
(自LEDblink README):
One major problem (090904) is that OpenOCD does not control invalidation
of the I-cache when uploading updated program code to RAM. So the processor does not execute the same code fron I-Cache as the debugger can read from memory thrugh the AHB-MEMAP.
If we are executing in UBoot, halt the processor, upload and runs a program then
everything works because ththe code region is not cached. If we change our code, rebuilds and uploads without somehow clearing the caches, the the MPU will run the old code but gdb will see the new code. And confusion starts.
2, 开始gdb调试不行, 后来发现是原来无意中删除了"monitor halt". 现在感觉降速到100k还是比较稳定的. 调试u-boot的".gdbinit":
echo Setting up the environment for debugging gdb.\n
# This connects to OpenOcd at localhost:3333
target remote localhost:3333
# Increase the packet size to improve download speed.
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
#omap3_dbginit must be run in OpenOCD after every reset
monitor omap3_dbginit omap3530.cpu
#monitor cortex_a8 dbginit
#monitor mww 0x5401d030 0x00002000
monitor halt
# Load the program executable called "u-boot"
load u-boot
# Load the symbols for the program.
symbol-file u-boot
我在汇编start.S和lib_arm/board.c设置断点都没有问题.
在6M下测试感觉也比原来稳定(但下载速度仍然是1k/sec), 原因未知.
3, openocd的serve包括gdb_server, telnet_server, tcl_server.
\todo 整理openocd调试架构.
4, RVI仍然不行, 有时间用逻辑分析仪看. 发信(未发送):
抄送arm公司那个人. aiguo, fengbeizhan, liaozhicheng. 附上原理图.
we are using arm Realview ICE debug TI OMAP3530 board which use TI 14pin jtag interface.
we use convert board(see attachment) to convert arm 20pin jtag interface to TI 14pin jtag.
zhangjian
vimicro
5, windows编译:
1), Linux编译参数:
./configure --enable-parport --enable-ft2232_libftdi --enable-jlink --prefix=/home/dec/bin/openOCD4Cortex-a8
2), Windows下, bootstrap运行有问题, 直接复制Linux下编译通过的完整目录.
位置: "36: Lnux\host\openocd\for cortex-a8\openocd_LinuxBuildDone.tar.gz"
./configure --enable-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=/home/ftd2xx_win32/ --enable-jlink --prefix=/home/bin/openOCD4Cortex-a8
3), make
发现用的rvds的make, 在全局Path中把mingW make path(D:\Software\MinGW\bin)放到最前面:
D:\Software\MinGW\bin;C:\Program Files\ARM\bin\win_32-pentium;C:\Program Files\ARM\Utilities\FLEXlm\10.8.5.0\1\win_32-pentium;C:\Program Files\ARM\RVCT\Programs\4.0\400\win_32-pentium;C:\Program Files\ARM\ADSv1_2\bin;C:\Program Files\Common Files\NetSarang;D:\Software\Graphviz2.20\bin;D:\softare\Perl\site\bin;D:\softare\Perl\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\Software\openocd-r717\bin;D:\Software\openocd-r717\utils\bin;C:\Program Files\ARM\Multi-ICE;C:\Program Files\ARM\Multi-ICE\system;C:\Program Files\OpenOCD\0.1.0\bin\;C:\Program Files\ARM\RVI\Tools\3.3\106\programs\win_32-pentium;C:\Program Files\ARM\RVD\Core\4.0\1106\win_32-pentium\bin;C:\Program Files\ARM\RVI\GDB\3.3\8
(1), 出错:
src/target:
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src/helper -I../../src/jtag -I../../src/xsvf -g -O2 -I/home/bin/openOCD4Cortex-a8/include -D__USE_MINGW_ANSI_STDIO -I/home/ftd2xx_win32 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -MT target.lo -MD -MP -MF .deps/target.Tpo -c target.c -o target.o
看target.c, 2545:
command_print(CMD_CTX,
"dumped %zu bytes in %fs (%0.3f kb/s)", fileio.size,
duration_elapsed(&bench), duration_kbps(&bench, fileio.size));
由于%zu是无符号的, 但fileio.size是sszie_t, 所以把fileio.size强制转为(size_t)fileio.size.
(2), src/flash/flash.c: 906, src/flash/nand.c: 1686, src/flash/mflash.c: 754.
同样问题和改法.
(3), make install时发现源代码目录"openocd/contrib/libdcc"里面有openocd调试工具范例. 可以看看. 似乎不错.
(4), 编译结果"36: Linux\host\openocd\for cortex-a8"
4), 同样实验u-boot, 同样是500k. 下载(速度4kbyte/sec比Linux 1k/sec快)设置断点正常. 明天加上eclipse实验稳定性. 如果基本可用, openocd就暂告段落了. 明天会继续做VC0816 cache tag和VC0882 mas review: clkrst.
10:03 2010-1-8
公司, 行政, 15层同事工位,
wangyang邮件"工位更新"20100108_0959
D:\work\Documentation\15F工位图_091211.xls
10:36 2010-1-8
1, 切频的时候trace clk会不会有影响.
zhangjian: 我们现在没有HTM, 所以cpu停的时候trace停下来应该没问题.
2, CKD_CPU_NDIV可以动态改. FPGA时可以测到吧?
3, cpu和bus在不同pll? 那就是说cpu和bus是异步的?
4, 硬件切频流程到底如何. cpu在任何memory运行是否都会gate ddrc.
1), cpu频率改变时是否不影响bus. \todo 测试项
2), cpu切频时软件查CPU_CLK_CFG_BUSY的意义? 如果cpu_clk不稳定, 软件运行不受影响么? 会影响下次切频么?
3), memory参数是何时换的, shadow需要更新(ddrc绿色). ddrc_mrs0, ddrc_emrs1是shadow. 切频时可以配置是否发命令更新(DRAM_REFRESH.emrs1_after_selfref, mrs_after_selfref, 在退出selfrefresh后发送. 这和VC0830现在的软件切频流程是一致的, 见Clkrst_Drv_TriggerSwitch()(VC0830\clkrst\drv\clkrst_drv.c)).
没有ddrc_emrs23是cuiyunfei确认的, 没有与频率有关的东西. 其实个人觉得多加会保险, 但是既然IC觉得没必要, 也只能这样了.
5, When N=1, CKD_ACLK is bypassed. div和bypass怎么联系上的?
6, DDRC_SYNC_MODE起什么作用? 何时同步, 何时不同步?
12:44 2010-1-8
同事信息, ZengJuanJuan, 8950, 知识产权, 研发记录簿
13:16 2010-1-8
VC1600, VC0882, VC0718, arm SOC, 模拟器: qemu, BSP: Android, jtag: openOCD, android相关新闻
总结: qemu omap3530有sd移植, 需要尽快实验. android omap3530有elcaire也需要尽快实验. 周末下载.
1, qemu
1), 主线最新版本是0.12.1
git: http://savannah.nongnu.org/git/?group=qemu
omap3530没有加入主线.
2), OMAP3530移植:
Documentation: Cortex-A8 port (Version #15): 这是omap3 qemu介绍文档, 下面两个移植都有提到
http://www.riscosopen.org/wiki/documentation/pages/Cortex-A8+port/versions/15. 已下载至"36 Linux\host\tools\simulator\qemu\qemu_for_omap3530.htm"
(1), 之前关注的qemu, 最近比较忙没有更新
http://code.google.com/p/qemu-omap3/
(2), 这个也是qemu omap3(自2)网页), 而且最近比较活跃. 从目录看已经支持了mmu等设备, 这个对我很有帮助. 代码已下载"36: Linux\host\tools\simulator\qemu\qemu_0.10.0-0sb10.tar.gz".
https://garage.maemo.org/projects/qemu
2, android
http://0xlab.info/planet.html android相关新闻
1), 今天才注意到embinux是OHA做的, 现在已经支持到Eclair了, 这个要尽快实验:
http://labs.embinux.org/index.php/Android-Eclair_porting_guide_to_BeagleBoard
2), rowboat无更新.
3, openocd
1), maillist achieve:
https://lists.berlios.de/pipermail/openocd-development/
2), cortex-a8 debug introduction(回家下载):
http://arttools.blogspot.com/2009/09/debugging-on-cortex-a8-system.html
3), 关于初始化语句"mww 0x5401d030 0x00002000"的地址计算(\todo 看omap3530 trm and adiv5):
From lundin at mlu.mine.nu Wed Sep 2 18:12:56 2009
From: lundin at mlu.mine.nu (Magnus Lundin)
Date: Wed, 02 Sep 2009 18:12:56 +0200
Subject: [Openocd-development] Cortex-A8 problems
...
>
>> So in the OMAP initialisation script we have the line
>>
>> # set DBGEN signal
>> mww 0x5401d030 0x00002000
>>
> Hi Magnus,
>
> It seems that the debug address space is remapped from 0xD4010000
> to 0x54010000.
> But I could not find out any sections mentioned this remapping.
>
> Also, I checked the global memory space mapping in omap35x_TRM.
> The corresponding address of 0x54010000 is for MPU emulation.
> I could not find out why this remapping is needed.
> Anything do I miss?
>
The ap debug base address is 0x80000000, you can se this in the
romtable information for DAP #1 with dap inf 1.
Here you can also se the offsets from the debug base address to the
debug component adresses. To get the memory address in the MEMAP memory
map you must add base+offset:
( the 2 LSB bits are status and not part of the address)
0x80000000+0xD4010000 = 0x54010000 ( unsigned 32 integer addresses )
So the values given in OMAP35x TRM table 1.52: Debugger Address Space
are not the memory bus addresses but the offsets from the romtable base
address.
More information can be found in the ARM Debug Interface v5
Architecture Specification, ARM IHI 0031A, sec. 8.1.3 and 14.6
4), \todo 查我的出错信息有没有.
14:01 2010-1-8
时间管理
0, 10:00-23:21
1, 计划<DONEor转移>
1), 其它
2), 总结下午会议内容.
2, 执行
1),
2), 14:00-17:52 VC0882 mas review clkrst.
3), 晚上-23:12 openode, windows, 见"20:11 2010-1-8"
3, 次日计划<转移>:
0), 本周总结.
1), 见"13:16 2010-1-8", 总结: qemu omap3530有sd移植, 需要尽快实验. android omap3530有elcaire也需要尽快实验. 周末下载.
2), 总结1月8日下午会议收获.
3), 关注"Marvell推出高清全编解码和3D应用处理器ARMADA 610系列"(Yangzuoxing邮件), 加入日志中Marvell, Qualcomm处理器部分.
4), VC0816收尾.
5), 另外给arm发信问rvi问题. 见"16:12 2010-1-7"4
20:11 2010-1-8
VC1600, VC0882, VC0718, arm debug, jtag: openocd/RVI, SOC: OMAP3530, compiler: codesourcery, 编译armv7程序, 编译NEON程序
1, 为了编译windows下的openocd, 安装最新arm编译器.
arm工具链下载地址: http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite
1), 编译arm-7a thumb-2方式:
ARMv7-A Thumb-2 - Little-Endian, Soft-Float, GLIBC
Command-line option(s): -mthumb -march=armv7-a
Sysroot subdirectory: thumb2/
Dynamic linker: lib/ld-linux.so.3
2), 编译NEON:
(1), 自动生成:
To enable generation of NEON vector code, use the command-line options -ftree-vectorize -mfpu=neon -mfloat-abi=softfp. The -mfpu=neon option also enables generation of VFPv3 scalar floating-point code.
(2), c intrinsics(arm_none.h, \todo 看):
Sourcery G++ also includes support for manual generation of NEON SIMD code using C intrinsic functions. These intrinsics, the same as those supported by the ARM RealView® compiler, are defined in the arm_neon.h header and are documented in the 'ARM NEON Intrinsics' section of the GCC manual. The command-line options -mfpu=neon -mfloat-abi=softfp must be specified to use these intrinsics; -ftree-vectorize is not required.
2, 建立符号链接的命令在mingW的执行有问题, rm也是. 符号链接部分手工建立.
3, make:
1),
bash.exe"-3.1$ make
System not configured - see README
make: *** [all] Error 1
2), 复制Linux下uboot的include\config.mk后. 仍然有问题. 暂时放弃.
3, openocd出错信息: Warn : Invalid ACK in SWJDP transaction
今天用的时候感觉还可以, 时间长了才有可能断开.
4, 发现windows下编译u-boot或xloader都比较困难. 于是编译LEDblink
1), 如果用arm-none-linux-gnueabi编译LEDblink最后链接时会提示:
LEDblink.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
2), 编译通过后用eclipse调试, 没有问题. 与原来调试Linux方式相同.
把每步都抓了图, 见"36 Linux\host\openocd\openocd_gdb_eclipse使用方法.doc".
注: 如果不设置断点一直运行, 可以看到jtag边上两个led(D6,D7)明暗变化.
3), eclipse中register默认是10进制, 如果希望修改为16进制可以圈选全部寄存器后统一设置类型.
23:22 2010-1-8
时间管理, 本月加班时间, 明天有空详细计算, 希望加班时间到60以上.
17,22,23,29,30,31,2,3,6,7,8,9
9日加班4.4小时, 其中2,3,9是休息日. 各加班6小时. 其余每天按2.5小时计算. 目前大约共加班8*2.5+3*6+4.4=42.4. 如果下周除了周三都加班2.5小时, 本月共加班52.4小时.
10:13 2010-1-9
时间管理
0, 9:53-
1, 计划
-1), 总结1月8日下午会议收获. <DONE>, 见"20:06 2010-1-10"
0), 本周总结. <转移>
1), VC0882 pll问题: 一般应用中都是除2. <DONE>: 为了减小jitter(周期变化)
2), 见"13:16 2010-1-8", 总结: qemu omap3530有sd移植, 需要尽快实验. android omap3530有elcaire也需要尽快实验. 周末下载. <转移>
3), 关注"Marvell推出高清全编解码和3D应用处理器ARMADA 610系列"(Yangzuoxing邮件), 加入日志中Marvell, Qualcomm处理器部分. <转移>
4), VC0816收尾.<转移>
5), 另外给arm发信问rvi问题. 见"16:12 2010-1-7"4. <转移>
2, 执行
1), 10:05-11:04, 软件技巧, editplus, perl, 见"10:22 2010-1-9", "10:56 2010-1-9".
3, 次日计划:
1), 本周总结.
2), 今天连接RVI到VC0830也有问题, 难道是我软件装的有问题? 再其它人机器试试.
3), 写arm邮件(如何写配置文件, arm文档). 参"16:34 2010-1-9".
4), VC0816收尾: 周一希望把映象给zhaolong.
5), 继续学习VC0882 clkrst, 参见"20:06 2010-1-10"
6), 见"13:16 2010-1-8", 总结: qemu omap3530有sd移植, 需要尽快实验. android omap3530有elcaire也需要尽快实验. 周末下载.
7), 关注"Marvell推出高清全编解码和3D应用处理器ARMADA 610系列"(Yangzuoxing邮件), 加入日志中Marvell, Qualcomm处理器部分.
11:15 2010-1-9
项目经验, VC0830, VC0598, video, lcdc, de, 带宽压力, 压力测试
VC0830当初lcdc在带宽紧张情况下会fail. 即使带宽再恢复lcdc也不行恢复正常. 所以单独花了三个月时间修这个bug.
VC0598现在也有类似问题.
这提醒我压力测试的重要性, normal情况正常不行.
11:35 2010-1-9
VC1600, VC0882, arm architecture, debug, performance monitors
1, arm学习:
1), performance monitors, 这个是armv7加入的:
见ARM_ARM_7AR, C9.1 About the performance monitors.
cortex-a8 TRM: Table 3-82 Performance Monitor Control Register bit functions
2), ddrc中加入performance counter: 见ddrc_reg performance页面.
感觉"ACTIV_CYC_P"是个总的counter: This counter used to calculate transfer time (clock cycle) of all AXI transactions from DDRC AXI Interface. This transfer time contain command request and acknowledge time, write/read data transfer time to/from external DDR SDRAM. This counter wills plus one if command queue is not empty at each clock cycle.
相比VC0830, 提供的计算细化很多, VC0830 sdrc负载在marb寄存器中:
MARB_SDRC_WKLD_THRSHLD, MARB_SDRC_WKLD_PRESTEP, MARB_SDRC_WKLD_CURSTEP前面两个对应中断MARB_SRCPND[10],[9].
11:45 2010-1-9
VC1600, VC0882, mas review, clkrst, Meeting minutes
1, HuangWei邮件"VC0882 CLKRST MAS REVIEW Meeting minutes"20100109_1044
感谢大家参加昨天下午的 CLKRST MAS review meeting, 下面是此会议的 action items.
1). Watchdog timer从PSO移到PMU, wdog_rst_n 在PMU中合并入pso_rst_n, reset整个 PSO (owner: liuzixi, zhangqian)
2). global software reset可能要细分为两种: 一种是reset整个pso,另一种是reset除了ARM Debug logic以外的整个 PSO (Owner: huangwei)
3). global software reset 从PSO移到PMU, 且加入memory-mapped register 记录reset type (owner: liu zixi)
4). DDRC sync mode, 即ACLK和DDRC_MCLK同步模式下, 如果从DDRPHY DLL 到ACLK leaf pin的clock network latency 较大, 需要在从DDRPHY DLL 到 ITM的clock tree 上插入buffer以达到balance clock tree的目的,咨询 SYNOPSYS service 这样做有不有问题 (owner: Cun Yun Fei).
5). 为 AXI fabric加上软件控制的clock gating. (owner : huangwei)
2, 昨天讨论笔记:
1), cpu和bus异步主要为了节省功耗;
2), reset变动, 把watch reset和global_software_reset从PSO移到PMU域, 这样的目的是简化reset逻辑, 因为正常reset逻辑如果在PSO, reset时自己也会被reset, 这样不好设计.
\todo
14:45 2010-1-9
(23:33 2010-1-10)
VC1600, VC0882, arm architecture, 最小环境
1, 调试环境
1), rvds: RVI还不能联omap3530(\todo 发邮件).
已经找了一个rvds4.0破解版(似乎主要破解的是eclipse相关内容, 试试eclipse能不能调试), 编译器可以运行. 实验调试.(首先保证编译可用, 这样大家就可以在工位写代码了). RVDS4.0正版只有两套, 所以实验室也需要装盗版.
\todo 用正版破解试试.
否则: 现在用的rvds4.0评估版需要每个月新注册一个邮箱(gmail邮箱可以随意申请, 而且可以直接上网访问), 看大家能不能接受.
2), openocd整个调试环境已经可以了: rvds4.0 eclipse+arm-none-eabi
2, 下周计划是arm最小环境和arm调试接口深入分析(结合arm文档和openocd代码). 同时给arm发信. 有空的话需要深入看clkrst.
15:05 2010-1-9
VC1600, VC0882, arm debug, jtag: openocd, usb2jtag, 使用ftdi2232/ft2232
自: http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=3803109&bbs_page_no=1&bbs_id=1032
1, 基于FT2232D这个IC的,不同的是SRST,TRST这两个脚的控制不同的!
2, usb jtag(ft2232)相比并口的优势:
General Restrictions
Theoretically, a USB based pod is able to stimulate the JTAG bus with a much higher frequency than bit-banging on the parallel port would allow. Even more when bit shifts and clock events are combined and compressed into higher level commands. In reality, this requires to consider some specific features of USB.
To put it simple, each transaction over USB is bound to a 1 ms raster. E.g. a bit-bang style operation looks like this:
command: set clock high
command: set clock low
command: read TDO
result: current TDO
Given that each of the steps occurs in this 1 ms raster, the whole sequence takes 4 ms. That's far more than for parallel port drivers and results in a ridiculous overall performance. Even if this sequence is combined into one command plus one result by the FT2232 protocol, it's still 2 ms just for reading one bit of TDO.
Performance Gain
The most important rule of thumb to increase the overall transaction performance with the FT2232 chip is:
Minimize the number of USB transactions
The immediate consequence is to build command streams as long as possible. This should be achieved with the command queuing methods described above. A USB transaction is triggered only under certain conditions:
forced flush on the cable todo queue
maximum number of result bytes for submitted commands is reached
the ftdi-mpsse and ftd2xx-mpsse trigger a hidden transaction when their send buffer (4K) is full
There is a significant difference between libftdi and libftd2xx. The latter one allows to schedule up to 64*64 bytes of result data while libftdi fails with more than 4*64. As a consequence, the FT2232 driver is forced to perform around 16x more USB transactions for long command streams with TDO capture when running with libftdi.
16:34 2010-1-9
VC1600, VC0882, arm debug, jtag: RVI, 连接cortex-a8错误信息:
\todo 对比"10:36 2010-1-8"我的问题.
> connect "@Cortex-A8_0@RVI"
Error V2801C (Vehicle): 0x0506000b: No connection to target.
20:06 2010-1-10
VC1600, VC0882, mas review, clkrst, meeting, 原文见小本p42-p45.
摘要: 下面是1月8日"VC0882 clkrst mas review meeting"笔记, 主要涉及pll, clockswitch, power management. 总的来说VC0882与VC0830相比clkrst变化较多, 需要深入看. meeting minutes见"11:45 2010-1-9".
1, pll时 TCMC 65LP.
1), xclk变化: 支持12,13,24,26等, 实际spec支持更多.
2), 146k-1.2G: \todo 查这个频率范围的含义.
3), output频率: 240-1.2G. 目前设计cpu最高800MHz.
4), 面积: 0.1mm2(include isolator)
5), 3ma@600.
6), leakage? 待查.
7), 原有设计中6个pll(+xclk)都给cpu,bus选择. 这样后端中所有pll都会再一起. 可能clock到其它用pll的模块的走线会很长. zhukai建议高频pll少mux.
例如: mipi phy需要再1GHz测试, 这个频率没法从芯片外输入, 只能由内部pll供给. 因为从外部输入这么高频率的clock很困难.
会议讨论: 改为1,2,6+xclk给cpu,bus.
8), 目前预计的floorplan:
/---------------\
| | |
|ddr | |
|phy | |
| | pll |
| |----------|
| | ARM |
\---------------/
ddr phy: synopsys.
9), ddr phy内部有1ns margin. 要求从ddr phy输出到ddrc, axi bus回到ddr phy的延时最大是1ns. 否则ddr phy内部需要补偿.
\todo 看ddr phy关于这个的示意图.
10), VC0882 pll是先reconfig再reset. \todo 确认. 如果这样的话与VC0830不同.
11), 增加pll reset count: 需要5us. VC0830的pll其实也需要count, 但是软件, 硬件都没有加. \todo 这个对切频稳定性有影响么?
2, clkmask功能去掉了, clkmask本意时cpu,bus比例不变是降低功耗.
开会时YangZuoXing好像说时对avs(动态调整电压?)有影响.
3, 占空比是否可调, 是. 包括NFC. \todo 查clkrst确认.
4, 细看figure2-9, 这个图是glitch free的图, huangwei说是一级同步, 确认. 老是不看电路图都不会了.
5, pmu liuzixi内部做clock选择(RTC clk或xclk).
6, 由于系统异步设计, AXI分: main AXI, Cpu AXI, perpheral AXI等. 需要了解系统时钟域.
\todo 查CDC: cross domain clock?
7, audio 可能用IP. 输入是12MHz. 如果不是需要但是一个pll提供clock. 现在与usb等share pll的方案就不行了. 重要!!
8, avs: 动态电压调整. 根据系统负载调整.
\todo: 这个难以测试. 但testplan也得一样写上.
9, 切频时间. reset pll 5us, 5000xNR. \todo 查.
openissue: 用哪个做为counter的clock计数? 讨论结果是xclk.
\todo 用xclk计数是否再任何频率都够用. 希望避免像VC0830一样的pll stable时间不够的问题.
10, VC0882新feture, cpu,bus,ddrc可以都是异步. 不过bus, ddrc异步会影响一点性能. 是MP4组的要求, 因为pcddr没法跑太低的频率, 但是希望把bus频率降低功耗.
11, 与1合并.
12, 查同事信息: huamin, zhukai, dongxiangfu.
13, 其余与1合并.
1), 关于reset:
(1), 讨论中发现wdt, global_software_reset在PSO域, wdt_reset和global_software_reset复位PSO域时需要保证自己的复位逻辑是正确的, 这样逻辑上不好处理. 会议讨论结果是: 把这两个reset都放在PMU域.
(2), cortex_a8有多个reset. \todo 查TRM.
会议讨论: 把reset cortex-a8时是否reset cortex-a8 debug做为属性.
14, 与1合并.
15, clock switch
1), cpu_clk_cfg_busy, 表示是否稳定到目标频率(从硬件切频完成到稳定到目标频率前cpu运行不受映象).
2), VC0882中clkswitch改名为recfg, cpu,bus可以独立切频(因为二者是异步关系).
\todo 查其它设计中有没有二者异步的.
16, ddrc可以与bus同步或异步, 后者效率低一些. 是MP4组为了省功耗.
\todo test plan review: 又是容易有corner的地方.
17, 内部sram 16k. \todo 了解VC0882 memory map.
18, 与15合并.
19, 与9合并.
20, bus recfg
1), bus切频...(忘了)
2), 因为bus recfg时会gate ddrc, 除了ddrc当前已经执行的命令会完成. 其余queue中的命令会block. 这样必须各模块不能有timeout, 否则会出问题.
zhangjian: 因为VC0882中各模块访问ddrc都是通过dma template, 所以保证dma template没有timeout就可以.
\todo 这点需要跟踪.
21, 与1合并
22, cpu,ddrc都有performance monior. 详见"11:35 2010-1-9"
23, gpu有自动gate, vdec会加自动gate.
23:28 2010-1-10
项目, 综合提供, Meeting Minutes, Meeting Minutes Format
自: http://www.meetingwizard.org/meetings/meeting-minutes-format.cfm
\todo 这个网站好像是介绍meeting相关内容的.
Meeting Minutes Format
These days, many of us find ourselves in the position of taking meeting minutes without a clue of how to go about it. The following is a guide for making this task easier:
Make sure that all of the essential elements are noted, such as type of meeting, name of the organization, date and time, name of the chair or facilitator, main topics and the time of adjournment. For formal and corporate meetings include approval of previous minutes, and all resolutions.
Prepare an outline based on the agenda ahead of time, and leave plenty of white space for notes. By having the topics already written down, you can jump right on to a new topic without pause.
Prepare a list of expected attendees and check off the names as people enter the room. Or, you can pass around an attendance sheet for everyone to sign as the meeting starts.
To be sure about who said what, make a map of the seating arrangement, and make sure to ask for introductions of unfamiliar people.
Don't make the mistake of recording every single comment, but concentrate on getting the gist of the discussion and taking enough notes to summarize it later. Remember that minutes are the official record of what happened, not what was said, at a meeting.
Use whatever device is comfortable for you, a notepad, a laptop computer, a tape recorder, a steno pad, shorthand. Many people routinely record important meetings as a backup to their notes.
Be prepared! Study the issues to be discussed and ask a lot of questions ahead of time. If you have to fumble for understanding while you are making your notes, they won't make any sense to you later.
Don't wait too long to type up the minutes, and be sure to have them approved by the chair or facilitator before distributing them to the attendees.
Don't be intimidated, you may be called upon many times to write meeting minutes, and the ability to produce concise, coherent minutes is widely admired and valued.
Example of Minutes Format
Name of Organization:
Purpose of Meeting:
Date/Time:
Chair:
Topic Discussion Action Person
Responsible
1.
2.
3.
17:52 2010-1-21
VC0816, SV , 量产,
1, 把cache测试地址改为0xfe0, 但没有锁入的地址仍然会引起sdrc访问.
所以只能是把lockdown 0x1000, 但测试fe0.
2, 还要加300MHz和测试3way.
1), 600_300_150, 012way+tag
坏片两片pass(l和i), 3片fail。 5好片pass。
2), 600_300_150, way
开始没有修改3way的频点, 所以5个好片都能筛出来, 相当于是测试了336_168 3way的映像.
坏片: 两片pass(l, d3), 其余fail, 好片pass
代码和映像位置: 36: share\zhangjian\VC0816\elf_bin\20100121_mp_0120+sdrcPowerDown.
3, 发信, 说明频点参数用法. 上传CVS(mmu_cache.S 1.26):
1), 原有多余memory访问问题已解决, 原因和解决办法分别是
(1), 测试012三路中最后一路cache的+0xff8偏移时, 由于此时pc是+0x1000, 造成cpu取指时把0x1000所在的8个word(1个cacheline)读入cache, 这个地址正好是没有锁入cache的sdram区域, 所以产生了sdram访问. 解决办法是每路测试时最后8个word不测试.
(2), daichunquan邮件"在结束的时候也发生很多向sdram写的操作,比如第一个地址是0x00102d40,写的都是0xaaaaaaaa". 分析原因时cache测试后的unlock操作导致cpu换入新数据时把旧数据写回. 解决办法是cache测试后不执行cache unlock操作.
2), 附件中四个压缩包分别是336_168的012way+tag测试, 3way测试和300_150两个测试.
300_150频点测试结果, 由于频率降低, 有坏片没有筛出是正常的:
(1), 600_300_150, 012way+tag
坏片两片pass(l和i), 3片fail。 5好片pass。
(2), 600_300_150, way
坏片: 两片pass(l, d3), 其余fail, 好片pass
3), 加入切频频点方法
(1), 使用已有频点.
直接修改"SI_CACHE_TEST_OP"宏, 例如
SI_CACHE_TEST_OP EQU SI_600_300_150
表示在672_336_168切频. 目前支持的频点如下
SI_pll_cpu_bus:
SI_672_336_168
SI_480_240_60
SI_504_262_126
SI_576_144_72
SI_528_264_132
SI_576_288_144
SI_560_280_140
SI_600_300_150
(2), 加入新频点方法, 以加入SI_600_300_150为例,
(1), 在"SYSTEM_INFO DATA"数组的SI_NUMBER前加入频点, 同时把SI_NUMBER加1(加入SI_600_300_150后, SI_NUMBER从7增加为8):
;7: SI_600_300_150
DCD 12,0x1100,600,0x1401f4,0,0, 0x56, 0x0085000c
;8: SI_NUMBER
DCD 0,0,0,0,0,0,0,0
(2), 频点信息包括(ckd具体计算方法参见详见VC0816 databook clkrst章, uart波特率见uart章)
DCD 12,0x1100,600,0x1401f4,0,0, 0x56, 0x0085000c
A, 默认xclk频率: 12. 如果xclk是24MHz, 需要把strap pin(LCD_DATA[3]=1), 程序会根据strap pin判断xclk, 并调整pll ckd.
B, cpu_bus_ckd: 高8位是bus ckd=1+1+2=4. 低8位是cpu ckd=0+0+2=2.
C, pll频率(MHz): 为了保持与VC0830/VC0816 SV程序一致, 此程序不使用.
D, pll_ckd(@12MHz): pll_freq = 12/0x14*0x1f4*2=600. 为了24MHz也能够使用, 要求ckd的main div(0x1f4)必须是4个倍数.
E, F: 均为0. 为了保持与VC0830/VC0816 SV程序一致, 此程序不使用.
G; 0x56. per_ckd(for uart): per_freq = pll / (5+6+2) / 2 = 23.07923...
H: uart_band_div: uart波特率固定为115200, 根据如下公式计算uart div的整数和小数部分.
uart_baud = per_freq(Hz) / uart_div / 16
uart_div = 0xc+0x85/256 = 12.51953125.
20:56 2010-1-21
丢失工作日志的损失:
1, 最近在整理cortex-a8资料, 用scosystem这个概念. 从board(3530 3个主芯片功能), SOC(架构差异, 各家各有优势: arm+dsp, armv7等等), cpu core, isa四个层次说明.
21:58 2010-1-21
今天liaozhicheng遇到的nand供电问题造成读写速度上不去, 和sd卡电压低造成acmd41 有问题时一类. \todo 总结.
22:33 2010-1-21
时间管理
明日计划
1, 简单实验华恒hammmer-a for cortex-a8调试3530是否好用. 需要找个机器编译u-boot, 并且实验rvds3.0(因为3.0能看v7指令).
2, aasp汇编到c语言希望完成. 从目前看, 就是cache地方不同. 代码用branch方式. 这样避免本机挂掉造成问题.
12:42 2010-1-22
开发环境, arm debug, rvds3.0, license设置
rvds3.0 license如果配置错误, 不会在rvds启动时提示, 在连接debugger才提示.
我今天安装rvds3.0时遇到这个错误, 后来发现是自己复制的license少了下面几行:
SERVER dell-bcb79dda9a 0007e94c6f66
VENDOR armlmd
USE_SERVER
加上并修改hostname为"dell-bcb79dda9a"正常, 判断方法:
lmtools: Server status->Perform Status Enquiry, 查到类似信息说明license设置正确。
--------
Status
--------
Flexible License Manager status on Fri 1/22/2010 12:35
[Detecting lmgrd processes...]
Error getting status: Cannot connect to license server system.
The license server manager (lmgrd) has not been started yet,
the wrong port@host or license file is being used, or the
port or hostname in the license file has been changed.
Server name: 127.0.0.1
License path: 27000@127.0.0.1
FLEXnet Licensing error:-15,10. System Error: 10061 "WinSock: Connection refused"
For further information, refer to the FLEXnet Licensing End User Guide,
available at "www.macrovision.com".
--------
Status
--------
Flexible License Manager status on Fri 1/22/2010 12:38
[Detecting lmgrd processes...]
Error getting status: Cannot connect to license server system.
The license server manager (lmgrd) has not been started yet,
the wrong port@host or license file is being used, or the
port or hostname in the license file has been changed.
Server name: 127.0.0.1
License path: 27000@127.0.0.1
FLEXnet Licensing error:-15,10. System Error: 10061 "WinSock: Connection refused"
For further information, refer to the FLEXnet Licensing End User Guide,
available at "www.macrovision.com".
--------
Status
--------
Flexible License Manager status on Fri 1/22/2010 12:40
[Detecting lmgrd processes...]
License server status: 27000@dell-bcb79dda9a
License file(s) on dell-bcb79dda9a: E:\sofewere\rvds and softether\license3.0.lic: