Re: [edk2] [PATCH] ArmPkg/CpuDxe: Disable interrupt before restoring context

2015-09-21 Thread Ard Biesheuvel
On 18 September 2015 at 16:25, Heyi Guo wrote: > Hi Ard, > > Sorry for the late reply. > > However, it seems V7 may not have the some problem, with the reasons below: > > 1. It always restores the context and then increase SP (V8 code increases SP > BEFORE restoring context);

Re: [edk2] [PATCH] ArmPkg/CpuDxe: Disable interrupt before restoring context

2015-09-18 Thread Heyi Guo
Hi Ard, Sorry for the late reply. However, it seems V7 may not have the some problem, with the reasons below: 1. It always restores the context and then increase SP (V8 code increases SP BEFORE restoring context); 2. It stores PC and CPSR to srsfd stack slot: ldr R1,[SP,#0x3c]

Re: [edk2] [PATCH] ArmPkg/CpuDxe: Disable interrupt before restoring context

2015-08-28 Thread Heyi Guo
Hi Ard, Sorry for the late reply. However I think you've got what I meant :) In my opinion, UEFI actually needs timer interrupt nesting, e.g. we have a timer event with low TPL and long execution time, UEFI should support a higher TPL timer event interrupt the execution of this low TPL event,

Re: [edk2] [PATCH] ArmPkg/CpuDxe: Disable interrupt before restoring context

2015-08-24 Thread Ard Biesheuvel
On 23 August 2015 at 17:59, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 23 August 2015 at 15:39, Heyi Guo heyi@linaro.org wrote: On 08/17/2015 05:52 PM, Ard Biesheuvel wrote: On 13 August 2015 at 05:10, Heyi Guoheyi@linaro.org wrote: Interrupt must be disabled before we

Re: [edk2] [PATCH] ArmPkg/CpuDxe: Disable interrupt before restoring context

2015-08-23 Thread Heyi Guo
On 08/17/2015 05:52 PM, Ard Biesheuvel wrote: On 13 August 2015 at 05:10, Heyi Guoheyi@linaro.org wrote: Interrupt must be disabled before we storing ELR and other system registers, or else ELR will be overridden by interrupt reentrance. This bug is critical as we may get occasional

Re: [edk2] [PATCH] ArmPkg/CpuDxe: Disable interrupt before restoring context

2015-08-12 Thread Heyi Guo
On 08/13/2015 11:10 AM, Heyi Guo wrote: Interrupt must be disabled before we storing ELR and other system registers, or else ELR will be overridden by interrupt reentrance. This bug is critical as we may get occasional exception or dead loop when interrupt reentrance occurs: After

[edk2] [PATCH] ArmPkg/CpuDxe: Disable interrupt before restoring context

2015-08-12 Thread Heyi Guo
Interrupt must be disabled before we storing ELR and other system registers, or else ELR will be overridden by interrupt reentrance. This bug is critical as we may get occasional exception or dead loop when interrupt reentrance occurs: After increasing SP ... Before popping out registers Or