freebsd-skq/sys/arm
andrew ff8a1038b7 Add the MD parts of dtrace needed to use fbt on ARM. For this we need to
emulate the instructions used in function entry and exit.

For function entry ARM will use a push instruction to push up to 16
registers to the stack. While we don't expect all 16 to be used we need to
handle any combination the compiler may generate, even if it doesn't make
sense (e.g. pushing the program counter).

On function return we will either have a pop or branch instruction. The
former is similar to the push instruction, but with care to make sure we
update the stack pointer and program counter correctly in the cases they
are either in the list of registers or not. For branch we need to take the
24-bit offset, sign-extend it, and add that number of 4-byte words to the
program counter. Care needs to be taken as, due to historical reasons, the
address the branch is relative to is not the current instruction, but 8
bytes later.

This allows us to use the following probes on ARM boards:
  dtrace -n 'fbt::malloc:entry { stack() }'
and
  dtrace -n 'fbt:🆓return { stack() }'

Differential Revision:	https://reviews.freebsd.org/D2007
Reviewed by:	gnn, rpaulo
Sponsored by:	ABT Systems Ltd
2015-03-05 17:55:31 +00:00
..
allwinner Implement GPIO_GET_BUS() method for all GPIO drivers. 2015-01-31 19:32:14 +00:00
altera/socfpga Implement GPIO_GET_BUS() method for all GPIO drivers. 2015-01-31 19:32:14 +00:00
arm Add the MD parts of dtrace needed to use fbt on ARM. For this we need to 2015-03-05 17:55:31 +00:00
at91 Use explicit initializer style, fill in missing functions. 2015-01-21 03:28:07 +00:00
broadcom/bcm2835 Add support to the bcm2835 mailbox driver to work before interrupts are 2015-02-22 11:11:05 +00:00
cavium/cns11xx Use the base arm bus_space instead of an identical local copy. 2015-01-21 04:22:20 +00:00
conf Add a "module" to build the dtb files for all supported imx6 systems. 2015-03-02 22:12:56 +00:00
freescale Implement GPIO_GET_BUS() method for all GPIO drivers. 2015-01-31 19:32:14 +00:00
include Revert r279338. The casts are apparently bogus, despite the fact that 2015-03-02 20:40:25 +00:00
lpc Implement GPIO_GET_BUS() method for all GPIO drivers. 2015-01-31 19:32:14 +00:00
mv Rename bus_space-v6.c to bus_space_base.c, because it's not v6-specific 2015-01-21 03:44:29 +00:00
rockchip Implement GPIO_GET_BUS() method for all GPIO drivers. 2015-01-31 19:32:14 +00:00
samsung Add quirk to disable 64-bit XHCI DMA after r276717. 2015-03-02 20:42:06 +00:00
ti Fix a number of -Wcast-qual warnings under sys/arm. No functional 2015-02-26 07:47:35 +00:00
versatile Remove a no-longer-used include. 2015-01-21 04:19:54 +00:00
xilinx Implement GPIO_GET_BUS() method for all GPIO drivers. 2015-01-31 19:32:14 +00:00
xscale The cpu_id macro was renamed in r278529, catch up with this new name. 2015-02-11 10:37:55 +00:00