2005-09-26 14:04:21 +08:00
|
|
|
#
|
|
|
|
# Makefile for ppc-specific library files..
|
|
|
|
#
|
|
|
|
|
2009-06-10 04:48:51 +08:00
|
|
|
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
|
|
|
|
|
2010-09-23 04:51:09 +08:00
|
|
|
ccflags-$(CONFIG_PPC64) := -mno-minimal-toc
|
2006-06-10 18:23:54 +08:00
|
|
|
|
2008-11-27 04:54:46 +08:00
|
|
|
CFLAGS_REMOVE_code-patching.o = -pg
|
|
|
|
CFLAGS_REMOVE_feature-fixups.o = -pg
|
|
|
|
|
2007-09-21 08:16:20 +08:00
|
|
|
obj-y := string.o alloc.o \
|
2010-06-30 04:08:42 +08:00
|
|
|
checksum_$(CONFIG_WORD_SIZE).o crtsavres.o
|
|
|
|
obj-$(CONFIG_PPC32) += div64.o copy_32.o
|
2008-05-12 20:57:51 +08:00
|
|
|
obj-$(CONFIG_HAS_IOMEM) += devres.o
|
2005-10-10 20:50:37 +08:00
|
|
|
|
2007-09-21 08:16:20 +08:00
|
|
|
obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \
|
2010-08-03 04:09:52 +08:00
|
|
|
memcpy_64.o usercopy_64.o mem_64.o string.o \
|
2010-08-13 00:28:09 +08:00
|
|
|
checksum_wrappers_64.o hweight_64.o
|
powerpc: Emulate most Book I instructions in emulate_step()
This extends the emulate_step() function to handle a large proportion
of the Book I instructions implemented on current 64-bit server
processors. The aim is to handle all the load and store instructions
used in the kernel, plus all of the instructions that appear between
l[wd]arx and st[wd]cx., so this handles the Altivec/VMX lvx and stvx
and the VSX lxv2dx and stxv2dx instructions (implemented in POWER7).
The new code can emulate user mode instructions, and checks the
effective address for a load or store if the saved state is for
user mode. It doesn't handle little-endian mode at present.
For floating-point, Altivec/VMX and VSX instructions, it checks
that the saved MSR has the enable bit for the relevant facility
set, and if so, assumes that the FP/VMX/VSX registers contain
valid state, and does loads or stores directly to/from the
FP/VMX/VSX registers, using assembly helpers in ldstfp.S.
Instructions supported now include:
* Loads and stores, including some but not all VMX and VSX instructions,
and lmw/stmw
* Atomic loads and stores (l[dw]arx, st[dw]cx.)
* Arithmetic instructions (add, subtract, multiply, divide, etc.)
* Compare instructions
* Rotate and mask instructions
* Shift instructions
* Logical instructions (and, or, xor, etc.)
* Condition register logical instructions
* mtcrf, cntlz[wd], exts[bhw]
* isync, sync, lwsync, ptesync, eieio
* Cache operations (dcbf, dcbst, dcbt, dcbtst)
The overflow-checking arithmetic instructions are not included, but
they appear not to be ever used in C code.
This uses decimal values for the minor opcodes in the switch statements
because that is what appears in the Power ISA specification, thus it is
easier to check that they are correct if they are in decimal.
If this is used to single-step an instruction where a data breakpoint
interrupt occurred, then there is the possibility that the instruction
is a lwarx or ldarx. In that case we have to be careful not to lose the
reservation until we get to the matching st[wd]cx., or we'll never make
forward progress. One alternative is to try to arrange that we can
return from interrupts and handle data breakpoint interrupts without
losing the reservation, which means not using any spinlocks, mutexes,
or atomic ops (including bitops). That seems rather fragile. The
other alternative is to emulate the larx/stcx and all the instructions
in between. This is why this commit adds support for a wide range
of integer instructions.
Signed-off-by: Paul Mackerras <paulus@samba.org>
2010-06-15 12:48:58 +08:00
|
|
|
obj-$(CONFIG_XMON) += sstep.o ldstfp.o
|
|
|
|
obj-$(CONFIG_KPROBES) += sstep.o ldstfp.o
|
2010-06-15 14:05:19 +08:00
|
|
|
obj-$(CONFIG_HAVE_HW_BREAKPOINT) += sstep.o ldstfp.o
|
2005-10-28 20:53:37 +08:00
|
|
|
|
2005-10-27 14:45:38 +08:00
|
|
|
ifeq ($(CONFIG_PPC64),y)
|
|
|
|
obj-$(CONFIG_SMP) += locks.o
|
|
|
|
endif
|
2006-09-22 02:18:53 +08:00
|
|
|
|
2007-09-16 18:53:25 +08:00
|
|
|
obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
|
2008-06-24 09:32:21 +08:00
|
|
|
|
|
|
|
obj-y += code-patching.o
|
2008-06-24 09:32:36 +08:00
|
|
|
obj-y += feature-fixups.o
|
2008-06-24 09:33:03 +08:00
|
|
|
obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
|