From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web08.9091.1614084182164138241 for ; Tue, 23 Feb 2021 04:43:02 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qsgiSpKd; spf=pass (domain: kernel.org, ip: 198.145.29.99, mailfrom: ardb@kernel.org) Received: by mail.kernel.org (Postfix) with ESMTPSA id 7990764E5C for ; Tue, 23 Feb 2021 12:43:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614084181; bh=C/C6HptT66cvtjJUXNcKo10UY8jXbc+V9AbrchgtW38=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qsgiSpKdyJSAqAfQJ1dWPMagERAEfxOivbN5rzYQquTOv2xxh0eE4Xnj9xdZF4Z7i mlvSA4n4uqsgLMIs/pHv2PHq0hfh9gm482M0MvWTv/SCsF/clxf4SulkvCWn9EOBqU vZ2U6S9EFkURF4s6nZmP/TGEM47D+WALUIsVcEnQsdsnMUZ29sx/cvUswcgguNd4YB 2gU4Q2Mt2VEx900oxbMi/ftxyG0EX2s0B5WI2hHyL0JqMCYf6PuuMz8WOQUnZk5ukg OWGdEWseENJ41+cLN4unSO8O6lwjOLS0UYExNziG3KhKY8kxyJDcvKSYN53cgTjVlh 5EM07nfgrarpQ== Received: by mail-oi1-f172.google.com with SMTP id l3so17477557oii.2 for ; Tue, 23 Feb 2021 04:43:01 -0800 (PST) X-Gm-Message-State: AOAM5313SR76sbuFFuKHieIg0k4lmwnKw0NJkgEqCV3HKmUSMszhzCco Ir3T4BRhZ1XZP6vGgQ2cz9J/P2kvQZb3XN7oMtI= X-Google-Smtp-Source: ABdhPJzw462PFIcW2wNhdIcEV1mr+AfHPQgo9wZO/F3R/H+yzTdTOtPO6pHPnR/i9XIOxcfJQ/eNDpxnvK2xt6+IK4s= X-Received: by 2002:a05:6808:10ca:: with SMTP id s10mr16314903ois.33.1614084180808; Tue, 23 Feb 2021 04:43:00 -0800 (PST) MIME-Version: 1.0 References: <20210223110642.90020-1-huangming@linux.alibaba.com> In-Reply-To: <20210223110642.90020-1-huangming@linux.alibaba.com> From: "Ard Biesheuvel" Date: Tue, 23 Feb 2021 13:42:49 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH edk2 v2 1/1] ArmPkg/ArmGic: Fix GICR_IPRIORITYR address wrong issue To: Ming Huang Cc: devel@edk2.groups.io, Ard Biesheuvel , Leif Lindholm , guoheyi@linux.alibaba.com Content-Type: text/plain; charset="UTF-8" On Tue, 23 Feb 2021 at 12:07, Ming Huang wrote: > > The register address of GICR_IPRIORITYR is in SGI_base frame. Add > IPRIORITY_ADDRESS macro for getting GICR_IPRIORITYR address. Otherwise > GIC RAS error(Uncorrected software error) may report in ArmGicDxe. NOTE: missing sign-off Patch seems fine to me Tested-by: Ard Biesheuvel # QEMU/kvm guest on ThunderX2 > --- > ArmPkg/Drivers/ArmGic/ArmGicLib.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmGicLib.c > index 8ef32b33a1..b4d3965acb 100644 > --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c > +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c > @@ -30,6 +30,9 @@ > #define ICENABLER_ADDRESS(base,offset) ((base) + \ > ARM_GICR_CTLR_FRAME_SIZE + ARM_GICR_ICENABLER + (4 * offset)) > > +#define IPRIORITY_ADDRESS(base,offset) ((base) + \ > + ARM_GICR_CTLR_FRAME_SIZE + ARM_GIC_ICDIPR + (4 * offset)) > + > /** > * > * Return whether the Source interrupt index refers to a shared interrupt (SPI) > @@ -236,7 +239,7 @@ ArmGicSetInterruptPriority ( > } > > MmioAndThenOr32 ( > - GicCpuRedistributorBase + ARM_GIC_ICDIPR + (4 * RegOffset), > + IPRIORITY_ADDRESS (GicCpuRedistributorBase, RegOffset), > ~(0xff << RegShift), > Priority << RegShift > ); > -- > 2.17.1 >