acpigen: Add option for reserved bits in Field

Add an option for unused/reserved bits in a Field definition,
allowing for declarations that do not start at bit 0:

Field (UART, AnyAcc, NoLock, Preserve)
{
    , 7,  /* RESERVED */
    BITF, /* Used bit */
}

These just use byte 0 instead of a name.

Change-Id: I86b54685dbdebacb0834173857c9341ea9fa9a46
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46254
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Duncan Laurie
2020-09-30 23:09:29 +00:00
committed by Duncan Laurie
parent cf5d58328f
commit 095bbf969d
2 changed files with 18 additions and 1 deletions

View File

@@ -158,6 +158,10 @@ enum {
.name = X, \
.bits = Y, \
}
#define FIELDLIST_RESERVED(X) { .type = RESERVED, \
.name = "", \
.bits = X, \
}
#define FIELD_ANYACC 0
#define FIELD_BYTEACC 1
@@ -174,6 +178,7 @@ enum {
enum field_type {
OFFSET,
NAME_STRING,
RESERVED,
FIELD_TYPE_MAX,
};