The GTDT table is updated to make the timer table more generic and represent external timers. The field added are to support upto 8 interrupt support in the timer block. frequency and interrupt count parameter is also added. However some more parameter has to added here in future like, 1) Timer clock name. 2) More than 8 interrupt support.
This change also needs corresponding change in acpia tools as shown below,
diff source/common/dmtbinfo.c.org source/common/dmtbinfo.c 992a993
{ACPI_DMT_FLAG1, ACPI_GTDT_FLAG_OFFSET (Flags,0), "Timer Core", 0},
993a995,997
{ACPI_DMT_NAME8, ACPI_GTDT_OFFSET (id[0]), "Timer ID", 0}, {ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (freq), "Timer frequency", 0}, {ACPI_DMT_UINT32, ACPI_GTDT_OFFSET (interrupt_count), "Interrupt count", 0},
1012a1017,1021
ACPI_DMT_NEW_LINE, {ACPI_DMT_UINT64, ACPI_GTDT_OFFSET (reserved5), "reserved5", 0}, {ACPI_DMT_UINT64, ACPI_GTDT_OFFSET (reserved6), "reserved6", 0}, {ACPI_DMT_UINT64, ACPI_GTDT_OFFSET (reserved7), "reserved7", 0}, {ACPI_DMT_UINT64, ACPI_GTDT_OFFSET (reserved8), "reserved8", 0},
Signed-off-by: Amit Daniel Kachhap amit.daniel@samsung.com --- include/acpi/actbl3.h | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index e2c0931..2525b44 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h @@ -243,13 +243,18 @@ struct acpi_s3pt_suspend { * * GTDT - Generic Timer Description Table (ACPI 5.0) * Version 1 + * Each timer can support a maximum of 8 interrupts * ******************************************************************************/
struct acpi_table_gtdt { struct acpi_table_header header; /* Common ACPI table header */ u64 address; + u32 size; u32 flags; + u8 id[8]; + u32 freq; + u32 interrupt_count; u32 secure_pl1_interrupt; u32 secure_pl1_flags; u32 non_secure_pl1_interrupt; @@ -258,11 +263,28 @@ struct acpi_table_gtdt { u32 virtual_timer_flags; u32 non_secure_pl2_interrupt; u32 non_secure_pl2_flags; + u64 reserved5; + u64 reserved6; + u64 reserved7; + u64 reserved8; +}; + +struct acpi_table_tdt { + struct acpi_table_header header; /* Common ACPI table header */ + u64 address; + u32 size; + u32 flags; + u8 id[8]; + u32 freq; + u32 interrupt_count; + u32 interrupt_num[8]; + u32 interrupt_flags[8]; };
/* Values for Flags field above */
#define ACPI_GTDT_MAPPED_BLOCK_PRESENT 1 +#define ACPI_GTDT_CORE 2
/* Values for all "TimerFlags" fields above */