From patchwork Thu May 9 21:13:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 10937749 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 04DED76 for ; Thu, 9 May 2019 21:14:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAE1D287E7 for ; Thu, 9 May 2019 21:14:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEB27289F4; Thu, 9 May 2019 21:14:25 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86CBD287E7 for ; Thu, 9 May 2019 21:14:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727255AbfEIVOY (ORCPT ); Thu, 9 May 2019 17:14:24 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43927 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727258AbfEIVOX (ORCPT ); Thu, 9 May 2019 17:14:23 -0400 Received: by mail-pf1-f193.google.com with SMTP id c6so1943106pfa.10 for ; Thu, 09 May 2019 14:14:22 -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=y0IPEAAZhLi1gys+2LirQge8UODqrAqbS/22Qm4bF1s=; b=cH+VBwgKsOunqPxtWlu1VRhFgLfNjKBoEnzFUBNyyHA8/Q8GAPqkdWGZXT5t4vH9V2 G7V2bOhe0nuB+Dqyq7vpAWNVFoM6BhSlslYT1S/UqsnkcFDQjGsa+iOhjVOkVaVJsyBu POIUoG2DRasIPlM2Ukm0TaLG42f5fSOJ30za0= 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=y0IPEAAZhLi1gys+2LirQge8UODqrAqbS/22Qm4bF1s=; b=nmt8ztMo5VpuOcfOadbOfm9WjO1IGLDZy8em2BdOriOATPOncOY/MSVvmOyggXq9fI 1aNZu01nFjKVgHOsO6f/AMAfS5gbFVTx9vUqe0DoX9juqE5GayaypasuPyS35o/ZaJfy 22f9R1REpveVjAaZz4jeKERuKqoN0O54uw9PeB8WmJtSpNGXFiLY//auqF1lI0AqAwm/ 4IHzAWCzlJwq1ntVniemG8JOryNjzkfxaCv6vRN8PlxAbZhnTFyJvkVTfbKik4Tcp1O5 WMQU5sfK04Wv0OtlcQK8wiOLqSkaCUdJhhKqTvuDRfTWC+ltxhdUwgsstjDAD1gVuP3K t2kQ== X-Gm-Message-State: APjAAAXe/87+xxUQzgId5XOu8X77fNuVCdOutyQp+3SUl2CQ9hWz+FQw zCJyfvwDZVqagAJ99AL5rBYkvw== X-Google-Smtp-Source: APXvYqyE6f1XisQgbEH3d5hrLdGWQVIy/zvCRIyERSNmqjO7MmtzNljBiI83zTxtJqG/PDRN7/ThIQ== X-Received: by 2002:a62:4c5:: with SMTP id 188mr8667284pfe.29.1557436462597; Thu, 09 May 2019 14:14:22 -0700 (PDT) Received: from localhost ([2620:15c:202:1:3c8f:512b:3522:dfaf]) by smtp.gmail.com with ESMTPSA id g2sm4443402pfd.134.2019.05.09.14.14.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 14:14:22 -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 Cc: linux-iio@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Gwendal Grignou Subject: [PATCH v3 13/30] mfd: cros_ec: Expand hash API Date: Thu, 9 May 2019 14:13:36 -0700 Message-Id: <20190509211353.213194-14-gwendal@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog In-Reply-To: <20190509211353.213194-1-gwendal@chromium.org> References: <20190509211353.213194-1-gwendal@chromium.org> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Improve API to verify EC image signature. Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung 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 0ff1941288cf..76943e64998a 100644 --- a/include/linux/mfd/cros_ec_commands.h +++ b/include/linux/mfd/cros_ec_commands.h @@ -2018,8 +2018,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 /*****************************************************************************/ /*