All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 08/18] x86: efi: Refactor the directory of EFI app and payload support
Date: Sun, 10 Jun 2018 06:25:07 -0700	[thread overview]
Message-ID: <1528637118-32739-9-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com>

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>
---

 arch/x86/Kconfig                              | 3 +--
 arch/x86/cpu/Makefile                         | 2 +-
 arch/x86/{lib => cpu}/efi/Kconfig             | 0
 arch/x86/cpu/efi/Makefile                     | 7 +++++++
 arch/x86/{lib => cpu}/efi/car.S               | 0
 arch/x86/{lib/efi/efi.c => cpu/efi/payload.c} | 0
 arch/x86/lib/Makefile                         | 1 -
 arch/x86/lib/efi/Makefile                     | 7 -------
 8 files changed, 9 insertions(+), 11 deletions(-)
 rename arch/x86/{lib => cpu}/efi/Kconfig (100%)
 rename arch/x86/{lib => cpu}/efi/car.S (100%)
 rename arch/x86/{lib/efi/efi.c => cpu/efi/payload.c} (100%)
 delete mode 100644 arch/x86/lib/efi/Makefile

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 460aed6..43fa30b 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"
@@ -781,6 +782,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 af9e26c..f862d8c 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
similarity index 100%
rename from arch/x86/lib/efi/Kconfig
rename to arch/x86/cpu/efi/Kconfig
diff --git a/arch/x86/cpu/efi/Makefile b/arch/x86/cpu/efi/Makefile
index 06d0480..32c2dde 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
similarity index 100%
rename from arch/x86/lib/efi/car.S
rename to arch/x86/cpu/efi/car.S
diff --git a/arch/x86/lib/efi/efi.c b/arch/x86/cpu/efi/payload.c
similarity index 100%
rename from arch/x86/lib/efi/efi.c
rename to arch/x86/cpu/efi/payload.c
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 112ac3d..ba83ce2 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 f6c6523..0000000
--- 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 at denx.de.
-
-obj-$(CONFIG_EFI_STUB) += car.o
-obj-$(CONFIG_EFI_STUB) += efi.o
-- 
2.7.4

  parent reply	other threads:[~2018-06-10 13:25 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-10 13:24 [U-Boot] [PATCH 00/18] x86: efi: Fixes and enhancements to application and payload support Bin Meng
2018-06-10 13:25 ` [U-Boot] [PATCH 01/18] x86: doc: Fix reference to EFI doc in U-Boot Bin Meng
2018-06-10 13:39   ` Heinrich Schuchardt
2018-06-10 14:01     ` Bin Meng
2018-06-10 17:46       ` Heinrich Schuchardt
2018-06-10 13:25 ` [U-Boot] [PATCH 02/18] x86: Conditionally build the pinctrl_ich6 driver Bin Meng
2018-06-11 14:53   ` Simon Glass
2018-06-12 13:07     ` Bin Meng
2018-06-10 13:25 ` [U-Boot] [PATCH 03/18] x86: efi: app: Fix broken EFI application Bin Meng
2018-06-11 14:53   ` Simon Glass
2018-06-12 13:07     ` Bin Meng
2018-06-11 17:18   ` Heinrich Schuchardt
2018-06-11 23:19     ` Bin Meng
2018-06-10 13:25 ` [U-Boot] [PATCH 04/18] x86: efi: payload: Enforce toolchain to generate 64-bit EFI payload stub codes Bin Meng
2018-06-10 19:11   ` Alexander Graf
2018-06-11  2:34     ` Bin Meng
2018-06-11  5:55       ` Alexander Graf
2018-06-11  6:05         ` Bin Meng
2018-06-11 14:53   ` Simon Glass
2018-06-12 13:07     ` Bin Meng
2018-06-10 13:25 ` [U-Boot] [PATCH 05/18] efi: Fix efi_uintn_t for 64-bit EFI payload Bin Meng
2018-06-10 14:02   ` Heinrich Schuchardt
2018-06-10 14:30     ` Bin Meng
2018-06-10 18:17       ` Heinrich Schuchardt
2018-06-10 23:36         ` Bin Meng
2018-06-11 15:31           ` Heinrich Schuchardt
2018-06-11 16:35             ` Bin Meng
2018-06-11 18:35               ` Heinrich Schuchardt
2018-06-11  9:11   ` Bin Meng
2018-06-11 19:43     ` Alexander Graf
2018-06-10 13:25 ` [U-Boot] [PATCH 06/18] dm: pci: Make ranges dt property optional Bin Meng
2018-06-11 14:53   ` Simon Glass
2018-06-12 13:07     ` Bin Meng
2018-06-10 13:25 ` [U-Boot] [PATCH 07/18] dm: pci: Use a 1:1 mapping for bus <-> phy addresses Bin Meng
2018-06-11 14:54   ` Simon Glass
2018-06-12 13:07     ` Bin Meng
2018-06-10 13:25 ` Bin Meng [this message]
2018-06-11 14:54   ` [U-Boot] [PATCH 08/18] x86: efi: Refactor the directory of EFI app and payload support Simon Glass
2018-06-10 13:25 ` [U-Boot] [PATCH 09/18] x86: efi: payload: Add arch_cpu_init() Bin Meng
2018-06-11 14:54   ` Simon Glass
2018-06-10 13:25 ` [U-Boot] [PATCH 10/18] x86: efi: payload: Minor clean up on error message output Bin Meng
2018-06-11 14:54   ` Simon Glass
2018-06-12 13:07     ` Bin Meng
2018-06-10 13:25 ` [U-Boot] [PATCH 11/18] x86: Add generic EFI payload support Bin Meng
2018-06-11 14:54   ` Simon Glass
2018-06-10 13:25 ` [U-Boot] [PATCH 12/18] x86: Drop QEMU-specific " Bin Meng
2018-06-11 14:54   ` Simon Glass
2018-06-10 13:25 ` [U-Boot] [PATCH 13/18] x86: baytrail: Drop EFI-specific test logics Bin Meng
2018-06-11 14:54   ` Simon Glass
2018-06-10 13:25 ` [U-Boot] [PATCH 14/18] efi: stub: Pass EFI GOP information to U-Boot payload Bin Meng
2018-06-10 19:16   ` Alexander Graf
2018-06-10 23:29     ` Bin Meng
2018-06-11  5:52       ` Alexander Graf
2018-06-11  6:01         ` Bin Meng
2018-06-11  7:34           ` Alexander Graf
2018-06-11  7:44             ` Bin Meng
2018-06-11  8:33               ` Alexander Graf
2018-06-11  9:02                 ` Bin Meng
2018-06-11 14:53   ` Simon Glass
2018-06-10 13:25 ` [U-Boot] [PATCH 15/18] dm: video: Add an EFI framebuffer driver Bin Meng
2018-06-10 15:52   ` Anatolij Gustschin
2018-06-10 13:25 ` [U-Boot] [PATCH 16/18] x86: efi: payload: Add EFI framebuffer driver support Bin Meng
2018-06-11 14:54   ` Simon Glass
2018-06-10 13:25 ` [U-Boot] [PATCH 17/18] x86: Rename efi-x86 target to efi-x86_app Bin Meng
2018-06-11 14:54   ` Simon Glass
2018-06-11 15:50     ` Bin Meng
2018-06-10 13:25 ` [U-Boot] [PATCH 18/18] x86: efi: app: Display correct CPU info during boot Bin Meng
2018-06-11 14:54   ` Simon Glass
2018-06-11 14:53 ` [U-Boot] [PATCH 00/18] x86: efi: Fixes and enhancements to application and payload support Simon Glass
2018-06-11 15:53   ` Bin Meng
2018-06-11 19:38     ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1528637118-32739-9-git-send-email-bmeng.cn@gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.