From: Vabhav Sharma <vabhav.sharma@nxp.com>
To: "afish@apple.com" <afish@apple.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Clarification about InitializeCpuExceptionHandlers() and TGE bit in hcr_el2
Date: Thu, 5 Oct 2017 16:53:50 +0000 [thread overview]
Message-ID: <DB4PR04MB29912FB9B65BF89D4C07EC1F3700@DB4PR04MB299.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <E04039D8-F716-49C2-A978-6128BC9484B3@apple.com>
Thanks Andrew Fish,
I understand.
In PEI Phase, No handlers are installed and there might be pending exception. ExceptionHandlers() can be installed during PEI phase like after initializing the MMU to catch unhandled exception. Please suggest?
Dear Arm Folks,
I request you to comment on hcr_el2 usage mentioned in below email
I understand that Enabling TGE bit will route the EL1 exception to EL2.Is there any EL1 code during UEFI execution?
Regards,
Vabhav
-----Original Message-----
From: afish@apple.com [mailto:afish@apple.com]
Sent: Thursday, September 28, 2017 7:31 PM
To: Vabhav Sharma <vabhav.sharma@nxp.com>
Cc: edk2-devel@lists.01.org; edk2-devel <edk2-devel-bounces@lists.01.org>
Subject: Re: [edk2] Clarification about InitializeCpuExceptionHandlers() and TGE bit in hcr_el2
> On Sep 28, 2017, at 4:23 AM, Vabhav Sharma <vabhav.sharma@nxp.com> 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
next prev parent reply other threads:[~2017-10-05 16:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 11:23 Clarification about InitializeCpuExceptionHandlers() and TGE bit in hcr_el2 Vabhav Sharma
2017-09-28 14:00 ` Andrew Fish
2017-10-05 16:53 ` Vabhav Sharma [this message]
2017-10-05 17:02 ` Andrew Fish
2017-10-05 17:14 ` Vabhav Sharma
2017-10-05 17:20 ` Andrew Fish
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB4PR04MB29912FB9B65BF89D4C07EC1F3700@DB4PR04MB299.eurprd04.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox