From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.171.2.31; helo=mail-in21.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from mail-in21.apple.com (mail-out21.apple.com [17.171.2.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E17A721F2AF61 for ; Thu, 28 Sep 2017 06:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1506607234; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pLQ6OCiJfOjHZhofd88d6Lr69VlzozAKaWhHcYY2nIQ=; b=GJBpj3hv503wXWxAjkDcIEPo3o8vbGW86fzpcO+vM6pG2em/JCU9ew0W73dygZb3 WV/IFNcHzgHb22R7SEDWbYv+5z7cVpYrMEL7LOsCHZyZ1kfSjgxbsbVqnUebyBFd 6twBiV62sJ/4gdTijHWSD7Rs8DCjUV2eMTX7ofGRwNKuPm1FTqTtk3NoihfJnLDH itaEcQWGG2y7Wz2Hvp5zbH6p4VJnF5DdgzQ933iQHMM5KDzWY5Wl5k477eBwahGv kOPde5QwSF981C7cjzwhGbhgPS7mltJeXsD7v2mMjs9tBNjw6owmiws6stLs/Bge H3OeZMz/BE6YoAU8iDCjNw==; Received: from relay6.apple.com (relay6.apple.com [17.128.113.90]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail-in21.apple.com (Apple Secure Mail Relay) with SMTP id 8D.1A.21774.2800DC95; Thu, 28 Sep 2017 07:00:34 -0700 (PDT) X-AuditID: 11ab0215-922009c00000550e-42-59cd00825892 Received: from nwk-mmpp-sz10.apple.com (nwk-mmpp-sz10.apple.com [17.128.115.122]) by relay6.apple.com (Apple SCV relay) with SMTP id E3.29.03275.2800DC95; Thu, 28 Sep 2017 07:00:34 -0700 (PDT) MIME-version: 1.0 Received: from [17.234.40.194] by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.1.3.20170825 64bit (built Aug 25 2017)) with ESMTPSA id <0OWZ00HEKTKXWT50@nwk-mmpp-sz10.apple.com>; Thu, 28 Sep 2017 07:00:34 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish In-reply-to: Date: Thu, 28 Sep 2017 07:00:34 -0700 Cc: "edk2-devel@lists.01.org" , edk2-devel Message-id: References: To: Vabhav Sharma X-Mailer: Apple Mail (2.3273) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLLMWRmVeSWpSXmKPExsUi2FAYpdvEcDbSYM5fTYtTi6ayWew5dJTZ on/baxYHZo/u2f9YPDa+28EUwBTFZZOSmpNZllqkb5fAlXH+fStrwSKeirnf5rI0MP7h7GLk 4JAQMJE43hTfxcjJISSwhkliYbc6iA0SvnxnK1MXIxdQ/BCjxJsTN5hBErwCghI/Jt9jAell FpCXOHheFiTMLKAl8f1RKwvEnK+MEi3/MkBsYQFxiXdnNjFD2IkS0/vXMoLYbALKEivmf2AH sTkFYiWm/e8Dq2ERUJWYdPgRK8TMdImvmxexQay1kXj3Zj0zxPwYiZvrFoHViAhoSvRM/c0G cbOsxK3Zl5gh7A42idZbxRMYhWchuXoWwtWzkFy9gJF5FaNwbmJmjm5mnpGhXmJBQU6qXnJ+ 7iZGUHivZhLdwTj/leEhRgEORiUeXo3FpyOFWBPLiitzDzFKc7AoifMaK5+JFBJITyxJzU5N LUgtii8qzUktPsTIxMEp1cBo1/Lrhf26b8Wq+ilqsX/uqf5OfaF/892cowaT51w8UF2X2MCT 9Ubmv94xjX/yseFabn/Cqye4BB0oOXH7wCHu7Olxr/hWvDfdJrjufaVKnev0r9M6pI45qHea hF5esXdVgN6vXpXv32T5Uu7Hh0Xs/xYzV2wGy4drs2wvS8TMmLHo9u+2jcKXlViKMxINtZiL ihMBhAGTblACAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrELMWRmVeSWpSXmKPExsUi2FBcpdvEcDbSYNltPotTi6ayWew5dJTZ on/baxYHZo/u2f9YPDa+28EUwBTFZZOSmpNZllqkb5fAlXH+fStrwSKeirnf5rI0MP7h7GLk 5JAQMJG4fGcrUxcjF4eQwCFGiTcnbjCDJHgFBCV+TL7H0sXIwcEsIC9x8LwsSJhZQEvi+6NW FhBbSOAro0TLvwwQW1hAXOLdmU3MEHaixPT+tYwgNpuAssSK+R/YQWxOgViJaf/7wGpYBFQl Jh1+xAoxM13i6+ZFbBBrbSTevVnPDDE/RuLmukVgNSICmhI9U3+zQdwsK3Fr9iXmCYwCs5Bc Ogvh0llILl3AyLyKUaAoNSex0kwvsaAgJ1UvOT93EyM4JAujdjA2LLc6xCjAwajEw3thwelI IdbEsuLKXGBQcDArifAm/j8TKcSbklhZlVqUH19UmpNafIhRmoNFSZx3xZqjkUIC6Yklqdmp qQWpRTBZJg5OqQZGVwlHvg3MeU5pIWwR/UwvxOvZojRVxRduZzqfmlYR/z2f6WN+lHplpFpt wZTIA2p7qwWZmHdbHuH43J7qk7s5Jkikm2PqAfZpPDftBbYyLbZZ1R+x4YPHofDHHtPEXDQN U/QehG3LuPaO+fjNth3+3w4Ynw39selH1+WWugUqjXU17yszRZRYijMSDbWYi4oTATx08gxF AgAA Subject: Re: Clarification about InitializeCpuExceptionHandlers() and TGE bit in hcr_el2 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: Thu, 28 Sep 2017 13:57:21 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII > On Sep 28, 2017, at 4:23 AM, Vabhav Sharma wrote: > > Hi All, > > I see that InitializeCpuExceptionHandlers() is called from DxeMain to take over exception handlers and later from ArmCpuDxe. > Is there any specific purpose to call it from two places during dxe phase? > Vabhav, DxeMain is the DXE Core and that is like (micro) kernel and it is platform agnostic code. InitializeCpuExceptionHandlers() exists in that location to catch unhandled exceptions, especially in the case when no debugger stub is linked in. The CPU Dxe driver abstracts CPU specifics from the DXE Core and it adds supports for interrupts, cachability, etc. and the DXE Core uses services from this driver to abstract CPU implementation. To make things even more complex on some platforms PEI and DXE run in entirely different modes. For example on x86 is is common for PEI to be 32-bit and and DXE to be 64-bit. This is mostly due to how complex it is to turn on memory, and the fact that there is no good place to put the page tables prior to memory init. I'll let the ARM folks comment on hcr_el2 usage. Thanks, Andrew Fish > Additionally we are setting TGE bit three times in hcr_el2 during PrePei phase(ArmPlatformPkg/PrePi/AArch64/ArchPrePi.c) > and Twice in Dxe phase: dxemain(),ArmCpuDxe > > Please help to clarify or required to be fixed? > > Regards, > Vabhav > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel