aboutsummaryrefslogtreecommitdiff
path: root/tests/acpi-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/acpi-utils.h')
-rw-r--r--tests/acpi-utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/acpi-utils.h b/tests/acpi-utils.h
index 348e4d7931..f8d87236c6 100644
--- a/tests/acpi-utils.h
+++ b/tests/acpi-utils.h
@@ -87,6 +87,16 @@ typedef struct {
g_assert_cmpstr(ACPI_ASSERT_CMP_str, ==, expected); \
} while (0)
+#define ACPI_READ_GENERIC_ADDRESS(field, addr) \
+ do { \
+ ACPI_READ_FIELD((field).space_id, addr); \
+ ACPI_READ_FIELD((field).bit_width, addr); \
+ ACPI_READ_FIELD((field).bit_offset, addr); \
+ ACPI_READ_FIELD((field).access_width, addr); \
+ ACPI_READ_FIELD((field).address, addr); \
+ } while (0);
+
+
uint8_t acpi_calc_checksum(const uint8_t *data, int len);
uint32_t acpi_find_rsdp_address(void);
void acpi_parse_rsdp_table(uint32_t addr, AcpiRsdpDescriptor *rsdp_table);