Commit Graph

986 Commits

Author SHA1 Message Date
5079cd7e31 doc: documentation of failpanda
Change-Id: I05a57942daaa66d146db754fc3ddc72707e55dd9
2014-01-23 18:53:21 +01:00
e1aae23c64 openocd: straighten up wrapper code
Change-Id: I3cec9af50ea9e3f10385839890b84d4e71d1fddb
2014-01-23 18:53:21 +01:00
0e7ee03937 compute-hops: bugfix rollback-threshold
Rollback threshold was not set by command line argument.

Change-Id: I68ba63cc5cd31e3af8408f83caec8b3d7bb10c78
2014-01-23 18:53:21 +01:00
99bcd93ffb openocd: reordering main loop
Main loop reordered, as before some buggy states could be reached.

Change-Id: If798724da5e7bc98b036058f2247e0ad17135723
2014-01-23 18:53:20 +01:00
bcb1e6b7a4 openocd: trace format fix
The output format of the tracing plugin needs to be as follows:
For a position in execution, first the PC-Event needs to be sent up
to the simulator controller, afterwards potential MEM-Events can be
signaled.

This order requirement is fixed with this commit.

Change-Id: I8412dd7a5a85a58c50a0d0d9b9d0369c838bc0a3
2014-01-23 18:53:20 +01:00
b97998829a openocd: some minor fixes in wrapper
Change-Id: I94ecde881d5eaeea280e5c6de3c3abc16c2903f4
2014-01-23 18:53:20 +01:00
55d17ba439 openocd: always try to aggregate mmu config writes
As memory writes have high fix costs, we want to minimize the number
of writes in consequence of the mmu configuration.

This commit aggregates writes as far as possible.

Change-Id: I4ba6618fc9023ae4a353585710e2933d3d7a6051
2014-01-23 18:53:20 +01:00
98777e1ec3 openocd: get activated watchpoint from openocd
Decoding the current instruction sometimes failes, so we need
to extract the currently activated watchpoint from the openocd
internal list of watchpoints. If we have more than one watchpoint,
we are in trouble.

Change-Id: I14b172e4f933ca894cf66685c6d2ca8e573a3151
2014-01-23 18:53:20 +01:00
eac600e1b6 openocd: silence debug-messages
Change-Id: I10d1ad484871cda5dba47f75b0d310ed441f701a
2014-01-23 18:53:20 +01:00
9f334a02bd openocd: arm read pc -> offset of 8
On ARM we need to add a offset to the pc, if we read it
(ARM ARM (DDI 0100I) page A2-9). This fixes bugs in memory
trace generation and watchpoint recognition.

Change-Id: I1cfcb84af2abae7971869d2ce29d602648e2f020
2014-01-23 18:53:20 +01:00
83ac40dfb5 comm: use unsigned trace positions in protobuf
Change-Id: I91927ce2c54989c724ea537a6bd344de8c467a16
2014-01-23 18:53:19 +01:00
eab469192c cpn: regard equivalence classes of length 1
Previously the code did not handle equivalence classes, which consist
only of one instruction (length 1). As these classes for example
come up at two consecutive read instructions, we have to handle them.

Change-Id: Ib9e475a782828a380dfc79f5b390ca9192f4b8e3
2014-01-23 18:53:19 +01:00
99bc6e7c03 lra-simple-panda: Experiment updated for evaluation
Change-Id: I7905bda6aab7825c28b750683f2712161add325b
2014-01-23 18:53:19 +01:00
286a28e7ae smarthops: calculate target instruction & allow zero input
As we might need information of target instruction (in case of
checkpoint, etc.) this information is now added to the output
protobuf message.

Trace-Events are generated also for position zero, so this case is
also regarded.

Change-Id: I69ff4818e7f8d6771923802f65bf0aa1b81883c5
2014-01-23 18:53:19 +01:00
ba765c16c2 cpn: pruning-aware injection points
As we gain some degrees of freedom in choice of the specific
injection instruction offset, this can be used to minimize
navigational costs. This is a first approach towards pruning-aware
injection points.

To do so, we need to modify the sql query, which gets the pilots,
so we additionally join with the trace table to get begin and
end information for equivalence classes, which are feeded into
the creation of InjectionPoints.

Change-Id: I343b712dfcbed1299121f02eee9ce1b136a7ff15
2014-01-23 18:53:19 +01:00
d7a9a2811d cpn: Not every InjectionPointHops calcs smart-hops
As the InjectionPoint is considered to be a container for abstract
"points in time" which can be navigated to, not every object of
a InjectionPointHops needs a smart-hopping calculator.

Change-Id: I150a46cf79a2b9d8ddb2d24a6d89dc3d4246cdb3
2014-01-23 18:53:19 +01:00
e824e7a0fa cpn: Parsing of unsigned int fixed
As atoi caps the value of a unsigned int bigger than (2^31 - 1) other
than just letting it overflow to the corresponding negative value on
32Bit-integer machines, it must not be used for parsing to unsigned int.

TODO: Also apply this fix to all other unsigned values (in database)
which get parsed by atoi.

