History log of /haiku/src/system/boot/platform/bios_ia32/acpi.cpp
Revision Date Author Comments
# 91ee0332 19-Jul-2022 David Karoly <karolyd577@gmail.com>

move acpi headers from x86 to non-arch

Change-Id: Ida6186af7a40fb7d91b4da92c36d25db30dadb33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5484
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 0ad4a233 18-May-2020 Jérôme Duval <jerome.duval@gmail.com>

bios_ia32: continue on invalid ACPI RSDT/XSDT table checksum

like ACPICA does by default. should help with #16055.

Change-Id: I2379d99ecda93007b0dd316b3c94eb1a36ccd7e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2740
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# 0994532d 25-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

boot_loader: checks whether mapping rsdt header succeeded.

... and exits in case of failure. Reported by mt in #9895.


# 73df2f20 12-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Add validation of the RSDP checksums.
* If we detect ACPI 2.0 or higher, the spec says we should use the XSDT rather
than the RSDT. Attempt to do so, falling back to the RSDT if the former fails
to be mapped/validated.
* Refactored acpi_find_table into a templated version to account for the fact
that the XSDT exports different pointer widths for its links to other tables
than the RSDT.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42133 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c4b692da 11-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Revert r42105. The rsdt_length field on the rsdp structure we have declared is
actually misleading, since it specifies the length of the xsdt rather than the rsdt. Furthermore, it is only available if the BIOS reports ACPI version 2.0 or greater. Since we don't currently support the XSDT, we can't rely on that field and have to resort to the previous approach of mapping the RSDT header in order to determine the length of the RSDT itself.

Also add validation of the RSDT's checksum so we don't get tripped up by BIOS's with broken tables.

Should fix boot problems that were introduced by r42105.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42118 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14282c1e 11-Jun-2011 jackburton <jackburton@a95241bf-73f2-0310-859d-f6bbb57e9c96>

We already know the rsdt length in advance,
so map the whole table without freeing and remapping later


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42105 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e70e32d 11-Jun-2011 anevilyak <anevilyak@a95241bf-73f2-0310-859d-f6bbb57e9c96>

If we found a header, but it wasn't the one we were looking for, reset the header ptr to NULL after unmapping. Otherwise a bogus header pointer was potentially returned, leading to an invalid mem access. Fixes boot problems on my Athlon following recent ACPI changes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42103 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b047e413 09-Jun-2011 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Map the whole table also in acpi_check_rsdt().
Also print the table revision, after the vendor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42084 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb764e7f 10-Jun-2011 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Map the whole table, and not just the header. Fix #7497 again (hopefully
correctly now)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42083 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ad12a198 09-Jun-2011 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Revert r42068 and r42069, since they didnt' make sense (but something's
obviously fishy)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42078 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0a3e6ddf 09-Jun-2011 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Add a comment so this doesn't happen anymore


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42069 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e282383b 09-Jun-2011 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Map B_PAGE_SIZE, and not just acpi_description_header (was actually a
regression), since the tables are bigger than that.
Accessing unmapped memory was doing bad things on
XenServer.
Fixes ticket #7497.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42068 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f3eff1ca 26-Dec-2010 Michael Lotz <mmlr@mlotz.ch>

Free the header after possibly accessing it when tracing is enabled. Also guard
the trace output against header being NULL (i.e. failed to map).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39958 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 43e738bd 18-Mar-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Style fixes


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35897 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33e11f7c 16-Mar-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Squashed todo: only compute the numEntries once, and made it static.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35889 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d756fcf6 08-Jan-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

acpi_check_rsdt(), acpi_find_table(): Unmap the mapped page again, if we
don't need it. That prevents us from ending up with the page being mapped
multiple times (under VMware at least) and thus fixes #5208.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34948 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c2a5ae2 27-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed gcc4 warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32764 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 12378618 09-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* acpi_init() could pass a NULL "rsdp" to acpi_check_rsdt() which would happily
dereference it no matter what. This fixes CID 1282.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27392 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7d2739a0 08-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

argument was missing from the TRACE call

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27368 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85f26688 21-Jul-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Patch by Dustin Howett (GSOC): Move ACPI probing out of the
bootloader's smp init and into its own unit.
ACPI tables can now generally be found with acpi_find_table(signature).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26538 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0994532db4335fe9bdc09ca26823e3182e4bb6e3 25-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

boot_loader: checks whether mapping rsdt header succeeded.

... and exits in case of failure. Reported by mt in #9895.


