Kernel: ACPI ignore events from non-existent ports

This commit is contained in:
Bananymous 2024-04-16 00:00:07 +03:00
parent b89bafa165
commit b6587b32b9
1 changed files with 2 additions and 0 deletions

View File

@ -509,6 +509,8 @@ acpi_release_global_lock:
auto get_fixed_event =
[&](uint16_t sts_port)
{
if (sts_port == 0)
return 0;
auto sts = IO::inw(sts_port);
auto en = IO::inw(sts_port + fadt().pm1_evt_len / 2);
if (auto pending = sts & en)