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>
This commit is contained in:
Michael Niewöhner 2021-09-23 17:04:35 +02:00 committed by Werner Zeh
parent 953a8762f8
commit ab088c9345
1 changed files with 12 additions and 0 deletions

View File

@ -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"