Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1956910ybe; Tue, 3 Sep 2019 06:07:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqy88VzBQq1E+/+zO4hB6bafy/Wi3liWappT8XF5Bf9hqi1aJF8wJYwh/u6i9BxDTLkhXi28 X-Received: by 2002:a17:902:4545:: with SMTP id m63mr34229454pld.45.1567516068787; Tue, 03 Sep 2019 06:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567516068; cv=none; d=google.com; s=arc-20160816; b=pFxMdjiQJJrNUx4uU/I71T173uaPlC3DPlJSPJD8WIqhjJpAImQcn88mxC1KS9DHhf T1XvCg+XCpjG8FAVL5BJltcoZC1mHhIjuS05LXU9jZ4hr8fw1mx/snFioZhdhibsENeZ g2lxsnH1FUsbpQ16+CdeQUNE8IX2Tf7mZkou7aUCT/WdorVR9BsSizJKdAjrzr8GPzgW ZgmlTVdA4UtNE72WSVTqrJYrk3PvaHhnq7uucJ058fFs8no7qcY1fcgqOAj1oHlMw1mj D2oG4kyMyYh9wWsaqw3gKkjL1MRaf4lw7qO4N/bNRH/D4rPeNMUoPXIXo/dTv3fMWgos o7Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=/LLM7J6+HokC/zKImy+sCz03x2tLqjVruyKyZN+VBAI=; b=aOFHu6/TZTItoJWrvOeeCxptGv5iX/ypUyc1RCjr+iClI0jtA/ZF8VO36PbMpqHtw6 37FO0tMDrwKjp8PNiM3NlK6MVV9VmCABccLTCokfbLZ/+zSPDqEf2mOLS1C/gjtE73Fz vugnbf6BjNsZtegoyS+5eiy8ER9zPAoWHhoNUpbr30w1vxC7zSyhe29arxscOb/s6ft2 XZz8jf4U7RzOqk4Ow/PrCYR8wypYqn/3wzZgrh7wknhn5No0rRd5/FAFbCXbtFqNNCN1 evzJuHxy+MIpgdWFl80CZUa+o8mmO7StWvhvDSE6c1zxeW78wpMetj1Qbcvaux4b2fmR W8KQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7si15053782pjn.50.2019.09.03.06.07.32; Tue, 03 Sep 2019 06:07:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729335AbfICNGY (ORCPT + 99 others); Tue, 3 Sep 2019 09:06:24 -0400 Received: from mga02.intel.com ([134.134.136.20]:32285 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729255AbfICNGX (ORCPT ); Tue, 3 Sep 2019 09:06:23 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2019 06:06:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,463,1559545200"; d="scan'208";a="183548849" Received: from marshy.an.intel.com ([10.122.105.159]) by fmsmga007.fm.intel.com with ESMTP; 03 Sep 2019 06:06:22 -0700 From: richard.gong@linux.intel.com To: gregkh@linuxfoundation.org, robh+dt@kernel.org, mark.rutland@arm.com, dinguyen@kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, sen.li@intel.com, richard.gong@intel.com Subject: [PATCHv5 3/4] firmware: rsu: document sysfs interface Date: Tue, 3 Sep 2019 08:18:20 -0500 Message-Id: <1567516701-26026-4-git-send-email-richard.gong@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567516701-26026-1-git-send-email-richard.gong@linux.intel.com> References: <1567516701-26026-1-git-send-email-richard.gong@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Richard Gong Describe Intel Stratix10 Remote System Update (RSU) device attributes Signed-off-by: Richard Gong Reviewed-by: Alan Tull --- v2: changed to use tab everywhere and wrap lines at 72 columns s/soc:firmware:svc:rsu/stratix10-rsu.0 added for watchdog v3: s/KernelVersion:5.2/KernelVersion:5.3 v4: replaced /sys/devices/platform/stratix10-rsu.0/ with /sys/devices/.../stratix10-rsu.0/driver/ removed spaces v5: corrected typo in the previous version s/KernelVersion:5.3/KernelVersion:5.4 replace contact email address with richard.gong@linux.intel.com replaced /sys/devices/.../stratix10-rsu.0/driver/ with /sys/devices/platform/stratix10-rsu.0/ --- .../testing/sysfs-devices-platform-stratix10-rsu | 128 +++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-stratix10-rsu diff --git a/Documentation/ABI/testing/sysfs-devices-platform-stratix10-rsu b/Documentation/ABI/testing/sysfs-devices-platform-stratix10-rsu new file mode 100644 index 0000000..ae9af98 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-platform-stratix10-rsu @@ -0,0 +1,128 @@ + Intel Stratix10 Remote System Update (RSU) device attributes + +What: /sys/devices/platform/stratix10-rsu.0/current_image +Date: August 2019 +KernelVersion: 5.4 +Contact: Richard Gong +Description: + (RO) the address in flash of currently running image. + +What: /sys/devices/platform/stratix10-rsu.0/fail_image +Date: August 2019 +KernelVersion: 5.4 +Contact: Richard Gong +Description: + (RO) the address in flash of failed image. + +What: /sys/devices/platform/stratix10-rsu.0/state +Date: August 2019 +KernelVersion: 5.4 +Contact: Richard Gong +Description: + (RO) the state of RSU system. + The state field has two parts: major error code in + upper 16 bits and minor error code in lower 16 bits. + + b[15:0] + Currently used only when major error is 0xF006 + (CPU watchdog timeout), in which case the minor + error code is the value reported by CPU to + firmware through the RSU notify command before + the watchdog timeout occurs. + + b[31:16] + 0xF001 bitstream error + 0xF002 hardware access failure + 0xF003 bitstream corruption + 0xF004 internal error + 0xF005 device error + 0xF006 CPU watchdog timeout + 0xF007 internal unknown error + +What: /sys/devices/platform/stratix10-rsu.0/version +Date: August 2019 +KernelVersion: 5.4 +Contact: Richard Gong +Description: + (RO) the version number of RSU firmware. 19.3 or late + version includes information about the firmware which + reported the error. + + pre 19.3: + b[31:0] + 0x0 version number + + 19.3 or late: + b[15:0] + 0x1 version number + b[31:16] + 0x0 no error + 0x0DCF Decision CMF error + 0x0ACF Application CMF error + +What: /sys/devices/platform/stratix10-rsu.0/error_location +Date: August 2019 +KernelVersion: 5.4 +Contact: Richard Gong +Description: + (RO) the error offset inside the image that failed. + +What: /sys/devices/platform/stratix10-rsu.0/error_details +Date: August 2019 +KernelVersion: 5.4 +Contact: Richard Gong +Description: + (RO) error code. + +What: /sys/devices/platform/stratix10-rsu.0/retry_counter +Date: August 2019 +KernelVersion: 5.4 +Contact: Richard Gong +Description: + (RO) the current image's retry counter, which is used by + user to know how many times the images is still allowed + to reload itself before giving up and starting RSU + fail-over flow. + +What: /sys/devices/platform/stratix10-rsu.0/reboot_image +Date: August 2019 +KernelVersion: 5.4 +Contact: Richard Gong +Description: + (WO) the address in flash of image to be loaded on next + reboot command. + +What: /sys/devices/platform/stratix10-rsu.0/notify +Date: August 2019 +KernelVersion: 5.4 +Contact: Richard Gong +Description: + (WO) client to notify firmware with different actions. + + b[15:0] + inform firmware the current software execution + stage. + 0 the first stage bootloader didn't run or + didn't reach the point of launching second + stage bootloader. + 1 failed in second bootloader or didn't get + to the point of launching the operating + system. + 2 both first and second stage bootloader ran + and the operating system launch was + attempted. + + b[16] + 1 firmware to reset current image retry + counter. + 0 no action. + + b[17] + 1 firmware to clear RSU log + 0 no action. + + b[18] + this is negative logic + 1 no action + 0 firmware record the notify code defined + in b[15:0]. -- 2.7.4