History log of /haiku/src/add-ons/kernel/bus_managers/acpi/acpica/include/platform/achaiku.h
Revision Date Author Comments
# 15338de9 24-Nov-2023 PulkoMandy <pulkomandy@pulkomandy.tk>

Update ACPICA to 20230628

Change-Id: I5cbe5fa52bcca13ef8308ae1d2a1b1c19afcfe7e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7142
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# f2acc47f 06-Dec-2023 Jérôme Duval <jerome.duval@gmail.com>

acpi: update AcpiOsAcquireGlobalLock and AcpiOsReleaseGlobalLock

implementations from FreeBSD. Because the argument wasn't volatile,
the compiler wasn't considerung reading the lock content.
* fix the acquire and release loops:
The loop could be exited when any new values were read.
Instead the return value should be checked against the old value.

Old x86 gcc2 asm loop in AcpiOsAcquireGlobalLock:
11660: 89 c8 mov %ecx,%eax
11662: f0 0f b1 1a lock cmpxchg %ebx,(%edx)
11666: 39 0a cmp %ecx,(%edx)
11668: 74 f6 je 11660 <AcpiOsAcquireGlobalLock+0x20>

New x86 gcc13 asm loop in AcpiOsAcquireGlobalLock:

4d58: 8b 11 mov (%ecx),%edx
4d5a: 89 d0 mov %edx,%eax
4d5c: 89 d3 mov %edx,%ebx
4d5e: 83 e0 fc and $0xfffffffc,%eax
4d61: 83 cb 03 or $0x3,%ebx
4d64: f6 c2 02 test $0x2,%dl
4d67: 75 05 jne 4d6e <AcpiOsAcquireGlobalLock+0x1e>
4d69: 83 c8 02 or $0x2,%eax
4d6c: 89 c3 mov %eax,%ebx
4d6e: 89 d0 mov %edx,%eax
4d70: f0 0f b1 19 lock cmpxchg %ebx,(%ecx)
4d74: 75 e2 jne 4d58 <AcpiOsAcquireGlobalLock+0x8>

Old x86 gcc2 asm loop in AcpiOsReleaseGlobalLock:
11690: 89 c8 mov %ecx,%eax
11692: f0 0f b1 1a lock cmpxchg %ebx,(%edx)
11696: 39 0a cmp %ecx,(%edx)
11698: 74 f6 je 11690 <AcpiOsReleaseGlobalLock+0x10>

New x86 gcc13 asm loop in AcpiOsReleaseGlobalLock:
4d88: 8b 11 mov (%ecx),%edx
4d8a: 89 d3 mov %edx,%ebx
4d8c: 89 d0 mov %edx,%eax
4d8e: 83 e3 fc and $0xfffffffc,%ebx
4d91: f0 0f b1 19 lock cmpxchg %ebx,(%ecx)
4d95: 75 f1 jne 4d88 <AcpiOsReleaseGlobalLock+0x8>

Change-Id: Ia55ba8666efe8b5c198a01db100b4747b72df4a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7185
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 153bb8ef 06-Dec-2023 Jérôme Duval <jerome.duval@gmail.com>

Revert "ACPICA removed our cast we need for gcc 2.95.3"

This reverts commit fe0910891a6a6488a0bec335073eb47f82e1a74e.

Change-Id: I5887dcbfad83fb10978cd58bda5c2dc540226fe3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7184
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 41c1669d 16-Oct-2022 Jérôme Duval <jerome.duval@gmail.com>

bin/acpi_call: command to call ACPI methods

adapted from the FreeBSD tool, uses ACPICA headers in userland mode.

Change-Id: Icba77b01e6e351df31538dda21520f0cc99b26bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5749
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 748b4883 28-Mar-2022 milek7 <me@milek7.pl>

ACPI: Make it compile on architectures other than x86.

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


# fe091089 31-Jan-2021 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

ACPICA removed our cast we need for gcc 2.95.3

Change-Id: I2e3f907708a174dbea6a34055e9dbbf4c2b7b1e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3722
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 0ffed378 20-Jan-2021 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Upgrade ACPICA to 20210105 from 20181213

Many changes, some problems with sleep fixed
See https://acpica.org/sites/acpica/files/changes_56.txt

Change-Id: I935eca34daac29f37a19c3fd1df5a0595ba4d862
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3718
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# ff2e2f81 21-Jan-2018 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Upgrade to ACPICA 20180105

Tested on x86_64 and x86_gcc2, works on my machine and most likely fixes
that was most likely due to missing lock sync in previous ACPI upgrade.

* Redid some of kallisti5's work as it was easier to start from earlier
version.

