skyeye-patch Mailing List for SkyEye (Page 3)
a very fast full system simulator
Status: Beta
Brought to you by:
kangsh
You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(11) |
Dec
(115) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(124) |
Feb
(2) |
Mar
(87) |
Apr
(82) |
May
(57) |
Jun
(47) |
Jul
(52) |
Aug
(61) |
Sep
(9) |
Oct
(12) |
Nov
(169) |
Dec
(130) |
2012 |
Jan
(29) |
Feb
(50) |
Mar
(67) |
Apr
(12) |
May
(42) |
Jun
(22) |
Jul
(15) |
Aug
(1) |
Sep
|
Oct
|
Nov
(4) |
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Alloc Y. <all...@gm...> - 2012-05-15 12:04:19
|
Test process: 1.download these patches and apply it 2.run android and it improves speed -- alloc Thanks *地址:清华大学 FIT楼 4区308* *邮箱: **all...@gm...* <ke...@gm...> ** <dav...@ho...> |
From: Alloc Y. <all...@gm...> - 2012-05-11 11:50:19
|
Test Produce: 1.Download the android kernel source code and apply 0003 & 0004 patches for kernel git clone ssh://sxq@166.111.134.89/srv/git_repository/s3c6410_android_kernel 2.Copy android_nand_config to .config and menuconfig. 3.Download the latest skyeye source code ,apply 0001 & 0002 patches ,Compile the source code. 4.Download the testcase. ftp://166.111.134.170/s3c6410_android_nand/ 5.mount the initrd.img and remove debug_bin dir to reduce size and change fs mount to yaffs in init.rc 102 mount yaffs2 mtd@system /system 103 mount yaffs2 mtd@system /system ro remount 104 mount yaffs2 mtd@userdata /data nosuid nodev 105 mount yaffs2 mtd@cache /cache nosuid nodev 6.make initrd.img yaffs; make system.img yaffs fs and userdata 7.copy mknandflashdump form skyeye source code dir to test dir and run mkimg.sh to make nandflash image 8.Copy the vmlinux to the testcase and run android ./run_android.sh -- alloc Thanks *地址:清华大学 FIT楼 4区308* *邮箱: **all...@gm...* <ke...@gm...> ** <dav...@ho...> |
From: Michael.Kang <bla...@gm...> - 2012-05-11 07:57:24
|
Merged into our kernel tree. Thanks MK On Thu, Feb 9, 2012 at 4:29 PM, xq2537 shu <xq...@gm...> wrote: > Tester: Anyone > Reviewer: MK > Branch: android-3.0 > Test Proc: > 1.Download the kernel. > ========================================================= > git clone ssh://sxq@166.111.134.73/srv/git_repository/s3c6410_android_kernel > > password: tsinghua > ========================================================= > 2.Copy android_config to .config > 3.Compile the kernel. > ========================================================= > > make ARCH=arm CROSS_COMPILE=arm-linux- oldconfig > > make ARCH=arm CROSS_COMPILE=arm-linux- > > ========================================================= > You will get vmlinux. > 4.Download the testsuite: > ===================================== > ftp://166.111.134.114/s3c6410_cs8900a_testsuite/ > ===================================== > > 5.Copy your vmlinux into the testsuite. > 6.Run skyeye and go into the console. > ==================================== > sudo /opt/skyeye/bin/skyeye -n -e vmlinux > ===================================== > 7.ping 10.0.0.1 > ========================================== > /bin/ash: can't access tty; job control turned off > / $ping 10.0.0.1 > PING 10.0.0.1 (10.0.0.1): 56 data bytes > 64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=10.0 ms > ========================================== > Test result: > ok > > -- > ADDRESS:清华大学东门FIT楼4-308 > TEL:15611681257 > > Thanks, > XiaoQiao > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Skyeye-patch mailing list > Sky...@li... > https://lists.sourceforge.net/lists/listinfo/skyeye-patch > -- www.skyeye.org |
From: David Yu <ke...@gm...> - 2012-05-11 03:49:40
|
The six patch is base on skyeye-1.3.5, Test OK, Please merge these patch into skyeye-135 David Yu Thanks *地址:清华大学 FIT楼 4区308* *手机:13552980886* *邮箱: **ke...@gm...* <ke...@gm...> *MSN: **dav...@ho...* <dav...@ho...> 2012/5/10 bang bang <she...@gm...> > If you want to run hello_world about sparc, please attach the following > patches > > If you want to test it, please refer to > mail"[SKYEYE-PATCH][SPARC][SPARC-TESTCASE]patches for sparc to pint hello > world in linux and windows and testcase" > > 2012/5/7 bang bang <she...@gm...> > >> Test it in linux, it run ok!!! >> >> >> 2012/5/7 David Yu <ke...@gm...> >> >>> The four patch is v2 about run sparc-hello with sparc. >>> >>> base on this commit >>> commit 7b78ceadf4c665175dd9258d7bc81fd875dc9c8a >>> Author: Michael.Kang <bla...@gm...> >>> Date: Fri May 4 14:00:11 2012 +0800 >>> >>> Add the nandflash of s3c6410 >>> >>> Add the nandflash of s3c6410 >>> >>> OB test it in linux please. >>> Note : you must compile it in src_path. otherwise compile android/* will >>> stop. >>> ./autogen >>> ./automake >>> ./configure --enable-targets=sparc >>> make >>> make install >>> /opt/skyeye/bin/skyeye -n -e sparc-hello >>> >>> If have no error and case, Please merge it. >>> >>> David Yu >>> Thanks >>> >>> >>> >>> >>> 2012/5/4 bang bang <she...@gm...> >>> >>>> Compile it in widows, the following errror occured: >>>> >>>> bus/bank_ops.c:25:23: error: arpa/inet.h: No such file or directory >>>> bus/bank_ops.c: In function 'bus_read': >>>> bus/bank_ops.c:112: error: implicit declaration of function 'htonl' >>>> make[2]: *** [bank_ops.lo] Error 1 >>>> make[2]: Leaving directory `/home/tsinghua/skyeye_inter/common' >>>> make[1]: *** [all-recursive] Error 1 >>>> make[1]: Leaving directory `/home/tsinghua/skyeye_inter' >>>> make: *** [all] Error 2 >>>> >>>> 2012/5/4 David Yu <ke...@gm...> >>>> >>>>> I m sorry, *0002-Modify-a-error-about-endian-about-sparc.patch *have >>>>> some cases about bus_read function. >>>>> It 's my fault. >>>>> >>>>> David Yu >>>>> Thanks >>>>> >>>>> >>>>> >>>>> >>>>> 2012/5/3 David Yu <ke...@gm...> >>>>> >>>>>> Tester: OB >>>>>> Reviewer: MK >>>>>> Branch: dyncom_arm_ppc >>>>>> Test Proc: >>>>>> Apply these patch. >>>>>> run sparc hello.exe from leon2. >>>>>> Debug it with remote gdb: si break and other commands of gdb. >>>>>> >>>>>> Base on commit version: >>>>>> Author: Michael.Kang <bla...@gm...> >>>>>> Date: Fri Apr 13 22:25:35 2012 +0800 >>>>>> >>>>>> Remove address translation for user mode running >>>>>> >>>>>> Remove address translation for user mode running >>>>>> >>>>>> >>>>>> Note:skyeye will exit If "Bus read error, can not find corresponding >>>>>> bank" happened >>>>>> >>>>>> If these patch have not error and bug, OB could debug hello world by >>>>>> remote-gdb now. >>>>>> >>>>>> Test result: >>>>>> passed. >>>>>> >>>>>> >>>>>> David Yu >>>>>> Thanks >>>>>> >>>>>> *地址:清华大学 FIT楼 4区308* >>>>>> *手机:13552980886* >>>>>> *邮箱: **ke...@gm...* <ke...@gm...> >>>>>> *MSN: **dav...@ho...* <dav...@ho...> >>>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. >>>>> Discussions >>>>> will include endpoint security, mobile security and the latest in >>>>> malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> Skyeye-patch mailing list >>>>> Sky...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/skyeye-patch >>>>> >>>>> >>>> >>>> >>>> -- >>>> ADDRESS:清华大学FIT楼4-308 >>>> TEL: 156-1166-2737 >>>> >>>> >>> >> >> >> -- >> ADDRESS:清华大学FIT楼4-308 >> TEL: 156-1166-2737 >> >> > > > -- > ADDRESS:清华大学FIT楼4-308 > TEL: 156-1166-2737 > > |
From: Alloc Y. <all...@gm...> - 2012-05-09 13:50:31
|
-- alloc Thanks *地址:清华大学 FIT楼 4区308* *邮箱: **all...@gm...* <ke...@gm...> ** <dav...@ho...> |
From: xq2537 s. <xq...@gm...> - 2012-05-09 06:59:29
|
I‘m sorry. The *0006-Add-android-nand-config.patch is error. The correct patch is here.Below is the third version.* On Wed, May 9, 2012 at 2:53 PM, xq2537 shu <xq...@gm...> wrote: > I‘m sorry. The *0006-Add-android-nand-config.patch is error. > The correct patch is here.Below is the second version. > > * > > On Wed, May 9, 2012 at 2:24 PM, xq2537 shu <xq...@gm...> wrote: > >> Test Produce: >> 1.Download the android kernel source code. >> git clone ssh:// >> sxq@166.111.134.89/srv/git_repository/s3c6410_android_kernel >> 2.Copy android_nand_config to .config and menuconfig. >> 3.Compile the source code. >> 4.Download the testcase. >> ftp://166.111.134.170/s3c6410_android_nand/ >> 5.Copy the vmlinux to the testcase and run android >> ./run_android.sh >> >> >> >> -- >> ADDRESS:清华大学东门FIT楼4-308 >> TEL:15611681257 >> >> Thanks, >> XiaoQiao >> >> > > > -- > ADDRESS:清华大学东门FIT楼4-308 > TEL:15611681257 > > Thanks, > XiaoQiao > > -- ADDRESS:清华大学东门FIT楼4-308 TEL:15611681257 Thanks, XiaoQiao |
From: xq2537 s. <xq...@gm...> - 2012-05-09 06:54:09
|
I‘m sorry. The *0006-Add-android-nand-config.patch is error. The correct patch is here.Below is the second version. * On Wed, May 9, 2012 at 2:24 PM, xq2537 shu <xq...@gm...> wrote: > Test Produce: > 1.Download the android kernel source code. > git clone ssh:// > sxq@166.111.134.89/srv/git_repository/s3c6410_android_kernel > 2.Copy android_nand_config to .config and menuconfig. > 3.Compile the source code. > 4.Download the testcase. > ftp://166.111.134.170/s3c6410_android_nand/ > 5.Copy the vmlinux to the testcase and run android > ./run_android.sh > > > > -- > ADDRESS:清华大学东门FIT楼4-308 > TEL:15611681257 > > Thanks, > XiaoQiao > > -- ADDRESS:清华大学东门FIT楼4-308 TEL:15611681257 Thanks, XiaoQiao |
From: xq2537 s. <xq...@gm...> - 2012-05-09 06:24:38
|
Test Produce: 1.Download the android kernel source code. git clone ssh://sxq@166.111.134.89/srv/git_repository/s3c6410_android_kernel 2.Copy android_nand_config to .config and menuconfig. 3.Compile the source code. 4.Download the testcase. ftp://166.111.134.170/s3c6410_android_nand/ 5.Copy the vmlinux to the testcase and run android ./run_android.sh -- ADDRESS:清华大学东门FIT楼4-308 TEL:15611681257 Thanks, XiaoQiao |
From: xq2537 s. <xq...@gm...> - 2012-05-09 04:02:20
|
Test Produce: 1.Download the android kernel source code. -- ADDRESS:清华大学东门FIT楼4-308 TEL:15611681257 Thanks, XiaoQiao |
From: Michael.Kang <bla...@gm...> - 2012-05-08 12:27:26
|
1. some unused variable in your patch as the following: +int flag = 0; +unsigned long long start_usec, start_sec, current_utime, last_utime, passed_utime; +static uint64_t now_us = 0, now_sec = 0; 2. Please avoid use static variable since that is not thread safe. +static int s3c6410x_scheduler_id = -1; 3. use more reasonable implementation for the following code: + switch(div){ + case 0x0: + mux=1; + break; + case 0x1: + mux=2; + break; + case 0x2: + mux=4; + break; + case 0x3: + mux=8; + break; + case 0x4: + mux=16; + break; + default: + mux=1; + break; + } I think you should use the following code: mux = 1 >> div Thanks MK On Sat, Apr 28, 2012 at 10:56 AM, xq2537 shu <xq...@gm...> wrote: > Test produce: > 1.Before you apply this patches,you should update patches in > ftp://166.111.134.170/android_patch.tar.gz > > 2.After you applied the patches.Compile skyeye and install it. > 3.Got the testsuite. > ftp://166.111.134.170/qt_testcase/ > 4.Run the script. > ./run_android.sh > > Test result: > You go into qt GUI,and run the clock,you will observe that clock is > accurate. > > > -- > ADDRESS:清华大学东门FIT楼4-308 > TEL:15611681257 > > Thanks, > XiaoQiao > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Skyeye-patch mailing list > Sky...@li... > https://lists.sourceforge.net/lists/listinfo/skyeye-patch > > -- www.skyeye.org |
From: Michael.Kang <bla...@gm...> - 2012-05-08 09:31:17
|
发现三个问题: 1、不能在外部目录编译,只能在源码目录编译 2、脚本和程序中都把emulator可执行文件的路径写死了,能否用比较灵活的方法。 3、在我的opensuse 12.1 上会出现如下错误: ksh@tu134089:~/qt_testcase_xq> ./run_android.sh SkyEye 1.3.4 SkyEye is an Open Source project under GPL. All rights of different parts or modules are reserved by their author. Any modification or redistributions of SkyEye should not remove or modify the annoucement of SkyEye copyright. Get more information about it, please visit the homepage http://www.skyeye.org. Type "help" to get command list. ethmod num=1, mac addr=0:4:3:2:1:f, hostip=10.0.0.1 In epprom_reset(io->ieee_addr) mac addr=0:4:3:2:1:f In epprom_reset(net->macaddr) mac addr=0:4:3:2:1:f In new_tlb, get TLB 0x7f80002f6580 emulator: WARNING: system partition size adjusted to match image file (97 MB > 66 MB) opts->no_windows is 0 SDL init failure, reason is: No available video device Thanks MK On Tue, Apr 24, 2012 at 1:57 PM, bang bang <she...@gm...> wrote: > Test it OK!!! > > 在 2012年4月23日 下午3:17,xq2537 shu <xq...@gm...>写道: >> >> android所有的patch都在如下包中 >> >> ftp://166.111.134.170/android_patch.tar.gz >> >> 测试用例: >> ftp://166.111.134.170/qt_testcase/ >> >> 测试过程: >> 1.最新arm-dyncom分支上打上以上patch. >> 2.编译安装skyeye >> 3.下载测试用例 >> 4.运行gtk的qt应用程序 >> =============================================== >> /opt/skyeye/bin/skyeye -n -e vmlinux >> =============================================== >> 5.运行SDL的qt应用程序 >> =============================================== >> ./run_android.sh >> =============================================== >> 进入qt,并玩一下贪吃蛇小游戏 >> >> 测试结果: >> 1,gtk的qt应用程序运行正常 >> 2. sdl 的qt应用程序,小游戏正常运行 >> -- >> ADDRESS:清华大学东门FIT楼4-308 >> TEL:15611681257 >> >> Thanks, >> XiaoQiao >> >> >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> >> _______________________________________________ >> Skyeye-patch mailing list >> Sky...@li... >> https://lists.sourceforge.net/lists/listinfo/skyeye-patch >> > > > > -- > ADDRESS:清华大学FIT楼4-308 > TEL: 156-1166-2737 > -- www.skyeye.org |
From: bang b. <she...@gm...> - 2012-05-07 07:53:53
|
Test it in linux, it run ok!!! 2012/5/7 David Yu <ke...@gm...> > The four patch is v2 about run sparc-hello with sparc. > > base on this commit > commit 7b78ceadf4c665175dd9258d7bc81fd875dc9c8a > Author: Michael.Kang <bla...@gm...> > Date: Fri May 4 14:00:11 2012 +0800 > > Add the nandflash of s3c6410 > > Add the nandflash of s3c6410 > > OB test it in linux please. > Note : you must compile it in src_path. otherwise compile android/* will > stop. > ./autogen > ./automake > ./configure --enable-targets=sparc > make > make install > /opt/skyeye/bin/skyeye -n -e sparc-hello > > If have no error and case, Please merge it. > > David Yu > Thanks > > > > > 2012/5/4 bang bang <she...@gm...> > >> Compile it in widows, the following errror occured: >> >> bus/bank_ops.c:25:23: error: arpa/inet.h: No such file or directory >> bus/bank_ops.c: In function 'bus_read': >> bus/bank_ops.c:112: error: implicit declaration of function 'htonl' >> make[2]: *** [bank_ops.lo] Error 1 >> make[2]: Leaving directory `/home/tsinghua/skyeye_inter/common' >> make[1]: *** [all-recursive] Error 1 >> make[1]: Leaving directory `/home/tsinghua/skyeye_inter' >> make: *** [all] Error 2 >> >> 2012/5/4 David Yu <ke...@gm...> >> >>> I m sorry, *0002-Modify-a-error-about-endian-about-sparc.patch *have >>> some cases about bus_read function. >>> It 's my fault. >>> >>> David Yu >>> Thanks >>> >>> >>> >>> >>> 2012/5/3 David Yu <ke...@gm...> >>> >>>> Tester: OB >>>> Reviewer: MK >>>> Branch: dyncom_arm_ppc >>>> Test Proc: >>>> Apply these patch. >>>> run sparc hello.exe from leon2. >>>> Debug it with remote gdb: si break and other commands of gdb. >>>> >>>> Base on commit version: >>>> Author: Michael.Kang <bla...@gm...> >>>> Date: Fri Apr 13 22:25:35 2012 +0800 >>>> >>>> Remove address translation for user mode running >>>> >>>> Remove address translation for user mode running >>>> >>>> >>>> Note:skyeye will exit If "Bus read error, can not find corresponding >>>> bank" happened >>>> >>>> If these patch have not error and bug, OB could debug hello world by >>>> remote-gdb now. >>>> >>>> Test result: >>>> passed. >>>> >>>> >>>> David Yu >>>> Thanks >>>> >>>> *地址:清华大学 FIT楼 4区308* >>>> *手机:13552980886* >>>> *邮箱: **ke...@gm...* <ke...@gm...> >>>> *MSN: **dav...@ho...* <dav...@ho...> >>>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Skyeye-patch mailing list >>> Sky...@li... >>> https://lists.sourceforge.net/lists/listinfo/skyeye-patch >>> >>> >> >> >> -- >> ADDRESS:清华大学FIT楼4-308 >> TEL: 156-1166-2737 >> >> > -- ADDRESS:清华大学FIT楼4-308 TEL: 156-1166-2737 |
From: bang b. <she...@gm...> - 2012-05-04 06:34:33
|
Compile it in widows, the following errror occured: bus/bank_ops.c:25:23: error: arpa/inet.h: No such file or directory bus/bank_ops.c: In function 'bus_read': bus/bank_ops.c:112: error: implicit declaration of function 'htonl' make[2]: *** [bank_ops.lo] Error 1 make[2]: Leaving directory `/home/tsinghua/skyeye_inter/common' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/tsinghua/skyeye_inter' make: *** [all] Error 2 2012/5/4 David Yu <ke...@gm...> > I m sorry, *0002-Modify-a-error-about-endian-about-sparc.patch *have some > cases about bus_read function. > It 's my fault. > > David Yu > Thanks > > > > > 2012/5/3 David Yu <ke...@gm...> > >> Tester: OB >> Reviewer: MK >> Branch: dyncom_arm_ppc >> Test Proc: >> Apply these patch. >> run sparc hello.exe from leon2. >> Debug it with remote gdb: si break and other commands of gdb. >> >> Base on commit version: >> Author: Michael.Kang <bla...@gm...> >> Date: Fri Apr 13 22:25:35 2012 +0800 >> >> Remove address translation for user mode running >> >> Remove address translation for user mode running >> >> >> Note:skyeye will exit If "Bus read error, can not find corresponding >> bank" happened >> >> If these patch have not error and bug, OB could debug hello world by >> remote-gdb now. >> >> Test result: >> passed. >> >> >> David Yu >> Thanks >> >> *地址:清华大学 FIT楼 4区308* >> *手机:13552980886* >> *邮箱: **ke...@gm...* <ke...@gm...> >> *MSN: **dav...@ho...* <dav...@ho...> >> > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Skyeye-patch mailing list > Sky...@li... > https://lists.sourceforge.net/lists/listinfo/skyeye-patch > > -- ADDRESS:清华大学FIT楼4-308 TEL: 156-1166-2737 |
From: David Yu <ke...@gm...> - 2012-05-04 06:01:05
|
I m sorry, *0002-Modify-a-error-about-endian-about-sparc.patch *have some cases about bus_read function. It 's my fault. David Yu Thanks 2012/5/3 David Yu <ke...@gm...> > Tester: OB > Reviewer: MK > Branch: dyncom_arm_ppc > Test Proc: > Apply these patch. > run sparc hello.exe from leon2. > Debug it with remote gdb: si break and other commands of gdb. > > Base on commit version: > Author: Michael.Kang <bla...@gm...> > Date: Fri Apr 13 22:25:35 2012 +0800 > > Remove address translation for user mode running > > Remove address translation for user mode running > > > Note:skyeye will exit If "Bus read error, can not find corresponding bank" > happened > > If these patch have not error and bug, OB could debug hello world by > remote-gdb now. > > Test result: > passed. > > > David Yu > Thanks > > *地址:清华大学 FIT楼 4区308* > *手机:13552980886* > *邮箱: **ke...@gm...* <ke...@gm...> > *MSN: **dav...@ho...* <dav...@ho...> > |
From: xq2537 s. <xq...@gm...> - 2012-04-28 06:25:18
|
Oh,sorry,android will still restart after apply my patch. 2012/4/28 bang bang <she...@gm...> > Test it ok, I compared it with wrist watch!! > > 在 2012年4月28日 下午12:30,Michael.Kang <bla...@gm...>写道: > > Is android more stable than before without you patch? >> >> >> Thanks >> MK >> 2012/4/28 xq2537 shu <xq...@gm...> >> >>> Test produce: >>> 1.Before you apply this patches,you should update patches in >>> ftp://166.111.134.170/android_patch.tar.gz >>> >>> 2.After you applied the patches.Compile skyeye and install it. >>> 3.Got the testsuite. >>> ftp://166.111.134.170/qt_testcase/ >>> 4.Run the script. >>> ./run_android.sh >>> >>> Test result: >>> You go into qt GUI,and run the clock,you will observe that clock is >>> accurate. >>> >>> >>> -- >>> ADDRESS:清华大学东门FIT楼4-308 >>> TEL:15611681257 >>> >>> Thanks, >>> XiaoQiao >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Skyeye-patch mailing list >>> Sky...@li... >>> https://lists.sourceforge.net/lists/listinfo/skyeye-patch >>> >>> >> >> >> -- >> www.skyeye.org >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Skyeye-patch mailing list >> Sky...@li... >> https://lists.sourceforge.net/lists/listinfo/skyeye-patch >> >> > > > -- > ADDRESS:清华大学FIT楼4-308 > TEL: 156-1166-2737 > > -- ADDRESS:清华大学东门FIT楼4-308 TEL:15611681257 Thanks, XiaoQiao |
From: bang b. <she...@gm...> - 2012-04-28 06:18:58
|
Test it ok, I compared it with wrist watch!! 在 2012年4月28日 下午12:30,Michael.Kang <bla...@gm...>写道: > Is android more stable than before without you patch? > > > Thanks > MK > 2012/4/28 xq2537 shu <xq...@gm...> > >> Test produce: >> 1.Before you apply this patches,you should update patches in >> ftp://166.111.134.170/android_patch.tar.gz >> >> 2.After you applied the patches.Compile skyeye and install it. >> 3.Got the testsuite. >> ftp://166.111.134.170/qt_testcase/ >> 4.Run the script. >> ./run_android.sh >> >> Test result: >> You go into qt GUI,and run the clock,you will observe that clock is >> accurate. >> >> >> -- >> ADDRESS:清华大学东门FIT楼4-308 >> TEL:15611681257 >> >> Thanks, >> XiaoQiao >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Skyeye-patch mailing list >> Sky...@li... >> https://lists.sourceforge.net/lists/listinfo/skyeye-patch >> >> > > > -- > www.skyeye.org > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Skyeye-patch mailing list > Sky...@li... > https://lists.sourceforge.net/lists/listinfo/skyeye-patch > > -- ADDRESS:清华大学FIT楼4-308 TEL: 156-1166-2737 |
From: Michael.Kang <bla...@gm...> - 2012-04-28 04:30:43
|
Is android more stable than before without you patch? Thanks MK 2012/4/28 xq2537 shu <xq...@gm...> > Test produce: > 1.Before you apply this patches,you should update patches in > ftp://166.111.134.170/android_patch.tar.gz > > 2.After you applied the patches.Compile skyeye and install it. > 3.Got the testsuite. > ftp://166.111.134.170/qt_testcase/ > 4.Run the script. > ./run_android.sh > > Test result: > You go into qt GUI,and run the clock,you will observe that clock is > accurate. > > > -- > ADDRESS:清华大学东门FIT楼4-308 > TEL:15611681257 > > Thanks, > XiaoQiao > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Skyeye-patch mailing list > Sky...@li... > https://lists.sourceforge.net/lists/listinfo/skyeye-patch > > -- www.skyeye.org |
From: xq2537 s. <xq...@gm...> - 2012-04-28 02:56:16
|
Test produce: 1.Before you apply this patches,you should update patches in ftp://166.111.134.170/android_patch.tar.gz 2.After you applied the patches.Compile skyeye and install it. 3.Got the testsuite. ftp://166.111.134.170/qt_testcase/ 4.Run the script. ./run_android.sh Test result: You go into qt GUI,and run the clock,you will observe that clock is accurate. -- ADDRESS:清华大学东门FIT楼4-308 TEL:15611681257 Thanks, XiaoQiao |
From: bang b. <she...@gm...> - 2012-04-24 05:57:32
|
Test it OK!!! 在 2012年4月23日 下午3:17,xq2537 shu <xq...@gm...>写道: > android所有的patch都在如下包中 > > ftp://166.111.134.170/android_patch.tar.gz > > 测试用例: > ftp://166.111.134.170/qt_testcase/ > > 测试过程: > 1.最新arm-dyncom分支上打上以上patch. > 2.编译安装skyeye > 3.下载测试用例 > 4.运行gtk的qt应用程序 > =============================================== > /opt/skyeye/bin/skyeye -n -e vmlinux > =============================================== > 5.运行SDL的qt应用程序 > =============================================== > ./run_android.sh > =============================================== > 进入qt,并玩一下贪吃蛇小游戏 > > 测试结果: > 1,gtk的qt应用程序运行正常 > 2. sdl 的qt应用程序,小游戏正常运行 > -- > ADDRESS:清华大学东门FIT楼4-308 > TEL:15611681257 > > Thanks, > XiaoQiao > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > > _______________________________________________ > Skyeye-patch mailing list > Sky...@li... > https://lists.sourceforge.net/lists/listinfo/skyeye-patch > > -- ADDRESS:清华大学FIT楼4-308 TEL: 156-1166-2737 |
From: xq2537 s. <xq...@gm...> - 2012-04-23 07:18:01
|
android所有的patch都在如下包中 ftp://166.111.134.170/android_patch.tar.gz 测试用例: ftp://166.111.134.170/qt_testcase/ 测试过程: 1.最新arm-dyncom分支上打上以上patch. 2.编译安装skyeye 3.下载测试用例 4.运行gtk的qt应用程序 =============================================== /opt/skyeye/bin/skyeye -n -e vmlinux =============================================== 5.运行SDL的qt应用程序 =============================================== ./run_android.sh =============================================== 进入qt,并玩一下贪吃蛇小游戏 测试结果: 1,gtk的qt应用程序运行正常 2. sdl 的qt应用程序,小游戏正常运行 -- ADDRESS:清华大学东门FIT楼4-308 TEL:15611681257 Thanks, XiaoQiao |
From: xq2537 s. <xq...@gm...> - 2012-04-20 06:54:13
|
2012/4/20 xq2537 shu <xq...@gm...> > Test produce: > 1.Before you apply these patches,you should update patches in > ftp://166.111.134.182/upload/XiaoQiao/android_sdl/android_sdl_patch > > 2.After you applied these patches.Compile skyeye and install it. > 3.Got the testsuite. > ftp://166.111.134.182/upload/XiaoQiao/android_sdl/qt_testcase_keypad > 4.Run the script. > ./run_android.sh > > Test result: > You go into qt GUI,and use keypad to input. > -- > ADDRESS:清华大学东门FIT楼4-308 > TEL:15611681257 > > Thanks, > XiaoQiao > > -- ADDRESS:清华大学东门FIT楼4-308 TEL:15611681257 Thanks, XiaoQiao |
From: xq2537 s. <xq...@gm...> - 2012-04-20 06:52:06
|
Test produce: 1.Before you apply these patches,you should update patches in ftp://166.111.134.182/upload/XiaoQiao/android_sdl/android_sdl_patch 2.After you applied these patches.Compile skyeye and install it. 3.Got the testsuite. ftp://166.111.134.182/upload/XiaoQiao/android_sdl/qt_testcase_keypad 4.Run the script. ./run_android.sh Test result: You go into qt GUI,and use keypad to input. -- ADDRESS:清华大学东门FIT楼4-308 TEL:15611681257 Thanks, XiaoQiao |
From: bang b. <she...@gm...> - 2012-04-13 12:00:44
|
1.快速解释执行:qt和android测试都通过 2.动态编译: qt测试通过,android由于内存耗尽而死!!! 另外: 编译的时候可能会出现下面的错误: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libiberty.a(xmalloc.o): relocation R_X86_64_32 against `.rodata.str1.1'can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libiberty.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [libemulator_common.la] 错误 1 make[2]:正在离开目录 `/home/ou/skyeye/skyeye_qiao_bak/android/objs/emulator_common' make[1]: *** [all-recursive] 错误 1 解决办法: sudo cp third-party/libiberty/pic/libiberty.a /usr/lib64/ 或者 sudo cp third-party/libiberty/pic/libiberty.a /usr/lib 在 2012年4月13日 上午10:45,xq2537 shu <xq...@gm...>写道: > 新添加qt的测试用例,支持触摸屏 > ftp://166.111.134.80/upload/XiaoQiao/android_sdl/ > > > ---------- Forwarded message ---------- > From: xq2537 shu <xq...@gm...> > Date: 2012/4/10 > Subject: [skyeye-patch] Android avd and sdl. > To: skyeye-patch <Sky...@li...> > > > As patch is too big,I pull it on the 80 server. > ftp://166.111.134.80/upload/XiaoQiao/android_sdl/ > > There are two directory: > android_sdl_patch > android_testcase_sdl > > android_sdl_patch is the patches for skyeye. > android_testcase_sdl is the testcase for the module. > > Test produce: > 1.Apply these patches on android_sdl_patch. > 2.Go into android_testcase_sdl and run the script run_android.sh > > tsinghua@tu134080:~/ftp/android_sdl/android_testcase_sdl$ ls > android_args initrd.img skins userdata.img > hardware-qemu.ini ramdisk.img skyeye.conf vmlinux > initrd_96M.img run_android.sh system.img > tsinghua@tu134080:~/ftp/android_sdl/android_testcase_sdl$ ./run_android.sh > > 3.Test reslut: > You can run android as the attach. > > ADDRESS:清华大学东门FIT楼4-308 > TEL:15611681257 > > Thanks, > XiaoQiao > > > > -- > ADDRESS:清华大学东门FIT楼4-308 > TEL:15611681257 > > Thanks, > XiaoQiao > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Skyeye-patch mailing list > Sky...@li... > https://lists.sourceforge.net/lists/listinfo/skyeye-patch > > -- ADDRESS:清华大学FIT楼4-308 TEL: 156-1166-2737 |
From: <bla...@gm...> - 2012-03-20 10:49:11
|
From: "Michael.Kang" <bla...@gm...> Reformat the parallel framework and do some clean. The qt testcase can not run successfully. Signed-off-by: Michael.Kang <bla...@gm...> --- arch/arm/dyncom/arm_dyncom_interface.cpp | 4 +- arch/arm/dyncom/arm_dyncom_parallel.cpp | 763 ++++++------------------------ 2 files changed, 140 insertions(+), 627 deletions(-) diff --git a/arch/arm/dyncom/arm_dyncom_interface.cpp b/arch/arm/dyncom/arm_dyncom_interface.cpp index 9981b45..caccd3d 100644 --- a/arch/arm/dyncom/arm_dyncom_interface.cpp +++ b/arch/arm/dyncom/arm_dyncom_interface.cpp @@ -179,8 +179,7 @@ static void per_cpu_step(conf_object_t * running_core){ case HYBRID: /* if next instruction will be interpreted, ret value is 0. Exceptions are handled inside the interpreter, so we return immediatly */ - if(launch_compiled_queue((cpu_t*)(core->dyncom_cpu->obj), core->Reg[15]) == 0) - return; + launch_compiled_queue((cpu_t*)(core->dyncom_cpu->obj), core->Reg[15]); break; case PURE_DYNCOM: launch_compiled_queue_dyncom((cpu_t*)(core->dyncom_cpu->obj), core->Reg[15]); @@ -210,6 +209,7 @@ static void per_cpu_step(conf_object_t * running_core){ } } mach->mach_io_do_cycle(cpu); + return; } static void per_cpu_stop(conf_object_t * core){ diff --git a/arch/arm/dyncom/arm_dyncom_parallel.cpp b/arch/arm/dyncom/arm_dyncom_parallel.cpp index bbdc677..6619ca4 100644 --- a/arch/arm/dyncom/arm_dyncom_parallel.cpp +++ b/arch/arm/dyncom/arm_dyncom_parallel.cpp @@ -33,6 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "bank_defs.h" #include <stack> +#include <hash_map> using namespace std; #ifndef __ARMEMU_H__ #define __ARMEMU_H__ @@ -55,7 +56,7 @@ extern ARMword ARMul_Emulate32 (ARMul_State *); #define INTBITS (0xc0L) #endif -#define QUEUE_LENGTH 0x6000 +#define QUEUE_LENGTH 1024 /* Monothread: threshold compilation only Multithread: threshold compilation or Polling compilation (cpu intensive) */ #define MULTI_THREAD 1 @@ -133,7 +134,6 @@ do_mode_option (skyeye_option_t * this_option, int num_params, } return 0; } - void init_compiled_queue(cpu_t* cpu){ memset(&compiled_queue[0], 0xff, sizeof(uint32_t) * QUEUE_LENGTH); if (get_skyeye_pref()->interpret_mode) { @@ -148,10 +148,8 @@ void init_compiled_queue(cpu_t* cpu){ fprintf(stderr, "can not initilize the rwlock\n"); } /* Create a thread to compile IR to native code */ -#if MULTI_THREAD pthread_t id; create_thread(compiled_worker, (void*)cpu, &id); -#endif } cpu->dyncom_engine->cur_tagging_pos = 0; } @@ -159,14 +157,6 @@ void init_compiled_queue(cpu_t* cpu){ void interpret_cpu_step(conf_object_t * running_core){ arm_core_t *state = (arm_core_t *)running_core->obj; -#if 0 - static uint32_t flag = 0; - if (flag) - { - state->NextInstr = PRIMEPIPE; - flag = 0; - } -#endif /* Initialize interpreter step */ state->step++; state->cycle++; @@ -218,7 +208,7 @@ inline int clear_cache(cpu_t *cpu, fast_map hash_map) return No_exp; } -/* For HYBRID or PURE_INTERPRETER. +/* Only for HYBRID . In HYBRID mode, when encountering a new (untagged) pc, we recursive-tag it so all newly tagged instructions belongs to this basic block. A translated address, if it is an entry point, will be dyncom-executed. Else, it will be interpreted. */ @@ -226,27 +216,6 @@ int launch_compiled_queue(cpu_t* cpu, uint32_t pc){ arm_core_t* core = (arm_core_t*)(cpu->cpu_data->obj); void * pfunc = NULL; - //printf("\t\t### Launching %p Type %d\n", pc, core->NextInstr); - - if (running_mode == PURE_INTERPRET) - { - interpret_cpu_step(cpu->cpu_data); - return 0; - } - - /* pc correction due to the pipeline */ - if (core->NextInstr == PRIMEPIPE) { - /* If PRIMEPIPE, then the executed pc is the value in the pc register */ - /* In Pure Dyncom mode, NextInstr is always PRIMEPIPE */ - } else if (core->NextInstr == PCINCEDSEQ) { - /* If PCINCEDSEQ, the executed pc is -8 */ - pc = pc - 8 ; - } else { - /* Else, the executed pc is pc register - 4 */ - pc = pc - 4 ; - } - - /* Attempt to retrieve physical address if mmu, only in kernel mode */ if (is_user_mode(cpu)) { @@ -254,416 +223,52 @@ int launch_compiled_queue(cpu_t* cpu, uint32_t pc){ } else { - uint32_t dummy, ret = 0; - //ret = core->mmu.ops.load_instr(core,pc,&core->phys_pc); // for interpreter only - - /* effective_to_physical function uses dyncom registers. - Therefore, they need to be imported from interpreter registers. - Hopefully, the new interpreter will use unified registers. */ - CP15REG(CP15_TRANSLATION_BASE_CONTROL) = core->mmu.translation_table_ctrl; - CP15REG(CP15_TRANSLATION_BASE_TABLE_0) = core->mmu.translation_table_base0; - CP15REG(CP15_TRANSLATION_BASE_TABLE_1) = core->mmu.translation_table_base1; - CP15REG(CP15_DOMAIN_ACCESS_CONTROL) = core->mmu.domain_access_control; - CP15REG(CP15_CONTROL) = core->mmu.control; - + uint32_t ret = 0; ret = cpu->mem_ops.effective_to_physical(cpu, pc, &core->phys_pc); - /* targeted instruction is not in memory, let the interpreter prefetch abort do the job */ if (ret != 0) { - //printf("#### Issues in mmu %d at pc %x, phys_pc? %x\n", ret, pc, core->phys_pc); - interpret_cpu_step(cpu->cpu_data); + /* prefetch abort happened */ return 0; } } - /* Check if the executed pc already got tagged */ - uint32_t counter = 0, entry = 0; - uint32_t tag = check_tag_execution(cpu, core->phys_pc, &counter, &entry); - if ((tag & TAG_CODE) == 0) - { - push_compiled_work(cpu, core->phys_pc); - } /* Check if the wanted instruction is in the dyncom engine */ fast_map hash_map = cpu->dyncom_engine->fmap; PFUNC(core->phys_pc); - /* If not, compile it if it has reached execution threshold - Note: in pure dyncom, push_compiled_work should have translated the block, - so this code will not be executed in pure dyncom. It is ok since - we don't care much about the compiled queue in pure dyncom. */ -#if !MULTI_THREAD - if ((!pfunc) && (tag & TAG_ENTRY) && (counter > 0x1000)) - { - uint32_t index; - if (translated_block > 0x200) - { - clear_cache(cpu, hash_map); - printf(" (Monothread) Cleaning translated blocks ----- \n"); - return 0; - } - - for (index = 0; index < cpu->dyncom_engine->cur_tagging_pos; index++) - { - if(compiled_queue[index] == core->phys_pc) { - //printf("### Compiling %x for %x idx %x\n", entry, core->phys_pc, index); - cpu->dyncom_engine->functions = index; - //printf("Planning to translate block n*%x at pc %x phys %x\n", cpu->dyncom_engine->functions, pc, core->phys_pc); - cpu_translate(cpu, compiled_queue[index]); - //PFUNC(core->phys_pc); - translated_block += 1; - break; - } - } - } -#else -#if !LIFO - if ((!pfunc) && (tag & TAG_ENTRY) && (counter > 0x1000)) - { - uint32_t index; - if (translated_block > 0x200) - { - pthread_rwlock_wrlock(&translation_rwlock); - clear_cache(cpu, hash_map); - printf(" (Multithread) Cleaning translated blocks ----- \n"); - while (!compile_stack.empty()) - { - compile_stack.pop(); - } - pthread_rwlock_unlock(&translation_rwlock); - return 0; - } - - for (index = 0; index < cpu->dyncom_engine->cur_tagging_pos; index++) - { - if(compiled_queue[index] == core->phys_pc) { - pthread_rwlock_wrlock(&compile_stack_rwlock); - //if (compile_stack.empty() || compile_stack.top() != index) - { - // printf("### Pushing to compile %x for %x idx %x\n", entry, core->phys_pc, index); - compile_stack.push(core->phys_pc); - compile_stack.push(index); - } - pthread_rwlock_unlock(&compile_stack_rwlock); - compiled_queue[index] = -1; - //printf("Planning to translate block n*%x at pc %x phys %x\n", cpu->dyncom_engine->functions, pc, core->phys_pc); - break; - } - } - } -#else - if ((!pfunc) && (tag & TAG_ENTRY) && (counter > 0x5)) - { - uint32_t index; - if (translated_block > 0x400) - { - pthread_rwlock_wrlock(&translation_rwlock); - clear_cache(cpu, hash_map); - printf(" (LIFO) Cleaning translated blocks ----- \n"); - while (!compile_stack.empty()) - { - compile_stack.pop(); - } - pthread_rwlock_unlock(&translation_rwlock); - return 0; + if (!pfunc) + { + /* The instruction is not is the engine, we interpret it */ + //printf("Interpreting %p-%p with MMU %x\n", core->phys_pc, pc, (core->mmu.control)); + //compiled_queue[(++cur_compile_pos )% QUEUE_LENGTH] = core->phys_pc; + //bb_prof + //pthread_rwlock_wrlock(&compile_stack_rwlock); + //if(cur_compile_pos == QUEUE_LENGTH){ + int ret; + if((ret = pthread_rwlock_trywrlock(&compile_stack_rwlock)) == 0){ + compile_stack.push(core->phys_pc); + pthread_rwlock_unlock(&compile_stack_rwlock); } - - for (index = 0; index < cpu->dyncom_engine->cur_tagging_pos; index++) - { - if(compiled_queue[index] == core->phys_pc) { - pthread_rwlock_wrlock(&compile_stack_rwlock); - if (compile_stack.empty() || compile_stack.top() != index) - { - //printf("### Pushing to compile %x for %x idx %x\n", entry, core->phys_pc, index); - compile_stack.push(core->phys_pc); - compile_stack.push(index); - } - pthread_rwlock_unlock(&compile_stack_rwlock); - //compiled_queue[index] = -1; - //printf("Planning to translate block n*%x at pc %x phys %x\n", cpu->dyncom_engine->functions, pc, core->phys_pc); - break; - } + else{ + printf("Warning ,can not get the wrlock ,error is %d, %s\n", ret, strerror(ret)); } - } -#endif -#endif + //} + extern void InterpreterMainLoop(cpu_t *core); + InterpreterMainLoop(cpu); - //printf("#### counter is %x for pc %x\n", counter, pc); - - /* The instruction is not is the engine, we interpret it */ - if (!pfunc) - { - //printf("Interpreting %p-%p with MMU %x\n", core->phys_pc, pc, (core->mmu.control)); - interpret_cpu_step(cpu->cpu_data); return 0; } else { - //if (get_skyeye_pref()->start_logging) - //printf("Ready! In %p %p Type %d \n", pc, core->phys_pc, core->NextInstr); - - /* synchronize flags between dyncom and interpreter */ - //UPDATE_TIMING(cpu, TIMER_SWITCH, true); - //printf("In Cpsr %x N %x Z %x C %x V %x -> ", core->Cpsr, core->NFlag, core->ZFlag, core->CFlag, core->VFlag); - core->Cpsr = core->Cpsr & 0xfffffff; - core->Cpsr |= core->NFlag << 31; - core->Cpsr |= core->ZFlag << 30; - core->Cpsr |= core->CFlag << 29; - core->Cpsr |= core->VFlag << 28; - //core->Cpsr |= IFFlags = (((core->Cpsr & INTBITS) >> 6) & 3); - //printf("-> Cpsr %x\n", core->Cpsr); - - if (!is_user_mode(cpu)) { - CP15REG(CP15_TRANSLATION_BASE_CONTROL) = core->mmu.translation_table_ctrl; - CP15REG(CP15_TRANSLATION_BASE_TABLE_0) = core->mmu.translation_table_base0; - CP15REG(CP15_TRANSLATION_BASE_TABLE_1) = core->mmu.translation_table_base1; - CP15REG(CP15_DOMAIN_ACCESS_CONTROL) = core->mmu.domain_access_control; - //CP15REG(CP15_CONTROL) &= ~CONTROL_MMU; - //CP15REG(CP15_CONTROL) &= ~CONTROL_VECTOR; - //CP15REG(CP15_CONTROL) |= core->mmu.control & CONTROL_MMU; - //CP15REG(CP15_CONTROL) |= core->mmu.control & CONTROL_VECTOR; - CP15REG(CP15_CONTROL) = core->mmu.control; - CP15REG(CP15_INSTR_FAULT_STATUS) = core->mmu.fault_statusi; - CP15REG(CP15_FAULT_STATUS) = core->mmu.fault_status; - CP15REG(CP15_FAULT_ADDRESS) = core->mmu.fault_address; - - switch (core->Mode) - { - case USER32MODE: - core->Spsr_copy = core->Spsr[USERBANK]; - core->RegBank[USERBANK][13] = core->Reg[13]; - core->RegBank[USERBANK][14] = core->Reg[14]; - break; - case IRQ32MODE: - core->Spsr_copy = core->Spsr[IRQBANK]; - core->RegBank[IRQBANK][13] = core->Reg[13]; - core->RegBank[IRQBANK][14] = core->Reg[14]; - break; - case SVC32MODE: - core->Spsr_copy = core->Spsr[SVCBANK]; - core->RegBank[SVCBANK][13] = core->Reg[13]; - core->RegBank[SVCBANK][14] = core->Reg[14]; - break; - case ABORT32MODE: - core->Spsr_copy = core->Spsr[ABORTBANK]; - core->RegBank[ABORTBANK][13] = core->Reg[13]; - core->RegBank[ABORTBANK][14] = core->Reg[14]; - break; - case UNDEF32MODE: - core->Spsr_copy = core->Spsr[UNDEFBANK]; - core->RegBank[UNDEFBANK][13] = core->Reg[13]; - core->RegBank[UNDEFBANK][14] = core->Reg[14]; - break; - case FIQ32MODE: - core->Spsr_copy = core->Spsr[FIQBANK]; - core->RegBank[FIQBANK][13] = core->Reg[13]; - core->RegBank[FIQBANK][14] = core->Reg[14]; - break; - } - - #if 0 // performance ? - core->Spsr_copy = core->Spsr[core->Bank]; - core->RegBank[core->Bank][13] = core->Reg[13]; - core->RegBank[core->Bank][14] = core->Reg[14]; - #endif - - core->Reg_usr[0] = core->RegBank[USERBANK][13]; - core->Reg_usr[1] = core->RegBank[USERBANK][14]; - core->Reg_irq[0] = core->RegBank[IRQBANK][13]; - core->Reg_irq[1] = core->RegBank[IRQBANK][14]; - core->Reg_svc[0] = core->RegBank[SVCBANK][13]; - core->Reg_svc[1] = core->RegBank[SVCBANK][14]; - core->Reg_abort[0] = core->RegBank[ABORTBANK][13]; - core->Reg_abort[1] = core->RegBank[ABORTBANK][14]; - core->Reg_undef[0] = core->RegBank[UNDEFBANK][13]; - core->Reg_undef[1] = core->RegBank[UNDEFBANK][14]; - core->Reg_firq[0] = core->RegBank[FIQBANK][13]; - core->Reg_firq[1] = core->RegBank[FIQBANK][14]; - } - - if (core->NextInstr == PRIMEPIPE) - { - - } else if (core->NextInstr == SEQ){ - core->Reg[15] -= 4; - } else if (core->NextInstr == NONSEQ){ - core->Reg[15] -= 4; - } - //UPDATE_TIMING(cpu, TIMER_SWITCH, false); - int rc = JIT_RETURN_NOERR; - if (is_user_mode(cpu)) - rc = um_cpu_run(cpu); - else - rc = cpu_run(cpu); - - //UPDATE_TIMING(cpu, TIMER_SWITCH, true); - core->NFlag = ((core->Cpsr & 0x80000000) != 0); - core->ZFlag = ((core->Cpsr & 0x40000000) != 0); - core->CFlag = ((core->Cpsr & 0x20000000) != 0); - core->VFlag = ((core->Cpsr & 0x10000000) != 0); - core->IFFlags = (((core->Cpsr & INTBITS) >> 6) & 3); - //printf("Out Cpsr %x N %x Z %x C %x V %x\n", core->Cpsr, core->NFlag, core->ZFlag, core->CFlag, core->VFlag); - - if (!is_user_mode(cpu)) { - core->mmu.translation_table_ctrl = CP15REG(CP15_TRANSLATION_BASE_CONTROL); - core->mmu.translation_table_base0 = CP15REG(CP15_TRANSLATION_BASE_TABLE_0); - core->mmu.translation_table_base1 = CP15REG(CP15_TRANSLATION_BASE_TABLE_1); - core->mmu.domain_access_control = CP15REG(CP15_DOMAIN_ACCESS_CONTROL); - core->mmu.control = CP15REG(CP15_CONTROL); - core->mmu.fault_statusi = CP15REG(CP15_INSTR_FAULT_STATUS); - core->mmu.fault_status = CP15REG(CP15_FAULT_STATUS); - core->mmu.fault_address = CP15REG(CP15_FAULT_ADDRESS); - - switch (core->Mode) - { - case USER32MODE: - core->Bank = USERBANK; - core->Spsr[USERBANK] = core->Spsr_copy; - core->Reg_usr[0] = core->Reg[13]; - core->Reg_usr[1] = core->Reg[14]; - break; - case IRQ32MODE: - core->Bank = IRQBANK; - core->Spsr[IRQBANK] = core->Spsr_copy; - core->Reg_irq[0] = core->Reg[13]; - core->Reg_irq[1] = core->Reg[14]; - break; - case SVC32MODE: - core->Bank = SVCBANK; - core->Spsr[SVCBANK] = core->Spsr_copy; - core->Reg_svc[0] = core->Reg[13]; - core->Reg_svc[1] = core->Reg[14]; - break; - case ABORT32MODE: - core->Bank = ABORTBANK; - core->Spsr[ABORTBANK] = core->Spsr_copy; - core->Reg_abort[0] = core->Reg[13]; - core->Reg_abort[1] = core->Reg[14]; - break; - case UNDEF32MODE: - core->Bank = UNDEFBANK; - core->Spsr[UNDEFBANK] = core->Spsr_copy; - core->Reg_undef[0] = core->Reg[13]; - core->Reg_undef[1] = core->Reg[14]; - break; - case FIQ32MODE: - core->Bank = FIQBANK; - core->Spsr[FIQBANK] = core->Spsr_copy; - core->Reg_firq[0] = core->Reg[13]; - core->Reg_firq[1] = core->Reg[14]; - break; - } - - core->RegBank[USERBANK][13] = core->Reg_usr[0]; - core->RegBank[USERBANK][14] = core->Reg_usr[1]; - core->RegBank[IRQBANK][13] = core->Reg_irq[0]; - core->RegBank[IRQBANK][14] = core->Reg_irq[1]; - core->RegBank[SVCBANK][13] = core->Reg_svc[0]; - core->RegBank[SVCBANK][14] = core->Reg_svc[1]; - core->RegBank[ABORTBANK][13] = core->Reg_abort[0]; - core->RegBank[ABORTBANK][14] = core->Reg_abort[1]; - core->RegBank[UNDEFBANK][13] = core->Reg_undef[0]; - core->RegBank[UNDEFBANK][14] = core->Reg_undef[1]; - core->RegBank[FIQBANK][13] = core->Reg_firq[0]; - core->RegBank[FIQBANK][14] = core->Reg_firq[1]; - } - - //UPDATE_TIMING(cpu, TIMER_SWITCH, false); - - if (is_user_mode(cpu)) { - core->phys_pc = core->Reg[15]; - } else { - uint32_t ret; - ret = cpu->mem_ops.effective_to_physical(cpu, core->Reg[15], &core->phys_pc); - } - - //if (get_skyeye_pref()->start_logging) - // printf("### Out of jit return %d - %p %p\n", rc, core->Reg[15], core->phys_pc); - - /* In all cases, the next instruction should be considered first in pipeline */ - core->NextInstr = PRIMEPIPE; - - /* General rule: return 1 if next block should be handled by Dyncom */ - switch (rc) { - case JIT_RETURN_NOERR: /* JIT code wants us to end execution */ - case JIT_RETURN_TIMEOUT: - PFUNC(core->phys_pc); - if (pfunc) { - //printf("Timeout - Next handling by DYNCOM %x\n", core->Reg[15]); - return 1; - } else { - //printf("Timeout - Next handling by INTERP %x\n", core->Reg[15]); - return 0; - } - case JIT_RETURN_SINGLESTEP: - /* TODO */ - case JIT_RETURN_FUNCNOTFOUND: - //printf("pc %x is not found, phys_pc is %p\n", core->Reg[15], core->phys_pc); - if (!is_user_mode(cpu)) - { - switch_mode(core, core->Cpsr & 0x1f); - if (flush_current_page(cpu)) { - return 0; - } - } - //clear_tag_page(cpu, core->phys_pc); /* do it or not ? */ - push_compiled_work(cpu, core->phys_pc); - return 0; - case JIT_RETURN_TRAP: - { - /* user mode handling */ - if (is_user_mode(cpu)) - { - #ifdef OPT_LOCAL_REGISTERS - uint32_t instr; - bus_read(32, core->Reg[15], &instr); - ARMul_OSHandleSWI(core, BITS(0,19)); - #endif - core->Reg[15] += 4; - core->phys_pc = core->Reg[15]; - //if (get_skyeye_pref()->start_logging) - // printf("Trap - Handled %x\n", core->phys_pc); - return 0; - } - - /* kernel mode handling */ - PFUNC(core->phys_pc); - if (pfunc) { - //if (get_skyeye_pref()->start_logging) - // printf("Trap - Next handling by DYNCOM %x %x\n", core->Reg[15], core->phys_pc); - } else { - core->Reg[15] += 4; - //if (get_skyeye_pref()->start_logging) - // printf("Trap - Next handling by INTERP %x %x\n", core->Reg[15], core->phys_pc); - return 0; - } - - //printf("###### Trap %x\n", core->Reg[15]); - if (core->syscallSig) { - return 1; - } - if (core->abortSig) { - return 1; - } - - /* if regular trap */ - uint32_t mode = core->Cpsr & 0x1f; - if ( (mode != core->Mode) && (!is_user_mode(cpu)) ) { - switch_mode(core, mode); - } - - core->Reg[15] += 4; - } - return 1; - default: - fprintf(stderr, "unknown return code: %d\n", rc); - skyeye_exit(-1); - } + /* pure dyncom */ + launch_compiled_queue_dyncom(cpu, pc); + return 0; } - return 0; } +static int handle_fp_insn(arm_core_t* core); /* For PURE_DYNCON mode. This one is a direct copy of the old one, and is far less complicated */ @@ -672,17 +277,16 @@ int launch_compiled_queue_dyncom(cpu_t* cpu, uint32_t pc) { void * pfunc = NULL; /* set correct pc */ - if (is_user_mode(cpu)) - { + if (is_user_mode(cpu)){ core->phys_pc = pc; } /* if cpu_run doesn't find the address of the block, it will return asap */ int rc = JIT_RETURN_NOERR; if (is_user_mode(cpu)) - rc = um_cpu_run(cpu); - else - rc = cpu_run(cpu); + rc = um_cpu_run(cpu); + else + rc = cpu_run(cpu); /* General rule: return 1 if next block should be handled by Dyncom */ switch (rc) { @@ -704,20 +308,23 @@ int launch_compiled_queue_dyncom(cpu_t* cpu, uint32_t pc) { /* keep the tflag same with the bit in CPSR */ core->TFlag = core->Cpsr & (1 << THUMB_BIT); //clear_tag_page(cpu, core->phys_pc); /* do it or not ? */ - push_compiled_work(cpu, core->phys_pc); // in usermode, it might be more accurate to translate reg[15] instead + if(running_mode != HYBRID) + push_compiled_work(cpu, core->phys_pc); // in usermode, it might be more accurate to translate reg[15] instead return 0; case JIT_RETURN_TRAP: { /* user mode handling */ if (is_user_mode(cpu)) { + core->phys_pc = core->Reg[15]; + if(handle_fp_insn(core) == 0){ #ifdef OPT_LOCAL_REGISTERS uint32_t instr; bus_read(32, core->Reg[15], &instr); ARMul_OSHandleSWI(core, BITS(0,19)); #endif + } core->Reg[15] += 4; - core->phys_pc = core->Reg[15]; //if (get_skyeye_pref()->start_logging) // printf("Trap - Handled %x\n", core->phys_pc); return 0; @@ -729,103 +336,16 @@ int launch_compiled_queue_dyncom(cpu_t* cpu, uint32_t pc) { if (core->abortSig) { return 1; } - if(core->Reg[15] == 0xc002df8c ) - printf("@@@@@@@@@@@@@@@@@@@@@ cpsr=0x%x, mode=0x%x\n", core->Cpsr, core->Mode); /* if regular trap */ + core->Reg[15] += 4; uint32_t mode = core->Cpsr & 0x1f; - if ( (mode != core->Mode) && (!is_user_mode(cpu)) ) { + if ((mode != core->Mode) && (!is_user_mode(cpu))) { switch_mode(core, mode); - core->Reg[15] += 4; return 1; } - uint32 instr = 0xdeadc0de; - bus_read(32, core->phys_pc, &instr); - if((instr & 0x0FB80e50)== 0x0eb80a40){ /* some instruction need to implemented here */ - /* VCVTBFI */ - printf("\n\nVCVTBFI executed:\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - if((instr & 0x0FBF0ed0)== 0x0eb70ac0){ /* some instruction need to implemented here */ - /* VCVTBDS */ - printf("\n\nVCVTBDS executed:\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - - else if((instr & 0x0fb00e50) == 0x0e300a00){ /* some instruction need to implemented here */ - /* VADD */ - printf("VADD executed:\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - else if((instr & 0x0FBF0E50)== 0x0eb40a40){ /* some instruction need to implemented here */ - /* VCMP */ - printf("VCMP executed:\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - else if((instr & 0x0FBF0E50)== 0x0eb50a40){ /* some instruction need to implemented here */ - /* VCMP2 */ - printf("VCMP2 executed:\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - else if((instr & 0xFF800F10)== 0xF3000800){ /* some instruction need to implemented here */ - /* VSUB */ - printf("\n\nVSUB executed:\n\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - else if((instr & 0x0FB00E50)== 0x0E300a40){ /* some instruction need to implemented here */ - /* VSUB */ - printf("\n\nVSUB(floating-point) executed at 0x%x:\n\n", core->Reg[15]); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - - else if((instr & 0x0Fb00e50)== 0x0E200a00){ /* some instruction need to implemented here */ - /* VFMUL */ - printf("\n\nVMUL executed:\n\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - else if((instr & 0x0Fb00e50)== 0x0E800a00){ /* some instruction need to implemented here */ - /* VFMUL */ - printf("\n\nVDIV executed:\n\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - else if((instr & 0x0Fb00e10)== 0x0E000a00){ /* some instruction need to implemented here */ - /* VMLA */ - printf("\n\nVMLA executed:\n\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - else if((instr & 0x0FbF0ed0)== 0x0Eb00ac0){ /* some instruction need to implemented here */ - /* VABS */ - printf("\n\nVABS executed:\n\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - else if((instr & 0x0Fb00e10)== 0x0E100a00){ /* some instruction need to implemented here */ - /* VNMLA */ - printf("\n\nVNMLA executed:\n\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - else if((instr & 0x0Fb00e50)== 0x0E200a40){ /* some instruction need to implemented here */ - /* VMLS */ - printf("\n\nVNMLA executed:\n\n"); - extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); - vcvtbfi_instr_impl(core, instr); - } - else{ - //printf("Unknown instruction 0x%x\n", instr); - } - - core->Reg[15] += 4; + /* handle float point instruction */ + handle_fp_insn(core); return 1; } default: @@ -833,138 +353,131 @@ int launch_compiled_queue_dyncom(cpu_t* cpu, uint32_t pc) { fprintf(stderr, "unknown return code: %d\n", rc); skyeye_exit(-1); } - } + }//switch return 1; } -/* This function handles tagging */ -static void push_compiled_work(cpu_t* cpu, uint32_t pc){ - int i = 0; - int cur_pos = 0; - - #if 1 - if (running_mode == HYBRID) { - cur_pos = cpu->dyncom_engine->cur_tagging_pos; - /* check if the pc already exist in the queue */ - for(i = 0; i < cur_pos; i++) { - if(compiled_queue[i] == pc) { - //printf("pc 0x%x is also exist at %d\n", pc, cur_pos); - return; - } - } - - if(cur_pos >= 0 && cur_pos < QUEUE_LENGTH) - { - //printf("\t##### Tagging %p\n", pc); - cpu_tag(cpu, pc); - /* Locked data includes compiled_queue, stack, and function pointer */ - //pthread_rwlock_wrlock(&compiled_queue_rwlock); - //printf("In %s, place the pc=0x%x to the pos %d\n",__FUNCTION__, pc, cur_pos); - compiled_queue[cur_pos] = pc; - //pthread_rwlock_unlock(&compiled_queue_rwlock); - //printf("##### Waiting to compile %p, %d\n", pc, cur_pos); - cpu->dyncom_engine->cur_tagging_pos ++; - } - else - printf("In %s, compiled queue overflowed\n", __FUNCTION__); +static int handle_fp_insn(arm_core_t* core){ + uint32 instr = 0xdeadc0de; + bus_read(32, core->phys_pc, &instr); + if((instr & 0x0FB80e50)== 0x0eb80a40){ /* some instruction need to implemented here */ + /* VCVTBFI */ + printf("\n\nVCVTBFI executed:\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); } - else if (running_mode == PURE_DYNCOM) { - if (translated_block > 0x1800) - { - //printf("\t(Dyncom) Cleaning %x translated blocks ----- \n", cpu->dyncom_engine->cur_tagging_pos); - //clear_cache(cpu, cpu->dyncom_engine->fmap); - } - cpu_tag(cpu, pc); - cpu->dyncom_engine->cur_tagging_pos ++; - cpu_translate(cpu, pc); - translated_block += 1; - #if 0 - void* pfunc = NULL; - fast_map hash_map = cpu->dyncom_engine->fmap; - PFUNC(pc); - //printf("######### (Dyncom) Translated %x %p rank\n", pc, pfunc, cpu->dyncom_engine->cur_tagging_pos); - #endif + if((instr & 0x0FBF0ed0)== 0x0eb70ac0){ /* some instruction need to implemented here */ + /* VCVTBDS */ + printf("\n\nVCVTBDS executed:\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); } - else - printf("In %s, this function should not be called in interpreter mode\n", __FUNCTION__); - - - #else - if (running_mode == HYBRID) - cur_pos = cpu->dyncom_engine->cur_tagging_pos; - - /* check if the pc already exist in the queue */ - for(i = 0; i < cur_pos; i++) - if(compiled_queue[i] == pc) { - printf("pc 0x%x is also exist at %d\n", pc, cur_pos); - return; - } - - if(cur_pos >= 0 && cur_pos < QUEUE_LENGTH){ - //printf("\t##### Tagging %p\n", pc); - - if( running_mode == PURE_DYNCOM ){ - cpu_tag(cpu, pc); - cpu_translate(cpu, pc); - translated_block += 1; - #if 0 - void* pfunc = NULL; - fast_map hash_map = cpu->dyncom_engine->fmap; - PFUNC(pc); - //printf("######### (Dyncom) Translated %x %p rank\n", pc, pfunc, cpu->dyncom_engine->cur_tagging_pos); - #endif - } - else{ - cpu_tag(cpu, pc); - /* Locked data includes compiled_queue, stack, and function pointer */ - //pthread_rwlock_wrlock(&compiled_queue_rwlock); - //printf("In %s, place the pc=0x%x to the pos %d\n",__FUNCTION__, pc, cur_pos); - compiled_queue[cur_pos] = pc; - //pthread_rwlock_unlock(&compiled_queue_rwlock); - //printf("##### Waiting to compile %p, %d\n", pc, cur_pos); - } - cpu->dyncom_engine->cur_tagging_pos ++; + else if((instr & 0x0fb00e50) == 0x0e300a00){ /* some instruction need to implemented here */ + /* VADD */ + printf("VADD executed:\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); + } + else if((instr & 0x0FBF0E50)== 0x0eb40a40){ /* some instruction need to implemented here */ + /* VCMP */ + printf("VCMP executed:\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); + } + else if((instr & 0x0FBF0E50)== 0x0eb50a40){ /* some instruction need to implemented here */ + /* VCMP2 */ + printf("VCMP2 executed:\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); + } + else if((instr & 0xFF800F10)== 0xF3000800){ /* some instruction need to implemented here */ + /* VSUB */ + printf("\n\nVSUB executed:\n\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); + } + else if((instr & 0x0FB00E50)== 0x0E300a40){ /* some instruction need to implemented here */ + /* VSUB */ + printf("\n\nVSUB(floating-point) executed at 0x%x:\n\n", core->Reg[15]); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); + } + else if((instr & 0x0Fb00e50)== 0x0E200a00){ /* some instruction need to implemented here */ + /* VFMUL */ + printf("\n\nVMUL executed:\n\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); + } + else if((instr & 0x0Fb00e50)== 0x0E800a00){ /* some instruction need to implemented here */ + /* VFMUL */ + printf("\n\nVDIV executed:\n\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); + } + else if((instr & 0x0Fb00e10)== 0x0E000a00){ /* some instruction need to implemented here */ + /* VMLA */ + printf("\n\nVMLA executed:\n\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); } + else if((instr & 0x0FbF0ed0)== 0x0Eb00ac0){ /* some instruction need to implemented here */ + /* VABS */ + printf("\n\nVABS executed:\n\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); + } + else if((instr & 0x0Fb00e10)== 0x0E100a00){ /* some instruction need to implemented here */ + /* VNMLA */ + printf("\n\nVNMLA executed:\n\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); + } + else if((instr & 0x0Fb00e50)== 0x0E200a40){ /* some instruction need to implemented here */ + /* VMLS */ + printf("\n\nVNMLA executed:\n\n"); + extern int vcvtbfi_instr_impl(arm_core_t* cpu, uint32 instr); + vcvtbfi_instr_impl(core, instr); + } else{ - printf("In %s, compiled queue overflowed\n", __FUNCTION__); + //printf("Unknown instruction 0x%x\n", instr); + return 0; } - #endif + return 1; } -/* Compiled the target to the host address */ + +/* This function handles tagging */ +static inline void push_compiled_work(cpu_t* cpu, uint32_t pc){ + cpu_tag(cpu, pc); + cpu->dyncom_engine->cur_tagging_pos ++; + cpu_translate(cpu, pc); + return; +} +/* Compiled the target to the host address , and try to free some unused translation block */ static void* compiled_worker(void* argp){ cpu_t* cpu = (cpu_t*) argp; - uint32_t pos_to_translate; + //uint32_t pos_to_translate; for(;;){ -try_compile: while(1){ - pthread_rwlock_wrlock(&translation_rwlock); uint32_t compiled_addr = 0xFFFFFFFF; pthread_rwlock_rdlock(&compile_stack_rwlock); if (!compile_stack.empty()) { - pos_to_translate = compile_stack.top(); - compile_stack.pop(); compiled_addr = compile_stack.top(); compile_stack.pop(); } - pthread_rwlock_unlock(&compile_stack_rwlock); - if(compiled_addr == 0xFFFFFFFF) { - pthread_rwlock_unlock(&translation_rwlock); + else{ + /* All the code is translated, we need to out for a rest */ + pthread_rwlock_unlock(&compile_stack_rwlock); break; } - //printf("In %s, pc=0x%x\n", __FUNCTION__, compiled_queue[compiling_pos]); - /* Just for get basicblock */ - //cpu_tag(cpu, compiled_queue[cur_pos]); - /* functions will increasement in translate procedure */ - //printf("#### %x GET \n", compiled_addr); + pthread_rwlock_unlock(&compile_stack_rwlock); + /* begin translation */ + pthread_rwlock_wrlock(&translation_rwlock); fast_map hash_map = cpu->dyncom_engine->fmap; void* pfunc; PFUNC(compiled_addr); if(pfunc == NULL){ - cpu->dyncom_engine->functions = pos_to_translate; - cpu_translate(cpu, compiled_addr); - translated_block += 1; - //printf("##### (Hybrid) Translated %p %x\n", compiled_addr, pos_to_translate); + push_compiled_work(cpu, compiled_addr); } pthread_rwlock_unlock(&translation_rwlock); } -- 1.7.7 |
From: <bla...@gm...> - 2012-03-20 10:49:05
|
From: "Michael.Kang" <bla...@gm...> Remove the exception check for user mode Signed-off-by: Michael.Kang <bla...@gm...> --- arch/arm/dyncom/arm_dyncom_interpreter.cpp | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/arch/arm/dyncom/arm_dyncom_interpreter.cpp b/arch/arm/dyncom/arm_dyncom_interpreter.cpp index a5896da..3c0372f 100644 --- a/arch/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/arch/arm/dyncom/arm_dyncom_interpreter.cpp @@ -3625,14 +3625,19 @@ void InterpreterMainLoop(cpu_t *core) goto END; } /* check next instruction address is valid. */ - fault = check_address_validity(cpu, cpu->Reg[15], &phys_addr, 1); - if (fault) { - cpu->abortSig = true; - cpu->Aborted = ARMul_PrefetchAbortV; - cpu->AbortAddr = cpu->Reg[15]; - cpu->CP15[CP15(CP15_INSTR_FAULT_STATUS)] = fault & 0xff; - cpu->CP15[CP15(CP15_FAULT_ADDRESS)] = cpu->Reg[15]; - goto END; + if(core->is_user_mode){ + phys_addr = cpu->Reg[15]; + } + else{ + fault = check_address_validity(cpu, cpu->Reg[15], &phys_addr, 1); + if (fault) { + cpu->abortSig = true; + cpu->Aborted = ARMul_PrefetchAbortV; + cpu->AbortAddr = cpu->Reg[15]; + cpu->CP15[CP15(CP15_INSTR_FAULT_STATUS)] = fault & 0xff; + cpu->CP15[CP15(CP15_FAULT_ADDRESS)] = cpu->Reg[15]; + goto END; + } } if (find_bb(phys_addr, ptr) == -1) { if (InterpreterTranslate(core, ptr, phys_addr) == FETCH_EXCEPTION) -- 1.7.7 |