Change-Id: I96e29b14d36479ab6e567c527a40feb0b5fb14e5
2014-01-23 18:53:18 +01:00
8b5098abdd tools: added compute-hops and dump-hops tools
As these tools work closely together with fail components, its
easiest, to build them in this context. As these tools don't
really matter for fail use, they might never be pushed to the
master branch.

Change-Id: I8c8bd80376d0475f08a531a995d829e85032371b
2014-01-23 18:53:11 +01:00
16ce7a4fee panda: read memory in chunks of 4 byte
As openocd is able to read maximally 4-Byte sized chunks,
this will be done for performance improvement.

Change-Id: I79f85e580240f913b5a3d7b49bc0698390644ca8
2014-01-22 18:04:36 +01:00
5142ff650e openocd: watchpoint check fix
If we halt in a watchpoint, we need to figure out, which one it was.
This will from now on be done by decoding the current instruction.

Change-Id: Ib62df0016c60044f2618af00e853b4373eb00bd7
2014-01-22 18:04:36 +01:00
e4ba517251 openocd: halt cortex-m3 after reboot
As we want to use the cortex-m3 only for memory access, it should
always be halted. To achieve this, we need to halt it after every
reboot.

Change-Id: I5f0edf4986b65aea5a2aa59020247b9676de4dcb
2014-01-22 18:04:36 +01:00
14cd9346ec openocd: generic halt function
Halting can now be done for cortex-a9 and cortex-m3 target with the halting
function which originally was only able to halt the cortex-a9 target.

Change-Id: I9ced64253405654c4155c8f776534bc7231387b2
2014-01-22 18:04:36 +01:00
f9cc503b7e openocd: freeze cyclecounter on halts
As the cycle counter seems to be running forth, we need to halt it, to
get exact cycle count values.

Change-Id: Id85c052b88cec48b25ee0975ad47369587e08096
2014-01-22 18:04:36 +01:00
2285427a4c panda: invalidate cache by default
When writing to memory, related cache-lines should by default be invalidated.

Change-Id: I5477fa86c75d512f483a5b61f147666d3d845ea2
2014-01-22 18:04:36 +01:00
52e5ee8f60 lra-simple-panda: converted experiment to campaign
As we need hop chains to efficiently navigate to the injection
point on pandaboard, this campaign uses these. As we do not yet
have a component, which automatically navigates to a generic
InjectionPoint (API needs to be properly designed), we do this
explicitly.

Change-Id: I26ca6ebb3f05cde735f9641551a8ce5478e463f6
2014-01-22 18:04:36 +01:00
c142818325 cpn: Generic wrapper for injection point
As for the pandaboard to navigate fast to the injection
instruction we need to deliver a hop chain to the fail-client,
this commit adds a generic wrapper for a injection point.
For now we have only the two options hop chain and instruction
offset, so it is activated via a cmake ON/OFF switch.

Change-Id: Ic01a07a30ac386d4316e6d6d271baf1549db966a
2014-01-22 18:04:29 +01:00
227f0fd7b4 openocd: repetition in irregular step fail
Single-stepping as in tracing sometimes fails in a long step-chain.
So we repeat the step until it really stepped. It can be observed, that
if openocd returns a step error, it never accidently steps nonetheless.
To ensure this behaviour, we could check for correct pc.

Change-Id: I05f82e2af0ca822cd6cd5571ffc3845f4e6a1d91
2014-01-22 17:54:10 +01:00
a307dc6df7 import-trace: fix for using non-gzipped traces
As non-gzipped trace-files cause the tool to always import zero events, the
input file is now openend as in the dump-trace tool, where opening non-gzipped
files obviously works fine.

Change-Id: If2575dbeb93ed657c7b8ddd9f14f41b5cc7bf7c6
2014-01-22 17:54:09 +01:00
c086800e58 openocd: added opcode parser
Added opcode parser of the F.E.H.L.E.R-project for analysis of
memory access in mmu-abort handling, tracing, etc.

Change-Id: I5912fa4a4d51ee0501817c43bae05e87ac0e9b90
2014-01-22 17:54:09 +01:00
146984f2fc openocd: Added support for MMU memory watch
AccessListener with long width are implemented as MMU page-faults

Change-Id: I85208463b1f7eb3dbab187287caa387394a4af90
2014-01-22 17:54:09 +01:00
809af0ae55 openocd: add cycle counter for trace timestamp
Added performance monitor hw-function cycle count.
Also fix for single-stepping exit, some additional register
exits and prevention of reboot failures.

Change-Id: I74196905dc39ecc14ae78366e7e1cb70ec7092f1
2014-01-22 17:54:03 +01:00
1feab4fd54 sal: wrong include fixed
Include of ArmArchitecture was misspelled

Change-Id: Iba3e0a9f1b687cfcd640c74ad9d185f0ffabe510
2014-01-22 17:47:17 +01:00
d4776cf628 panda: fix in breakpoints aspect
Halt condition type not properly set

Change-Id: I17c780216606b89a7c8a0ace03ac3788582d95ac
2014-01-22 17:47:17 +01:00
98a478badd openocd: arm register mapping
Mapping register id (ArmArchitecture) to openocd register id.

