summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJimmy Huang <jimmy.huang@mediatek.com>2015-06-16 12:18:50 +0800
committerPatrick Georgi <pgeorgi@google.com>2015-12-03 14:16:43 +0100
commit9b423a77d171a7f18ef0eb6bb98daf56eeb1da62 (patch)
treefd07d94b8c97e6e0a198e42b30dfb580bae565a2 /src
parent03688ec1da056d4b82bf40053cc9674ff9170822 (diff)
downloadcoreboot-9b423a77d171a7f18ef0eb6bb98daf56eeb1da62.tar.xz
arch/arm64: add DMA_COHERENT region macros to memlayout
BRANCH=none BUG=none TEST=build pass Change-Id: Ia997ce97ad42234ab020af7bd007d57d7191ee86 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 604ac738e33fdfbaf093989ea13162c8506b9360 Original-Change-Id: I636a1a38d0f5af97926d4446f3edb91a359cce4c Original-Signed-off-by: Jimmy Huang <jimmy.huang@mediatek.com> Original-Reviewed-on: https://chromium-review.googlesource.com/292551 Original-Commit-Ready: Yidi Lin <yidi.lin@mediatek.com> Original-Tested-by: Yidi Lin <yidi.lin@mediatek.com> Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/12584 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/arch/arm64/include/arch/memlayout.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/arm64/include/arch/memlayout.h b/src/arch/arm64/include/arch/memlayout.h
index 0bd0835aa8..ac09934019 100644
--- a/src/arch/arm64/include/arch/memlayout.h
+++ b/src/arch/arm64/include/arch/memlayout.h
@@ -22,6 +22,11 @@
REGION(ttb, addr, size, 4K) \
_ = ASSERT(size % 4K == 0, "TTB size must be divisible by 4K!");
+#define DMA_COHERENT(addr, size) \
+ REGION(dma_coherent, addr, size, 4K) \
+ _ = ASSERT(size % 4K == 0, \
+ "DMA buffer should be multiple of smallest page size (4K)!");
+
/* ARM64 stacks need 16-byte alignment. */
#define STACK(addr, size) \
REGION(stack, addr, size, 16) \