ia64/xen-unstable

view extras/mini-os/minios.mk @ 19557:226ef307cd2e

AMD IOMMU: Fix ioapic interrupt remapping

A few ioapic redirection entries are initialized by hypervisor before
enabling iommu hardware. This patch copies those entries from ioapic
redirection table into interrupt remapping table after interrupt
remapping table has been allocated.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Apr 17 13:16:39 2009 +0100 (2009-04-17)
parents 183d2d7adc2f
children
line source
1 #
2 # The file contains the common make rules for building mini-os.
3 #
5 debug = y
7 # Define some default flags.
8 # NB. '-Wcast-qual' is nasty, so I omitted it.
9 DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls
10 DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
11 DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
12 DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
13 DEF_CPPFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
15 DEF_ASFLAGS += -D__ASSEMBLY__
16 DEF_LDFLAGS +=
18 ifeq ($(debug),y)
19 DEF_CFLAGS += -g
20 #DEF_CFLAGS += -DMM_DEBUG
21 #DEF_CFLAGS += -DFS_DEBUG
22 #DEF_CFLAGS += -DLIBC_DEBUG
23 DEF_CFLAGS += -DGNT_DEBUG
24 DEF_CFLAGS += -DGNTMAP_DEBUG
25 else
26 DEF_CFLAGS += -O3
27 endif
29 # Make the headers define our internal stuff
30 DEF_CFLAGS += -D__INSIDE_MINIOS__
32 # Build the CFLAGS and ASFLAGS for compiling and assembling.
33 # DEF_... flags are the common mini-os flags,
34 # ARCH_... flags may be defined in arch/$(TARGET_ARCH_FAM/rules.mk
35 CFLAGS := $(DEF_CFLAGS) $(ARCH_CFLAGS)
36 CPPFLAGS := $(DEF_CPPFLAGS) $(ARCH_CPPFLAGS)
37 ASFLAGS := $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
38 LDFLAGS := $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
40 # Special build dependencies.
41 # Rebuild all after touching this/these file(s)
42 EXTRA_DEPS = $(MINI-OS_ROOT)/minios.mk \
43 $(MINI-OS_ROOT)/$(TARGET_ARCH_DIR)/arch.mk
45 # Find all header files for checking dependencies.
46 HDRS := $(wildcard $(MINI-OS_ROOT)/include/*.h)
47 HDRS += $(wildcard $(MINI-OS_ROOT)/include/xen/*.h)
48 HDRS += $(wildcard $(ARCH_INC)/*.h)
49 # For special wanted header directories.
50 extra_heads := $(foreach dir,$(EXTRA_INC),$(wildcard $(dir)/*.h))
51 HDRS += $(extra_heads)
53 # Add the special header directories to the include paths.
54 override CPPFLAGS := $(CPPFLAGS) $(extra_incl)
56 # The name of the architecture specific library.
57 # This is on x86_32: libx86_32.a
58 # $(ARCH_LIB) has to built in the architecture specific directory.
59 ARCH_LIB_NAME = $(XEN_TARGET_ARCH)
60 ARCH_LIB := lib$(ARCH_LIB_NAME).a
62 # This object contains the entrypoint for startup from Xen.
63 # $(HEAD_ARCH_OBJ) has to be built in the architecture specific directory.
64 HEAD_ARCH_OBJ := $(XEN_TARGET_ARCH).o
65 HEAD_OBJ := $(OBJ_DIR)/$(TARGET_ARCH_DIR)/$(HEAD_ARCH_OBJ)
68 $(OBJ_DIR)/%.o: %.c $(HDRS) Makefile $(EXTRA_DEPS)
69 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
71 $(OBJ_DIR)/%.o: %.S $(HDRS) Makefile $(EXTRA_DEPS)
72 $(CC) $(ASFLAGS) $(CPPFLAGS) -c $< -o $@