xen/arch/x86/include/asm/asm-macros.h
xen/arch/*/xen.lds
xen/arch/*/efi/boot.c
+xen/arch/*/efi/common-stub.c
xen/arch/*/efi/compat.c
xen/arch/*/efi/ebmalloc.c
xen/arch/*/efi/efi.h
obj-y += $(EFIOBJ-y)
obj-$(CONFIG_ACPI) += efi-dom0.init.o
else
-# Add stub.o to EFIOBJ-y to re-use the clean-files in
-# efi-common.mk. Otherwise the link of stub.c in arm/efi
-# will not be cleaned in "make clean".
-EFIOBJ-y += stub.o
-obj-y += stub.o
+obj-y += common-stub.o
$(obj)/stub.o: CFLAGS-y += -fno-short-wchar
$(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
$(addprefix $(obj)/,$(EFIOBJ-y)): CFLAGS_stack_boundary := $(cflags-stack-boundary)
-obj-y := stub.o
+obj-y := common-stub.o stub.o
obj-$(XEN_BUILD_EFI) := $(filter-out %.init.o,$(EFIOBJ-y))
obj-bin-$(XEN_BUILD_EFI) := $(filter %.init.o,$(EFIOBJ-y))
extra-$(XEN_BUILD_EFI) += buildid.o relocs-dummy.o
#include <efi/eficon.h>
#include <efi/efidevp.h>
#include <efi/efiapi.h>
-#include "../../../common/efi/stub.c"
/*
* Here we are in EFI stub. EFI calls are not supported due to lack
}
void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t l4e) { }
-
-int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
- __attribute__((__alias__("efi_get_info")));
-
-int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
- __attribute__((__alias__("efi_runtime_call")));
--- /dev/null
+#include <xen/efi.h>
+#include <xen/errno.h>
+#include <xen/lib.h>
+
+bool efi_enabled(unsigned int feature)
+{
+ return false;
+}
+
+bool efi_rs_using_pgtables(void)
+{
+ return false;
+}
+
+unsigned long efi_get_time(void)
+{
+ BUG();
+ return 0;
+}
+
+void efi_halt_system(void) { }
+void efi_reset_system(bool warm) { }
+
+int efi_get_info(uint32_t idx, union xenpf_efi_info *info)
+{
+ return -ENOSYS;
+}
+
+int efi_runtime_call(struct xenpf_efi_runtime_call *op)
+{
+ return -ENOSYS;
+}
+
+#ifdef CONFIG_COMPAT
+
+int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
+ __attribute__((__alias__("efi_get_info")));
+
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
+ __attribute__((__alias__("efi_runtime_call")));
+
+#endif
# e.g.: It transforms "dir/foo/bar" into successively
# "dir foo bar", ".. .. ..", "../../.."
$(obj)/%.c: $(srctree)/common/efi/%.c FORCE
- $(Q)test -f $@ || \
- ln -nfs $(subst $(space),/,$(patsubst %,..,$(subst /, ,$(obj))))/source/common/efi/$(<F) $@
+ $(Q)ln -nfs $(subst $(space),/,$(patsubst %,..,$(subst /, ,$(obj))))/source/common/efi/$(<F) $@
clean-files += $(patsubst %.o, %.c, $(EFIOBJ-y:.init.o=.o) $(EFIOBJ-))
+clean-files += common-stub.c
.PRECIOUS: $(obj)/%.c
+++ /dev/null
-#include <xen/efi.h>
-#include <xen/errno.h>
-#include <xen/lib.h>
-
-bool efi_enabled(unsigned int feature)
-{
- return false;
-}
-
-bool efi_rs_using_pgtables(void)
-{
- return false;
-}
-
-unsigned long efi_get_time(void)
-{
- BUG();
- return 0;
-}
-
-void efi_halt_system(void) { }
-void efi_reset_system(bool warm) { }
-
-int efi_get_info(uint32_t idx, union xenpf_efi_info *info)
-{
- return -ENOSYS;
-}
-
-int efi_runtime_call(struct xenpf_efi_runtime_call *op)
-{
- return -ENOSYS;
-}