Luna/kernel/src/acpi/SDT.cpp

15 lines
304 B
C++
Raw Normal View History

2022-09-06 09:46:26 +00:00
#include "acpi/SDT.h"
2022-10-06 15:13:34 +00:00
#pragma GCC push_options
#pragma GCC diagnostic ignored "-Wconversion"
2022-09-25 19:43:28 +00:00
bool ACPI::validate_sdt_header(ACPI::SDTHeader* header)
2022-09-06 09:46:26 +00:00
{
uint8_t sum = 0;
for (uint32_t i = 0; i < header->Length; i++) { sum += ((char*)header)[i]; }
return sum == 0;
2022-10-06 15:13:34 +00:00
}
#pragma GCC pop_options