[PATCH v1 34/43] x86: apl: Fix save/restore of ITSS priorities

Simon Glass sjg at chromium.org
Wed Jul 8 05:33:04 CEST 2020


Hi Bin,

On Tue, 30 Jun 2020 at 02:27, Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Hi Simon,
>
> On Mon, Jun 15, 2020 at 11:58 AM Simon Glass <sjg at chromium.org> wrote:
> >
> > The FSP-S changes the ITSS priorities. The code that tries to save it
> > before running FSP-S and restore it afterwards does not work as U-Boot
> > relocates in between the save and restore. This means that the driver
> > data saved before relocation is lost and the new driver just sees zeroes.
> >
> > Fix this by allocating space in the relocated memory for the ITSS data.
> > Save it there and access it from the driver after relocation.
> >
> > This fixes interrupt handling on coral.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> >  arch/x86/cpu/apollolake/fsp_s.c    | 11 +++++------
> >  arch/x86/cpu/cpu.c                 | 13 +++++++++++++
> >  arch/x86/cpu/intel_common/itss.c   | 25 +++++++++++++++++++++++--
> >  arch/x86/include/asm/global_data.h |  1 +
> >  arch/x86/include/asm/itss.h        |  2 +-
> >  drivers/misc/irq-uclass.c          |  2 +-
> >  6 files changed, 44 insertions(+), 10 deletions(-)
> >
[..]

> > diff --git a/drivers/misc/irq-uclass.c b/drivers/misc/irq-uclass.c
> > index 98bc79eaba..6b32b451a6 100644
> > --- a/drivers/misc/irq-uclass.c
> > +++ b/drivers/misc/irq-uclass.c
> > @@ -170,7 +170,7 @@ int irq_first_device_type(enum irq_dev_t type, struct udevice **devp)
> >
> >         ret = uclass_first_device_drvdata(UCLASS_IRQ, type, devp);
> >         if (ret)
> > -               return log_msg_ret("find", ret);
> > +               return ret;
>
> Is this change intended?

Yes but I forgot to mention it in the commit message. Will add it.

Regards,
Simon


More information about the U-Boot mailing list