|
Message
From: György 'nog' Jeney<nog@s...>
Date: Thu Mar 31 17:09:53 CEST 2005
Subject: [openrisc] or1ksim
Hi all,The hughe number of patches that I've been dumping to the mailing list have been commited to the cvs HEAD unstable/development branch. The number of patches that I'll be sending should be back to normal levels again.
Incase you weren't paying attention, cvs HEAD now includes a major optimisation in the executeion speed of the sim. Even if you belive that it is too imature to use in your semi-mission critical development, please spend a couple of minutes to try it out. Wether you find it to work great or not, drop me a mail (or the mailing list). Your feedback is greatly appriciated.
To test it out you must build the sim with: ./configure --target=or32 --enable-execution=dynamic && make
Note that the recompiler only works on 32-bit i386 cpus. Porting it to another architecture should be as easy as porting the small/simple inline functions in dyngen_i386.c, i386_regs.h, op_i386.h, rec_i386.h and common_i386.h.
I'll recap from my earlier mails some of the more usefull information:
If you decide to give the recompiler a go note that you absolutly must disable the security-enhancing kernel features like exec-shield and PAX. I don't know about the others. The problem is that they execute protect everything except the .text section of the ELF file which works fine for most programs but since this is a dynamic code generator the code that ulimatly simulates the cpu ends up being dynamically allocated (ie. Doesn't reside in the .text section).
There are still some limitations that need to be ironed out, but it is good enough to boot linux and run some of the basic utilities found in the initrd. The known limitations: 1) There are numerous missed optimistaions. Check the FIXMEs in the code. 2) Instruction cache emuation does not work as there is no instruction fetch on *any* executed instruction. The both mmus and the data cache work though. 3) The overflow flag is not implemented. 4) The carry flag is not implemented. 5) The mac instructions don't work (Don't know why). 6) The debug unit does not work. 7) The instructions are only counted if running with do_stats (execution log etc.) 8) Some stuff I surely missed.
What doesn't work in the command line interface (interactive mode): 1) The pr command won't work if the register that is being patched is in a temporary. 2) The pc command only updates the pc visually but doesn't actually alter the execution sequence. 3) The break command doesn't have any effect. 4) The stall command doesn't work. Actually, simulateing a stalled cpu is not implemented. 5) The trace (and run) command(s) only print the `just executed instruction' if running with analysis.
nog.
|
 |