From patchwork Tue Feb 9 01:32:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 61455 Delivered-To: patches@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1766580lbl; Mon, 8 Feb 2016 17:33:25 -0800 (PST) X-Received: by 10.182.142.170 with SMTP id rx10mr28346466obb.34.1454981603631; Mon, 08 Feb 2016 17:33:23 -0800 (PST) Return-Path: Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com. [2607:f8b0:4003:c01::22f]) by mx.google.com with ESMTPS id sb6si18664760oec.15.2016.02.08.17.33.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Feb 2016 17:33:23 -0800 (PST) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c01::22f as permitted sender) client-ip=2607:f8b0:4003:c01::22f; Authentication-Results: mx.google.com; spf=pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c01::22f as permitted sender) smtp.mailfrom=al.stone@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-ob0-x22f.google.com with SMTP id xk3so173517585obc.2 for ; Mon, 08 Feb 2016 17:33:23 -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=I6IPc9RA1THi+iJaWBvXKWBTPfzjNm6riaHomi23jK0=; b=PW7ExQBi4BrIJ3/NyXQ+HnVTI2bZPXNUlovmPAtBpU2F7ME728ZgUlamIbJmLzrMo7 AZ4XHEv2i2q1GpxULicCaUP90PPwiHm/o+TAM6oI8NBbNX6UyKzyytU7ETjucBBBclSq WGfqZClQXagcCixDo1qP4aayslN1JaJUpfG+I= 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=I6IPc9RA1THi+iJaWBvXKWBTPfzjNm6riaHomi23jK0=; b=TZHWWrkFWVVhDxNj37mBnHoMij3aO0wYOPni0jGM9wI+mJypTZa98BeAZebHTORSsI X9UB/y8RNzsb8bw3JbthdIxcoifofbIgNcrVhyY32Hl+DU4NFngjAgnH/0V2gJ1T9dEf CrH+k/Idp/FmzetLKdTOclxQVTtJSPDaRwWe72qBDw5isy9ey0iONJaiHihGV5z0L24X 10dTGLJzPxEjDKCQr1a5ej+e3aCdEvjZkA1Hhj0dCVP4z+O16+DOuLx8BTa6Wi5HB0y5 9aHMVoFPu12IKIlglpV3vD2wMfMAPTCoyoSFKDuMT1irQ1Fx2TeFEE2ukrdUhy6fufj7 SW0w== X-Gm-Message-State: AG10YORe0Gff/aUw4UwIJepBITz0E+Zn4xQbRiTCwOxtA18p/pMeObSgeH2XUU7xJaH7AAducHM= X-Received: by 10.60.124.165 with SMTP id mj5mr28951906oeb.39.1454981603342; Mon, 08 Feb 2016 17:33:23 -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 qp4sm19097135obc.9.2016.02.08.17.33.21 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Feb 2016 17:33:22 -0800 (PST) From: Al Stone To: fwts-devel@lists.ubuntu.com Cc: linaro-acpi@lists.linaro.org, patches@linaro.org, Al Stone Subject: [PATCH 02/21] FADT: non-x86 machines need an FADT but x86 can survive without one Date: Mon, 8 Feb 2016 18:32:44 -0700 Message-Id: <1454981583-31872-3-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454981583-31872-1-git-send-email-al.stone@linaro.org> References: <1454981583-31872-1-git-send-email-al.stone@linaro.org> If there is no FADT, x86 machines can get by. Others cannot (or at least should not). On non-x86 machines, cause the initialization to fail instead of ignoring a zero-length FADT. Signed-off-by: Al Stone --- src/acpi/fadt/fadt.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- 2.5.0 diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c index 1a5560c..aacf317 100644 --- a/src/acpi/fadt/fadt.c +++ b/src/acpi/fadt/fadt.c @@ -56,10 +56,17 @@ static int fadt_init(fwts_framework *fw) fadt = (const fwts_acpi_table_fadt*)table->data; fadt_size = table->length; - /* Not having a FADT is not a failure */ + /* Not having a FADT is not a failure on x86 */ if (fadt_size == 0) { - fwts_log_info(fw, "FADT does not exist, this is not necessarily a failure, skipping tests."); - return FWTS_SKIP; + if (fw->target_arch == FWTS_ARCH_X86) { + fwts_log_info(fw, + "FADT does not exist, this is not " + "necessarily a failure, skipping tests."); + return FWTS_SKIP; + } else { + fwts_log_error(fw, "ACPI table FACP has zero length!"); + return FWTS_ERROR; + } } return FWTS_OK;