diff mbox

[1/3] lib: acpi: add supports for DRTM

Message ID 1471836301-12717-1-git-send-email-alex.hung@canonical.com
State Accepted
Headers show

Commit Message

Alex Hung Aug. 22, 2016, 3:24 a.m. UTC
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/lib/include/fwts_acpi.h | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

Comments

Colin Ian King Aug. 22, 2016, 8:24 a.m. UTC | #1
On 22/08/16 04:24, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/lib/include/fwts_acpi.h | 38 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
> index b2116fb..8df4cec 100644
> --- a/src/lib/include/fwts_acpi.h
> +++ b/src/lib/include/fwts_acpi.h
> @@ -688,6 +688,44 @@ typedef struct {
>  }  __attribute__ ((packed)) fwts_acpi_table_tpm2;
>  
>  /*
> + * ACPI Trusted Computing Group DRTM Architecture Specification
> + *   http://www.trustedcomputinggroup.org/wp-content/uploads/TCG_D-RTM_Architecture_v1-0_Published_06172013.pdf
> + */
> +typedef struct {
> +	fwts_acpi_table_header	header;
> +	uint64_t	entry_base_address;
> +	uint64_t	entry_length;
> +	uint32_t	entry_address32;
> +	uint64_t	entry_address64;
> +	uint64_t	exit_address;
> +	uint64_t	log_area_address;
> +	uint32_t	log_area_length;
> +	uint64_t	arch_dependent_address;
> +	uint32_t	flags;
> +}  __attribute__ ((packed)) fwts_acpi_table_drtm;
> +
> +typedef struct {
> +	uint32_t	validated_table_count;
> +	uint64_t	validated_tables[];
> +}  __attribute__ ((packed)) fwts_acpi_table_drtm_vtl;
> +
> +typedef struct  {
> +	uint8_t		size[7];
> +	uint8_t		type;
> +	uint64_t	address;
> +}__attribute__ ((packed)) fwts_acpi_drtm_resource;
> +
> +typedef struct {
> +	uint32_t	resource_count;
> +	fwts_acpi_drtm_resource	resources[];
> +}  __attribute__ ((packed)) fwts_acpi_table_drtm_rtl;
> +
> +typedef struct {
> +	uint32_t	dps_id_length;
> +	uint8_t		dps_id[16];
> +}  __attribute__ ((packed)) fwts_acpi_table_drtm_dps;
> +
> +/*
>   * ACPI XENV (Xen Environment Table)
>   *   http://wiki.xenproject.org/mediawiki/images/c/c4/Xen-environment-table.pdf
>   */
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
Ivan Hu Aug. 29, 2016, 3:22 a.m. UTC | #2
On 2016年08月22日 11:24, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/lib/include/fwts_acpi.h | 38 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
>
> diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
> index b2116fb..8df4cec 100644
> --- a/src/lib/include/fwts_acpi.h
> +++ b/src/lib/include/fwts_acpi.h
> @@ -688,6 +688,44 @@ typedef struct {
>  }  __attribute__ ((packed)) fwts_acpi_table_tpm2;
>
>  /*
> + * ACPI Trusted Computing Group DRTM Architecture Specification
> + *   http://www.trustedcomputinggroup.org/wp-content/uploads/TCG_D-RTM_Architecture_v1-0_Published_06172013.pdf
> + */
> +typedef struct {
> +	fwts_acpi_table_header	header;
> +	uint64_t	entry_base_address;
> +	uint64_t	entry_length;
> +	uint32_t	entry_address32;
> +	uint64_t	entry_address64;
> +	uint64_t	exit_address;
> +	uint64_t	log_area_address;
> +	uint32_t	log_area_length;
> +	uint64_t	arch_dependent_address;
> +	uint32_t	flags;
> +}  __attribute__ ((packed)) fwts_acpi_table_drtm;
> +
> +typedef struct {
> +	uint32_t	validated_table_count;
> +	uint64_t	validated_tables[];
> +}  __attribute__ ((packed)) fwts_acpi_table_drtm_vtl;
> +
> +typedef struct  {
> +	uint8_t		size[7];
> +	uint8_t		type;
> +	uint64_t	address;
> +}__attribute__ ((packed)) fwts_acpi_drtm_resource;
> +
> +typedef struct {
> +	uint32_t	resource_count;
> +	fwts_acpi_drtm_resource	resources[];
> +}  __attribute__ ((packed)) fwts_acpi_table_drtm_rtl;
> +
> +typedef struct {
> +	uint32_t	dps_id_length;
> +	uint8_t		dps_id[16];
> +}  __attribute__ ((packed)) fwts_acpi_table_drtm_dps;
> +
> +/*
>   * ACPI XENV (Xen Environment Table)
>   *   http://wiki.xenproject.org/mediawiki/images/c/c4/Xen-environment-table.pdf
>   */
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
index b2116fb..8df4cec 100644
--- a/src/lib/include/fwts_acpi.h
+++ b/src/lib/include/fwts_acpi.h
@@ -688,6 +688,44 @@  typedef struct {
 }  __attribute__ ((packed)) fwts_acpi_table_tpm2;
 
 /*
+ * ACPI Trusted Computing Group DRTM Architecture Specification
+ *   http://www.trustedcomputinggroup.org/wp-content/uploads/TCG_D-RTM_Architecture_v1-0_Published_06172013.pdf
+ */
+typedef struct {
+	fwts_acpi_table_header	header;
+	uint64_t	entry_base_address;
+	uint64_t	entry_length;
+	uint32_t	entry_address32;
+	uint64_t	entry_address64;
+	uint64_t	exit_address;
+	uint64_t	log_area_address;
+	uint32_t	log_area_length;
+	uint64_t	arch_dependent_address;
+	uint32_t	flags;
+}  __attribute__ ((packed)) fwts_acpi_table_drtm;
+
+typedef struct {
+	uint32_t	validated_table_count;
+	uint64_t	validated_tables[];
+}  __attribute__ ((packed)) fwts_acpi_table_drtm_vtl;
+
+typedef struct  {
+	uint8_t		size[7];
+	uint8_t		type;
+	uint64_t	address;
+}__attribute__ ((packed)) fwts_acpi_drtm_resource;
+
+typedef struct {
+	uint32_t	resource_count;
+	fwts_acpi_drtm_resource	resources[];
+}  __attribute__ ((packed)) fwts_acpi_table_drtm_rtl;
+
+typedef struct {
+	uint32_t	dps_id_length;
+	uint8_t		dps_id[16];
+}  __attribute__ ((packed)) fwts_acpi_table_drtm_dps;
+
+/*
  * ACPI XENV (Xen Environment Table)
  *   http://wiki.xenproject.org/mediawiki/images/c/c4/Xen-environment-table.pdf
  */