From patchwork Fri Dec 7 15:14:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1009507 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="s+zIMu1d"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43BGHn4fn6z9s3l for ; Sat, 8 Dec 2018 02:15:33 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 5858CC22755; Fri, 7 Dec 2018 15:15:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A3BDEC22760; Fri, 7 Dec 2018 15:14:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 31B4DC21F19; Fri, 7 Dec 2018 15:14:39 +0000 (UTC) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by lists.denx.de (Postfix) with ESMTPS id DB4FFC21F18 for ; Fri, 7 Dec 2018 15:14:38 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id t27so4134584wra.6 for ; Fri, 07 Dec 2018 07:14:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Nz8kWaGZZxE+RYWZ96zTJqQbSyZOwm3c2aIjpUtMnDI=; b=s+zIMu1d69lMOuhH9BC53yjfR2H7yCrF3XSyIjhcLQl8iF6rsnQ2XhxwHuIxiGNdkO 0qR+JgdsCqc8jhUn/LU9HKu5HJ/SYS3sEeUyWsBSmT5G/KnAom1oC7M3ZQ26zxCeKUHb M6xaKoeZhBFvse6rQAXleDlRa4TxgJ1qSROluYOEBjV1DQMnwKyz1G6Axo3NXcMCmwIb ial30KeA7sL75ppl/viVC9lZVVroLphDzhaZ1n/0VxzD337TFl3pK08u/AFKY9LWBTah QII62a5sEHTWRbAl1iHybLlVzOrp0t/isJ3MuGxK6QlLho5l1MJ8SlHj7WnE+QDUA6B0 zvXw== 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; bh=Nz8kWaGZZxE+RYWZ96zTJqQbSyZOwm3c2aIjpUtMnDI=; b=Z7cIk9R0WG7KJ8o+Iwoj4rknaOfHD3rA/v0b2hjVOx1Qr3AL95Ksq8nE+vv337Jcb/ iHb9LI4lI3hpgWSoiBGcS0ooLAogEATsG0em5KxboVZGW/eHu1Jm2sJ+si6tv+gSDcJM q1HbQm8mQPQyrSEHoXeqbGyNYLv91U+Y2y3LU9UYhaRvrg6sg8aHm9Tqb6Kvsayqkd+s BURcslORUBBB3IzmMgGrTydKOGCqh40K5JNOsUbWj+32l0GAhnOIgrqdtmeC5CFcVvlU LLc2z2FyWHGyoLTYPdiX6W+WChSEYcTP5K2QC63Pa1sCfy6+iXy9NEHDrUjGn+FFHB6i xD7A== X-Gm-Message-State: AA+aEWZI7Z9XbjXwYmaC31JUl3qUEWU5/8eQzKBZi4DdvUKdlnEnVW3Q fZvkU6Q6qehn3rMj+EtZh3bQ/ey3 X-Google-Smtp-Source: AFSGD/WaX28hGlbIyr+GbAYXigZ648JfSvUpYByEc5JQFDP0/S7elg0OtxMWhRyk26MFF9KIMWl/uw== X-Received: by 2002:a5d:5089:: with SMTP id a9mr2176899wrt.327.1544195678097; Fri, 07 Dec 2018 07:14:38 -0800 (PST) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id o64sm6507772wmo.47.2018.12.07.07.14.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 07:14:37 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: u-boot@lists.denx.de Date: Fri, 7 Dec 2018 16:14:28 +0100 Message-Id: <20181207151429.5172-2-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181207151429.5172-1-marek.vasut+renesas@gmail.com> References: <20181207151429.5172-1-marek.vasut+renesas@gmail.com> Cc: Takeshi Kihara , Hiroyuki Yokoyama , Marek Vasut Subject: [U-Boot] [PATCH 2/3] ARM: rcar_gen3: fix protection area access error X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Takeshi Kihara This patch fixes the problem that "main memory domain AXI secure access protection error" occurs. Exclude the area (0x43f00000 to 0x47DFFFFF) set by DBSC from the map area. Signed-off-by: Takeshi Kihara Signed-off-by: Hiroyuki Yokoyama Signed-off-by: Marek Vasut --- arch/arm/mach-rmobile/memmap-gen3.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rmobile/memmap-gen3.c b/arch/arm/mach-rmobile/memmap-gen3.c index 0429a2ac51..3c0f3548cb 100644 --- a/arch/arm/mach-rmobile/memmap-gen3.c +++ b/arch/arm/mach-rmobile/memmap-gen3.c @@ -82,8 +82,16 @@ void enable_caches(void) /* Mark memory reserved by ATF as cacheable too. */ if (start == 0x48000000) { - start = 0x40000000ULL; - size += 0x08000000ULL; + /* Unmark protection area (0x43F00000 to 0x47DFFFFF) */ + gen3_mem_map[i].virt = 0x40000000ULL; + gen3_mem_map[i].phys = 0x40000000ULL; + gen3_mem_map[i].size = 0x03F00000ULL; + gen3_mem_map[i].attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE; + i++; + + start = 0x47E00000ULL; + size += 0x00200000ULL; } gen3_mem_map[i].virt = start;