From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EC33C4338F for ; Fri, 6 Aug 2021 04:44:45 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 088FE611C5 for ; Fri, 6 Aug 2021 04:44:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 088FE611C5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06D2E829E2; Fri, 6 Aug 2021 06:44:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628225081; bh=BrqDYqjChSj9XSuPX9Um7od8Rujz4ma/FQQ6LoChDWg=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=J6Rmsh0XDEQZ/DJ0xiG6HR+Nj+WXgtiJOfNqG0k8w5Og0Zxm0LOTifx/G53+wYJEc C2y4jdayrvoVGojf3jN+AmtuNrlbmPHrfb/kPhcSzptcQ6IzqyoR0OXkMwa3t29rAb 4lrb2mP4oriPHUuJq4lp1mvsL16cGPMhlrESmirz68q6IJ7BGDWS0OBOB10raON5ut 1hq5t5Jgh4Ziqao58mxYCjLIZBwB6iT78VLrysrcCn2NUwh5lJZPEw9TbNuohcDqNN 8XYjI1wIdxz97kV+qdFwo/sKxorschl4CSDUCmWqH5wnZhkNzhzcgco+0vdfMB8iDD 6GPj9rFWXmuqA== Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: noc@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 03F8D82CE2 for ; Fri, 6 Aug 2021 06:44:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628225079; bh=BrqDYqjChSj9XSuPX9Um7od8Rujz4ma/FQQ6LoChDWg=; h=From:To:Cc:Subject:Date:From; b=ifZjwR7UhNBVptuh0oQ3jyrzBxnog1v4UOjB/pAAv7eMoJOPE651h+wliiX4b14EE llue2TLuBw8f7JYkK2roxlKSEJPDo7okb8WrG8QJj4eTCmDIkiBRoZOE1x5n06WOyt k9MPoraBhItAcFdglAT1SkCXLlsww0DZsN1Pq0cbz8W3zVhtoEFhdyResgwZtLl8Uw XuMTmkYLBAuTa+TjOyeSo4Ie20Sm/iiArzVtASu1sarpdkEb7edzMee9Gp/uwIdDTQ EMZjmYnDb8d960p4hOvj0aA7Ii3rz2WfmXzHnyd0SizQT3+cehOA02M3MHYWEieB0a 4BS1aY+edep6g== Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id 433FC18071E; Fri, 6 Aug 2021 06:44:32 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id 21EDE1A009F; Fri, 6 Aug 2021 06:44:32 +0200 (CEST) From: Heiko Schocher To: u-boot@lists.denx.de, Stefano Babic Cc: Tim Harvey , Heiko Schocher , Alexandru Gagniuc , Fabio Estevam , Faiz Abbas , Jaehoon Chung , Marek Vasut , Michael Walle , Michal Simek , "NXP i.MX U-Boot Team" , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Philippe Reynes , Simon Glass , Stefan Roese , Teresa Remmet Subject: [PATCH v1 0/2] imx8m: fix secure boot Date: Fri, 6 Aug 2021 06:44:25 +0200 Message-Id: <20210806044427.1958686-1-hs@denx.de> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean This series fixes secure boot on imx8m based boards. Tim also detected this issue and the patches fixed on his hardware also the problem, see discussion here: https://lists.denx.de/pipermail/u-boot/2021-July/454351.html Problem is that the IVT header gets loaded to a memallocated buffer, but it needs to sit on memaddress coded in IVT header itself. This patchseries adds a weak function spl_load_simple_fit() in common spl code, which does not change current code behaviour. Second patch than implements this weak function for imx based boards (if no IVT header is found on address which is passed to it, it does nothing). I am not sure if this is the best solution, but it fixes a real bug, and may could be made clearer, if possible. Heiko Schocher (2): spl_fit. add hook to make fixes after fit header is loaded imx: spl: implement spl_load_simple_fit_fix_load arch/arm/mach-imx/spl.c | 33 +++++++++++++++++++++++++++++++++ common/spl/spl_fit.c | 11 +++++++++++ include/spl.h | 8 ++++++++ 3 files changed, 52 insertions(+) -- 2.31.1