From patchwork Fri Oct 11 06:32:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gong X-Patchwork-Id: 3021101 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7E7879F245 for ; Fri, 11 Oct 2013 06:49:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A5C4E20320 for ; Fri, 11 Oct 2013 06:49:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D041720319 for ; Fri, 11 Oct 2013 06:49:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756506Ab3JKGro (ORCPT ); Fri, 11 Oct 2013 02:47:44 -0400 Received: from mga01.intel.com ([192.55.52.88]:61034 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756157Ab3JKGrb (ORCPT ); Fri, 11 Oct 2013 02:47:31 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 10 Oct 2013 23:47:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.90,1078,1371106800"; d="scan'208";a="415283483" Received: from gchen-sby.bj.intel.com (HELO localhost) ([10.238.158.212]) by fmsmga002.fm.intel.com with ESMTP; 10 Oct 2013 23:47:29 -0700 From: "Chen, Gong" To: tony.luck@intel.com, bp@alien8.de Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, "Chen, Gong" Subject: [PATCH 5/8] ACPI, APEI, CPER: Add UEFI 2.4 support for memory error Date: Fri, 11 Oct 2013 02:32:43 -0400 Message-Id: <1381473166-29303-6-git-send-email-gong.chen@linux.intel.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1381473166-29303-1-git-send-email-gong.chen@linux.intel.com> References: <1381473166-29303-1-git-send-email-gong.chen@linux.intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In latest UEFI spec(by now it is 2.4) memory error definition for CPER (UEFI 2.4 Appendix N Common Platform Error Record) adds some new fields. These fields help people to locate memory error on actual DIMM location. Original-author: Tony Luck Signed-off-by: Chen, Gong Reviewed-by: Borislav Petkov --- drivers/acpi/apei/cper.c | 3 ++- include/linux/cper.h | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/apei/cper.c b/drivers/acpi/apei/cper.c index b2e4134..680230c 100644 --- a/drivers/acpi/apei/cper.c +++ b/drivers/acpi/apei/cper.c @@ -8,7 +8,7 @@ * various tables, such as ERST, BERT and HEST etc. * * For more information about CPER, please refer to Appendix N of UEFI - * Specification version 2.3. + * Specification version 2.4. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version @@ -191,6 +191,7 @@ static const char *cper_mem_err_type_strs[] = { "memory sparing", "scrub corrected error", "scrub uncorrected error", + "Physical Memory Map-out event", }; static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem) diff --git a/include/linux/cper.h b/include/linux/cper.h index c230494..bd01c9a 100644 --- a/include/linux/cper.h +++ b/include/linux/cper.h @@ -232,6 +232,9 @@ enum { #define CPER_MEM_VALID_RESPONDER_ID 0x1000 #define CPER_MEM_VALID_TARGET_ID 0x2000 #define CPER_MEM_VALID_ERROR_TYPE 0x4000 +#define CPER_MEM_VALID_RANK_NUMBER 0x8000 +#define CPER_MEM_VALID_CARD_HANDLE 0x10000 +#define CPER_MEM_VALID_MODULE_HANDLE 0x20000 #define CPER_PCIE_VALID_PORT_TYPE 0x0001 #define CPER_PCIE_VALID_VERSION 0x0002 @@ -347,6 +350,10 @@ struct cper_sec_mem_err { __u64 responder_id; __u64 target_id; __u8 error_type; + __u8 reserved; + __u16 rank; + __u16 mem_array_handle; + __u16 mem_dev_handle; }; struct cper_sec_pcie {