summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm64/Makefile.mk1
-rw-r--r--src/arch/arm64/dma.c9
-rw-r--r--src/arch/ppc64/include/arch/hlt.h5
-rw-r--r--src/arch/riscv/include/arch/hlt.h5
-rw-r--r--src/arch/x86/Makefile.mk1
-rw-r--r--src/arch/x86/dma.c8
6 files changed, 29 insertions, 0 deletions
diff --git a/src/arch/arm64/Makefile.mk b/src/arch/arm64/Makefile.mk
index 538d254ace..2986397e51 100644
--- a/src/arch/arm64/Makefile.mk
+++ b/src/arch/arm64/Makefile.mk
@@ -119,6 +119,7 @@ ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += bl31.c
ramstage-y += transition.c transition_asm.S
ramstage-$(CONFIG_PAYLOAD_FIT_SUPPORT) += fit_payload.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
+ramstage-y += dma.c
rmodules_arm64-y += memset.S
rmodules_arm64-y += memcpy.S
diff --git a/src/arch/arm64/dma.c b/src/arch/arm64/dma.c
new file mode 100644
index 0000000000..cdeb50fa09
--- /dev/null
+++ b/src/arch/arm64/dma.c
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <console/console.h>
+#include <stdlib.h>
+
+int dma_coherent(const void *ptr)
+{
+ return 0;
+}
diff --git a/src/arch/ppc64/include/arch/hlt.h b/src/arch/ppc64/include/arch/hlt.h
index 397b3ccfbb..2839805f21 100644
--- a/src/arch/ppc64/include/arch/hlt.h
+++ b/src/arch/ppc64/include/arch/hlt.h
@@ -1,7 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef ARCH_HLT_H
+#define ARCH_HLT_H
+
static __always_inline void hlt(void)
{
while (1)
;
}
+
+#endif /* ARCH_HLT_H */
diff --git a/src/arch/riscv/include/arch/hlt.h b/src/arch/riscv/include/arch/hlt.h
index bdefbb5de7..b2643fdfdf 100644
--- a/src/arch/riscv/include/arch/hlt.h
+++ b/src/arch/riscv/include/arch/hlt.h
@@ -1,6 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef ARCH_HLT_H
+#define ARCH_HLT_H
+
static __always_inline void hlt(void)
{
while (1);
}
+
+#endif /* ARCH_HLT_H */
diff --git a/src/arch/x86/Makefile.mk b/src/arch/x86/Makefile.mk
index 04a0e58dbf..19945465bc 100644
--- a/src/arch/x86/Makefile.mk
+++ b/src/arch/x86/Makefile.mk
@@ -261,6 +261,7 @@ ramstage-y += ebda.c
ramstage-y += exception.c
ramstage-y += idt.S
ramstage-$(CONFIG_IOAPIC) += ioapic.c
+ramstage-y += dma.c
ramstage-y += memcpy.c
ramstage-$(CONFIG_ARCH_RAMSTAGE_X86_32) += memmove_32.c
ramstage-$(CONFIG_ARCH_RAMSTAGE_X86_64) += memmove_64.S
diff --git a/src/arch/x86/dma.c b/src/arch/x86/dma.c
new file mode 100644
index 0000000000..b39ac2ce30
--- /dev/null
+++ b/src/arch/x86/dma.c
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <stdlib.h>
+
+int dma_coherent(const void *ptr)
+{
+ return 1;
+}