From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0701.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::701]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 56E791A1DF3 for ; Mon, 26 Sep 2016 10:22:34 -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=cO+ZGzSGfm09S+6MMT6Z+/YfufTMn8/t30CsebVR8i8=; b=A9bxLOynPqRF1HYsDc6ixk/Qz4ZMSdqVokgO+yH40YlfyUVuCEvPzrx17fCx9QWDdL/ZW8WEot56gNEqnmFyXOFotbC26SCo0OcN7OqlFlWIO+c7d6Ze1EgFBWPFJfAY7cq5SLa2Vw11c/LHvAyQH+qyCsCZaRXuSjPhImnqpFI= 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:22:23 +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:22:23 +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/gwAAeKTQ Date: Mon, 26 Sep 2016 17:22:23 +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: 885537f6-1f0a-42ed-02ba-08d3e631ae29 x-microsoft-exchange-diagnostics: 1; BL2PR03MB433; 6:Qf3Jnup87Dur8kNYhRHIUjSDi8xt6ShsQTNC7rbB3m4v0cRXSo/cK0cZFTUn/n8RTzWQQBfqjyxEGILpX0ZlFsmsMqf++Dq18AZvISffhurW7otodM1vGesVa/wqhSZx/k6agz15HXTuJOYAab9aaE5wrZGS/3VWE/3kFn7Eq3hdcRFMe90LO0ynf6hLJEMgMWdWJ/xVby6DaG9g+CcfC8xx1TxbXvrZKQUvhkY0uVB28iIhAtALG4pgTq7WddZ2iAGufQjATqV4Hg/Eh7xsgsdwIVqfc8DrPOfF7gKmO1LvPbz1BRzr2+wbAPjkNCtpo6cOdgCOVbPuujkMpkzbZA==; 5:LVDANnwLMym9EzZVuX5zMISK4ZxPpI1VFr1zneIjPks194G9YQWd5BAEaNBPRsq9J3key1FP3hdXzBQgY3PVmINz0XdaE4vVLKyjr5hk+CidG0XIJ0ASQl6cARJzyPKXgrYM/W7FIZz+7aId/a4Mvw==; 24:H+kZU4onXdMJvxc7KatxYBOTz4mjre1/FYgUFwE8DqWx60YuGYMl+kgQKaWftXkdu7fIoYNRw91bHXfdDUdxUs5v0LVXJ+izyrXJL02lk/k=; 7:R5k37WFodQiXgIST5Bxua83tyxMkMY+zU8nXOEaC4sw9Fuw6eOoGALva5k+5NPi5tRgaafI358fsp17JrU1QBcep4p0MH+D1XEEHVo39UqIpckcsMECqLGrBN2Tny2OY6HUECi2+KyxF/e/FABHb7wPPDBGcWc8pohkaltXSpjfM7ZeTZK0evJisn0P+pxac2/wkD2fzS7+Db+kqudKXcoCHl7QSVqZruPPfG3GHxhdDOkgOCEO7LCNsQqGa0GkXYpKJTUuB0b3IjGrImFvbBs4Ng/a0vGvWr/bChhlSCKrqzP6EUO/EL6MKhz68SL8J 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)(189002)(199003)(110136003)(99286002)(105586002)(8676002)(7696004)(81166006)(81156014)(97736004)(86362001)(19580405001)(8990500004)(5002640100001)(19580395003)(4326007)(2906002)(229853001)(86612001)(2351001)(6916009)(2900100001)(77096005)(101416001)(189998001)(50986999)(7846002)(7736002)(106356001)(586003)(5660300001)(54356999)(102836003)(305945005)(3280700002)(74316002)(8936002)(6116002)(87936001)(11100500001)(10090500001)(33656002)(2501003)(9686002)(92566002)(3660700001)(76576001)(5005710100001)(68736007)(10290500002)(10400500002)(122556002)(3826002); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB433; H:BL2PR03MB433.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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:22:23.7159 (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:22:34 -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