Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4B271C05027 for ; Sun, 19 Feb 2023 23:59:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B03FB8593E; Mon, 20 Feb 2023 00:58:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="kCVQQe9+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D333A85860; Mon, 20 Feb 2023 00:46:19 +0100 (CET) Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 17BA285925 for ; Mon, 20 Feb 2023 00:46:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x134.google.com with SMTP id t16so538393ilg.9 for ; Sun, 19 Feb 2023 15:46:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CGwGxt8+PNeiiptixhTNleQmu9ybDf5FVvQ6+3ARM38=; b=kCVQQe9+iHozMIBo7/q3xbOQg1Tmbwu6KFOpmk2ec4zyYe2gCzNTO1Kp2i+6NHclnP Xt4atC8gguVNzCrb/GBzvLyT2fK3WWoUxYSJZERXG+PvwsmZ6uAxA7fFNCs2iIlEq41J DjiWe6bXg87ji9/YvEHg+wQNBsrhX746jLjXo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CGwGxt8+PNeiiptixhTNleQmu9ybDf5FVvQ6+3ARM38=; b=xBbbF01ahb6yiETbC1Aq41SAhg8PblChFNu5qPPHBdD6f3wexjKafGA1+a9BLi18io HuyuItkWOxzknDwDsuQ9V7S4KwdOBgAkPKAx4if2XFUZJnctD3WhWckXCJMCY1dLzASV /7YBvX1ICesjSay5wZWfgsPhcQpd89y3Rlfnss4sVlkV/DYS8DE/fca5gIYAFBT2puP6 HYYEuAXOcjM11c2/6luYcW+vjFOdRi3JdqCjUhgPm1DkaGzV/IBYDXnBNLQH/FRDGqbR EZPGUUxHpzAITs/ouCGR6NUwZSprcmrTAQPFr3Vc/Cp7R+9sQzIHRcKjzMxZQ33hu0df 8deQ== X-Gm-Message-State: AO0yUKWxKX+QZNOltCWF3vWKCs9xoM5Vzxz+WrgJ8mib7QCWqmu0CTA4 O/KqID42Mv9TnMB0XpH4cH3J5knPcqiCt+iv X-Google-Smtp-Source: AK7set/4iMmVR+kFk+B/Eg3DuJxMRkQ6Gw5hnDThQeSZt3qrhWcq5zVG6w4Y3v3/EzUDFQgUEyJj3g== X-Received: by 2002:a05:6e02:b42:b0:315:479e:bbd2 with SMTP id f2-20020a056e020b4200b00315479ebbd2mr1432680ilu.6.1676850369709; Sun, 19 Feb 2023 15:46:09 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id n23-20020a02a917000000b0037477c3d04asm3485333jam.130.2023.02.19.15.46.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 15:46:09 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v4 08/46] Correct SPL uses of FSL_ISBC_KEY_EXT Date: Sun, 19 Feb 2023 16:44:49 -0700 Message-Id: <20230219234527.1849470-9-sjg@chromium.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog In-Reply-To: <20230219234527.1849470-1-sjg@chromium.org> References: <20230219234527.1849470-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This converts 9 usages of this option to the non-SPL form, since there is no SPL_FSL_ISBC_KEY_EXT defined in Kconfig Signed-off-by: Simon Glass --- (no changes since v1) board/freescale/common/fsl_validate.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/board/freescale/common/fsl_validate.c b/board/freescale/common/fsl_validate.c index bfe6357b0d6..78bed122466 100644 --- a/board/freescale/common/fsl_validate.c +++ b/board/freescale/common/fsl_validate.c @@ -29,7 +29,7 @@ #define CHECK_KEY_LEN(key_len) (((key_len) == 2 * KEY_SIZE_BYTES / 4) || \ ((key_len) == 2 * KEY_SIZE_BYTES / 2) || \ ((key_len) == 2 * KEY_SIZE_BYTES)) -#if CONFIG_IS_ENABLED(FSL_ISBC_KEY_EXT) +#if IS_ENABLED(CONFIG_FSL_ISBC_KEY_EXT) /* Global data structure */ static struct fsl_secboot_glb glb; #endif @@ -63,7 +63,7 @@ self: goto self; } -#if CONFIG_IS_ENABLED(FSL_ISBC_KEY_EXT) +#if IS_ENABLED(CONFIG_FSL_ISBC_KEY_EXT) static u32 check_ie(struct fsl_secboot_img_priv *img) { if (img->hdr.ie_flag & IE_FLAG_MASK) @@ -188,7 +188,7 @@ static u32 check_srk(struct fsl_secboot_img_priv *img) { #ifdef CONFIG_ESBC_HDR_LS /* In LS, No SRK Flag as SRK is always present if IE not present*/ -#if CONFIG_IS_ENABLED(FSL_ISBC_KEY_EXT) +#if IS_ENABLED(CONFIG_FSL_ISBC_KEY_EXT) return !check_ie(img); #endif return 1; @@ -278,7 +278,7 @@ static u32 read_validate_single_key(struct fsl_secboot_img_priv *img) } #endif /* CONFIG_ESBC_HDR_LS */ -#if CONFIG_IS_ENABLED(FSL_ISBC_KEY_EXT) +#if IS_ENABLED(CONFIG_FSL_ISBC_KEY_EXT) static void install_ie_tbl(uintptr_t ie_tbl_addr, struct fsl_secboot_img_priv *img) @@ -434,7 +434,7 @@ void fsl_secboot_handle_error(int error) case ERROR_ESBC_CLIENT_HEADER_INVALID_KEY_NUM: case ERROR_ESBC_CLIENT_HEADER_INV_SRK_ENTRY_KEYLEN: #endif -#if CONFIG_IS_ENABLED(FSL_ISBC_KEY_EXT) +#if IS_ENABLED(CONFIG_FSL_ISBC_KEY_EXT) /*@fallthrough@*/ case ERROR_ESBC_CLIENT_HEADER_IE_KEY_REVOKED: case ERROR_ESBC_CLIENT_HEADER_INVALID_IE_NUM_ENTRY: @@ -571,7 +571,7 @@ static int calc_esbchdr_esbc_hash(struct fsl_secboot_img_priv *img) key_hash = 1; } #endif -#if CONFIG_IS_ENABLED(FSL_ISBC_KEY_EXT) +#if IS_ENABLED(CONFIG_FSL_ISBC_KEY_EXT) if (!key_hash && check_ie(img)) key_hash = 1; #endif @@ -705,7 +705,7 @@ static int read_validate_esbc_client_header(struct fsl_secboot_img_priv *img) } #endif -#if CONFIG_IS_ENABLED(FSL_ISBC_KEY_EXT) +#if IS_ENABLED(CONFIG_FSL_ISBC_KEY_EXT) if (!key_found && check_ie(img)) { ret = read_validate_ie_tbl(img); if (ret != 0) @@ -851,7 +851,7 @@ static int secboot_init(struct fsl_secboot_img_priv **img_ptr) return -ENOMEM; memset(img, 0, sizeof(struct fsl_secboot_img_priv)); -#if CONFIG_IS_ENABLED(FSL_ISBC_KEY_EXT) +#if IS_ENABLED(CONFIG_FSL_ISBC_KEY_EXT) if (glb.ie_addr) img->ie_addr = glb.ie_addr; #endif @@ -952,7 +952,7 @@ int fsl_secboot_validate(uintptr_t haddr, char *arg_hash_str, else ret = memcmp(srk_hash, img->img_key_hash, SHA256_BYTES); -#if CONFIG_IS_ENABLED(FSL_ISBC_KEY_EXT) +#if IS_ENABLED(CONFIG_FSL_ISBC_KEY_EXT) if (!hash_cmd && check_ie(img)) ret = 0; #endif -- 2.39.2.637.g21b0678d19-goog