From patchwork Fri May 3 22:02:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 10929331 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AE3801395 for ; Fri, 3 May 2019 22:13:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B32D287D1 for ; Fri, 3 May 2019 22:13:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C0DD287D3; Fri, 3 May 2019 22:13:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D5EF6287D1 for ; Fri, 3 May 2019 22:13:13 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 260E81743; Sat, 4 May 2019 00:12:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 260E81743 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1556921592; bh=Cq1/viddN/Hq6htgdLkG5xx5xQNNnscL4r6Xz+EMj2U=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PXiF0J9NYF11UnHcQbmmizthOwXtdQvY2WuwnQcYcnyV7bxccSPsxP8ZMhh4F2bU6 BdEQgnFFTSiZgZ8j6YHbTK30aLTJsDjN3jXtlR2uic7+YERi0XaRbzp8iG2vTQWG80 uvAMtpSaVy2GPyHu46sETPwh/GuRgcVYoUmQY8O8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2A3A6F8976E; Sat, 4 May 2019 00:03:52 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7819EF8974B; Sat, 4 May 2019 00:03:20 +0200 (CEST) Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D20C5F89731 for ; Sat, 4 May 2019 00:03:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D20C5F89731 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="KH+5ig0D" Received: by mail-pg1-x542.google.com with SMTP id n2so3327177pgg.13 for ; Fri, 03 May 2019 15:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9gD0rOjpw9ms8AskrbFlvCfQcUbKxm7TEx3UNlNN04U=; b=KH+5ig0DFc1zTwYKNJYOfHBjhc2PDb4Cds1wnM6NJoj1pelSlCwD/PCI21VlyaKWeJ WBphiyOpclP72T09Qs/LHN9XCItuX2i3ZLjMOvbJRxd9GWum9L7g5DWHl98Vbr0P2SMq vrgaz8+K8v6/032e198xX5xM0XwAzfnEb13YI= 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:mime-version:content-transfer-encoding; bh=9gD0rOjpw9ms8AskrbFlvCfQcUbKxm7TEx3UNlNN04U=; b=ArYJIEMYFoBQCgIQQK8g94QmcR4p9oTuowbTR6RyHeO51YkFET9QR1BQCgTY2nGpV8 6s8TzHodiMajD61ZFi5N8yBwO7NlR7lYl3ecPbhP7IpGZl621MRfefPOSRJzEMGAIlgO HvQ44LRc79bbbumMLYGofyhF/BhdX6qSmBxeG/fQ60r1yO5VqiB8TroVFap896D+Z+I/ 3RV35frSFUMb7bxoYfQxkluyeqN8NmnDBqz1LZl4B5WVXFd1oemmpxVSb4uNJjORlYWP SsxMboO4e0tNXMVQJ8s++Ac64yBmT6Z0toBEYBOFmT9xswcoGNzisdbRwh3BtFqcl1pS zvOA== X-Gm-Message-State: APjAAAUlLN0SLZ6WB4jz3PiGQVUloHKJZLonIJmMtu/SR3QPq9/Kgneo QuF32xbh8tjXZEzHoTYYelLlMg== X-Google-Smtp-Source: APXvYqwRZYTa/D/WqinOmvSIQQW6Xl5SMl55y+eG88O+PeZB5rLTHyfZLrobLweqWzUamBC3Cj9fRQ== X-Received: by 2002:aa7:9085:: with SMTP id i5mr11520540pfa.209.1556920984859; Fri, 03 May 2019 15:03:04 -0700 (PDT) Received: from localhost ([2620:15c:202:1:3c8f:512b:3522:dfaf]) by smtp.gmail.com with ESMTPSA id f22sm3884355pgv.45.2019.05.03.15.03.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 May 2019 15:03:04 -0700 (PDT) From: Gwendal Grignou To: enric.balletbo@collabora.com, bleung@chromium.org, groeck@chromium.org, lee.jones@linaro.org, jic23@kernel.org, broonie@kernel.org, cychiang@chromium.org, tiwai@suse.com Date: Fri, 3 May 2019 15:02:16 -0700 Message-Id: <20190503220233.64546-14-gwendal@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog In-Reply-To: <20190503220233.64546-1-gwendal@chromium.org> References: <20190503220233.64546-1-gwendal@chromium.org> MIME-Version: 1.0 Cc: linux-iio@vger.kernel.org, alsa-devel@alsa-project.org, Gwendal Grignou Subject: [alsa-devel] [PATCH v2 13/30] mfd: cros_ec: Expand hash API X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP Improve API to verify EC image signature. Acked-by: Enric Balletbo i Serra Signed-off-by: Gwendal Grignou --- include/linux/mfd/cros_ec_commands.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h index d55f155eb735..29a996832af0 100644 --- a/include/linux/mfd/cros_ec_commands.h +++ b/include/linux/mfd/cros_ec_commands.h @@ -1988,8 +1988,15 @@ enum ec_vboot_hash_status { * If one of these is specified, the EC will automatically update offset and * size to the correct values for the specified image (RO or RW). */ -#define EC_VBOOT_HASH_OFFSET_RO 0xfffffffe -#define EC_VBOOT_HASH_OFFSET_RW 0xfffffffd +#define EC_VBOOT_HASH_OFFSET_RO 0xfffffffe +#define EC_VBOOT_HASH_OFFSET_ACTIVE 0xfffffffd +#define EC_VBOOT_HASH_OFFSET_UPDATE 0xfffffffc + +/* + * 'RW' is vague if there are multiple RW images; we mean the active one, + * so the old constant is deprecated. + */ +#define EC_VBOOT_HASH_OFFSET_RW EC_VBOOT_HASH_OFFSET_ACTIVE /*****************************************************************************/ /*