freebsd-nq/sys/powerpc/include
Marcel Moolenaar 0f2fe153bc 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
..
_inttypes.h
_limits.h Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
_stdint.h <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN is 2004-05-18 16:04:57 +00:00
_types.h Introduce the cpumask_t type. The purpose of the type is to create a 2004-03-20 20:41:40 +00:00
asm.h
atomic.h
bat.h
bootinfo.h
bus_memio.h
bus_pio.h
bus.h - Introduce a new busdma flag BUS_DMA_ZERO to request for zero'ed 2003-07-27 13:52:10 +00:00
clock.h
cpu.h Instead of calling ia32_pause() conditionally on __i386__ or __amd64__ 2004-08-03 18:44:27 +00:00
cpufunc.h Always isync after a mtmsr. While perhaps not strictly necessary for PSL_EE 2004-08-07 00:20:00 +00:00
critical.h Remove race condition between reading of MSR, setting md_savecrit, 2004-08-03 04:14:55 +00:00
db_machdep.h Let ddb know powerpc is big endian so as to make ddb output 2004-07-23 14:45:15 +00:00
elf.h Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit 2003-09-25 01:10:26 +00:00
endian.h Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
exec.h
float.h Fix printing of long doubles to match the size that 2004-07-19 23:56:07 +00:00
floatingpoint.h Add sys file required for IEEE fp functions. 2004-02-12 09:12:11 +00:00
fpu.h
frame.h Update the callframe structure to leave space for the frame pointer 2004-07-22 01:28:51 +00:00
hid.h Definitions for MPC7457 CPU type and HID0 bits 2004-02-09 00:12:50 +00:00
ieee.h Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
ieeefp.h
in_cksum.h Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
interruptvar.h
intr_machdep.h Interrupt statistics, vmstat -i now works. 2004-02-11 13:18:31 +00:00
intr.h
ipl.h
kdb.h Properly implement kdb_cpu_{set|clear}_singlestep to allow DDB to 2004-07-27 07:06:20 +00:00
limits.h Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
md_var.h Further cleanup <machine/cpu.h> and <machine/md_var.h>: move the MI 2003-08-16 16:57:57 +00:00
memdev.h Add /dev/mem and /dev/kmem to powerpc. 2004-08-16 13:07:40 +00:00
metadata.h
mutex.h
nexusvar.h Remove hard-coded knowledge of specific OFW devices. Use bus_generic_probe 2004-01-13 11:20:52 +00:00
ofw_machdep.h Add /dev/mem and /dev/kmem to powerpc. 2004-08-16 13:07:40 +00:00
openpicreg.h
openpicvar.h Make the OpenPic driver bus-independent, with attachments for 2004-01-13 11:24:36 +00:00
param.h <machine/pte.h> has no business being here. Finally exposed by F77 build 2004-04-21 22:58:39 +00:00
pcb.h Add prototype for KDB's makectx routine 2004-07-12 22:17:20 +00:00
pcpu.h Gratuitous namechange to avoid low-level association with ddb. 2004-07-12 22:18:02 +00:00
pio.h
pmap.h Add pmap locking to many of the functions. 2004-08-26 04:15:36 +00:00
powerpc.h - removed obsolete ppc_exit/ppc_boot functions 2003-12-10 08:55:53 +00:00
proc.h
profile.h Move the kernel-specific logic to adjust frompc from MI to MD. For 2004-08-27 19:42:35 +00:00
psl.h
pte.h
ptrace.h Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
reg.h Add comment explaining struct reg and struct fpreg must match the trapframe. 2004-07-29 13:39:27 +00:00
reloc.h
resource.h
runq.h
sc_machdep.h A syscons implementation using the 8-bit framebuffer set up by 2004-01-21 05:16:23 +00:00
setjmp.h
sf_buf.h MFamd64 2004-04-18 08:10:04 +00:00
sigframe.h
signal.h
smp.h
spr.h Definitions for MPC7457 CPU type and HID0 bits 2004-02-09 00:12:50 +00:00
sr.h Increase kernel VA from 256Mb to 512Mb by shifting the segment used 2004-03-02 06:49:21 +00:00
stdarg.h In the spirit of amd64/include/stdarg.h rev 1.6; add __va_copy 2004-07-06 07:47:09 +00:00
trap.h
ucontext.h Use the version field to identify the partial context used by 2004-07-19 07:21:46 +00:00
varargs.h Standardize idempotentcy ifdefs. Consistently use _MACHINE_VARARGS_H_ 2003-09-01 03:01:45 +00:00
vmparam.h Increase kernel VA from 256Mb to 512Mb by shifting the segment used 2004-03-02 06:49:21 +00:00