avb_verify: support sandbox configuration
authorJens Wiklander <jens.wiklander@linaro.org>
Tue, 25 Sep 2018 14:40:22 +0000 (16:40 +0200)
committerTom Rini <trini@konsulko.com>
Sun, 7 Oct 2018 15:07:26 +0000 (11:07 -0400)
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@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/avb_verify.h

index a532a2331aea9a6c03d2cb42420546593bbe363d..18278f829e41c7c2c8e0cfc1018e225c6374936c 100644 (file)
@@ -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)