Fix ACPI table discovery on the UEFI boot path by teaching the ACPI OSL
to use the loader-provided ACPI root table information instead of relying
only on legacy BIOS RSDP scanning:
- Build a synthetic RSDP from the ACPI BIOS configuration node
populated by the bootloader
- Fallback to the old scan only if that data is unavailable
- Keep full 64-bit physical addresses when mapping ACPI tables
- Improve failure diagnostics if initialization still fails
This lets ACPICA initialize from the UEFI-provided RSDT/XSDT path.
CORE-11954
So QEMU Q35 on UEFI is now able to discover ACPI tables through the loader-
provided root table path, which fixes 0x7B INACCESSIBLE_BOOT_DEVICE bugcheck:
https://github.com/user-attachments/assets/25d4d9c9-4197-496b-84f9-e5642c65809d
Fixes GCC 13 warning about misleading indentation.
C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c: In function 'acpi_evaluate_reference':
C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c:367:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
367 | if (buffer.Pointer)
| ^~
In file included from C:/ReactOS/reactos/drivers/bus/acpi/acpica/include/acpi.h:70,
from C:/ReactOS/reactos/drivers/bus/acpi/precomp.h:6,
from C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c:26:
C:/ReactOS/reactos/drivers/bus/acpi/acpica/include/acoutput.h:496:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
496 | #define return_ACPI_STATUS(s) return(s)
| ^~~~~~
C:/ReactOS/reactos/drivers/bus/acpi/busmgr/utils.c:370:9: note: in expansion of macro 'return_ACPI_STATUS'
370 | return_ACPI_STATUS(status);
| ^~~~~~~~~~~~~~~~~~
* [PCIX] Fix the weird text corruption in PciGetDescriptionMessage
* [PCIX] Return the buffer to the caller PciQueryBusInformation
Co-authored-by: Stanislav Motylkov <[email protected]>
Fix a bug introduced in 5070e8960a.
CORE-17256
- These handlers must be memory resident. Otherwise,
this would cause a page fault that needs to be resolved.
Low-level storage drivers could evaluate ACPI control
methods while the device's IRP queue has been paused.
- Minor code enhancements.
Move these out of ACPI in preparation for ACPI_NEW so they keep their juicy commit history.
Also both ACPIs can coexist for awhile as I don't see the old driver getting removed anytime soon.
- Declare CMBATT_DISCHARGE_TIME and CMBATT_CAPACITY_BOGUS constructs
- Determine if the battery was already discharging and if not, update the time when it's being discharged
- Fix the condition where it checks if the battery has been discharging for quite some time
- Default the time to BATTERY_UNKNOWN_TIME if querying the estimated battery time request fails or if the battery has just started discharging not over 15 seconds
CORE-18969
CORE-19452
IoInitializeRemoveLock expects an allocation tag to be provided when it allocates debug data in the kernel.
Passing 0 leads to a bunch of ASSERTs in the kernel as such data is allocated by ExAllocatePoolWithTag of which a tag has to be supplied, it's not optional.
- Introduce some new constructs
- Annotate the function prototypes with SAL2
- Re-structure & remove some useless fields in COMPBATT_DEVICE_EXTENSION and COMPBATT_BATTERY_DATA
_BIX is basically _BIF but with more information added, such as cycle count, measurement capacity accuracy and whatnot.
Starting with ACPI 4.0 _BIF is rendered obsolete and as a matter of fact a lot of modern hardware fill their ACPI machine data to _BIX.
ReactOS must go forward and beyond, compatibility with _BIF is kept. NOTE that a machine can ONLY support one battery static information method!
CORE-18969
CORE-19452
ReactOS (like any other OSes) expects power data to be represented in milliwatts per hour, not in milliamps per hour.
Currently CMBATT defaults the stats to unknown values, if that's the case, and there are a bunch of machines that do report their data from _BIF ACPI method in ampere.
CORE-18969
CORE-19452
- Reimplement WriteWord using the WriteByte helper.
- Remove inline qualifiers from the bus read and write functions.
This code path is considered "cold" and using an inline for it is overkill.
- Don't apply the IRQL restrictions to our PnP state transition helpers.
They are only called at IRQL below dispatch level.
- Properly handle the case when the dependent function is placed
after fixed resources
- Initialize the version and revision fields of resource lists
- Improve validation of resource data
- Add more debug prints
CORE-18562