From patchwork Tue Jan 19 00:26:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 59946 Delivered-To: patches@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2280672lbb; Mon, 18 Jan 2016 16:26:35 -0800 (PST) X-Received: by 10.202.197.82 with SMTP id v79mr18395434oif.60.1453163194928; Mon, 18 Jan 2016 16:26:34 -0800 (PST) Return-Path: Received: from mail-oi0-x229.google.com (mail-oi0-x229.google.com. [2607:f8b0:4003:c06::229]) by mx.google.com with ESMTPS id px4si28971093oec.72.2016.01.18.16.26.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2016 16:26:34 -0800 (PST) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c06::229 as permitted sender) client-ip=2607:f8b0:4003:c06::229; Authentication-Results: mx.google.com; spf=pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c06::229 as permitted sender) smtp.mailfrom=al.stone@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-oi0-x229.google.com with SMTP id w75so152483657oie.0 for ; Mon, 18 Jan 2016 16:26:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3ELhMELrjjHKplS3WgR1XNJybH3dug70Gw3hu1f4sWE=; b=Wv5R1WvQsO1yshK14eOdYHon911qCqzKri3lgx9Ipc47ZpOr9lAiW7R0fgEoPtJZjG vm9VxcQ+PJKq/6XoLq0T4dc6OjSt3AJKCvQzKZB0F0IrQhSrcLI0jTrWo8tBbTvzkoEB 8ZMS8YKgp4XzMQurUfBWqvO4i5SJOiE7q7XIQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3ELhMELrjjHKplS3WgR1XNJybH3dug70Gw3hu1f4sWE=; b=TvsWghhiUhby7PiuhjNXwNkpwCnk9wJmMf/I7NEFeTlnZ1oMDf9iucNaMt2K5aZ1Ac XG+rcqs5aFicPRM39dPuOA5ypCDYH/+Ahpej4mGoiR8v9WOVTz0wYUXmOJoKWPW0HT9s nVqc6swl8uD6KDLpGtZW3py0OsD1pF2y/cRKunHWKjLVsEvIQ6Rh/oi3hBoczODDytkW IdBItTrKPsQwZseHjb4qByRUDHR800Mo+vf9LV9j/IrFzKoqGCoQGC63tA9cWAVYcZou f7HC1nebRXzy2EDAXWdw+a0ZrwmVBYx5mNS68xN/DhlVF4BwhfnQjWActE6O4T3abjeg mJ6Q== X-Gm-Message-State: ALoCoQlPA3vjDVEXki+cfWHT21auOWH5ft0jXkPpDQEnzAgClS/3v9RXAEl+5MClmdT9DqojsSRCYHcWti5szm4xeGdMctkmeQ== X-Received: by 10.202.64.8 with SMTP id n8mr20202295oia.112.1453163194613; Mon, 18 Jan 2016 16:26:34 -0800 (PST) Return-Path: Received: from fidelio.ahs3 (c-50-134-239-249.hsd1.co.comcast.net. [50.134.239.249]) by smtp.googlemail.com with ESMTPSA id y9sm14289969obg.4.2016.01.18.16.26.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jan 2016 16:26:33 -0800 (PST) From: Al Stone To: fwts-devel@lists.ubuntu.com Cc: linaro-acpi@lists.linaro.org, patches@linaro.org, Al Stone Subject: [PATCH v3 1/6] Start defining FWTS architectures as variables Date: Mon, 18 Jan 2016 17:26:10 -0700 Message-Id: <1453163175-5801-2-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1453163175-5801-1-git-send-email-al.stone@linaro.org> References: <1453163175-5801-1-git-send-email-al.stone@linaro.org> 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 --- 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 --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 + * + * 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