Luna/kernel/src/acpi/SDT.cpp
2022-10-06 17:13:34 +02:00

15 lines
304 B
C++

#include "acpi/SDT.h"
#pragma GCC push_options
#pragma GCC diagnostic ignored "-Wconversion"
bool ACPI::validate_sdt_header(ACPI::SDTHeader* header)
{
uint8_t sum = 0;
for (uint32_t i = 0; i < header->Length; i++) { sum += ((char*)header)[i]; }
return sum == 0;
}
#pragma GCC pop_options