lkml.org 
[lkml]   [2017]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ACPI, APEI: Fixup incorrect 16-bit access width firmware bug
Date
From: Liwei Song <liwei.song@windriver.com>

This is a follow up to commit f712c71f7b2b ("ACPI, APEI: Fixup common
access width firmware bug") fix the following firmware bug:

[Firmware Bug]: APEI: Invalid bit width + offset in GAR [0xb2/16/0/1/1]

This is due to an 8-bit access width is specified for a 16-bit register,
Do bit_width check just like what the original commit have done.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
drivers/acpi/apei/apei-base.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
index da370e1..7e47bc6 100644
--- a/drivers/acpi/apei/apei-base.c
+++ b/drivers/acpi/apei/apei-base.c
@@ -610,6 +610,9 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
else if (bit_width == 64 && bit_offset == 0 && (*paddr & 0x07) == 0 &&
*access_bit_width < 64)
*access_bit_width = 64;
+ else if (bit_width == 16 && bit_offset == 0 && (*paddr & 0x01) == 0 &&
+ *access_bit_width < 16)
+ *access_bit_width = 16;

if ((bit_width + bit_offset) > *access_bit_width) {
pr_warning(FW_BUG APEI_PFX
--
2.7.4
\
 
 \ /
  Last update: 2017-07-21 11:42    [W:0.084 / U:7.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site