Browse Source

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>
tags/2020-06-01
Bin Meng 2 years ago
parent
commit
4f1dacd43f
9 changed files with 10 additions and 16 deletions
  1. +1
    -2
      arch/x86/Kconfig
  2. +1
    -1
      arch/x86/cpu/Makefile
  3. +0
    -0
      arch/x86/cpu/efi/Kconfig
  4. +7
    -0
      arch/x86/cpu/efi/Makefile
  5. +0
    -0
      arch/x86/cpu/efi/car.S
  6. +0
    -0
      arch/x86/cpu/efi/payload.c
  7. +0
    -1
      arch/x86/lib/Makefile
  8. +0
    -7
      arch/x86/lib/efi/Makefile
  9. +1
    -5
      doc/README.u-boot_on_efi

+ 1
- 2
arch/x86/Kconfig View File

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

+ 1
- 1
arch/x86/cpu/Makefile View File

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


arch/x86/lib/efi/Kconfig → arch/x86/cpu/efi/Kconfig View File


+ 7
- 0
arch/x86/cpu/efi/Makefile View File

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

arch/x86/lib/efi/car.S → arch/x86/cpu/efi/car.S View File


arch/x86/lib/efi/efi.c → arch/x86/cpu/efi/payload.c View File


+ 0
- 1
arch/x86/lib/Makefile View File

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


+ 0
- 7
arch/x86/lib/efi/Makefile View File

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

+ 1
- 5
doc/README.u-boot_on_efi View File

@@ -235,12 +235,8 @@ Where is the code?
lib/efi
payload stub, application, support code. Mostly arch-neutral

arch/x86/lib/efi
helper functions for the fake DRAM init, etc. These can be used by
any board that runs as a payload.

arch/x86/cpu/efi
x86 support code for running as an EFI application
x86 support code for running as an EFI application and payload

board/efi/efi-x86/efi.c
x86 board code for running as an EFI application


Loading…
Cancel
Save