diff mbox

[v3,1/6] Start defining FWTS architectures as variables

Message ID 1453163175-5801-2-git-send-email-al.stone@linaro.org
State New
Headers show

Commit Message

Al Stone Jan. 19, 2016, 12:26 a.m. UTC
Add in fwts_arch.h and a typedef for fwts_architecture so that we can
start referring to the architectures used as variables.  Later on we
will define host and target architectures to make it easier for tests
to adapt their behavior.  What we want the tests to be able to do is
change a test -- if necessary -- based on the architecture supported
by the firmware being tested.  For example, if hardware reduced mode
is not being used on arm64, it is an error; on ia64 or x86, it may
not matter.

Signed-off-by: Al Stone <al.stone@linaro.org>

---
 src/lib/include/fwts.h      |  1 +
 src/lib/include/fwts_arch.h | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 src/lib/include/fwts_arch.h

-- 
2.5.0
diff mbox

Patch

diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
index 483f4ad..711a379 100644
--- a/src/lib/include/fwts.h
+++ b/src/lib/include/fwts.h
@@ -47,6 +47,7 @@ 
 #include "fwts_acpi.h"
 #include "fwts_acpi_tables.h"
 #include "fwts_acpid.h"
+#include "fwts_arch.h"
 #include "fwts_checkeuid.h"
 #include "fwts_cpu.h"
 #include "fwts_dump.h"
diff --git a/src/lib/include/fwts_arch.h b/src/lib/include/fwts_arch.h
new file mode 100644
index 0000000..3fc03fc
--- /dev/null
+++ b/src/lib/include/fwts_arch.h
@@ -0,0 +1,33 @@ 
+/*
+ * Copyright (C) 2016, Al Stone <ahs3@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __FWTS_ARCH_H__
+#define __FWTS_ARCH_H__
+
+/*
+ * Possible architectures for either the host (where FWTS is being run)
+ * or the target (what is being tested -- e.g., running FWTS on x86 but
+ * examining arm64 ACPI tables).
+ *
+ * NB: kernel conventions are used for the arch names.
+ */
+typedef enum {
+	FWTS_ARCH_X86,
+	FWTS_ARCH_IA64,
+	FWTS_ARCH_ARM64,
+	FWTS_ARCH_OTHER
+} fwts_architecture;
+
+#endif