From patchwork Fri Feb 19 23:39:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 62418 Delivered-To: patches@linaro.org Received: by 10.112.43.199 with SMTP id y7csp78453lbl; Fri, 19 Feb 2016 15:40:25 -0800 (PST) X-Received: by 10.202.87.208 with SMTP id l199mr13230445oib.97.1455925225257; Fri, 19 Feb 2016 15:40:25 -0800 (PST) Return-Path: Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com. [2607:f8b0:4003:c06::230]) by mx.google.com with ESMTPS id l68si18919874oib.116.2016.02.19.15.40.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Feb 2016 15:40:25 -0800 (PST) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c06::230 as permitted sender) client-ip=2607:f8b0:4003:c06::230; Authentication-Results: mx.google.com; spf=pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c06::230 as permitted sender) smtp.mailfrom=al.stone@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-oi0-x230.google.com with SMTP id m82so22780258oif.1 for ; Fri, 19 Feb 2016 15:40:24 -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=S+luiy9Y1WFOTqlLpjOkJ5j8Wv7Krc8wkLddRX9i+fs=; b=DUV2TJGM+7jLeKUYv5xar8+mkyilS+FqLajfh9o5kIG3zjqPuBhAKEJuSYe5Kicvx6 c5Yxwe+BYFBzPvPfq4SdEE6UhLhtcMaILR2W8OPuU9RMfgBBOERzGnMIIBJh+FK9eBn4 bjr3+ku86av28js0UPRSDe4Eq3P+UrDPL8A60= 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=S+luiy9Y1WFOTqlLpjOkJ5j8Wv7Krc8wkLddRX9i+fs=; b=gLbv2IheRjPQcbfbCv38oej+T3ACaTqNZFuJ1r3+19geKvyX6SHSxzjxG7MCNpeK+1 +oM/fc4kODzMkxAuaQ5/zTAOsSIRTKTNiNw4Usi8zu7QKZkVtdPEtj8cSrL+K1kRWW83 OVZK5X+Kpkd/w06xNTGGuDweL95MQiAnft29BTE+lzqY7PsUQ/pQSXrO7dQ5Bbe/57kF SnDmYWY9rtzpw9/o1J/YKXi4IcCCDlo+UsTqmSbPGhSAB0W25XUSSORoKCg0axUvaS0e 1yI5mmkMuRkn8YzVKH1tksjTMybzopTLjQIqktLAt/lrwO0+ZSuMZ4GHBP3v2Z1tMbFi wwuw== X-Gm-Message-State: AG10YOQaYjBXaG27OcAJCLtVyZXCBTtSV6ffAV0W1ft8YEYFzJcuJYmDMp5V7WNgT3lhZSqpwaQ= X-Received: by 10.202.202.139 with SMTP id a133mr13102470oig.28.1455925224542; Fri, 19 Feb 2016 15:40:24 -0800 (PST) Return-Path: Received: from fidelio.ahs3.com (c-50-134-239-249.hsd1.co.comcast.net. [50.134.239.249]) by smtp.googlemail.com with ESMTPSA id kg7sm8655217obb.27.2016.02.19.15.40.22 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Feb 2016 15:40: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 v2 02/23] FADT: non-x86 machines need an FADT but x86 can survive without one Date: Fri, 19 Feb 2016 16:39:38 -0700 Message-Id: <1455925199-8587-3-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1455925199-8587-1-git-send-email-al.stone@linaro.org> References: <1455925199-8587-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 Acked-by: Colin Ian King Acked-by: Ivan Hu --- 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;