Change-Id: Id951ce1606e1720e7bc2fd7d6686cff8c1d5c9b4
2014-01-22 17:47:10 +01:00
1e511a4b64 openocd: main loop fix
Polling of current target system state was done non-blocking until now.
Because of this, when the target was executing a longer time, the main-loop
was walked through several times and so unwanted state changes were
triggered. After this fix, the polling of execution state is blocking
in a while-loop until the target system hits any halting condition.

Also added some minor fixes

Change-Id: I4cbbef6eb6ff6ff8a3451affb8409a0df6a95fc5
2014-01-22 17:43:31 +01:00
582459c5bb panda: non-returning openocd-loop at terminate
Previously for correct termination, the PandaController called
the finish-function of the openocd wrapper, invoked a coroutine
switch and waited for the openocd wrapper to finish up and switch
coroutine again, so the PandaController could exit with correct
exitStatus. Now the openocd-wrapper directly exits with chosen
exit status.

Change-Id: I8d318a4143c53340896ccee4d059a0d79fdcfe89
2014-01-22 17:43:31 +01:00
5638a7473e openocd: refactored register access
Change-Id: I396bd8a89e85d806183106c41070c58e2a37a377
2014-01-22 17:43:31 +01:00
0d2a5175cf panda: comment fix & remove unimplemented functions
Change-Id: Ibe533a41871bbf186272d6df43966dabb692dede
2014-01-22 17:43:31 +01:00
e8eebb69ba experiments: new experiment for testing pandaboard
Change-Id: Ic27eb3ddc34fdac944b26e70ac4347330cbab044
2014-01-22 17:43:31 +01:00
db0b82daca fail: modifications for pandaboard support
Change-Id: I52d3c9b9862b206a000394c45126f0afdfee081f
2014-01-22 17:43:31 +01:00
749631e21c fail: add support for pandaboard
Change-Id: I1525c9b36d58bf53ad238a553d914f183f983bba
2014-01-22 17:43:23 +01:00
2f6111b2f4 openocd: type-cast fix
Fixed type-cast.
As we are using -fpermissive, it won't compile otherwise.

Change-Id: I97180c3d642065a501540bc0d9c58328d2ed4188
2014-01-13 19:13:26 +01:00
81210d17b2 openocd: include fix
Fixed absolute includes

Change-Id: Idaaa81710b7ace764635c6ab45d86067aadd1220
2014-01-13 19:13:26 +01:00
c03f42db44 openocd: config fix
In the OpenOCD config file for omap4460 an old definition of
Cortex-A9 CPUs was used. Without this fix, OpenOCD would not
start up.

Additionally this commit reduces the number of available Cortex-M
debug targets to one for the sake of simplicity.

Change-Id: Ic690bebd3d171ac0773bb0f1a8087ac96127fb6e
2014-01-13 19:13:26 +01:00
74b4a04d8e openocd: fixed static definition
As the target_to_arm function is needed in the OpenOCD-Wrapper,
it can't be any longer static.

Change-Id: I7099b99f2f1433359567278be16e4d71e06f28a7
2014-01-13 19:13:25 +01:00
f24d9813b6 openocd: speed-up
Normally OpenOCD reads all GP-Registers at halt, which is slow.
Restriction to only necessary Registers 1 and 15.

In the normal use case of OpenOCD this performance reduction does
not matter, because debugging does not need to be optimized for
performance. It just has to be faster than the human perception.

If we need to get the values of the registers 2 to 14, these are
fetched on demand per register.

Change-Id: I8587fbcc41c18722baebca1cec074188fe4cdebb
2014-01-13 19:13:25 +01:00
7e3cabf197 openocd: disabled main
As the openocd-executable won't be needed, the main-function just
prints a warning, which should never be seen in fail context.

Change-Id: I8e5bbd00f152f68058f946b68201c0917db9ec9a
2014-01-13 19:13:12 +01:00
73c39f7787 openocd: header fix
* If included by cpp-file, this will cause trouble. So it gets restricted
to use in c only.
* Prevent usage of "new" as variable name
* No redifinition of true and false, if included by C++
* Definition of bool fixed

Change-Id: Ic5403bd576afd9d2900a8ecfbcfdc50561ba0633
2013-12-02 14:53:35 +01:00
0bb8ff2fa7 openocd: add openocd wrapper
Including
 * Main loop for controlling pandaboard
 * Modification routines like setting halt conditions, reading
   or writing Memory, Registers, etc.
 * Timers

The *.hpp file is defined as *.hpp.in, because the absolute path to
config file must be set by CMake-Script (Will be introduced in later
commit)

Change-Id: I648df4916877dae550943bbb9b264b8d662689b7
2013-12-02 14:53:35 +01:00
5166ddf5e7 openocd: config file for Pandaboard ES + Flyswatter2
Combines the selection of both relevant config files.

Change-Id: Icc7d0add2f0a2ceab5ed715ef8d6b3b6a70ec774
2013-12-02 14:53:35 +01:00