freebsd-dev/sys/amd64/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
..
pc - Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 is 2004-06-10 20:43:04 +00:00
_inttypes.h Commit MD parts of a loosely functional AMD64 port. This is based on 2003-05-01 01:05:25 +00:00
_limits.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +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
acpica_machdep.h Add an MI implementation of the ACPI global lock routines and retire the 2004-05-05 20:04:14 +00:00
apicreg.h MFi386: remove APIC_IRQ* defines that are no longer used. 2003-12-11 02:48:25 +00:00
apicvar.h MFi386: various io apic cleanups 2004-07-08 01:42:49 +00:00
asm.h Argh. Add the mini-stack-frame back in for mcount's benefit for syscall 2004-06-10 22:02:26 +00:00
asmacros.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
atomic.h Cosmetic and/or trivial sync up with i386. 2003-11-21 03:02:00 +00:00
bus_amd64.h Implement the bus_space_map() function to allocate resources and initialize 2003-09-23 08:22:34 +00:00
bus_dma.h Cosmetic and/or trivial sync up with i386. 2003-11-21 03:02:00 +00:00
bus_memio.h AMD64 physical space is much larger than i386, de-i386 the bus_space and 2003-05-12 02:44:37 +00:00
bus_pio.h AMD64 physical space is much larger than i386, de-i386 the bus_space and 2003-05-12 02:44:37 +00:00
bus.h AMD64 physical space is much larger than i386, de-i386 the bus_space and 2003-05-12 02:44:37 +00:00
clock.h Initial landing of SMP support for FreeBSD/amd64. 2003-11-17 08:58:16 +00:00
cpu.h Instead of calling ia32_pause() conditionally on __i386__ or __amd64__ 2004-08-03 18:44:27 +00:00
cpufunc.h MFia64: 2004-07-30 16:44:29 +00:00
cputypes.h MFi386: move cpu_nameclass struct next to its only consumer 2004-06-03 20:18:15 +00:00
critical.h Pass a thread argument into cpu_critical_{enter,exit}() rather than 2004-07-27 16:41:01 +00:00
db_machdep.h Mega update for the KDB framework: turn DDB into a KDB backend. 2004-07-10 23:47:20 +00:00
elf.h Add style(9) foolishness. 2004-08-03 08:21:48 +00:00
endian.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
exec.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
float.h Make FLT_ROUNDS correctly reflect the dynamic rounding mode. 2004-07-19 08:17:25 +00:00
floatingpoint.h o Move the contents of <machine/floatingpoint.h> over to 2003-01-19 06:01:33 +00:00
fpu.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
frame.h Remove obsolete prototype of kdb_trap(). 2004-07-10 22:39:56 +00:00
gdb_machdep.h Introduce the GDB debugger backend for the new KDB framework. The 2004-07-10 17:47:22 +00:00
ieeefp.h Update the graffiti. 2003-11-08 04:39:22 +00:00
in_cksum.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
intr_machdep.h Sync with i386 - Optimize intr_execute_handlers a bit etc. 2004-08-16 23:12:30 +00:00
iodev.h Break out the MI part of the /dev/[k]mem and /dev/io drivers into 2004-08-01 11:40:54 +00:00
kdb.h Introduce the KDB debugger frontend. The frontend provides a framework 2004-07-10 18:40:12 +00:00
legacyvar.h MFi386: numerous interrupt and acpi updates 2004-05-16 20:30:47 +00:00
limits.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
md_var.h Remove atdevbase and replace it's remaining uses with direct references to 2004-06-10 20:31:00 +00:00
memdev.h Break out the MI part of the /dev/[k]mem and /dev/io drivers into 2004-08-01 11:40:54 +00:00
metadata.h Slight reorg and added AMD64 support. A couple of the MODINFOMD_* values 2003-05-01 03:31:18 +00:00
mp_watchdog.h Add an "options MP_WATCHDOG" to i386. This option allows one of the 2004-08-15 18:02:09 +00:00
mptable.h Convert a couple of pointers to integers for source compatability with 2003-11-14 22:23:30 +00:00
mutex.h Kill the ASM versions of the mtx_lock_spin and friends. They were never 2003-12-06 23:17:18 +00:00
param.h Turn off PREEMPTION by default while it gets debugged. It's been causing 2004-08-01 14:31:45 +00:00
pcb_ext.h Commit MD parts of a loosely functional AMD64 port. This is based on 2003-05-01 01:05:25 +00:00
pcb.h Implement makectx(). The makectx() function is used by KDB to create 2004-07-10 19:56:00 +00:00
pci_cfgreg.h MFi386: nuke pci_cfgintr 2004-03-13 19:19:13 +00:00
pcpu.h Argh! Followup to previous commit. I checked in the patch with an 2003-11-20 23:49:28 +00:00
pmap.h Remove the allpmaps list. It's unused. 2004-07-20 02:40:56 +00:00
proc.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
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 Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
ptrace.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
reg.h Remove advertising clause from University of California Regent's license, 2004-04-05 23:55:14 +00:00
reloc.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
resource.h
runq.h Reconfigure the runq macros to use the 64 bit ffs/bsf routines instead 2003-12-06 23:24:18 +00:00
segments.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
setjmp.h Make this more compatable with libc_r. Make the internal types for storing 2003-06-02 21:49:35 +00:00
sf_buf.h Simplify the sf_buf implementation. In short, make it a trivial veneer 2004-04-18 05:36:37 +00:00
sigframe.h Commit MD parts of a loosely functional AMD64 port. This is based on 2003-05-01 01:05:25 +00:00
signal.h Remove advertising clause from University of California Regent's license, 2004-04-05 23:55:14 +00:00
smp.h Kill the LAZYPMAP ifdefs. While they worked, they didn't do anything 2004-05-16 22:11:50 +00:00
specialreg.h Initial PG_NX support (no-execute page bit) 2004-06-08 01:02:52 +00:00
stdarg.h Add __va_copy and make it always visible, in spite of the __ISO_C_VISIBLE 2003-10-24 02:50:39 +00:00
sysarch.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
trap.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
tss.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
ucontext.h Update the graffiti. 2003-11-08 04:39:22 +00:00
varargs.h Standardize idempotentcy ifdefs. Consistently use _MACHINE_VARARGS_H_ 2003-09-01 03:01:45 +00:00
vmparam.h Increase VM_KMEM_SIZE_MAX from 200MB to 400MB. 2003-12-07 04:51:04 +00:00