Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless file generation when dumping special tables like RSDP, DSDT, etc. #285

Closed
smwikipedia opened this issue Jun 28, 2017 · 14 comments
Closed

Comments

@smwikipedia
Copy link
Contributor

smwikipedia commented Jun 28, 2017

[Symptom]:
I ported acpidump to UEFI Shell environment. When dumping special tables like RSDP, RSDT, XSDT, DSDT, FACS, acpidump.efi will generate too many files until it reaches AP_MAX_ACPI_FILES = 256.

This issue doesn't happen with normal tables like BERT, HEST. And doens't happen when dump table by index.

[Root cause]:
These special tables are all singleton. But there's no necessary detection when dump them with instance number > 1.

@acpibob
Copy link
Contributor

acpibob commented Jun 28, 2017

It does sound like a problem, but why are you using instance > 1?

@smwikipedia
Copy link
Contributor Author

smwikipedia commented Jun 28, 2017

I am not using instance > 1. I just use the following command line:
acpidump.efi -b -n DSDT
And it will generate many dsdt.dat files. All identical.

The reason is, when use -n to dump a table by name, "ApDumpTableByName()" will treat every table as potentially having multiple instances. It loops through 0 to AP_MAX_ACPI_FILES to call the AcpiOsGetTableByName(). For normal tables, there's a detection logic for excessive instnace number. For special tables like DSDT, there's not, so redundent files are generated.

@acpibob
Copy link
Contributor

acpibob commented Jun 28, 2017

Here's what I see on win:

c:\temp>acpidump -b -n DSDT

Directory of c:\temp

06/28/2017 08:44 AM

.
06/28/2017 08:44 AM ..
06/28/2017 08:44 AM 126,458 dsdt.dat
06/28/2017 08:42 AM 734,476 dump.txt

I'll take a look at the code, but I'm not seeing any bad behavior. What version of acpidump are you using? here's the current version:

c:\temp>acpidump -v

Intel ACPI Component Architecture
ACPI Binary Table Dump Utility version 20170531
Copyright (c) 2000 - 2017 Intel Corporation

@smwikipedia
Copy link
Contributor Author

smwikipedia commented Jun 28, 2017

The issue is with efi porting. The issue file is "\source\os_specific\efi\osefitbl.c". Function OslGetTable().
Windows version is fine because this file is not used.

@acpibob
Copy link
Contributor

acpibob commented Jun 28, 2017

Lv can have a look at this.

@acpibob
Copy link
Contributor

acpibob commented Jun 28, 2017

Probably best if you open a bugzilla on this at

https://bugs.acpica.org

And point out that the problem is against the EFI version.
Thanks.

@smwikipedia
Copy link
Contributor Author

I will contact him tomorrow.

@zetalog
Copy link
Contributor

zetalog commented Jun 29, 2017

DSDT could have 2 instances, one for 32-bit OS, the other for 64-bit OS. That's why we allow to dump DSDT with instances. But the support may not be fully tested.

@acpibob
Copy link
Contributor

acpibob commented Jun 29, 2017

How many files are generated?
It sounds like 256?

@zetalog
Copy link
Contributor

zetalog commented Jun 30, 2017

Filed a bug and posted a fix here:

https://bugs.acpica.org/show_bug.cgi?id=1407

@zetalog
Copy link
Contributor

zetalog commented Jun 30, 2017

How many files are generated? It sounds like 256?
Yes, EFI support contains a very old bug.

Originally acpidump is developed to support 2 instances of DSDT/FACS but it's not tested and broken. On Linux we changed to support only 1 instance of DSDT/FACS when a bug was reported. But EFI support is not fixed.

Actually we should support 2 instances, as FACS/XFACS do contain different content. I tried to improve both Linux and EFI support.

zetalog pushed a commit to zetalog/acpica that referenced this issue Jun 30, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 4, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 5, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
@zetalog zetalog mentioned this issue Jul 5, 2017
@smwikipedia
Copy link
Contributor Author

smwikipedia commented Jul 5, 2017 via email

zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 6, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 6, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 7, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 7, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 7, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 7, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 7, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 7, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 7, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 12, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 12, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 12, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 13, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/acpica that referenced this issue Jul 13, 2017
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
zetalog pushed a commit to zetalog/linux that referenced this issue Aug 2, 2017
ACPICA commit 343fc31840d40c06001f3b170ee5bcdfd3c7f3e0

ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in osl_get_table() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI acpidump. Fixed by
Lv Zheng.

Link: acpica/acpica@343fc318
Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica/acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
fengguang pushed a commit to 0day-ci/linux that referenced this issue Aug 3, 2017
ACPICA commit 343fc31840d40c06001f3b170ee5bcdfd3c7f3e0

ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in osl_get_table() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI acpidump. Fixed by
Lv Zheng.

Link: acpica/acpica@343fc318
Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica/acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
sudipm-mukherjee pushed a commit to sudipm-mukherjee/parport that referenced this issue Aug 7, 2017
ACPICA commit 343fc31840d40c06001f3b170ee5bcdfd3c7f3e0

ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in osl_get_table() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI acpidump. Fixed by
Lv Zheng.

Link: acpica/acpica@343fc318
Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica/acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
@acpibob
Copy link
Contributor

acpibob commented Sep 8, 2017

Can we close this?

@acpibob
Copy link
Contributor

acpibob commented Dec 1, 2017

Closing.

@acpibob acpibob closed this as completed Dec 1, 2017
kk-infra pushed a commit to kernkonzept/acpica that referenced this issue Nov 6, 2019
ACPI spec allows to configure different 32-bit/64-bit table addresses for
DSDT and FACS. And for FACS, it's meaningful to dump both of them as they
are used to support different suspend protocols.

While:
1. on Linux, only 1 instance is supported for DSDT/FACS; and
2. on EFI, the code in OslGetTable() is buggy with special table instances,
   causing endless file dump for such tables (reported by Shao Ming in link
   #2).

This patch adds DSDT/FACS instance support for Linux/EFI but doesn't cover
BSD as BSD acpidump needs a full refresh. Fixed by Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1407 [#1]
Link: acpica/acpica#285  [#2]
Reported-by: Shao Ming <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants