From patchwork Wed Feb 1 13:58:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 1735552 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=oV7cLCaf; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P6NrH2RTgz23j9 for ; Thu, 2 Feb 2023 01:01:35 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8DE9A85C79; Wed, 1 Feb 2023 14:59:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="oV7cLCaf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 98EF1854C7; Wed, 1 Feb 2023 14:59:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BL_SPAMCOP_NET, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 9559385C62 for ; Wed, 1 Feb 2023 14:59:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sumit.garg@linaro.org Received: by mail-pj1-x102f.google.com with SMTP id cq16-20020a17090af99000b0022c9791ac39so2251576pjb.4 for ; Wed, 01 Feb 2023 05:59:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=c6KJR1dXWQfbUVvWqz3TDKFjYpVTl3dj4ftXimlQA7Q=; b=oV7cLCafCeSYNiYllvsaHvFTLH7Zyefad3ry78BNWQDDlZS8IDkGP2ldVxdIOR/s9/ 1uol2pxgWxKdfTWdbA2jmzAY719N0jxXmgKo+TyV4RFYHKa6iSxKPTy+hBFaIw5BPRLj tCOHpnfy9WJ7p8UbSAkEL7RY7gB0WhDKcq8CxTe1uJteWFfHFEVyUyBYoYNS0Gz+1dmU DNOUnxdtyZ+PQfwbLj+vjZ8x5P198fDdp0MRQo33U/5OPdo4h+0nSlVq0mBsQeMjaLKu u+71J16LdUk1poX3UPHzyhOX+N/OgZQ/hZLV9U+K5u/YgVeCxBGJevnJL7AKRFkc4ABR BdNw== 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=c6KJR1dXWQfbUVvWqz3TDKFjYpVTl3dj4ftXimlQA7Q=; b=N7KJEUPEs7fHBtYKU1fRVuYS+c9K1LbiPtLazo1VCFQCoIhH3kYiAY0adiQsQfhZvr arFxeWjWfkuD515S0JNmBafOXX/3vo5mKNG+Evl43P5YqE1SBBvfwWpTe9p5XG76GtSF uIFiD/2D8wnl0olHuFOxVqb1eC3TQ2iGHyWidxqU2CnEO4cF4yV6pG5ON9k4Clmy6E8q ZDxg7vOR2eF22n5053rkl8TArFycRwtEcabfbJMDkYlSzkpMzPSReM7TcDJpS4WitXIU N55MNUyovWCtzNEcvMRd9MK/fonqBKSJedsXlJWZpxNYC+J4drW7T78X4FNRrWZjDQ7+ smzg== X-Gm-Message-State: AO0yUKUyetytFAmq7yzkf5+TvVjkMcGBcYsf1KgVSeLb4nf04IHkzHXK 3mOB2dCug5PoEcyPjjvZcGKiDvGFdOp5rMVv X-Google-Smtp-Source: AK7set8dTcC+8BQGmvCLEQKdXPPgxFzBjCgGNEAsXT5KW3EErEs39PX5VRQk3mhWpX69/04HdHJ3JQ== X-Received: by 2002:a17:902:e0c5:b0:194:9324:7084 with SMTP id e5-20020a170902e0c500b0019493247084mr2458791pla.36.1675259958592; Wed, 01 Feb 2023 05:59:18 -0800 (PST) Received: from sumit-X1.. ([223.178.209.222]) by smtp.gmail.com with ESMTPSA id i8-20020a17090332c800b001899c2a0ae0sm3636759plr.40.2023.02.01.05.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 05:59:18 -0800 (PST) From: Sumit Garg To: u-boot@lists.denx.de Cc: rfried.dev@gmail.com, hs@denx.de, joe.hershberger@ni.com, stephan@gerhold.net, mworsfold@impinj.com, lgillham@impinj.com, jbrennan@impinj.com, nicolas.dechesne@linaro.org, vinod.koul@linaro.org, daniel.thompson@linaro.org, Sumit Garg Subject: [PATCH v2 01/14] qcs404: sysmap: Don't map reserved memory ranges Date: Wed, 1 Feb 2023 19:28:48 +0530 Message-Id: <20230201135901.482671-2-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201135901.482671-1-sumit.garg@linaro.org> References: <20230201135901.482671-1-sumit.garg@linaro.org> MIME-Version: 1.0 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 Currently u-boot maps whole of 1G RAM but there reserved memory ranges on QCS404 which are reserved for TrustZone, various firmware components etc. Any access to these reserved memory ranges causes a bus hang issue. So disable mapping for reserved memory ranges in u-boot. Signed-off-by: Sumit Garg --- arch/arm/mach-snapdragon/sysmap-qcs404.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-snapdragon/sysmap-qcs404.c b/arch/arm/mach-snapdragon/sysmap-qcs404.c index b7409031a0..64ca4adf1b 100644 --- a/arch/arm/mach-snapdragon/sysmap-qcs404.c +++ b/arch/arm/mach-snapdragon/sysmap-qcs404.c @@ -19,7 +19,19 @@ static struct mm_region qcs404_mem_map[] = { }, { .virt = 0x80000000UL, /* DDR */ .phys = 0x80000000UL, /* DDR */ - .size = 0x40000000UL, + .size = 0x05900000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE + }, { + .virt = 0x89600000UL, /* DDR */ + .phys = 0x89600000UL, /* DDR */ + .size = 0x162000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE + }, { + .virt = 0xa0000000UL, /* DDR */ + .phys = 0xa0000000UL, /* DDR */ + .size = 0x20000000UL, .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_INNER_SHARE }, {