Bug 197177

Summary: ACPI Error: Needed [Integer/String/Buffer], found [Region] - Asus Prime B350M-K
Product: ACPI Reporter: fin4478
Component: ACPICA-CoreAssignee: acpi_acpica-core (acpi_acpica-core)
Status: CLOSED WILL_NOT_FIX    
Severity: normal CC: erik.kaneda, lenb, rjw, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.14.0-rc4 Subsystem:
Regression: No Bisected commit-id:
Attachments: acpidump
dmesg output
dmesg output of the Debian 4.13.0-1-amd64 kernel

Description fin4478 2017-10-09 23:38:09 UTC
When ACPI_NO_ERROR_MESSAGES is not defined, there is 2 meaningless ugly acpi errors in the screen (and in the dmesg log) at booth with the Asus Prime B350M-K motherboard and latest bios.

So for a non debug kernel, enable ACPI_NO_ERROR_MESSAGES. Exporting ACPI_HELP_APP as terminal environment variable does not work.

./include/acpi/platform/acenv.h
/* acpi_help configuration. Error messages disabled. */

#ifdef ACPI_HELP_APP
#define ACPI_NO_ERROR_MESSAGES
#endif
+#define ACPI_NO_ERROR_MESSAGES
Comment 1 Zhang Rui 2017-10-11 05:57:18 UTC
what are the messages?
Comment 2 fin4478 2017-10-11 06:09:16 UTC
(In reply to Zhang Rui from comment #1)
> what are the messages?

[    0.139732] ACPI Error: Needed [Integer/String/Buffer], found [Region] ffff88021e878120 (20170728/exresop-424)
[    0.139802] ACPI Exception: AE_AML_OPERAND_TYPE, Could not execute arguments for [IOB2] (Region) (20170728/nsinit-426)
Comment 3 Lv Zheng 2017-10-12 06:04:10 UTC
They are not meaningless, they can indicate real problems.
So IMO, they should be there for non-debugging kernels, while for special purposed debugging kernels, we can define ACPI_NO_ERROR_MESSAGES.
Comment 4 fin4478 2017-10-12 10:40:47 UTC
(In reply to Lv Zheng from comment #3)
> They are not meaningless, they can indicate real problems.

See the functions where the those comes, they do not fail but still throws error messages. So use dev_info instead dev_dbg. Dev_info messages are hided at boot but dev_dbg message are ugly.
Comment 5 Lv Zheng 2017-10-13 03:25:13 UTC
You cannot lay down a hammer for all users just due to this.
As they may reflect a real bug in Linux kernel.

BTW, why do you think they do not fail?
Please upload dmesg for further investigation.
Or if this is an already reported issue, please point me the bug#.
Comment 6 Len Brown 2017-10-16 23:01:58 UTC
please attach the acpidump for this system so we can debug if this is a serious issue or not.
Comment 7 fin4478 2017-10-23 18:06:06 UTC
Created attachment 260351 [details]
acpidump

Here is acpidump.
Comment 8 fin4478 2017-10-24 15:50:36 UTC
Created attachment 260363 [details]
dmesg output

Here is an error free dmesg output as it should be. I defined  ACPI_NO_ERROR_MESSAGES to get rid of annoying acpi errors and changed this amdgpu error message to info message (bug reports for this false amdgpu error has been  laying for years, but AMD does nothing because its not in their code)

[    2.300516] amdgpu 0000:25:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff
Comment 9 Erik Kaneda 2017-11-09 17:24:03 UTC
Could you attach the dmesg output with the ACPI errors?
Comment 10 fin4478 2017-11-13 07:35:26 UTC
See comment 2(In reply to Erik Schmauss from comment #9)
> Could you attach the dmesg output with the ACPI errors?

See comment 2:
[    0.139732] ACPI Error: Needed [Integer/String/Buffer], found [Region] ffff88021e878120 (20170728/exresop-424)
[    0.139802] ACPI Exception: AE_AML_OPERAND_TYPE, Could not execute arguments for [IOB2] (Region) (20170728/nsinit-426)

There was no more disturbing acpi messages. I do not want use buggy kernel when I have fixed bugs in them. To have a clean and fully working boot, I need to apply 3 patch sets already.

./include/acpi/platform/acenv.h
/* acpi_help configuration. Error messages disabled. */

#ifdef ACPI_HELP_APP
#define ACPI_NO_ERROR_MESSAGES
#endif
+#define ACPI_NO_ERROR_MESSAGES

Change Invalid PCI ROM header signature message to use the dev_info function in drivers/pci/rom.c

Apply Ryzen temperature patches.
Comment 11 Erik Kaneda 2017-11-13 17:43:46 UTC
I looked at the ACPI tables and it has illegal code that shouldn't compile with the latest iASL compiler. It has been compiled using an outdated iASL compiler.
Comment 12 Erik Kaneda 2017-11-13 18:43:35 UTC
After probing windows behavior, the code that resulted in the compilation does not work on windows. This is a bug in the firmware.
Comment 13 fin4478 2017-11-15 08:44:41 UTC
(In reply to Erik Schmauss from comment #12)
> After probing windows behavior, the code that resulted in the compilation
> does not work on windows. This is a bug in the firmware.

1. A non debug kernel should not produce error message like these.

2. Use dev_info instead of dev_err.
Comment 14 fin4478 2017-11-15 09:10:40 UTC
(In reply to fin4478 from comment #13)
> (In reply to Erik Schmauss from comment #12)
> > After probing windows behavior, the code that resulted in the compilation
> > does not work on windows. This is a bug in the firmware.
> 
> 1. A non debug kernel should not produce error message like these.
> 
> 2. Use dev_info instead of dev_err.

Unless you are not coding this way, you will receive more bug reports like this. I flashed latest Asus firmware and booted with a stock Debian kernel, dmesg output follows.
Comment 15 fin4478 2017-11-15 09:13:23 UTC
Created attachment 260673 [details]
dmesg output of the Debian 4.13.0-1-amd64 kernel
Comment 16 Erik Kaneda 2017-11-29 18:20:30 UTC
Some of these error messages can be quite serious such as

[    0.039918] ACPI Error: 1 table load failures, 10 successful (20170728/tbxfload-246)

and we have been working on differentiating between ACPI Errors and ACPI Firmware Errors. I think they will land in upstream in a few release cycles... ACPI Errors might be an error within the AML interpreter and ACPI Firmware errors indicate that APCI tables themselves are incorrect. There may be a possibility to silence ACPI firmware errors in the future but ACPI Errors can be quite serious.
Comment 17 fin4478 2017-12-03 23:56:22 UTC
(In reply to Erik Schmauss from comment #16)
> Some of these error messages can be quite serious such as
> 
> [    0.039918] ACPI Error: 1 table load failures, 10 successful
> (20170728/tbxfload-246)
>

I do not have that error message. Other users have that and you wrote to them that their firmware is buggy when code by wintel developers is buggy. Do your work and stop writing bullshit to the bug reporting system.