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

MADT PCAT_COMPAT flag values reversed? #224

Closed
Jnosh opened this issue Mar 7, 2017 · 2 comments · Fixed by #225
Closed

MADT PCAT_COMPAT flag values reversed? #224

Jnosh opened this issue Mar 7, 2017 · 2 comments · Fixed by #225

Comments

@Jnosh
Copy link

Jnosh commented Mar 7, 2017

In source/include/actbl1.h, ACPI_TABLE_MADT includes a flag field.

The preprocessor define ACPI_MADT_PCAT_COMPAT specifies a mask for the PCAT_COMPAT flag while ACPI_MADT_DUAL_PIC and ACPI_MADT_MULTIPLE_APIC specify the values of said flag.

My interpretation of said defines is that ACPI_MADT_DUAL_PIC indicates the presence of dual 8259 PICs, whereas ACPI_MADT_MULTIPLE_APIC indicates their absence.

i.e. hasDualPics = (madt->Flags & ACPI_MADT_PCAT_COMPAT) == ACPI_MADT_DUAL_PIC

However, ACPI_MADT_DUAL_PIC is defined as 0 while the ACPI specification says regarding the PCAT_COMPAT flag:

A one indicates that the system also has a PC-AT-compatible dual-8259 setup.
(ACPI 6.1, Table 5-45 Multiple APIC Flags, p. 144)

I am probably misunderstanding or misreading something but I would appreciate any insight.

@acpibob
Copy link
Contributor

acpibob commented Mar 7, 2017 via email

@Jnosh
Copy link
Author

Jnosh commented Mar 7, 2017

Thanks. I am currently running on Qemu, Bochs and Virtualbox, all of which emulate the PICs and they report 1 as the value of that flag in their MADTs. I was worried I might be misunderstanding how to use the defined constants.

I added a pull request to fix this, if that is OK: #225

I hope this doesn't cause any compatibility issues but since no-one noticed that before, those definitions probably aren't in broad use?
I did some quick googling and only found the definitions in the ACPICA header in various OSS projects but no actual uses.

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

Successfully merging a pull request may close this issue.

2 participants