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: 569712 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 474701402C0; Tue, 19 Jan 2016 11:26:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=Wv5R1WvQ; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1aLK89-00021N-Sj; Tue, 19 Jan 2016 00:26:41 +0000 Received: from mail-oi0-f53.google.com ([209.85.218.53]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.76) (envelope-from ) id 1aLK83-00020B-MK for fwts-devel@lists.ubuntu.com; Tue, 19 Jan 2016 00:26:35 +0000 Received: by mail-oi0-f53.google.com with SMTP id o124so174797504oia.3 for ; Mon, 18 Jan 2016 16:26:35 -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=fLunaYQnxc68377RxJlQXg7RZTQMtAnV0r3grXm35CMZtUOEZwhEk7EXTqe3Jmgc1L 9zk/ViODURaot8hbVHQp8U16HztQpOEW+ce18td7e4KCRCL2dz4EN5UTuDecETLwb+Yr lObuHCr3BNietg7w4jWYbWLeJFTX33qbjgZS+4onqcSCf9bO57x7ksVbAIkaHIgy2yL4 cd6PXkOF3l7fPpkOLGLprx4b0O4wRTPAhEj/XN9ojr2fcnodzP0FF5Etam4snxx9oi/8 VQhZIinURSDtI+YnpbsocNOmiMAZR3qDZcbhTojBO0ecVMK9u10CvbqNYsFnKkrbIGyk ZPng== X-Gm-Message-State: ALoCoQkjTPQ74EaqnH0nCgLzoD5tRXT5/h5oOS7e2DTMP75SxYTXb1LVQyiRLVW0ygwh+n8+bWIh1MSD3owzj5lsu9IM19oTyA== X-Received: by 10.202.64.8 with SMTP id n8mr20202295oia.112.1453163194613; Mon, 18 Jan 2016 16:26:34 -0800 (PST) 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 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> Cc: patches@linaro.org, linaro-acpi@lists.linaro.org X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: fwts-devel-bounces@lists.ubuntu.com 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 Acked-by: Alex Hung --- 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 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