Commit 301d27d9 authored by Radoslaw Biernacki's avatar Radoslaw Biernacki Committed by Sandrine Bailleux
Browse files

qemu: introducing sub-platforms to qemu platform



This commit change the plat/qemu directory structure into:

`-- plat
    `-- qemu
        |-- common    (files shared with all qemu subplatforms)
        |-- qemu      (original qemu platform)
        |-- qemu_sbsa (new sqemu_sbsa platform)
        |-- subplat1
        `-- subplat2

This opens the possibility of adding new qemu sub-platforms which reuse
existing common platform code. The first platform which will leverage new
structure will be SBSA platform.
Signed-off-by: default avatarRadoslaw Biernacki <radoslaw.biernacki@linaro.org>
Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: Id0d8133e1fffc1b574b69aa2770ebc02bb837a9b
parent ed01e0c4
...@@ -32,16 +32,20 @@ ifeq ($(NEED_BL32),yes) ...@@ -32,16 +32,20 @@ ifeq ($(NEED_BL32),yes)
$(eval $(call add_define,QEMU_LOAD_BL32)) $(eval $(call add_define,QEMU_LOAD_BL32))
endif endif
PLAT_PATH := plat/qemu/ PLAT_QEMU_PATH := plat/qemu/qemu
PLAT_INCLUDES := -Iplat/qemu/include PLAT_QEMU_COMMON_PATH := plat/qemu/common
PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
-I${PLAT_QEMU_COMMON_PATH}/include \
-I${PLAT_QEMU_PATH}/include \
-Iinclude/common/tbbr
ifeq (${ARM_ARCH_MAJOR},8) ifeq (${ARM_ARCH_MAJOR},8)
PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH} PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH}
endif endif
PLAT_BL_COMMON_SOURCES := plat/qemu/qemu_common.c \ PLAT_BL_COMMON_SOURCES := ${PLAT_QEMU_COMMON_PATH}/qemu_common.c \
plat/qemu/qemu_console.c \ ${PLAT_QEMU_COMMON_PATH}/qemu_console.c \
drivers/arm/pl011/${ARCH}/pl011_console.S \ drivers/arm/pl011/${ARCH}/pl011_console.S
include lib/xlat_tables_v2/xlat_tables.mk include lib/xlat_tables_v2/xlat_tables.mk
PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS}
...@@ -59,13 +63,13 @@ ifneq (${TRUSTED_BOARD_BOOT},0) ...@@ -59,13 +63,13 @@ ifneq (${TRUSTED_BOARD_BOOT},0)
BL1_SOURCES += ${AUTH_SOURCES} \ BL1_SOURCES += ${AUTH_SOURCES} \
bl1/tbbr/tbbr_img_desc.c \ bl1/tbbr/tbbr_img_desc.c \
plat/common/tbbr/plat_tbbr.c \ plat/common/tbbr/plat_tbbr.c \
plat/qemu/qemu_trusted_boot.c \ ${PLAT_QEMU_COMMON_PATH}/qemu_trusted_boot.c \
$(PLAT_PATH)/qemu_rotpk.S $(PLAT_QEMU_COMMON_PATH)/qemu_rotpk.S
BL2_SOURCES += ${AUTH_SOURCES} \ BL2_SOURCES += ${AUTH_SOURCES} \
plat/common/tbbr/plat_tbbr.c \ plat/common/tbbr/plat_tbbr.c \
plat/qemu/qemu_trusted_boot.c \ ${PLAT_QEMU_COMMON_PATH}/qemu_trusted_boot.c \
$(PLAT_PATH)/qemu_rotpk.S $(PLAT_QEMU_COMMON_PATH)/qemu_rotpk.S
ROT_KEY = $(BUILD_PLAT)/rot_key.pem ROT_KEY = $(BUILD_PLAT)/rot_key.pem
ROTPK_HASH = $(BUILD_PLAT)/rotpk_sha256.bin ROTPK_HASH = $(BUILD_PLAT)/rotpk_sha256.bin
...@@ -93,9 +97,9 @@ BL1_SOURCES += drivers/io/io_semihosting.c \ ...@@ -93,9 +97,9 @@ BL1_SOURCES += drivers/io/io_semihosting.c \
drivers/io/io_memmap.c \ drivers/io/io_memmap.c \
lib/semihosting/semihosting.c \ lib/semihosting/semihosting.c \
lib/semihosting/${ARCH}/semihosting_call.S \ lib/semihosting/${ARCH}/semihosting_call.S \
plat/qemu/qemu_io_storage.c \ ${PLAT_QEMU_COMMON_PATH}/qemu_io_storage.c \
plat/qemu/${ARCH}/plat_helpers.S \ ${PLAT_QEMU_COMMON_PATH}/${ARCH}/plat_helpers.S \
plat/qemu/qemu_bl1_setup.c ${PLAT_QEMU_COMMON_PATH}/qemu_bl1_setup.c
ifeq (${ARM_ARCH_MAJOR},8) ifeq (${ARM_ARCH_MAJOR},8)
BL1_SOURCES += lib/cpus/aarch64/aem_generic.S \ BL1_SOURCES += lib/cpus/aarch64/aem_generic.S \
...@@ -110,13 +114,13 @@ BL2_SOURCES += drivers/io/io_semihosting.c \ ...@@ -110,13 +114,13 @@ BL2_SOURCES += drivers/io/io_semihosting.c \
drivers/io/io_fip.c \ drivers/io/io_fip.c \
drivers/io/io_memmap.c \ drivers/io/io_memmap.c \
lib/semihosting/semihosting.c \ lib/semihosting/semihosting.c \
lib/semihosting/${ARCH}/semihosting_call.S\ lib/semihosting/${ARCH}/semihosting_call.S \
plat/qemu/qemu_io_storage.c \ ${PLAT_QEMU_COMMON_PATH}/qemu_io_storage.c \
plat/qemu/${ARCH}/plat_helpers.S \ ${PLAT_QEMU_COMMON_PATH}/${ARCH}/plat_helpers.S \
plat/qemu/qemu_bl2_setup.c \ ${PLAT_QEMU_COMMON_PATH}/qemu_bl2_setup.c \
${PLAT_QEMU_COMMON_PATH}/qemu_bl2_mem_params_desc.c \
${PLAT_QEMU_COMMON_PATH}/qemu_image_load.c \
common/fdt_fixup.c \ common/fdt_fixup.c \
plat/qemu/qemu_bl2_mem_params_desc.c \
plat/qemu/qemu_image_load.c \
common/desc_image_load.c common/desc_image_load.c
ifeq ($(add-lib-optee),yes) ifeq ($(add-lib-optee),yes)
...@@ -127,13 +131,13 @@ QEMU_GICV2_SOURCES := drivers/arm/gic/v2/gicv2_helpers.c \ ...@@ -127,13 +131,13 @@ QEMU_GICV2_SOURCES := drivers/arm/gic/v2/gicv2_helpers.c \
drivers/arm/gic/v2/gicv2_main.c \ drivers/arm/gic/v2/gicv2_main.c \
drivers/arm/gic/common/gic_common.c \ drivers/arm/gic/common/gic_common.c \
plat/common/plat_gicv2.c \ plat/common/plat_gicv2.c \
plat/qemu/qemu_gicv2.c ${PLAT_QEMU_COMMON_PATH}/qemu_gicv2.c
QEMU_GICV3_SOURCES := drivers/arm/gic/v3/gicv3_helpers.c \ QEMU_GICV3_SOURCES := drivers/arm/gic/v3/gicv3_helpers.c \
drivers/arm/gic/v3/gicv3_main.c \ drivers/arm/gic/v3/gicv3_main.c \
drivers/arm/gic/common/gic_common.c \ drivers/arm/gic/common/gic_common.c \
plat/common/plat_gicv3.c \ plat/common/plat_gicv3.c \
plat/qemu/qemu_gicv3.c ${PLAT_QEMU_COMMON_PATH}/qemu_gicv3.c
ifeq (${QEMU_USE_GIC_DRIVER}, QEMU_GICV2) ifeq (${QEMU_USE_GIC_DRIVER}, QEMU_GICV2)
QEMU_GIC_SOURCES := ${QEMU_GICV2_SOURCES} QEMU_GIC_SOURCES := ${QEMU_GICV2_SOURCES}
...@@ -148,10 +152,10 @@ BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \ ...@@ -148,10 +152,10 @@ BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \
lib/cpus/aarch64/cortex_a53.S \ lib/cpus/aarch64/cortex_a53.S \
lib/cpus/aarch64/cortex_a57.S \ lib/cpus/aarch64/cortex_a57.S \
plat/common/plat_psci_common.c \ plat/common/plat_psci_common.c \
plat/qemu/qemu_pm.c \ ${PLAT_QEMU_COMMON_PATH}/qemu_pm.c \
plat/qemu/topology.c \ ${PLAT_QEMU_COMMON_PATH}/topology.c \
plat/qemu/aarch64/plat_helpers.S \ ${PLAT_QEMU_COMMON_PATH}/aarch64/plat_helpers.S \
plat/qemu/qemu_bl31_setup.c \ ${PLAT_QEMU_COMMON_PATH}/qemu_bl31_setup.c \
${QEMU_GIC_SOURCES} ${QEMU_GIC_SOURCES}
endif endif
...@@ -167,7 +171,7 @@ endif ...@@ -167,7 +171,7 @@ endif
SEPARATE_CODE_AND_RODATA := 1 SEPARATE_CODE_AND_RODATA := 1
ENABLE_STACK_PROTECTOR := 0 ENABLE_STACK_PROTECTOR := 0
ifneq ($(ENABLE_STACK_PROTECTOR), 0) ifneq ($(ENABLE_STACK_PROTECTOR), 0)
PLAT_BL_COMMON_SOURCES += plat/qemu/qemu_stack_protector.c PLAT_BL_COMMON_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_stack_protector.c
endif endif
BL32_RAM_LOCATION := tdram BL32_RAM_LOCATION := tdram
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment