All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ACPI: tables: FPDT: Do not print FW_BUG message if subtable types are reserved
@ 2021-08-18  6:38 Adrian Huang
  2021-08-19  2:56 ` Zhang Rui
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Huang @ 2021-08-18  6:38 UTC (permalink / raw)
  To: linux-acpi; +Cc: Rafael J . Wysocki, Adrian Huang, Zhang Rui, Adrian Huang

From: Adrian Huang <ahuang12@lenovo.com>

Table 5.90 "Runtime Performance Record Types" in ACPI 6.4 spec [1] says:

  These type values "0x0003-0xFFFF" of Runtime Performance Record Types
  are reserved for ACPI spec usage, platform vendor usage, hardware
  vendor usage, platform firmware vendor usage and future use.

Users might be confused with the FW_BUG message, and they think this
is the FW issue. Here is the example in a Lenovo box:

  ACPI: FPDT 0x00000000A820A000 000044 (v01 LENOVO THINKSYS 00000100 01000013)
  ACPI: Reserving FPDT table memory at [mem 0xa820a000-0xa820a043]
  ACPI FPDT: [Firmware Bug]: Invalid record 4113 found

So, remove the FW_BUG message to avoid confusion since those subtable
types are reserved in ACPI 6.4 spec.

[1] https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#firmware-performance-data-table-fpdt

Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
---
 drivers/acpi/acpi_fpdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpi_fpdt.c b/drivers/acpi/acpi_fpdt.c
index 4ee2ad234e3d..568f26a7490a 100644
--- a/drivers/acpi/acpi_fpdt.c
+++ b/drivers/acpi/acpi_fpdt.c
@@ -220,8 +220,8 @@ static int fpdt_process_subtable(u64 address, u32 subtable_type)
 			break;
 
 		default:
-			pr_err(FW_BUG "Invalid record %d found.\n", record_header->type);
-			return -EINVAL;
+			/* Other types are reserved in ACPI 6.4 spec. */
+			break;
 		}
 	}
 	return 0;
-- 
2.25.1


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

* Re: [PATCH 1/1] ACPI: tables: FPDT: Do not print FW_BUG message if subtable types are reserved
  2021-08-18  6:38 [PATCH 1/1] ACPI: tables: FPDT: Do not print FW_BUG message if subtable types are reserved Adrian Huang
@ 2021-08-19  2:56 ` Zhang Rui
  2021-08-19  3:40   ` Huang Adrian
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang Rui @ 2021-08-19  2:56 UTC (permalink / raw)
  To: Adrian Huang, linux-acpi; +Cc: Rafael J . Wysocki, Adrian Huang

On Wed, 2021-08-18 at 14:38 +0800, Adrian Huang wrote:
> From: Adrian Huang <ahuang12@lenovo.com>
> 
> Table 5.90 "Runtime Performance Record Types" in ACPI 6.4 spec [1]
> says:
> 
>   These type values "0x0003-0xFFFF" of Runtime Performance Record
> Types
>   are reserved for ACPI spec usage, platform vendor usage, hardware
>   vendor usage, platform firmware vendor usage and future use.
> 
> Users might be confused with the FW_BUG message, and they think this
> is the FW issue. Here is the example in a Lenovo box:
> 
>   ACPI: FPDT 0x00000000A820A000 000044 (v01 LENOVO THINKSYS 00000100
> 01000013)
>   ACPI: Reserving FPDT table memory at [mem 0xa820a000-0xa820a043]
>   ACPI FPDT: [Firmware Bug]: Invalid record 4113 found
> 
> So, remove the FW_BUG message to avoid confusion since those subtable
> types are reserved in ACPI 6.4 spec.
> 
> [1] 
> https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#firmware-performance-data-table-fpdt
> 

In 
https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#fpdt-performance-record-types
it also mentions that "0x0002-0xFFFF" of FPDT Performance Record Types
are reserved, so it's better to fix them all in one patch?

thanks,
rui
> Cc: Zhang Rui <rui.zhang@intel.com>
> Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
> ---
>  drivers/acpi/acpi_fpdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/acpi_fpdt.c b/drivers/acpi/acpi_fpdt.c
> index 4ee2ad234e3d..568f26a7490a 100644
> --- a/drivers/acpi/acpi_fpdt.c
> +++ b/drivers/acpi/acpi_fpdt.c
> @@ -220,8 +220,8 @@ static int fpdt_process_subtable(u64 address, u32
> subtable_type)
>  			break;
>  
>  		default:
> -			pr_err(FW_BUG "Invalid record %d found.\n",
> record_header->type);
> -			return -EINVAL;
> +			/* Other types are reserved in ACPI 6.4 spec.
> */
> +			break;
>  		}
>  	}
>  	return 0;


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

* Re: [PATCH 1/1] ACPI: tables: FPDT: Do not print FW_BUG message if subtable types are reserved
  2021-08-19  2:56 ` Zhang Rui
@ 2021-08-19  3:40   ` Huang Adrian
  0 siblings, 0 replies; 3+ messages in thread
From: Huang Adrian @ 2021-08-19  3:40 UTC (permalink / raw)
  To: Zhang Rui; +Cc: linux-acpi, Rafael J . Wysocki, Adrian Huang

On Thu, Aug 19, 2021 at 10:56 AM Zhang Rui <rui.zhang@intel.com> wrote:
>
> On Wed, 2021-08-18 at 14:38 +0800, Adrian Huang wrote:
> > From: Adrian Huang <ahuang12@lenovo.com>
> >
> > Table 5.90 "Runtime Performance Record Types" in ACPI 6.4 spec [1]
> > says:
> >
> >   These type values "0x0003-0xFFFF" of Runtime Performance Record
> > Types
> >   are reserved for ACPI spec usage, platform vendor usage, hardware
> >   vendor usage, platform firmware vendor usage and future use.
> >
> > Users might be confused with the FW_BUG message, and they think this
> > is the FW issue. Here is the example in a Lenovo box:
> >
> >   ACPI: FPDT 0x00000000A820A000 000044 (v01 LENOVO THINKSYS 00000100
> > 01000013)
> >   ACPI: Reserving FPDT table memory at [mem 0xa820a000-0xa820a043]
> >   ACPI FPDT: [Firmware Bug]: Invalid record 4113 found
> >
> > So, remove the FW_BUG message to avoid confusion since those subtable
> > types are reserved in ACPI 6.4 spec.
> >
> > [1]
> > https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#firmware-performance-data-table-fpdt
> >
>
> In
> https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#fpdt-performance-record-types
> it also mentions that "0x0002-0xFFFF" of FPDT Performance Record Types
> are reserved, so it's better to fix them all in one patch?

Ah, I missed that. Will send the v2 patch later.

-- Adrian

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

end of thread, other threads:[~2021-08-19  3:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18  6:38 [PATCH 1/1] ACPI: tables: FPDT: Do not print FW_BUG message if subtable types are reserved Adrian Huang
2021-08-19  2:56 ` Zhang Rui
2021-08-19  3:40   ` Huang Adrian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.