# 73df2f2086aab13793b46594bd0c89ad6a00d96f 12-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Add validation of the RSDP checksums.
* If we detect ACPI 2.0 or higher, the spec says we should use the XSDT rather
than the RSDT. Attempt to do so, falling back to the RSDT if the former fails
to be mapped/validated.
* Refactored acpi_find_table into a templated version to account for the fact
that the XSDT exports different pointer widths for its links to other tables
than the RSDT.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42133 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c4b692da1a8d2839b26596c54d0a0833dc15f7c2 11-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Revert r42105. The rsdt_length field on the rsdp structure we have declared is
actually misleading, since it specifies the length of the xsdt rather than the rsdt. Furthermore, it is only available if the BIOS reports ACPI version 2.0 or greater. Since we don't currently support the XSDT, we can't rely on that field and have to resort to the previous approach of mapping the RSDT header in order to determine the length of the RSDT itself.

Also add validation of the RSDT's checksum so we don't get tripped up by BIOS's with broken tables.

Should fix boot problems that were introduced by r42105.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42118 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14282c1e552adaa826f96660feae9d66e95c22b8 11-Jun-2011 jackburton <jackburton@a95241bf-73f2-0310-859d-f6bbb57e9c96>

We already know the rsdt length in advance,
so map the whole table without freeing and remapping later


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42105 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e70e32dec85f4b242e64a2edb629472ad781a46 11-Jun-2011 anevilyak <anevilyak@a95241bf-73f2-0310-859d-f6bbb57e9c96>

If we found a header, but it wasn't the one we were looking for, reset the header ptr to NULL after unmapping. Otherwise a bogus header pointer was potentially returned, leading to an invalid mem access. Fixes boot problems on my Athlon following recent ACPI changes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42103 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b047e41327f71f11a71fbe896f556c22ef96f004 09-Jun-2011 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Map the whole table also in acpi_check_rsdt().
Also print the table revision, after the vendor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42084 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb764e7fda5c44977f1aa5a43412a66f41694eb4 10-Jun-2011 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Map the whole table, and not just the header. Fix #7497 again (hopefully
correctly now)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42083 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ad12a198d79fc2aaa954c6d548faab349fff2e9c 09-Jun-2011 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Revert r42068 and r42069, since they didnt' make sense (but something's
obviously fishy)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42078 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0a3e6ddf63a30ba6a69d8bbf665fc3233f6525e9 09-Jun-2011 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Add a comment so this doesn't happen anymore


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42069 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e282383b4eb2cdea2252077901d4eb7b8db4c636 09-Jun-2011 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Map B_PAGE_SIZE, and not just acpi_description_header (was actually a
regression), since the tables are bigger than that.
Accessing unmapped memory was doing bad things on
XenServer.
Fixes ticket #7497.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42068 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f3eff1ca00479ad1b0d1bc52b668c62f9b40864f 26-Dec-2010 Michael Lotz <mmlr@mlotz.ch>

Free the header after possibly accessing it when tracing is enabled. Also guard
the trace output against header being NULL (i.e. failed to map).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39958 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 43e738bd364a9a31c911e59538f4bcd79819cbf9 18-Mar-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Style fixes


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35897 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33e11f7c0f607f6fd55de96ecf8a3c8b5f9111ad 16-Mar-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Squashed todo: only compute the numEntries once, and made it static.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35889 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d756fcf644e9e1bf8aa070f44c7be9a2d32ddbe7 08-Jan-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

acpi_check_rsdt(), acpi_find_table(): Unmap the mapped page again, if we
don't need it. That prevents us from ending up with the page being mapped
multiple times (under VMware at least) and thus fixes #5208.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34948 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c2a5ae241684d3c438d71455ec9d8700f02484a 27-Aug-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed gcc4 warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32764 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 123786187cbab8833443093e6e6d74bc9ef694f2 09-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* acpi_init() could pass a NULL "rsdp" to acpi_check_rsdt() which would happily
dereference it no matter what. This fixes CID 1282.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27392 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7d2739a00fffba58d1cd1cb56db228be4303a8a2 08-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

argument was missing from the TRACE call

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27368 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85f2668898ba1eb50bf1ea6271b4fe28123f58e5 21-Jul-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Patch by Dustin Howett (GSOC): Move ACPI probing out of the
bootloader's smp init and into its own unit.
ACPI tables can now generally be found with acpi_find_table(signature).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26538 a95241bf-73f2-0310-859d-f6bbb57e9c96