From patchwork Tue Sep 25 14:40:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 147483 Delivered-To: patches@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp812835lji; Tue, 25 Sep 2018 07:40:56 -0700 (PDT) X-Received: by 2002:a2e:c3:: with SMTP id e64-v6mr705728lji.103.1537886456761; Tue, 25 Sep 2018 07:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537886456; cv=none; d=google.com; s=arc-20160816; b=XPuVV74rX/xjOz6oyVzoYpmvRgnVVtjtph05RW9nPT6pS2Nk1lXLLuqViUuWKzHwvJ n7HWOUJ06IybH28RlUBIrXN7Pt+WC2vAcABdUijbFP6ITcu0BVVJubxkHrmQaDRIGCdp WOGQQ1mZSvC+1NaSNyKviZBrWjIDZWr01lQIwr8T2RexKPeUT/K6UBsCEWZyNPSmaNNj /TT4JMteqN0uXZoyAlCmGRGGRjZ1aKaFxUjbO/gTxuswRWfSWeqNOca1vPFdyRBzNnEF ccjnlHURA+Q32Vfel/qJ8VOzrga4ZLZBKfJYrpWXSDVqzaC8gGzZAsfVlof2yK0kEjAW hnhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pHtCHlZoKRRyAYTbXNZIIP/Z56rbp5fXLxMqu4lNoRE=; b=bH0vpoRvw3g0npDAL73KOa5sPxPEkBWZRjUAGf284B2QhJX6aX9OaqC3DKrgXrMpuN bMVBqnu38HxqRtLqzF5KsBwc8OkwuhFcOTg5mCOcZwRPSWz9BNTiaCeLV8dp2tMRCy5/ ymYFqEypQbAoztgAq4TBe/jI6pIf24OP4m2IAi95XNXvRKEYnNjkUCxoYx3mKDBxgCR9 ejUc3C6I/D3gyTQZEdG00DeCrtWpolxJJPV3Dl+rY//U4cCMbhDOWCbFlBRdOWPXk4cg If+wtI0+QCJhVp5sj4HewBPmc9jcxeOq1FapfG5MsFBkdahaeNkQkNlJ77HI/U4/dzt/ zL1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D5lDQb32; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id s10-v6sor1615787ljd.14.2018.09.25.07.40.56 for (Google Transport Security); Tue, 25 Sep 2018 07:40:56 -0700 (PDT) Received-SPF: pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D5lDQb32; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pHtCHlZoKRRyAYTbXNZIIP/Z56rbp5fXLxMqu4lNoRE=; b=D5lDQb323FQHD9p6n9ytqHzidu6Va5Q5ypVhQFs0zST3NHhYolg+DiIBScCF6JPTKS DRclCJTRBEZWQBgWTKH5I7SSW4sQ51Iwva+eWP1TPqubz/7cPtcRGlpiJyjnYdNvnqzN gIzEMHidwcvanV2VHDuseiErOyUyZ7dVwyx50= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pHtCHlZoKRRyAYTbXNZIIP/Z56rbp5fXLxMqu4lNoRE=; b=fVdRqMSL6i1LJsd7QfGOB1SVZlHBTPD54HpL6k6KewwxJg4kk2CZLFhyEOxF4+zgp+ dqzAEnBAySDpOv4X3ZNu5jvX8z9wayJaX+vDUFuTmnUMFKvUPpt232oPrTVJ8y8AYSX/ dqNXIHcB+Crvnakj41lMpLDaA9zH0hL5KFjLA6aRxOqUmBrOZNYW2KJARrNPgeTRdI+b LqLyTJt//OXQFhDoy2dkoPgsWTT8pVDuSGzoApTEz1+WSaBpT4k7NKx2B/qfv8jPMFtu GlClXC8fO0RwLTAjRyL4jfem3kOHfKk2JVSwR/Bjnn312liESEQ1xAEk0h2D62qQEM3m 0otQ== X-Gm-Message-State: ABuFfojndNd8A4aIH53Pczw1zyUJ9FQR02H84Ux6DMrlIWZNrbNFHViK tchU2kXDsgwqsbKOVLHwSIK7Rvc1 X-Google-Smtp-Source: ACcGV61s4WAvatUCiFjtH4vjMT2Lf/R4STRAVNCSzzHgOuou2Qnkf3maXDbprRo8fC97caItylyiFQ== X-Received: by 2002:a2e:4401:: with SMTP id r1-v6mr1199267lja.21.1537886456435; Tue, 25 Sep 2018 07:40:56 -0700 (PDT) Return-Path: Received: from jax.urgonet (h-84-105.A175.priv.bahnhof.se. [79.136.84.105]) by smtp.gmail.com with ESMTPSA id g14-v6sm14483lja.96.2018.09.25.07.40.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 07:40:55 -0700 (PDT) From: Jens Wiklander To: u-boot@lists.denx.de Cc: Simon Glass , Igor Opaniuk , Tom Rini , Jaehoon Chung , Pierre Aubert , Albert Aribaud , Peter Griffin , Michal Simek , Jens Wiklander Subject: [PATCH v4 18/19] avb_verify: support sandbox configuration Date: Tue, 25 Sep 2018 16:40:22 +0200 Message-Id: <20180925144023.24555-19-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180925144023.24555-1-jens.wiklander@linaro.org> References: <20180925144023.24555-1-jens.wiklander@linaro.org> 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 --- include/avb_verify.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Simon Glass 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 #include #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)