The flag definitions of TimerFlags and VirtualTimerFlags in struct acpi_gtdt_timer_entry is missing, fix it.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- Those two patches are for ACPICA, I will send them to Bob and Lv. --- source/include/actbl3.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/source/include/actbl3.h b/source/include/actbl3.h index b30e80f..1e59241 100644 --- a/source/include/actbl3.h +++ b/source/include/actbl3.h @@ -432,6 +432,10 @@ typedef struct acpi_gtdt_timer_entry
} ACPI_GTDT_TIMER_ENTRY;
+/* Flag Definitions: TimerFlags and VirtualTimerFlags above */ + +#define ACPI_GTDT_GT_INTERRUPT_TRIGGER_MODE (1) +#define ACPI_GTDT_GT_INTERRUPT_POLARITY (1<<1)
/* Flag Definitions: CommonFlags above */
GICC affinity structure was added in SRAT in ACPI 5.1, add the code to support it.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- source/common/dmtable.c | 1 + source/common/dmtbdump.c | 5 +++++ source/common/dmtbinfo.c | 14 ++++++++++++++ source/compiler/dttable.c | 5 +++++ source/include/acdisasm.h | 1 + source/include/actbl1.h | 19 ++++++++++++++++++- source/tools/acpisrc/astable.c | 1 + 7 files changed, 45 insertions(+), 1 deletion(-)
diff --git a/source/common/dmtable.c b/source/common/dmtable.c index efb50b5..8ed2236 100644 --- a/source/common/dmtable.c +++ b/source/common/dmtable.c @@ -325,6 +325,7 @@ static const char *AcpiDmSratSubnames[] = "Processor Local APIC/SAPIC Affinity", "Memory Affinity", "Processor Local x2APIC Affinity", + "GICC Affinity", "Unknown SubTable Type" /* Reserved */ };
diff --git a/source/common/dmtbdump.c b/source/common/dmtbdump.c index b0ae905..2242ca4 100644 --- a/source/common/dmtbdump.c +++ b/source/common/dmtbdump.c @@ -2811,6 +2811,11 @@ AcpiDmDumpSrat ( InfoTable = AcpiDmTableInfoSrat2; break;
+ case ACPI_SRAT_TYPE_GIC_CPU_AFFINITY: + + InfoTable = AcpiDmTableInfoSrat3; + break; + default: AcpiOsPrintf ("\n**** Unknown SRAT subtable type 0x%X\n", SubTable->Type);
diff --git a/source/common/dmtbinfo.c b/source/common/dmtbinfo.c index 2a3bed4..1a1c072 100644 --- a/source/common/dmtbinfo.c +++ b/source/common/dmtbinfo.c @@ -279,6 +279,7 @@ #define ACPI_SRAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f) #define ACPI_SRAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f) #define ACPI_SRAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f) +#define ACPI_SRAT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GIC_CPU_AFFINITY,f) #define ACPI_VRTC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VRTC_ENTRY,f) #define ACPI_WDAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WDAT_ENTRY,f)
@@ -295,6 +296,7 @@ #define ACPI_SRAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_CPU_AFFINITY,f,o) #define ACPI_SRAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_MEM_AFFINITY,f,o) #define ACPI_SRAT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f,o) +#define ACPI_SRAT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_GIC_CPU_AFFINITY,f,o) #define ACPI_GTDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_GTDT,f,o) #define ACPI_GTDT0a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_TIMER_ENTRY,f,o) #define ACPI_GTDT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_WATCHDOG,f,o) @@ -2293,6 +2295,18 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[] = ACPI_DMT_TERMINATOR };
+/* : GICC Affinity (ACPI 5.1) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[] = +{ + {ACPI_DMT_UINT32, ACPI_SRAT3_OFFSET (ProximityDomain), "Proximity Domain", 0}, + {ACPI_DMT_UINT32, ACPI_SRAT3_OFFSET (AcpiProcessorUid), "Acpi Processor UID", 0}, + {ACPI_DMT_UINT32, ACPI_SRAT3_OFFSET (Flags), "Flags (decoded below)", DT_FLAG}, + {ACPI_DMT_FLAG0, ACPI_SRAT3_FLAG_OFFSET (Flags,0), "Enabled", 0}, + {ACPI_DMT_UINT32, ACPI_SRAT3_OFFSET (ClockDomain), "Clock Domain", 0}, + ACPI_DMT_TERMINATOR +}; +
/******************************************************************************* * diff --git a/source/compiler/dttable.c b/source/compiler/dttable.c index db95850..1620918 100644 --- a/source/compiler/dttable.c +++ b/source/compiler/dttable.c @@ -2492,6 +2492,11 @@ DtCompileSrat ( InfoTable = AcpiDmTableInfoSrat2; break;
+ case ACPI_SRAT_TYPE_GIC_CPU_AFFINITY: + + InfoTable = AcpiDmTableInfoSrat3; + break; + default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SRAT"); diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h index 21e26e6..f936128 100644 --- a/source/include/acdisasm.h +++ b/source/include/acdisasm.h @@ -432,6 +432,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoSratHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpa[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoUefi[]; diff --git a/source/include/actbl1.h b/source/include/actbl1.h index d28faa3..2b9f14a 100644 --- a/source/include/actbl1.h +++ b/source/include/actbl1.h @@ -1190,7 +1190,8 @@ enum AcpiSratType ACPI_SRAT_TYPE_CPU_AFFINITY = 0, ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, - ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ + ACPI_SRAT_TYPE_GIC_CPU_AFFINITY = 3, + ACPI_SRAT_TYPE_RESERVED = 4 /* 4 and greater are reserved */ };
/* @@ -1257,6 +1258,22 @@ typedef struct acpi_srat_x2apic_cpu_affinity #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
+/* 3: GICC Affinity (ACPI 5.1) */ + +typedef struct acpi_srat_gic_cpu_affinity +{ + ACPI_SUBTABLE_HEADER Header; + UINT32 ProximityDomain; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ClockDomain; + +} ACPI_SRAT_GIC_CPU_AFFINITY; + +/* Flags for ACPI_SRAT_GIC_CPU_AFFINITY */ + +#define ACPI_SRAT_GIC_CPU_ENABLED (1) /* 00: Use affinity structure */ + /* Reset to default packing */
#pragma pack() diff --git a/source/tools/acpisrc/astable.c b/source/tools/acpisrc/astable.c index 349bbc4..72981e0 100644 --- a/source/tools/acpisrc/astable.c +++ b/source/tools/acpisrc/astable.c @@ -707,6 +707,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { {"ACPI_SRAT_HEADER", SRC_TYPE_STRUCT}, {"ACPI_SRAT_MEM_AFFINITY", SRC_TYPE_STRUCT}, {"ACPI_SRAT_X2APIC_CPU_AFFINITY", SRC_TYPE_STRUCT}, + {"ACPI_SRAT_GIC_CPU_AFFINITY", SRC_TYPE_STRUCT}, {"ACPI_TPM2_CONTROL", SRC_TYPE_STRUCT}, {"ACPI_WDAT_ENTRY", SRC_TYPE_STRUCT},