diff mbox series

[v4,18/19] avb_verify: support sandbox configuration

Message ID 20180925144023.24555-19-jens.wiklander@linaro.org
State Accepted
Commit bbddbef998b9bb37917c9340ac5280d06d224703
Headers show
Series AVB using OP-TEE | expand

Commit Message

Jens Wiklander Sept. 25, 2018, 2:40 p.m. UTC
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>

---
 include/avb_verify.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.17.1

Comments

Simon Glass Oct. 2, 2018, 11:21 a.m. UTC | #1
On 25 September 2018 at 07:40, Jens Wiklander <jens.wiklander@linaro.org> wrote:
> 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>
> ---
>  include/avb_verify.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini Oct. 8, 2018, 1:41 a.m. UTC | #2
On Tue, Sep 25, 2018 at 04:40:22PM +0200, Jens Wiklander wrote:

> 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>


Applied to u-boot/master, thanks!

-- 
Tom
diff mbox series

Patch

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)