From nobody Wed Dec 25 02:25:51 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1511345287048165.28117663315822; Wed, 22 Nov 2017 02:08:07 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 03F09220C1620; Wed, 22 Nov 2017 02:03:40 -0800 (PST) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9DCB6220C1602 for ; Wed, 22 Nov 2017 02:03:37 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id v186so8937700wma.2 for ; Wed, 22 Nov 2017 02:07:53 -0800 (PST) Received: from localhost.localdomain ([154.145.25.106]) by smtp.gmail.com with ESMTPSA id i192sm2761457wmf.46.2017.11.22.02.07.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 02:07:51 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NHtF2+GCWtVtkzfqVOpiEvrKV1Y+RYnjVrQ+7d4ZKFI=; b=FYf7VMMmpg6DeOLuMvY5Ib07EIubR0G6G9krvq4JsooY2iYC3hkD3PiS8qhzL02J4L emNXBmwxmfe3s1pla5RoGxjg9rqsi3OHpvnFmQXsDkE5TVbE0WUkBFJYh6O/QWFsJogg EJZKG3JOXQINjE7Fh83EzHzCoA+y/TvNmQy1s= 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=NHtF2+GCWtVtkzfqVOpiEvrKV1Y+RYnjVrQ+7d4ZKFI=; b=sq7/l4EdJwHkzG2ZAjXt+BhJ/M+yoqnlucK0WWXyTtwBNp2oglfxfZHgTqWO0g/P+8 4i6/ws/l5id80J/63nLzWI9Zn6VdiTTczbySwg7xpDG4795KZw+2pLJFEnzmmW0Dq4oq U29pXGmjvIG6pcodFgzDQ72a+d7VcGGlEdGwzpUkOn9ey3zDH1AsdHeltq+GpKI0Xkgw 5BbOlBkvNvA1WD+0cQ5uq9+AqvDs/4ZZkR7BB9cFpExkiYhRWHT9tgK/dNodjRF6diaB ZFq3uqcYVSF2SWDW/bXFipYiKEFUXROkiZVFyxQkdwmoZQFwLJBQgC+TubvmuCKYa1RQ Ch/Q== X-Gm-Message-State: AJaThX4xZHwK8xtoi1CAovdD5OJQk+PSVfI13e/nGWdO9TOFpx7VQ1Jc FRuZIgcD5k4bmPHu6jSndS1QxEnHPS0= X-Google-Smtp-Source: AGs4zMbdxK/lFjwTt94vbONr1Ihuf4gf8v8I4VIbok5nl+LSMNYOv5gKVCz33giVYQJZ01FSBKXpbw== X-Received: by 10.28.67.68 with SMTP id q65mr3364838wma.26.1511345272133; Wed, 22 Nov 2017 02:07:52 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Wed, 22 Nov 2017 10:07:25 +0000 Message-Id: <20171122100731.24525-9-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171122100731.24525-1-ard.biesheuvel@linaro.org> References: <20171122100731.24525-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 08/14] ArmVirtPkg/ArmVirtPlatformLib: remove support for uncached mappings X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" QEMU/KVM has very little tolerance for using anything except writeback cacheable mappings of DRAM, so let's remove the 'feature' that allows us to select uncached mappings at build time. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/Library/ArmVirtPlatformLib/VirtMem.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/ArmVirtPkg/Library/ArmVirtPlatformLib/VirtMem.c b/ArmVirtPkg/L= ibrary/ArmVirtPlatformLib/VirtMem.c index d10548f86dfc..4368d05f76ef 100644 --- a/ArmVirtPkg/Library/ArmVirtPlatformLib/VirtMem.c +++ b/ArmVirtPkg/Library/ArmVirtPlatformLib/VirtMem.c @@ -22,10 +22,6 @@ // Number of Virtual Memory Map Descriptors #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 5 =20 -// DDR attributes -#define DDR_ATTRIBUTES_CACHED ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK -#define DDR_ATTRIBUTES_UNCACHED ARM_MEMORY_REGION_ATTRIBUTE_UNCACHED_UNBU= FFERED - EFI_PHYSICAL_ADDRESS ArmGetPhysAddrTop ( VOID @@ -48,7 +44,6 @@ ArmPlatformGetVirtualMemoryMap ( IN ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap ) { - ARM_MEMORY_REGION_ATTRIBUTES CacheAttributes; ARM_MEMORY_REGION_DESCRIPTOR *VirtualMemoryTable; =20 ASSERT (VirtualMemoryMap !=3D NULL); @@ -65,17 +60,11 @@ ArmPlatformGetVirtualMemoryMap ( return; } =20 - if (FeaturePcdGet (PcdCacheEnable) =3D=3D TRUE) { - CacheAttributes =3D DDR_ATTRIBUTES_CACHED; - } else { - CacheAttributes =3D DDR_ATTRIBUTES_UNCACHED; - } - // System DRAM VirtualMemoryTable[0].PhysicalBase =3D PcdGet64 (PcdSystemMemoryBase); VirtualMemoryTable[0].VirtualBase =3D VirtualMemoryTable[0].PhysicalBas= e; VirtualMemoryTable[0].Length =3D PcdGet64 (PcdSystemMemorySize); - VirtualMemoryTable[0].Attributes =3D CacheAttributes; + VirtualMemoryTable[0].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_WRITE= _BACK; =20 DEBUG ((EFI_D_INFO, "%a: Dumping System DRAM Memory Map:\n" "\tPhysicalBase: 0x%lX\n" @@ -104,7 +93,7 @@ ArmPlatformGetVirtualMemoryMap ( VirtualMemoryTable[3].PhysicalBase =3D FixedPcdGet64 (PcdFdBaseAddress); VirtualMemoryTable[3].VirtualBase =3D VirtualMemoryTable[3].PhysicalBas= e; VirtualMemoryTable[3].Length =3D FixedPcdGet32 (PcdFdSize); - VirtualMemoryTable[3].Attributes =3D CacheAttributes; + VirtualMemoryTable[3].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_WRITE= _BACK; =20 // End of Table ZeroMem (&VirtualMemoryTable[4], sizeof (ARM_MEMORY_REGION_DESCRIPTOR)); --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel