[PATCH master 01/23] habv4: use DMA-capable memory for getting event from BootROM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We pass the buffer to the BootROM and we aren't sure yet whether this
requires us to do cache maintenance[1].

Anyhow, it's a tiny bit better to at least have cache line alignment for
data exchanged with TF-A and the BootROM, so do that.

[1]: https://lists.trustedfirmware.org/archives/list/tf-a@xxxxxxxxxxxxxxxxxxxxxxxxx/message/D3PIAW7G2B3JQIH5BGMUZZKHPGNMXUUT/

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/hab/habv4.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
index a1d823ed2512..0f5618116e22 100644
--- a/drivers/hab/habv4.c
+++ b/drivers/hab/habv4.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <types.h>
 #include <mmu.h>
+#include <dma.h>
 #include <zero_page.h>
 #include <linux/sizes.h>
 #include <linux/arm-smccc.h>
@@ -581,7 +582,7 @@ static uint8_t *hab_get_event(const struct habv4_rvt *rvt, int index, size_t *le
 	if (err != HAB_STATUS_SUCCESS)
 		return NULL;
 
-	buf = malloc(*len);
+	buf = dma_alloc(*len);
 	if (!buf)
 		return NULL;
 
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux