summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2018-06-12 08:36:16 -0700
committerBin Meng <bmeng.cn@gmail.com>2018-06-17 21:16:04 +0800
commit4f1dacd43fcb5d4e97407df51b48dfde5e920078 (patch)
tree9a28f291189c0c8ee539590bc31b5bc5895f89c3 /arch/x86
parent9efeb3f4db9479c0179283c1c221725948b155fc (diff)
downloadu-boot-4f1dacd43fcb5d4e97407df51b48dfde5e920078.tar.gz
x86: efi: Refactor the directory of EFI app and payload support
At present the EFI application and payload support codes in the x86 directory is distributed in a hybrid way. For example, the Kconfig options for both app and payload are in arch/x86/lib/efi/Kconfig, but the source codes in the same directory get built only for CONFIG_EFI_STUB. This refactors the codes by consolidating all the EFI support codes into arch/x86/cpu/efi, just like other x86 targets. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/Kconfig3
-rw-r--r--arch/x86/cpu/Makefile2
-rw-r--r--arch/x86/cpu/efi/Kconfig (renamed from arch/x86/lib/efi/Kconfig)0
-rw-r--r--arch/x86/cpu/efi/Makefile7
-rw-r--r--arch/x86/cpu/efi/car.S (renamed from arch/x86/lib/efi/car.S)0
-rw-r--r--arch/x86/cpu/efi/payload.c (renamed from arch/x86/lib/efi/efi.c)0
-rw-r--r--arch/x86/lib/Makefile1
-rw-r--r--arch/x86/lib/efi/Makefile7
8 files changed, 9 insertions, 11 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 18c7fb2d49..a1c18d26e1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -112,6 +112,7 @@ source "arch/x86/cpu/braswell/Kconfig"
source "arch/x86/cpu/broadwell/Kconfig"
source "arch/x86/cpu/coreboot/Kconfig"
source "arch/x86/cpu/ivybridge/Kconfig"
+source "arch/x86/cpu/efi/Kconfig"
source "arch/x86/cpu/qemu/Kconfig"
source "arch/x86/cpu/quark/Kconfig"
source "arch/x86/cpu/queensbay/Kconfig"
@@ -772,6 +773,4 @@ config HIGH_TABLE_SIZE
Increse it if the default size does not fit the board's needs.
This is most likely due to a large ACPI DSDT table is used.
-source "arch/x86/lib/efi/Kconfig"
-
endmenu
diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile
index af9e26caab..f862d8c071 100644
--- a/arch/x86/cpu/Makefile
+++ b/arch/x86/cpu/Makefile
@@ -29,7 +29,7 @@ obj-$(CONFIG_INTEL_BAYTRAIL) += baytrail/
obj-$(CONFIG_INTEL_BRASWELL) += braswell/
obj-$(CONFIG_INTEL_BROADWELL) += broadwell/
obj-$(CONFIG_SYS_COREBOOT) += coreboot/
-obj-$(CONFIG_EFI_APP) += efi/
+obj-$(CONFIG_EFI) += efi/
obj-$(CONFIG_QEMU) += qemu/
obj-$(CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE) += ivybridge/
obj-$(CONFIG_INTEL_QUARK) += quark/
diff --git a/arch/x86/lib/efi/Kconfig b/arch/x86/cpu/efi/Kconfig
index e0975d34d3..e0975d34d3 100644
--- a/arch/x86/lib/efi/Kconfig
+++ b/arch/x86/cpu/efi/Kconfig
diff --git a/arch/x86/cpu/efi/Makefile b/arch/x86/cpu/efi/Makefile
index 06d0480440..32c2ddedb9 100644
--- a/arch/x86/cpu/efi/Makefile
+++ b/arch/x86/cpu/efi/Makefile
@@ -2,5 +2,12 @@
#
# Copyright (c) 2015 Google, Inc
+ifdef CONFIG_EFI_APP
obj-y += efi.o
obj-y += sdram.o
+endif
+
+ifdef CONFIG_EFI_STUB
+obj-y += car.o
+obj-y += payload.o
+endif
diff --git a/arch/x86/lib/efi/car.S b/arch/x86/cpu/efi/car.S
index 488dcde66c..488dcde66c 100644
--- a/arch/x86/lib/efi/car.S
+++ b/arch/x86/cpu/efi/car.S
diff --git a/arch/x86/lib/efi/efi.c b/arch/x86/cpu/efi/payload.c
index 81fb8b5f72..81fb8b5f72 100644
--- a/arch/x86/lib/efi/efi.c
+++ b/arch/x86/cpu/efi/payload.c
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 0e054da1e9..ba07ac728f 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -14,7 +14,6 @@ endif
obj-y += cmd_boot.o
obj-$(CONFIG_SEABIOS) += coreboot_table.o
obj-y += early_cmos.o
-obj-$(CONFIG_EFI) += efi/
obj-y += e820.o
obj-y += init_helpers.o
obj-y += interrupts.o
diff --git a/arch/x86/lib/efi/Makefile b/arch/x86/lib/efi/Makefile
deleted file mode 100644
index f6c65235e2..0000000000
--- a/arch/x86/lib/efi/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2002-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-
-obj-$(CONFIG_EFI_STUB) += car.o
-obj-$(CONFIG_EFI_STUB) += efi.o