[U-Boot] [PATCH v4 18/19] avb_verify: support sandbox configuration

Jens Wiklander jens.wiklander at linaro.org
Tue Sep 25 14:40:22 UTC 2018


Change get_sector_buf() to use map_sysmem() to get a pointer to the
CONFIG_FASTBOOT_BUF_ADDR in memory.

Signed-off-by: Jens Wiklander <jens.wiklander at linaro.org>
---
 include/avb_verify.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/avb_verify.h b/include/avb_verify.h
index a532a2331aea..18278f829e41 100644
--- a/include/avb_verify.h
+++ b/include/avb_verify.h
@@ -9,6 +9,7 @@
 #define _AVB_VERIFY_H
 
 #include <../lib/libavb/libavb.h>
+#include <mapmem.h>
 #include <mmc.h>
 
 #define AVB_MAX_ARGS			1024
@@ -76,7 +77,7 @@ static inline size_t get_sector_buf_size(void)
 
 static inline void *get_sector_buf(void)
 {
-	return (void *)CONFIG_FASTBOOT_BUF_ADDR;
+	return map_sysmem(CONFIG_FASTBOOT_BUF_ADDR, CONFIG_FASTBOOT_BUF_SIZE);
 }
 
 static inline bool is_buf_unaligned(void *buffer)
-- 
2.17.1



More information about the U-Boot mailing list