From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.2.42; helo=eur02-ve1-obe.outbound.protection.outlook.com; envelope-from=vabhav.sharma@nxp.com; receiver=edk2-devel@lists.01.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20042.outbound.protection.outlook.com [40.107.2.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E185C21F3C189 for ; Mon, 9 Oct 2017 10:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mBzUnP7jTZMS/RgvxsF5TR88tbjeZFgdO7UVgOxuZv0=; b=EBMbpgNDhrek2qn3f42aHSImTkOWya9m6fYvf600R3flHFENIDJfjkOUCydHrq+V5NtpenWz5gAFtVj6u436a5YBZqfOt2LN1JsymF8lpglBo1jKzmbCXnbJ9VBUjfKy5JnsnLU4u1ub5KqaAc3F+mY3taBri46J20jALfcyFZo= Received: from DB4PR04MB299.eurprd04.prod.outlook.com (10.141.239.21) by DB4PR04MB297.eurprd04.prod.outlook.com (10.141.239.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 9 Oct 2017 17:33:05 +0000 Received: from DB4PR04MB299.eurprd04.prod.outlook.com ([fe80::e4b0:da81:40ba:c125]) by DB4PR04MB299.eurprd04.prod.outlook.com ([fe80::e4b0:da81:40ba:c125%18]) with mapi id 15.20.0077.020; Mon, 9 Oct 2017 17:33:05 +0000 From: Vabhav Sharma To: "edk2-devel@lists.01.org" Thread-Topic: SError Exception and HCR_EL2 Usage Thread-Index: AdNBI/ZSHAAJ2OaMRnCprRmcYlDnjg== Date: Mon, 9 Oct 2017 17:33:05 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=vabhav.sharma@nxp.com; x-originating-ip: [203.122.1.67] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB4PR04MB297; 6:i+/Dqu49mkWtGXTAsE1NCj702hW+Q2jQ4phtpz7/HLd1OGbs9qsjXqg7I3DJQVbhhXa1Y17yz2iyFXrm+y1HVyW6gLOUFvTRvYD8vZ91FlUBWIL2rgVxRoUFioFbiQC0YLqEh1RcqQyyoq5zUbuxYSDpJt320XfNBa3CwW45NrUWDh61saugjt34sLRU5TrqF5Ah5esQ0p/ShVU+EKhfX9ZHqe6l7rn+x0Z+houmgYhhxh2w9ebOgmvj/J/ggwx0A7zbbtXGNIeRgT8j3YUp87698OsUeEiupe5UDyamur0elXHTGCLrTvnanPYLy5C0jEbAGJGzbHUslUtxiqsdKA==; 5:/NcoVlSap1VrtdHMYJ7gWisSuIVFHZOKqaRyUI+nvw5Q8npEXPGzxdUkq9dgzj0TAJtVu6xP6kIplXlieVs5gEGmD7UePk8RfGqmtnV8JEcS2xWecgeZnHqzIT39J7ZxzoBsR+tSujMM3o3MhDTsV5XT8nk+oqUYqR5wdmSY5Dw=; 24:8/QBPu9nUxsUbEwI0IUNnWFA4MHAu8JBKvfX/57V73A2koBE3xt1MHY6tdk4lZFDkSbhQh6eUIBpWTjmw3sL0xDcLI6RxOK2qSLbPDRFwfk=; 7:YWM+ukx/WjjGXOud5APHT0Yh1k2O9uZKD/zqW1pQiBhjXGca9dYQh9Rv2OFtXCpNVs82i2iRGPyjUQXx97Jb+a5u8ulc2v5D/qowudO5IEpUnXEkvEoE3tRXB57+pjbpG1vfX7COFRIWLcobm5SX6drAExQgJ6EAQd0DZW7FVHl5+7PLw5RFeUQZjd1j5sWjCcsIuLzKIII3ggctysCK8Q4FK/QCI2ThRob2vZDhg7c= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: f1f229de-0b67-4614-9c5d-08d50f3bcc93 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DB4PR04MB297; x-ms-traffictypediagnostic: DB4PR04MB297: x-exchange-antispam-report-test: UriScan:(21748063052155); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123558100)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB4PR04MB297; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB4PR04MB297; x-forefront-prvs: 045584D28C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(199003)(189002)(105586002)(9686003)(53936002)(14454004)(54896002)(6436002)(54356999)(50986999)(2501003)(99286003)(74316002)(7696004)(5640700003)(7736002)(5660300001)(55016002)(2900100001)(478600001)(101416001)(5250100002)(8676002)(6306002)(6506006)(81166006)(68736007)(3280700002)(189998001)(97736004)(316002)(81156014)(106356001)(102836003)(3846002)(6116002)(86362001)(6916009)(790700001)(413944005)(3660700001)(2906002)(25786009)(8936002)(33656002)(66066001)(2351001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB297; H:DB4PR04MB299.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2017 17:33:05.1256 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB297 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: SError Exception and HCR_EL2 Usage 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: , X-List-Received-Date: Mon, 09 Oct 2017 17:29:41 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dear Experts, I am facing SError exception during UEFI bring-up. At boot , secure f/w starts in EL3 and loads UEFI image to DDR. After this = secure f/w passes control to UEFI in EL2. I debugged and manifest the problem by adding below lines in UEFI PrePi ent= ry point(ModuleEntryPoint.S) ASM_FUNC(_ModuleEntryPoint) +msr daifclr,#4 +isb +mrs x0, hcr_el2 +ldr x1, =3D0x08000000 +orr x0, x0, x1 +msr hcr_el2, x0 +isb Once exception occurs than ELR_EL2 point to 'isb' instruction and ESR_EL2 i= s SError Exception syndrome. Could you please suggest if this is UEFI problem or Secure f/w issue? Additionally, TGE bit is set in hcr_el2 three times during PrePei phase(Arm= PlatformPkg/PrePi/AArch64/ArchPrePi.c),DxeMain(),ArmCpuDxe. Please explain the purpose of setting it or require to be fixed? Regards, Vabhav