On Wed, 5 Feb 2025 at 12:52, Alex Bennée <alex.ben...@linaro.org> wrote:
>
> Peter Maydell <peter.mayd...@linaro.org> writes:
>
> > In system register access pseudocode the common pattern for
> > AArch32 registers with access traps to EL3 is:
> >
> > at EL1 and EL2:
> >   if HaveEL(EL3) && !ELUsingAArch32(EL3) && (SCR_EL3.TERR == 1) then
> >      AArch64.AArch32SystemAccessTrap(EL3, 0x03);
> >   elsif HaveEL(EL3) && ELUsingAArch32(EL3) && (SCR.TERR == 1) then
> >      AArch32.TakeMonitorTrapException();
> > at EL3:
> >   if (PSTATE.M != M32_Monitor) && (SCR.TERR == 1) then
> >      AArch32.TakeMonitorTrapException();
>
> I was confused a little by my copy which was:
>
>     elsif HaveEL(EL3) && !ELUsingAArch32(EL3) && SCR_EL3.TERR == '1' then
>         if EL3SDDUndef() then
>             UNDEFINED;
>         else
>             AArch64.AArch32SystemAccessTrap(EL3, 0x03);
>
> But I think EL3SDDUndef() is always false for us as we don't have an
> external debug interface.

Yes, that's correct; I simplified the pattern a bit above
to remove some of the irrelevant detail. (EL3SDDUndef is also
hiding an IMPDEF choice about what order to prioritize the traps
in if you do implement external debug.)

-- PMM

Reply via email to