From patchwork Tue Sep 26 19:42:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 145055 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2212273vqu; Tue, 26 Sep 2023 14:48:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH384pIpk4VJKLC/RD0dA2+yBEKXlSfCrhizySGG4TxGjuizzUjfaBC3L4YVgknI/cfX2Ka X-Received: by 2002:a05:6870:e2c9:b0:1be:f311:4a29 with SMTP id w9-20020a056870e2c900b001bef3114a29mr283699oad.20.1695764923118; Tue, 26 Sep 2023 14:48:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695764923; cv=none; d=google.com; s=arc-20160816; b=jM01FfKk2pjugZa9kBVR3/fToxV8a6egfrvWNsE7Yep5mAMZr+66+dxJ00svnBuSVW aHMp/aEKu3TJ/KmW7qgGlzvnlKLf48Z3QJngGrnvBnH6QWK2DYPVFgaQ/S4/Mo+I7xgh 8MZNydgjK66qdbEqE482O87+87Y67gehCfyCSqfJH/HkEGH7dh6/DlHC6r5P6edaUhrA 1qLyWDIfqbDImCn+3iOzH/+OTDFjPVk6nfDTwRCDI1qb7wmR3oEMFSeLMhKqogKNS/+H 7ft6fLKiZQZXDWziazVVmjY8ogtsC47PNia3SKTOEOkbrZys92R40MNkUb8yCA6C5NJo tAmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ylRB+o0Qkrun1yi4fSnYM174Q1wG3Ph+hurLuy8H7Hg=; fh=FlE7IElbjivUp+c1PmZ8lKCmZOhFvzEG+rWVocSN51g=; b=AG+3HNFrJHHJZRG3nxX8LbSlD1BsBmEmRpIaBSLXVJGDepLgqFykmQjYtU7D95rAfo 0ygPguJ5iOZlpsmplA7k2lNfVilfZlm4fygXloLbO/KUawi20cIMegWI0rRuiSftDmEJ nqOQm9uQPUVExUQeS6ho8FRi3pjumhLYLA13+IcJDGJxoIPjFGxXONbAPWfWp2xJsUg/ Pscn8yYRZNezrsYBZahMNhgGjt8MePpOZRkWsdTkKvp0t7PVEmDnMf2sCyGm8aXEC9tq Ac6icKUHFqy+mPeSnsdEy2305wEzV9lsvnwOcQi4lThcsvSF2KILsuNFxc0NpWau1Uos 2LYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="TWm/VCEj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id b132-20020a63348a000000b005787de7abd4si13584498pga.12.2023.09.26.14.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 14:48:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="TWm/VCEj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6044583713B2; Tue, 26 Sep 2023 12:42:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229985AbjIZTmz (ORCPT + 28 others); Tue, 26 Sep 2023 15:42:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjIZTmy (ORCPT ); Tue, 26 Sep 2023 15:42:54 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDADCFC for ; Tue, 26 Sep 2023 12:42:47 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-79fb64b5265so229298339f.1 for ; Tue, 26 Sep 2023 12:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695757367; x=1696362167; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ylRB+o0Qkrun1yi4fSnYM174Q1wG3Ph+hurLuy8H7Hg=; b=TWm/VCEj9si6AjdAXsmNB/RbeRtOrLatEwkYKR+e8ab+fZZVdF0Ze8ewRdwZlSfYRk U3mS12hlGML+XU+1lFTvG8devxxWKU20JxkERQzwOJ5e8rm8r+9e4VuSuc2+soiuCFt7 8rowKY81p6mGn+BYqQklLUGGovkJ/CPxcitoo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695757367; x=1696362167; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ylRB+o0Qkrun1yi4fSnYM174Q1wG3Ph+hurLuy8H7Hg=; b=WQpORTN0q2abv1N/WVrDFcYYyqTU4DojhTNxOaBjFbgIxyp5TnMj47Rxv+simeEVHW GMr2qOSAEC7EgYmENdNVSGuCVRrDKoUMtU4YxKJmkuX2HUrOOI8KtXKPaGs2dssWatH3 nxWLtnq3VCPO74zgMoC5ucTDT7N2XbdGgUHGU3fCodmelzjEMQ5t+Sjfch8bIh+jBeu2 EFlUj7xLTRiNLDsQJzdkHmb8blTU7cfzh2r5F2Iw7uGVXs+doQEaM9Kiks6ILEb8DU7v PFyPkTt3/bI9bg2aDTXeN99RBnlCxHe8cJ9nhabDSpmAxERf4JXlvB+9H5v+QgxitnJU rR/g== X-Gm-Message-State: AOJu0YwsFGli2zShG8732PQCDxLQkf98rcoMDynhvRW7+aHP/sf6X4+d +Qq2QuX46wBs06gSVdCyoymi6w== X-Received: by 2002:a05:6e02:1d0c:b0:351:50f1:1f98 with SMTP id i12-20020a056e021d0c00b0035150f11f98mr3806231ila.32.1695757367326; Tue, 26 Sep 2023 12:42:47 -0700 (PDT) Received: from kea.bld.corp.google.com ([2620:15c:183:200:1da0:a3ce:7aae:e9fa]) by smtp.gmail.com with ESMTPSA id g6-20020a056e02130600b0035134f1a240sm1961451ilr.86.2023.09.26.12.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 12:42:47 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: Mark Rutland , Rob Herring , Lean Sheng Tan , lkml , Dhaval Sharma , Maximilian Brune , Yunhui Cui , Guo Dong , Tom Rini , ron minnich , Gua Guo , Chiu Chasel , linux-acpi@vger.kernel.org, U-Boot Mailing List , Ard Biesheuvel , Simon Glass Subject: [PATCH v7 1/2] schemas: memory: Add ECC properties Date: Tue, 26 Sep 2023 13:42:38 -0600 Message-ID: <20230926194242.2732127-1-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 26 Sep 2023 12:42:55 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778138399807796453 X-GMAIL-MSGID: 1778138399807796453 Some memories provide ECC detection and/or correction. For software which wants to check memory, it is helpful to see which regions provide this feature. Add this as a property of the /memory nodes, since it presumably follows the hardware-level memory system. Signed-off-by: Simon Glass --- Changes in v7: - Drop unnecessary | - Add a blank line between properties Changes in v6: - Use a number of bits instead of a string property - Fix inidcates typo Changes in v5: - Redo to make this property specific to ECC - Provide properties both for detection and correction Changes in v3: - Add new patch to update the /memory nodes dtschema/schemas/memory.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dtschema/schemas/memory.yaml b/dtschema/schemas/memory.yaml index 1d74410..b3bf3c9 100644 --- a/dtschema/schemas/memory.yaml +++ b/dtschema/schemas/memory.yaml @@ -35,6 +35,19 @@ patternProperties: For the purpose of identification, each NUMA node is associated with a unique token known as a node id. + ecc-detection-bits: + default: 0 + description: | + If present, this indicates the number of bits of memory error which + can be detected and reported by the Error-Correction Code (ECC) memory + subsystem (typically 0, 1 or 2). + + ecc-correction-bits: + default: 0 + description: | + If present, this indicates the number of bits of memory error which + can be corrected by the Error-Correction Code (ECC) memory subsystem + (typically 0, 1 or 2). required: - device_type