From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on072b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe48::72b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E7F391A1DF3 for ; Mon, 26 Sep 2016 10:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=moNuuIrv9dkiXb7ZM6Zw7CsX6S1f+CQc1qGP+4mD8YU=; b=NdMUdU1Pbk5aOHn9kVT6myHBwq6xnA70em1Jz+YFjj3iKe2W9D3KfJeYD0PLZyaIQW9PmikNg0ziUEA0eAWxWwDScxhP1DHzbu/E7+hE3UrMLSoX/6dt/8yABnSOoUN/Ni4/stWRY3OFGPPnBNlQvq/zQ0G3ffSfKbTtqM5mgpo= Received: from BL2PR03MB433.namprd03.prod.outlook.com (10.141.92.19) by BL2PR03MB433.namprd03.prod.outlook.com (10.141.92.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Mon, 26 Sep 2016 17:08:24 +0000 Received: from BL2PR03MB433.namprd03.prod.outlook.com ([10.141.92.19]) by BL2PR03MB433.namprd03.prod.outlook.com ([10.141.92.19]) with mapi id 15.01.0639.011; Mon, 26 Sep 2016 17:08:24 +0000 From: Kurt Kennett To: "edk2-devel@lists.01.org" CC: Leif Lindholm , Ard Biesheuvel Thread-Topic: [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem. Thread-Index: AdIYGFwd+ZCwDezKQh+ARjUYOJf/gw== Date: Mon, 26 Sep 2016 17:08:24 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Kurt.Kennett@microsoft.com; x-originating-ip: [2001:4898:80e8:5::35d] x-ms-office365-filtering-correlation-id: 7dcaa0fe-a793-408d-442b-08d3e62fb9dc x-microsoft-exchange-diagnostics: 1; BL2PR03MB433; 6:M1ZJ6oyTcwa3Z34f/gawcvB0PIXq5ocZqAgVw7hW9gN90zE2Ysc0jqXMLsFKTQa6YKVm4gVyCuAcL8Oh3mbo6SQ7qbvId4bgIzPhdbEi52iwf5q79wStRBP5IMzV/pgzWvgON9DTiSh+NXwJVbtL3psrapOmc3VKaL+MmOrYj6wbLOKdfDGMVeWNAvendsg9f/PyebygfjPdK5+jF+idnmQI9Q7K2J+nLxBgdR3ATKtoYuuYIXL4a7ZkfcJ118Jq2pRJEGu5iivSKEpeuFC+QernppTnvZrCOdkFlsShqsf1EzFViehTDFu0wxJzzt8mZYzwY3FcBGBW7MTHl9C/QA==; 5:S683wpvFt6QI/9L7osBlo9mTMFx1yWedQoYXqxHLDUDfIwt4pmIy0UEFkm0RHAJXTNjygbHCwAoLhn3rga2qw7kc+oFbu6a+xBBhh3iD5wX7BKZ52Xw10EnnHpT1OE3bxnr8TQgq4BVsFOJxnn0MuQ==; 24:dUXYmGHhtU1LICfeTgQIeYMw5BYWDZm3/wI4qo5/TzRD8hEJHBXDzmhwKIe5GB/ap4aHYVJFmxIUcJbL/D5ERvxhi2tdLeU+C8OQDrx3Rls=; 7:Xrl0kDjdVlVCbjLlgY3WHvdIuSl+W+BjvSKymCigapzfZiOZu2Xw1I3zMj6a38PZZRDkmSiyAfvisEbvm03kSqVFbUEP1VPGFqvxAaxrHd6AqOgni1T+M7wi4hatp0Dvd99F7zqiM4S60BGGdn19kzomZF7Baj28U9g93Oxqzk+WlFjJEIZySXcPrkLTO8Zes02UD+cU/7ZgTMdDl5yvM0DH7+M0QkOQm0UopkK1sBEmYYT3QLfnvenpNt4SrKy3SlVKWOpDUstuKTjU7xRapOeQYlZZJy7JRaQlgkFrkD1nPzDYDGhTIRz5RAUhmmAN x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB433; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(61426038)(61427038); SRVR:BL2PR03MB433; BCL:0; PCL:0; RULEID:; SRVR:BL2PR03MB433; x-forefront-prvs: 00770C4423 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(189002)(3280700002)(74316002)(305945005)(87936001)(11100500001)(8936002)(6116002)(7846002)(7736002)(50986999)(189998001)(54356999)(586003)(5660300001)(106356001)(102836003)(3660700001)(76576001)(122556002)(5005710100001)(10290500002)(10400500002)(68736007)(10090500001)(33656002)(9686002)(92566002)(2501003)(81156014)(97736004)(86362001)(8676002)(81166006)(7696004)(19580395003)(5002640100001)(8990500004)(19580405001)(110136003)(105586002)(99286002)(2900100001)(77096005)(6916009)(101416001)(2906002)(4326007)(86612001)(229853001)(2351001)(3826002); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB433; H:BL2PR03MB433.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Sep 2016 17:08:24.3562 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB433 Subject: [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 17:08:27 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable During Mmu initialization in the CpuDxe, for a page table any bits set=20 in the 'NextSectionAttributes' are garbage and were set from bits that=20 are actually part of the pagetable address.=A0 We clear it out to zero=20 so that the SyncCacheConfigPage will use the page attributes instead=20 of trying to convert the (bogus) section attributes into page=20 attributes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Kurt Kennett --- ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c b/ArmPkg/Drivers/CpuDxe/Arm/Mm= u.c index 63da8ba..64ef1bb 100644 --- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c +++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c @@ -297,6 +297,11 @@ SyncCacheConfig ( =A0=A0=A0=A0=A0=A0 } =A0=A0=A0=A0=A0=A0 NextRegionLength +=3D TT_DESCRIPTOR_SECTION_SIZE; =A0=A0=A0=A0 } else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevel= Table[i])) { +=A0=A0=A0=A0=A0 // In this case any bits set in the 'NextSectionAttributes= ' are garbage and were set from +=A0=A0=A0=A0=A0 // bits that are actually part of the pagetable address.= =A0 We clear it out to zero so that +=A0=A0=A0=A0=A0 // the SyncCacheConfigPage will use the page attributes in= stead of trying to convert the +=A0=A0=A0=A0=A0 // section attributes into page attributes +=A0=A0=A0=A0=A0 NextSectionAttributes =3D 0; =A0=A0=A0=A0=A0=A0 Status =3D SyncCacheConfigPage ( =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 i,FirstLevelTable[i], =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 NumberOfDescriptors, MemorySpaceMap, -- 2.9.0.windows.1