summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoyan Karatotev <boyan.karatotev@arm.com>2026-06-26 11:50:33 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2026-06-26 11:50:33 +0000
commit0ff6f48335d66e69cfdc42bb9c4d49a43b819bfc (patch)
tree19b190290fb2ba6382805db8a601e524ad297a80
parent347d1c1641384d891716e7528992158228b5fd07 (diff)
parentcbeb10011548ea3ed1a0104a6b61e7c5f3583d65 (diff)
downloadarm-trusted-firmware-0ff6f48335d66e69cfdc42bb9c4d49a43b819bfc.tar.gz
arm-trusted-firmware-0ff6f48335d66e69cfdc42bb9c4d49a43b819bfc.zip
Merge changes I68e7d32c,I0e9d4a08,I50e0af50,I142fd03c,I2d1ea919, ... into integration
* changes: feat(arm): add stubs for PCI SVC functions fix(smccc): initialize ret for SMC_PCI_READ refactor(rpi): remove add_define `SMC_PCI_SUPPORT` fix(build): move `SMC_PCI_SUPPORT` flag management to Makefile fix(build): move `USE_GIC_DRIVER` flag management in Makefile fix(sdei): move `SDEI_SUPPORT` flag management in Makefile
-rw-r--r--Makefile6
-rw-r--r--bl31/bl31.mk2
-rw-r--r--drivers/arm/gic/gic.mk6
-rw-r--r--plat/arm/common/arm_common.mk8
-rw-r--r--plat/arm/common/arm_pci_svc.c44
-rw-r--r--plat/rpi/rpi4/platform.mk1
-rw-r--r--plat/rpi/rpi5/platform.mk1
-rw-r--r--services/std_svc/pci_svc.c2
8 files changed, 60 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index d32a9798a..0d092368c 100644
--- a/Makefile
+++ b/Makefile
@@ -653,6 +653,8 @@ $(eval $(call assert_booleans,\
LFA_SUPPORT \
SUPPORT_SP_LIVE_ACTIVATION \
TEST_IO_SHORT_READ_FI \
+ SDEI_SUPPORT \
+ SMC_PCI_SUPPORT \
)))
# Numeric_Flags
@@ -738,6 +740,7 @@ $(eval $(call assert_numerics,\
IMPDEF_SYSREG_TRAP \
W \
TEST_IO_SHORT_READ_FI_IMAGE_ID \
+ USE_GIC_DRIVER \
)))
ifdef KEY_SIZE
@@ -936,6 +939,9 @@ $(eval $(call add_defines,\
SUPPORT_SP_LIVE_ACTIVATION \
TEST_IO_SHORT_READ_FI \
TEST_IO_SHORT_READ_FI_IMAGE_ID \
+ SDEI_SUPPORT \
+ USE_GIC_DRIVER \
+ SMC_PCI_SUPPORT \
)))
ifeq (${PLATFORM_REPORT_CTX_MEM_USE}, 1)
diff --git a/bl31/bl31.mk b/bl31/bl31.mk
index 69c348f9a..3a645d014 100644
--- a/bl31/bl31.mk
+++ b/bl31/bl31.mk
@@ -243,7 +243,6 @@ $(eval $(call assert_booleans,\
CRASH_REPORTING \
EL3_EXCEPTION_HANDLING \
FIRME_SUPPORT \
- SDEI_SUPPORT \
USE_DSU_DRIVER \
)))
@@ -257,7 +256,6 @@ $(eval $(call add_defines,\
$(sort \
CRASH_REPORTING \
EL3_EXCEPTION_HANDLING \
- SDEI_SUPPORT \
USE_DSU_DRIVER \
FIRME_SUPPORT \
)))
diff --git a/drivers/arm/gic/gic.mk b/drivers/arm/gic/gic.mk
index 8b28f219b..a79537f5f 100644
--- a/drivers/arm/gic/gic.mk
+++ b/drivers/arm/gic/gic.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2025, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2025-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -38,7 +38,3 @@ BL31_SOURCES += ${GIC_SOURCES}
else
BL32_SOURCES += ${GIC_SOURCES}
endif
-
-$(eval $(call add_defines,\
- USE_GIC_DRIVER \
-))
diff --git a/plat/arm/common/arm_common.mk b/plat/arm/common/arm_common.mk
index c5ea6b0bc..ba171015a 100644
--- a/plat/arm/common/arm_common.mk
+++ b/plat/arm/common/arm_common.mk
@@ -359,10 +359,18 @@ BL31_SOURCES += plat/arm/common/aarch64/execution_state_switch.c\
plat/arm/common/arm_sip_svc_validation.c \
plat/arm/common/plat_arm_sip_svc.c \
${ARM_SVC_HANDLER_SRCS}
+
+ifeq ($(SMC_PCI_SUPPORT), 1)
+BL31_SOURCES += plat/arm/common/arm_pci_svc.c
+endif
else
BL32_SOURCES += plat/arm/common/arm_sip_svc.c \
plat/arm/common/plat_arm_sip_svc.c \
${ARM_SVC_HANDLER_SRCS}
+
+ifeq ($(SMC_PCI_SUPPORT), 1)
+BL32_SOURCES += plat/arm/common/arm_pci_svc.c
+endif
endif
endif
diff --git a/plat/arm/common/arm_pci_svc.c b/plat/arm/common/arm_pci_svc.c
new file mode 100644
index 000000000..879910b28
--- /dev/null
+++ b/plat/arm/common/arm_pci_svc.c
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2026, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdint.h>
+
+#include <services/pci_svc.h>
+
+uint32_t pci_read_config(uint32_t addr, uint32_t off, uint32_t sz, uint32_t *val)
+{
+ uint32_t ret = SMC_PCI_CALL_SUCCESS;
+
+ (void)addr;
+ (void)off;
+ (void)sz;
+ (void)val;
+
+ return ret;
+}
+
+uint32_t pci_write_config(uint32_t addr, uint32_t off, uint32_t sz, uint32_t val)
+{
+ uint32_t ret = SMC_PCI_CALL_SUCCESS;
+
+ (void)addr;
+ (void)off;
+ (void)sz;
+ (void)val;
+
+ return ret;
+}
+
+uint32_t pci_get_bus_for_seg(uint32_t seg, uint32_t *bus_range, uint32_t *nseg)
+{
+ uint32_t ret = SMC_PCI_CALL_SUCCESS;
+
+ (void)seg;
+ (void)bus_range;
+ (void)nseg;
+
+ return ret;
+}
diff --git a/plat/rpi/rpi4/platform.mk b/plat/rpi/rpi4/platform.mk
index 9519087b9..3f0775c65 100644
--- a/plat/rpi/rpi4/platform.mk
+++ b/plat/rpi/rpi4/platform.mk
@@ -102,7 +102,6 @@ $(eval $(call add_define,RPI3_PRELOADED_DTB_BASE))
endif
$(eval $(call add_define,RPI3_RUNTIME_UART))
$(eval $(call add_define,RPI3_USE_UEFI_MAP))
-$(eval $(call add_define,SMC_PCI_SUPPORT))
ifeq (${ARCH},aarch32)
$(error Error: AArch32 not supported on rpi4)
diff --git a/plat/rpi/rpi5/platform.mk b/plat/rpi/rpi5/platform.mk
index 7346c9a44..2f6d386a0 100644
--- a/plat/rpi/rpi5/platform.mk
+++ b/plat/rpi/rpi5/platform.mk
@@ -101,7 +101,6 @@ $(eval $(call add_define,RPI3_PRELOADED_DTB_BASE))
endif
$(eval $(call add_define,RPI3_RUNTIME_UART))
$(eval $(call add_define,RPI3_USE_UEFI_MAP))
-$(eval $(call add_define,SMC_PCI_SUPPORT))
ifeq (${ARCH},aarch32)
$(error Error: AArch32 not supported on rpi5)
diff --git a/services/std_svc/pci_svc.c b/services/std_svc/pci_svc.c
index a02b8a745..5d7eac433 100644
--- a/services/std_svc/pci_svc.c
+++ b/services/std_svc/pci_svc.c
@@ -68,7 +68,7 @@ uint64_t pci_smc_handler(uint32_t smc_fid,
}
break;
case SMC_PCI_READ: {
- uint32_t ret;
+ uint32_t ret = 0U;
if (validate_rw_addr_sz(x1, x2, x3) != SMC_PCI_CALL_SUCCESS) {
SMC_RET2(handle, SMC_PCI_CALL_INVAL_PARAM, 0U);