From nobody Sat Feb 7 06:55:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55639+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55639+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1583572218; cv=none; d=zohomail.com; s=zohoarc; b=HHJZLc/HZF6U/JzaV0vKd36PCvYhanRpyeyH5eoSKJiWqECasAmwJLgTFmewkN5OMPHpXKP3V2px6dH52xW3FPG+4b9pziR90KwPW0dhuMXHi7nx8nYRql8RSaKGU/wW+C9vcYNRJFEH5AYFmaogZB9eWllgkho9hg88aq5bCkY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583572218; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=D7WTK+No1Il8VJEK0FChHDTudQWZfgdcLt9nTqUXze0=; b=KSMl0amsE8+wjpZdjfK8TgvO7k7US37S+FMnOl7XbR9ZUjVY8oipVwnHH/grtpjFLA8+DirSoT5paaTS39zVHn2V+qIr8/9AHFqPdVMnCTptI82ygJc9UmXrkKQ/cfxqRUvgJ/6TLp2KvmQA3wLrY0s4uBA0QJ8ikrfkDSRs4ww= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55639+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1583572218046248.29138916518366; Sat, 7 Mar 2020 01:10:18 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id hCBRYY1788612xxmK2ScPMq7; Sat, 07 Mar 2020 01:10:17 -0800 X-Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mx.groups.io with SMTP id smtpd.web10.11042.1583572217031546124 for ; Sat, 07 Mar 2020 01:10:17 -0800 X-Received: by mail-wm1-f67.google.com with SMTP id n8so917441wmc.4 for ; Sat, 07 Mar 2020 01:10:16 -0800 (PST) X-Gm-Message-State: V18nZ2JVZVhvBIF2kZbAQp4bx1787277AA= X-Google-Smtp-Source: ADFU+vs3IPz3d8KHhU64TbjFqhw+wUtjXnU4KIEejTMi5XjKEAQrInPEyYpPbDEcZ9ZudZIF+hFZwg== X-Received: by 2002:a05:600c:2241:: with SMTP id a1mr8810338wmm.59.1583572214996; Sat, 07 Mar 2020 01:10:14 -0800 (PST) X-Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id i204sm17088429wma.44.2020.03.07.01.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Mar 2020 01:10:14 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: leif@nuviainc.com, Ard Biesheuvel Subject: [edk2-devel] [PATCH 1/2] ArmPkg/ArmMmuLib AARCH64: drop pointless page table memory type check Date: Sat, 7 Mar 2020 10:10:07 +0100 Message-Id: <20200307091008.14918-2-ard.biesheuvel@linaro.org> In-Reply-To: <20200307091008.14918-1-ard.biesheuvel@linaro.org> References: <20200307091008.14918-1-ard.biesheuvel@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1583572217; bh=Ko7DJ2Kw0D/UoSABu4SapZ7fhpWJcajXHpGrIF55Djc=; h=Cc:Date:From:Reply-To:Subject:To; b=Mgx9vAuwlWiaC/eDacOb5HH8WiZNkwE9+0uhcwU3JjXD1aO0XlFeiwxOZ+YInvxxD2O 5uyUhb/a37b8Mgu4j14MtEXpUYk+RKd0lXHOgmil0OgKDSwomL74A41dJKPIJOKosLVqf RKOwFf6cWCKiHWifJKxMXfW//LfRXKM8K2c= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This is the AARCH64 counterpart of commit 1f3b1eb3082206e4, to remove a pointless check against the memory type of the allocations that the page tables happened to land in. On ArmV8, we use writeback cacheable exclusively for all memory. Signed-off-by: Ard Biesheuvel --- ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c b/ArmPkg/Libr= ary/ArmMmuLib/AArch64/ArmMmuLibCore.c index 221175ca6535..f2eec7191328 100644 --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c @@ -497,7 +497,6 @@ ArmConfigureMmu ( ) { VOID* TranslationTable; - UINT32 TranslationTableAttribute; UINT64 MaxAddress; UINTN T0SZ; UINTN RootTableEntryCount; @@ -618,18 +617,7 @@ ArmConfigureMmu ( RootTableEntryCount * sizeof(UINT64)); ZeroMem (TranslationTable, RootTableEntryCount * sizeof(UINT64)); =20 - TranslationTableAttribute =3D TT_ATTR_INDX_INVALID; while (MemoryTable->Length !=3D 0) { - - DEBUG_CODE_BEGIN (); - // Find the memory attribute for the Translation Table - if ((UINTN)TranslationTable >=3D MemoryTable->PhysicalBase && - (UINTN)TranslationTable + EFI_PAGE_SIZE <=3D MemoryTable->Physic= alBase + - MemoryTable->Len= gth) { - TranslationTableAttribute =3D MemoryTable->Attributes; - } - DEBUG_CODE_END (); - Status =3D FillTranslationTable (TranslationTable, MemoryTable); if (EFI_ERROR (Status)) { goto FREE_TRANSLATION_TABLE; @@ -637,9 +625,6 @@ ArmConfigureMmu ( MemoryTable++; } =20 - ASSERT (TranslationTableAttribute =3D=3D ARM_MEMORY_REGION_ATTRIBUTE_WRI= TE_BACK || - TranslationTableAttribute =3D=3D ARM_MEMORY_REGION_ATTRIBUTE_NON= SECURE_WRITE_BACK); - ArmSetMAIR (MAIR_ATTR(TT_ATTR_INDX_DEVICE_MEMORY, MAIR_ATTR_DEVICE_MEMOR= Y) | // mapped to EFI_MEMORY_UC MAIR_ATTR(TT_ATTR_INDX_MEMORY_NON_CACHEABLE, MAIR_ATTR_NORMA= L_MEMORY_NON_CACHEABLE) | // mapped to EFI_MEMORY_WC MAIR_ATTR(TT_ATTR_INDX_MEMORY_WRITE_THROUGH, MAIR_ATTR_NORMA= L_MEMORY_WRITE_THROUGH) | // mapped to EFI_MEMORY_WT --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55639): https://edk2.groups.io/g/devel/message/55639 Mute This Topic: https://groups.io/mt/71792475/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-