public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI, APEI: Fixup incorrect 64-bit access width firmware bug
@ 2013-01-16  9:03 Lans Zhang
  2013-01-16 22:54 ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Lans Zhang @ 2013-01-16  9:03 UTC (permalink / raw)
  To: len.brown; +Cc: linux-acpi

The bit width check was introduced by 15afae60 (ACPI, APEI: Fix
incorrect APEI register bit width check and usage), and a fixup
for incorrect 32-bit width memory address was given by f712c71
(ACPI, APEI: Fixup common access width firmware bug). Now there
is a similar symptom:

[Firmware Bug]: APEI: Invalid bit width + offset in GAR [0x12345000/64/0/3/0]

Another bogus BIOS reports an incorrect 64-bit width in trigger table.
Thus, apply to a similar workaround for 64-bit width memory address.

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
 drivers/acpi/apei/apei-base.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
index 00a7836..46f80e2 100644
--- a/drivers/acpi/apei/apei-base.c
+++ b/drivers/acpi/apei/apei-base.c
@@ -590,6 +590,9 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
 	if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 &&
 	    *access_bit_width < 32)
 		*access_bit_width = 32;
+	else if (bit_width == 64 && bit_offset == 0 && (*paddr & 0x07) == 0 &&
+	    *access_bit_width < 64)
+		*access_bit_width = 64;
 
 	if ((bit_width + bit_offset) > *access_bit_width) {
 		pr_warning(FW_BUG APEI_PFX
-- 
1.7.8.110.g4cb5d


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI, APEI: Fixup incorrect 64-bit access width firmware bug
  2013-01-16  9:03 [PATCH] ACPI, APEI: Fixup incorrect 64-bit access width firmware bug Lans Zhang
@ 2013-01-16 22:54 ` Rafael J. Wysocki
  2013-01-17 22:27   ` Gary Hade
  2013-01-18  2:50   ` Myron Stowe
  0 siblings, 2 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2013-01-16 22:54 UTC (permalink / raw)
  To: Lans Zhang; +Cc: len.brown, linux-acpi, Myron Stowe, Huang Ying, Gary Hade

On Wednesday, January 16, 2013 05:03:29 PM Lans Zhang wrote:
> The bit width check was introduced by 15afae60 (ACPI, APEI: Fix
> incorrect APEI register bit width check and usage), and a fixup
> for incorrect 32-bit width memory address was given by f712c71
> (ACPI, APEI: Fixup common access width firmware bug). Now there
> is a similar symptom:
> 
> [Firmware Bug]: APEI: Invalid bit width + offset in GAR [0x12345000/64/0/3/0]
> 
> Another bogus BIOS reports an incorrect 64-bit width in trigger table.
> Thus, apply to a similar workaround for 64-bit width memory address.

This makes sense to me, but I'd like more people to have a look at it (Myron,
Ying, Gary CCed).

Thanks,
Rafael


> Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
> ---
>  drivers/acpi/apei/apei-base.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
> index 00a7836..46f80e2 100644
> --- a/drivers/acpi/apei/apei-base.c
> +++ b/drivers/acpi/apei/apei-base.c
> @@ -590,6 +590,9 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
>  	if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 &&
>  	    *access_bit_width < 32)
>  		*access_bit_width = 32;
> +	else if (bit_width == 64 && bit_offset == 0 && (*paddr & 0x07) == 0 &&
> +	    *access_bit_width < 64)
> +		*access_bit_width = 64;
>  
>  	if ((bit_width + bit_offset) > *access_bit_width) {
>  		pr_warning(FW_BUG APEI_PFX
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI, APEI: Fixup incorrect 64-bit access width firmware bug
  2013-01-16 22:54 ` Rafael J. Wysocki
@ 2013-01-17 22:27   ` Gary Hade
  2013-01-18  8:50     ` Jean Delvare
  2013-01-18  2:50   ` Myron Stowe
  1 sibling, 1 reply; 5+ messages in thread
From: Gary Hade @ 2013-01-17 22:27 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Lans Zhang, len.brown, linux-acpi, Myron Stowe, Huang Ying,
	Gary Hade, Jean Delvare

On Wed, Jan 16, 2013 at 11:54:54PM +0100, Rafael J. Wysocki wrote:
> On Wednesday, January 16, 2013 05:03:29 PM Lans Zhang wrote:
> > The bit width check was introduced by 15afae60 (ACPI, APEI: Fix
> > incorrect APEI register bit width check and usage), and a fixup
> > for incorrect 32-bit width memory address was given by f712c71
> > (ACPI, APEI: Fixup common access width firmware bug). Now there
> > is a similar symptom:
> > 
> > [Firmware Bug]: APEI: Invalid bit width + offset in GAR [0x12345000/64/0/3/0]
> > 
> > Another bogus BIOS reports an incorrect 64-bit width in trigger table.
> > Thus, apply to a similar workaround for 64-bit width memory address.
> 
> This makes sense to me, but I'd like more people to have a look at it (Myron,
> Ying, Gary CCed).
> 
> Thanks,
> Rafael
> 
> 
> > Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
> > ---
> >  drivers/acpi/apei/apei-base.c |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
> > index 00a7836..46f80e2 100644
> > --- a/drivers/acpi/apei/apei-base.c
> > +++ b/drivers/acpi/apei/apei-base.c
> > @@ -590,6 +590,9 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
> >  	if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 &&
> >  	    *access_bit_width < 32)
> >  		*access_bit_width = 32;
> > +	else if (bit_width == 64 && bit_offset == 0 && (*paddr & 0x07) == 0 &&
> > +	    *access_bit_width < 64)
> > +		*access_bit_width = 64;
> >  
> >  	if ((bit_width + bit_offset) > *access_bit_width) {
> >  		pr_warning(FW_BUG APEI_PFX
> > 
> -- 
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.
> 

This looks reasonable to me.
Acked-by: Gary Hade <garyhade@us.ibm.com>

Copying Jean Delvare who authored the 32-bit fixup.

Gary

-- 
Gary Hade
System x Enablement
IBM Linux Technology Center
503-578-4503  IBM T/L: 775-4503
garyhade@us.ibm.com
http://www.ibm.com/linux/ltc


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI, APEI: Fixup incorrect 64-bit access width firmware bug
  2013-01-16 22:54 ` Rafael J. Wysocki
  2013-01-17 22:27   ` Gary Hade
@ 2013-01-18  2:50   ` Myron Stowe
  1 sibling, 0 replies; 5+ messages in thread
From: Myron Stowe @ 2013-01-18  2:50 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Lans Zhang, len.brown, linux-acpi, Huang Ying, Gary Hade

On Wed, 2013-01-16 at 23:54 +0100, Rafael J. Wysocki wrote:
> On Wednesday, January 16, 2013 05:03:29 PM Lans Zhang wrote:
> > The bit width check was introduced by 15afae60 (ACPI, APEI: Fix
> > incorrect APEI register bit width check and usage), and a fixup
> > for incorrect 32-bit width memory address was given by f712c71
> > (ACPI, APEI: Fixup common access width firmware bug). Now there
> > is a similar symptom:
> > 
> > [Firmware Bug]: APEI: Invalid bit width + offset in GAR [0x12345000/64/0/3/0]
> > 
> > Another bogus BIOS reports an incorrect 64-bit width in trigger table.
> > Thus, apply to a similar workaround for 64-bit width memory address.
> 
> This makes sense to me, but I'd like more people to have a look at it (Myron,
> Ying, Gary CCed).
> 
> Thanks,
> Rafael
> 
> 
> > Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
> > ---
> >  drivers/acpi/apei/apei-base.c |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
> > index 00a7836..46f80e2 100644
> > --- a/drivers/acpi/apei/apei-base.c
> > +++ b/drivers/acpi/apei/apei-base.c
> > @@ -590,6 +590,9 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
> >  	if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 &&
> >  	    *access_bit_width < 32)
> >  		*access_bit_width = 32;
> > +	else if (bit_width == 64 && bit_offset == 0 && (*paddr & 0x07) == 0 &&
> > +	    *access_bit_width < 64)
> > +		*access_bit_width = 64;
> >  
> >  	if ((bit_width + bit_offset) > *access_bit_width) {
> >  		pr_warning(FW_BUG APEI_PFX
> > 

I don't see anything concerning (the spec was definitely anything less
than clear - at least to me - so I'm not surprised we are seeing so many
interpretations and/or bugs).

Acked-by: Myron Stowe <myron.stowe@redhat.com>




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI, APEI: Fixup incorrect 64-bit access width firmware bug
  2013-01-17 22:27   ` Gary Hade
@ 2013-01-18  8:50     ` Jean Delvare
  0 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2013-01-18  8:50 UTC (permalink / raw)
  To: Gary Hade
  Cc: Rafael J. Wysocki, Lans Zhang, len.brown, linux-acpi, Myron Stowe,
	Huang Ying

Le jeudi 17 janvier 2013 à 14:27 -0800, Gary Hade a écrit :
> On Wed, Jan 16, 2013 at 11:54:54PM +0100, Rafael J. Wysocki wrote:
> > On Wednesday, January 16, 2013 05:03:29 PM Lans Zhang wrote:
> > > The bit width check was introduced by 15afae60 (ACPI, APEI: Fix
> > > incorrect APEI register bit width check and usage), and a fixup
> > > for incorrect 32-bit width memory address was given by f712c71
> > > (ACPI, APEI: Fixup common access width firmware bug). Now there
> > > is a similar symptom:
> > > 
> > > [Firmware Bug]: APEI: Invalid bit width + offset in GAR [0x12345000/64/0/3/0]
> > > 
> > > Another bogus BIOS reports an incorrect 64-bit width in trigger table.
> > > Thus, apply to a similar workaround for 64-bit width memory address.
> > 
> > This makes sense to me, but I'd like more people to have a look at it (Myron,
> > Ying, Gary CCed).
> > 
> > Thanks,
> > Rafael
> > 
> > 
> > > Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
> > > ---
> > >  drivers/acpi/apei/apei-base.c |    3 +++
> > >  1 files changed, 3 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
> > > index 00a7836..46f80e2 100644
> > > --- a/drivers/acpi/apei/apei-base.c
> > > +++ b/drivers/acpi/apei/apei-base.c
> > > @@ -590,6 +590,9 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
> > >  	if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 &&
> > >  	    *access_bit_width < 32)
> > >  		*access_bit_width = 32;
> > > +	else if (bit_width == 64 && bit_offset == 0 && (*paddr & 0x07) == 0 &&
> > > +	    *access_bit_width < 64)
> > > +		*access_bit_width = 64;
> > >  
> > >  	if ((bit_width + bit_offset) > *access_bit_width) {
> > >  		pr_warning(FW_BUG APEI_PFX
> > > 
> > -- 
> > I speak only for myself.
> > Rafael J. Wysocki, Intel Open Source Technology Center.
> > 
> 
> This looks reasonable to me.
> Acked-by: Gary Hade <garyhade@us.ibm.com>
> 
> Copying Jean Delvare who authored the 32-bit fixup.

I've not seen this specific case yet but yes, the fixup seems perfectly
reasonable.

Acked-by: Jean Delvare <jdelvare@suse.de>


-- 
Jean Delvare
Suse L3

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-18  8:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16  9:03 [PATCH] ACPI, APEI: Fixup incorrect 64-bit access width firmware bug Lans Zhang
2013-01-16 22:54 ` Rafael J. Wysocki
2013-01-17 22:27   ` Gary Hade
2013-01-18  8:50     ` Jean Delvare
2013-01-18  2:50   ` Myron Stowe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox