summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2021-09-23 17:04:35 +0200
committerWerner Zeh <werner.zeh@siemens.com>2021-10-08 05:21:21 +0000
commitab088c9345dc03698211c443fd53bf9158dd4ef0 (patch)
tree7ec329490c9bdd3c9e7ea3b47babb63fe625bbd2
parent953a8762f8c0d512fae1d2947b8db85652771e71 (diff)
acpi: add macros for MSR and `unsupported` register resource types
These will be used in the follow-up change. Change-Id: I4723ffaf0adff8cb5b1717600ed4d1634768e2b7 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57887 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r--src/include/acpi/acpi.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h
index 2c9af3a56f..e35accdf78 100644
--- a/src/include/acpi/acpi.h
+++ b/src/include/acpi/acpi.h
@@ -128,6 +128,18 @@ typedef struct acpi_gen_regaddr {
#define ACPI_ACCESS_SIZE_DWORD_ACCESS 3
#define ACPI_ACCESS_SIZE_QWORD_ACCESS 4
+/* Macros for common resource types */
+#define ACPI_REG_MSR(address, offset, width) \
+ { \
+ .space_id = ACPI_ADDRESS_SPACE_FIXED, \
+ .access_size = ACPI_ACCESS_SIZE_QWORD_ACCESS, \
+ .addrl = address, \
+ .bit_offset = offset, \
+ .bit_width = width, \
+ }
+
+#define ACPI_REG_UNSUPPORTED {0}
+
/* Common ACPI HIDs */
#define ACPI_HID_FDC "PNP0700"
#define ACPI_HID_KEYBOARD "PNP0303"