freebsd-dev/sys/amd64
marcel df865268d9 Move the kernel-specific logic to adjust frompc from MI to MD. For
these two reasons:
1. On ia64 a function pointer does not hold the address of the first
   instruction of a functions implementation. It holds the address
   of a function descriptor. Hence the user(), btrap(), eintr() and
   bintr() prototypes are wrong for getting the actual code address.
2. The logic forces interrupt, trap and exception entry points to
   be layed-out contiguously. This can not be achieved on ia64 and is
   generally just bad programming.

The MCOUNT_FROMPC_USER macro is used to set the frompc argument to
some kernel address which represents any frompc that falls outside
the kernel text range. The macro can expand to ~0U to bail out in
that case.
The MCOUNT_FROMPC_INTR macro is used to set the frompc argument to
some kernel address to represent a call to a trap or interrupt
handler. This to avoid that the trap or interrupt handler appear to
be called from everywhere in the call graph. The macro can expand
to ~0U to prevent adjusting frompc. Note that the argument is selfpc,
not frompc.

This commit defines the macros on all architectures equivalently to
the original code in sys/libkern/mcount.c. People can take it from
here...

Compile-tested on: alpha, amd64, i386, ia64 and sparc64
Boot-tested on: i386
2004-08-27 19:42:35 +00:00
..
acpica Sync with i386 - get the softc via the devclass rather than caching the dev 2004-08-16 23:10:18 +00:00
amd64 The machine-independent parts of the virtual memory system always pass a 2004-08-27 19:06:17 +00:00
compile
conf Always compile PFIL_HOOKS into the kernel and remove the associated kernel 2004-08-27 15:16:24 +00:00
ia32 Don't repeat the definition of IDTVEC(). It is in asmacros.h. 2004-05-24 11:28:11 +00:00
include Move the kernel-specific logic to adjust frompc from MI to MD. For 2004-08-27 19:42:35 +00:00
isa Sync with i386 - Optimize intr_execute_handlers a bit etc. 2004-08-16 23:12:30 +00:00
linux32 Correct the arguments to kern_sigaltstack() as they were reversed. 2004-08-24 20:52:52 +00:00
pci Add missing <sys/module.h> instances which were shadowed by the nested 2004-06-03 05:58:30 +00:00
Makefile