[prev in list] [next in list] [prev in thread] [next in thread]
List: fwts-devel
Subject: [PATCH 1/2] lib: fwts_acpi_tables: add a function to get FADT versions
From: Alex Hung <alex.hung () canonical ! com>
Date: 2021-08-13 21:35:38
Message-ID: 20210813213539.546368-1-alex.hung () canonical ! com
[Download RAW message or body]
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
src/lib/include/fwts_acpi_tables.h | 1 +
src/lib/src/fwts_acpi_tables.c | 14 ++++++++++++++
2 files changed, 15 insertions(+)
diff --git a/src/lib/include/fwts_acpi_tables.h b/src/lib/include/fwts_acpi_tables.h
index 2ac649bb..6b768d79 100644
--- a/src/lib/include/fwts_acpi_tables.h
+++ b/src/lib/include/fwts_acpi_tables.h
@@ -92,5 +92,6 @@ void fwts_acpi_space_id(fwts_framework *fw, const char *table, const char *field
const uint8_t actual, const uint8_t num_type, ...);
uint32_t fwts_get_acpi_version(fwts_framework *fw);
+void fwts_get_fadt_version(fwts_framework *fw, uint8_t *major, uint8_t *minor);
#endif
diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
index b08cbdfd..9f12539f 100644
--- a/src/lib/src/fwts_acpi_tables.c
+++ b/src/lib/src/fwts_acpi_tables.c
@@ -1829,3 +1829,17 @@ uint32_t fwts_get_acpi_version(fwts_framework *fw)
return acpi_version;
}
+
+/*
+ * fwts_get_fadt_version()
+ * get fadt major and minor versions
+ */
+void fwts_get_fadt_version(fwts_framework *fw, uint8_t *major, uint8_t *minor)
+{
+ uint32_t acpi_version;
+
+ /* ACPI version = FADT major & minor versions */
+ acpi_version = fwts_get_acpi_version(fw);
+ *major = (acpi_version & 0xF00) >> 8;
+ *minor = (acpi_version & 0xFF) >> 4;
+}
--
2.32.0
--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic