Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2152103rdh; Tue, 26 Sep 2023 14:19:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFtaZT2laZO+Abue8ZWTkyNd1IOR3TCWGDxfifChRAXnNVe4KtNgzhHKC8hB4+Uk9nitV9R X-Received: by 2002:a05:6870:d625:b0:1bb:4c5f:6db0 with SMTP id a37-20020a056870d62500b001bb4c5f6db0mr220530oaq.36.1695763162812; Tue, 26 Sep 2023 14:19:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695763162; cv=none; d=google.com; s=arc-20160816; b=NrZl4PskvMcyBLE99jgQAQgGGpWbCknIB2qkMisduyssBZsUxg30grYLkPVdya/WRk Vwiwu+pPYR6iIoknhTkMrxSkESvApEihJmo43ENxODmwAOlBowabdiAzG0Bv2zalPDK6 +8UgafrjZ2JL4oyO3nx2Y/l7pxTNWLvXZhCEI5SRiHTNhZjAr0/StFqdn9uE4JeE7LYv qQJOJD6T5BXHNnZy1uaLTf6v6o9O2uoe/0IRAy//tTxhK9H1ZRf1VOOrWa3rq/6HLigP x4S4Xrugx6DJM2SrzBYEEJfdV2zjpTdMudHarIcPKL0Jv/NKQYR0OmzOjN2UEPSR94Xj uHfQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xfBINqFi+tu9r+hgIndvcFHVghblGM5fsNWuNXfdXnI=; fh=FlE7IElbjivUp+c1PmZ8lKCmZOhFvzEG+rWVocSN51g=; b=A8NZrH1AVy4fH03RmDGoDIAkeYtSDRRaCuglkoPL1X6WO9AmAmkYjsYtZM/Lsiyxxe Ysqi2jMm1cyiKsJPxiEJnWD36ycKMF354Hp+xtBgU95H4PdEyV1JsLVlRobEHo+fR/ow L6KxJy24/UvmkRl86tyB8eybHYcB8wegaUUqE/AESR9ZCUA0dxZgM/HELi96xOt9kU3C D5I2HatTvI+gl0pT0qiRPEl7g06eU1aSo6gco1Zu4ut3wVWAYYjsuiVjQ72yqKTGMoNB 2gOUyi7nLon/ZRvnQ2ogeNdqnjpwUnV/+UCQVkAKdYmwi4U2MVUHSB9AEj5ChUBUP0ss syrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lEV6VOlJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id b9-20020a633409000000b00563d3ecfb13si2871880pga.117.2023.09.26.14.19.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 14:19:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lEV6VOlJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 19C3983713BA; Tue, 26 Sep 2023 12:43:02 -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 S232157AbjIZTm5 (ORCPT + 99 others); Tue, 26 Sep 2023 15:42:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjIZTm4 (ORCPT ); Tue, 26 Sep 2023 15:42:56 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2D349D for ; Tue, 26 Sep 2023 12:42:49 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-79fa7e33573so254372939f.0 for ; Tue, 26 Sep 2023 12:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695757369; x=1696362169; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xfBINqFi+tu9r+hgIndvcFHVghblGM5fsNWuNXfdXnI=; b=lEV6VOlJPdV09Ah2slGmsHMp5voeHDAUPfAZ8JxOV+ttSU+zaT0TWZ1Vj+jNS/PIJH pe77VvZn3EOVPmDJ8M+C8bZMPAT3GvB/Sj0uwzELyyE4mvSLPs7RHaugWWxlDH+wMOnk kE13JgIcZkdW5oNcEmTKPwzYQMmYybszxx5fE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695757369; x=1696362169; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xfBINqFi+tu9r+hgIndvcFHVghblGM5fsNWuNXfdXnI=; b=KC8j+/1oHahP8JonL91q0VElzG92L5vp6kN2h3xUFsoDPZebsZHzbiRQ0RSEn5Pl6N 9Aoz1Tyugwtaec8LvF/5rLlsm3h7G0DgHOvqTbnUaAO3qFNwJSdK1yBu70UuozSnCgP7 KCVyGkiCgHHRKkUtfKUJsu3ArBBfI0MBSfNjH5shYCy0gZcde6JWYw5agweNMM0qcolw zDHK4if7ebjh25pJCVfM/RCf7z3dlR6wIe1XQfRZ7qdqQ3vlBYMfBRl1JI19kTp8QDF2 tTtexFGraX08vu0zHuF9H+GtfiloQLys4DPyT7m/Nd/tfKTBGQWZqaYkU85aTlqtj/+/ qfXw== X-Gm-Message-State: AOJu0YyndJvWGUjw7wbHlDC+E6UnNtGy5RW0XkXlpqia7w03G9OcHQBp Jjhkhbgk8wcfFjM9NMk2voeiTw== X-Received: by 2002:a05:6e02:219c:b0:349:7cec:db76 with SMTP id j28-20020a056e02219c00b003497cecdb76mr14089105ila.31.1695757369179; Tue, 26 Sep 2023 12:42:49 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 12:42:48 -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 2/2] schemas: Add some common reserved-memory usages Date: Tue, 26 Sep 2023 13:42:39 -0600 Message-ID: <20230926194242.2732127-2-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog In-Reply-To: <20230926194242.2732127-1-sjg@chromium.org> References: <20230926194242.2732127-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=unavailable 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:43:02 -0700 (PDT) It is common to split firmware into 'Platform Init', which does the initial hardware setup and a "Payload" which selects the OS to be booted. Thus an handover interface is required between these two pieces. Where UEFI boot-time services are not available, but UEFI firmware is present on either side of this interface, information about memory usage and attributes must be presented to the "Payload" in some form. This aims to provide an small schema addition for the memory mapping needed to keep these two pieces working together well. Signed-off-by: Simon Glass --- Changes in v7: - Rename acpi-reclaim to acpi - Drop individual mention of when memory can be reclaimed - Rewrite the item descriptions - Add back the UEFI text (with trepidation) Changes in v6: - Drop mention of UEFI - Use compatible strings instead of node names Changes in v5: - Drop the memory-map node (should have done that in v4) - Tidy up schema a bit Changes in v4: - Make use of the reserved-memory node instead of creating a new one Changes in v3: - Reword commit message again - cc a lot more people, from the FFI patch - Split out the attributes into the /memory nodes Changes in v2: - Reword commit message .../reserved-memory/common-reserved.yaml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 dtschema/schemas/reserved-memory/common-reserved.yaml diff --git a/dtschema/schemas/reserved-memory/common-reserved.yaml b/dtschema/schemas/reserved-memory/common-reserved.yaml new file mode 100644 index 0000000..f7fbdfd --- /dev/null +++ b/dtschema/schemas/reserved-memory/common-reserved.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reserved-memory/common-reserved.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common memory reservations + +description: | + Specifies that the reserved memory region can be used for the purpose + indicated by its compatible string. + + Clients may reuse this reserved memory if they understand what it is for, + subject to the notes below. + +maintainers: + - Simon Glass + +allOf: + - $ref: reserved-memory.yaml + +properties: + compatible: + description: | + This describes some common memory reservations, with the compatible + string indicating what it is used for: + + acpi: Advanced Configuration and Power Interface (ACPI) tables + acpi-nvs: ACPI Non-Volatile-Sleeping Memory (NVS). This is reserved by + the firmware for its use and is required to be saved and restored + across an NVS sleep + boot-code: Contains code used for booting which is not needed by the OS + boot-code: Contains data used for booting which is not needed by the OS + runtime-code: Contains code used for interacting with the system when + running the OS + runtime-data: Contains data used for interacting with the system when + running the OS + + enum: + - acpi + - acpi-nvs + - boot-code + - boot-data + - runtime-code + - runtime-data + + reg: + description: region of memory that is reserved for the purpose indicated + by the compatible string. + +required: + - reg + +unevaluatedProperties: false + +examples: + - | + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + + reserved@12340000 { + compatible = "boot-code"; + reg = <0x12340000 0x00800000>; + }; + + reserved@43210000 { + compatible = "boot-data"; + reg = <0x43210000 0x00800000>; + }; + }; -- 2.42.0.515.g380fc7ccd1-goog