* Evaluating 64 bit physical addressing on 32 bit Haiku again as this
was likely the cause of pagefaults (#12377):
"Implemented internal support for full 64-bit addresses that appear in all
Generic Address Structure (GAS) structures. Previously, only the lower 32
bits were used. Affects the use of GAS structures in the FADT and other
tables, as well as the GAS structures passed to the AcpiRead and
AcpiWrite public external interfaces that are used by drivers. Lv Zheng."

* Mostly bugfixes in ACPICA


# 3f04c835 13-Jan-2018 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Revert "acpica: Upgrade to 20170303"

This reverts commit 0bc647d605e2731a1b88d970eb755c0a514df128.


# 7d93e79a 30-Dec-2017 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Latest ACPI update removed some essential configuration

* The global lock, needed for hw <-> os to sync, was a no op.
This means that OS and HW could read and write to same value
at the same time, causing garbled data and crashes. This is easiest
to see in battery status, where battery values and OEM name would
become garbage. It also causes instability and failure to shutdown

* ACPI used 64 bit addressing (which it normally should) on 32 bit.
This would cause page faults as it would jump to incorrect addresses


# e5c95a01 28-Mar-2017 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Use 64 bit addressing for ACPI on 32 bit builds.

32 bit builds with PAE are so much fun. It's like
64 bit without all the extra registers...


# ca92f2f4 19-Mar-2017 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Add back 32 bit addressing flag for 32 bit builds.

Should fix #13383.

Leaving other warning fix as they may not be needed with new ACPICA.


# 0bc647d6 18-Mar-2017 Alexander von Gluck IV <kallisti5@unixzen.com>

acpica: Upgrade to 20170303

Notable changes since 20160729:
* Will be dual licensed going forward. We choose the Intel License.
* Fixed two issues with auto-repair double-delete an internal object
* New hook for sleep support (AcpiOsEnterSleep)
* Fixed a regression introduced in 20160729, "FADT support cleanup"
around early 64-bit address support.
* Fixed a problem where runtime implicit conversion was
incorrectly disabled for the ASL operators below. This brings the
behavior into compliance with the ACPI specification:
FromBCD,ToBCD,ToDecimalString,ToHexString,ToInteger,ToBuffer
* Fixed a regression in the internal AcpiTbFindTable function where
a non AE_OK exception could inadvertently be returned even if the
function did not fail. This problem affects the following operators:
DataTableRegion,LoadTable


# f18e21a8 21-Feb-2017 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Cast ACPI UINT32* to uint32* to avoid warning on 32 bit builds.


# 74ffd18d 07-Aug-2016 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update ACPICA to 20160729

Changelog: https://acpica.org/sites/acpica/files/changes_34.txt

Mostly minor fixes and ACPI 6.0 work since latest update.


# b64e8511 17-Jan-2016 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update ACPICA to 20160108, removed common.

Changelog: https://acpica.org/sites/acpica/files/changes_29.txt

* This is based on the upgrade waddlesplash aborted due to a bug
in ACPICA which has since been fixed.
* Some ACPICA code is excluded until needed. (You may want to
compare our acpica dir to ACPICA if you are missing functions.)


# c8bd1b0a 14-Sep-2015 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Set ACPI io and physical address to 32 bit on 32 bit arch.

This is temporary fix, our ACPI.h header needs a review, and perhaps
a better approach.


# e226d1d0 13-Sep-2015 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update ACPICA to 20150818.

Previous update was 20140724.
Changes at:
https://acpica.org/sites/acpica/files/changes_25.txt


# ad5bbfb8 23-Aug-2014 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update ACPICA to 20140724.

Previous update was 20121018. So it was about time don't you think? I think so :)

* ACPI 5.1 is fully supported in ACPICA as of this release.

Changes are so many that I can just point to the Changelog:
https://acpica.org/sites/acpica/files/changes_13.txt

Here is the work in progress: http://instagram.com/p/sCxrHnh2sU/


# c70258b7 31-Oct-2013 Jérôme Duval <jerome.duval@gmail.com>

acpi: Update to ACPICA 20130823.


# 9b0d045c 03-Nov-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update to ACPICA 20121018.

This is an update from 20120711 and A LOT has happened since then. See
https://acpica.org/download/changes.txt for all the changes.


# 0174267a 11-Jul-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Move ACPICA files into acpica subdir and use acpica subdir layout.

This matches layout in ACPICA and keeps a cleaner boundry between
Haiku and ACPICA code. The only haiku specific file in ACPICA is
achaiku.h and it will hopefully be included upstream soon.

Merging will be simpler as we can just replace acpica contents and
fix Jamfile and build errors in our code.


# c8bd1b0ad097d20693307d1938ab8b7091c5d9d3 14-Sep-2015 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Set ACPI io and physical address to 32 bit on 32 bit arch.

This is temporary fix, our ACPI.h header needs a review, and perhaps
a better approach.


# e226d1d04f5937c7d6fa4f002ad35b691cbf27a8 13-Sep-2015 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update ACPICA to 20150818.

Previous update was 20140724.
Changes at:
https://acpica.org/sites/acpica/files/changes_25.txt


# ad5bbfb8e1be05ad72aab31d4149034d4078fe0d 23-Aug-2014 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update ACPICA to 20140724.

Previous update was 20121018. So it was about time don't you think? I think so :)

* ACPI 5.1 is fully supported in ACPICA as of this release.

Changes are so many that I can just point to the Changelog:
https://acpica.org/sites/acpica/files/changes_13.txt

Here is the work in progress: http://instagram.com/p/sCxrHnh2sU/


# c70258b79f40a1d66e50767f61def8d6f4588ba1 31-Oct-2013 Jérôme Duval <jerome.duval@gmail.com>

acpi: Update to ACPICA 20130823.


# 9b0d045c59c1d03dbedf8c76ac88efe6bda7d8d0 03-Nov-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update to ACPICA 20121018.

This is an update from 20120711 and A LOT has happened since then. See
https://acpica.org/download/changes.txt for all the changes.


# 0174267ad4e56f4eea5d108dfd6daf1be4037782 11-Jul-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Move ACPICA files into acpica subdir and use acpica subdir layout.

This matches layout in ACPICA and keeps a cleaner boundry between
Haiku and ACPICA code. The only haiku specific file in ACPICA is
achaiku.h and it will hopefully be included upstream soon.

Merging will be simpler as we can just replace acpica contents and
fix Jamfile and build errors in our code.