diff options
| author | Yann Gautier <yann.gautier@st.com> | 2026-06-23 13:39:04 +0200 |
|---|---|---|
| committer | Yann Gautier <yann.gautier@st.com> | 2026-06-26 13:12:51 +0200 |
| commit | cbeb10011548ea3ed1a0104a6b61e7c5f3583d65 (patch) | |
| tree | 19b190290fb2ba6382805db8a601e524ad297a80 | |
| parent | 05087afeda3d1273d494f20353cfa0f3398c61d4 (diff) | |
| download | arm-trusted-firmware-cbeb10011548ea3ed1a0104a6b61e7c5f3583d65.tar.gz arm-trusted-firmware-cbeb10011548ea3ed1a0104a6b61e7c5f3583d65.zip | |
feat(arm): add stubs for PCI SVC functions
After putting the management of SMC_PCI_SUPPORT in Makefile, there is a
link error when compiling fvp platform with SMC_PCI_SUPPORT=1 in build
command line.
The issue was hidden by the fact that with the previous behavior, the
SMC_PCI_SUPPORT was only enabled in makefiles, and not in C files. And
then pci_smc_handler() was compiled but never used, and then dropped
during the link.
When putting SMC_PCI_SUPPORT flag management in Makefile with eval call
add_defines, this is no more the case. The functions called in the file
services/std_svc/pci_svc.c should then exist.
Create a new file plat/arm/common/arm_pci_svc.c that just stub the
required interfaces.
Change-Id: I68e7d32c80a17bb32486163f2dee59394c9877a1
Signed-off-by: Yann Gautier <yann.gautier@st.com>
| -rw-r--r-- | plat/arm/common/arm_common.mk | 8 | ||||
| -rw-r--r-- | plat/arm/common/arm_pci_svc.c | 44 |
2 files changed, 52 insertions, 0 deletions
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; +} |
