linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: acampanella-thegoodpenguin <acampanella@thegoodpenguin.co.uk>
To: linux-embedded@vger.kernel.org
Subject: [PATCH PREVIEW RFC 6/6] dt-bindings: bootcache: Add bindings for bootcache backend
Date: Tue, 23 Sep 2025 15:23:43 +0100	[thread overview]
Message-ID: <20250923-bootcache-v1-6-4f86fdc38b4e@thegoodpenguin.co.uk> (raw)
In-Reply-To: <20250923-bootcache-v1-0-4f86fdc38b4e@thegoodpenguin.co.uk>

From: Marc Kelly <mkelly@thegoodpenguin.co.uk>

Add device tree bindings for the bootcache_backend_memory.

Signed-off-by: Marc Kelly <mkelly@thegoodpenguin.co.uk>
---
 .../bootcache/linux,bootcache-backend-memory.yaml  | 67 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 2 files changed, 68 insertions(+)

diff --git a/Documentation/devicetree/bindings/bootcache/linux,bootcache-backend-memory.yaml b/Documentation/devicetree/bindings/bootcache/linux,bootcache-backend-memory.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..cf46bf4c513e263f67cdf2323349fa16837c8d22
--- /dev/null
+++ b/Documentation/devicetree/bindings/bootcache/linux,bootcache-backend-memory.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bootcache/linux,bootcache-backend-memory.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Bootcache Framework reserved memory backend
+
+maintainers:
+  - Marc Kelly <mkelly@thegoodpenguin.co.uk>
+  - Andrea Campenella <acampenella@thegoodpenguin.co.uk>
+
+description:
+  This bootcache backend adds support for using reserved memory
+  for the storage location for bootcache data. On initialization this
+  memory is read and any bootcache entries found are added to the
+  bootcache framework.
+  Data is inserted into these memory locations via the bootloader
+  or other means before the kernel boots.
+
+properties:
+  compatible:
+    enum:
+      - linux,backend-backend-memory
+
+  reg:
+    maxItems: 2
+
+  memory-region:
+    maxItems: 1
+    description:
+      Contains the bootcache reserved memory.
+      Data format is a binary block of packed cache data consisting
+      of a selection of key and value pairs, along with size indicators.
+      The format should be considered private to the driver and should
+      not be interpreted outside of the drivers context.
+
+required:
+  - compatible
+  - reg
+  - memory-region
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    /*
+     * The bootcache-backend is placed in the in the main domain
+     * of the SOC, with the reserved memory location defined as
+     * follows.
+     * This defines 64kBytes in the upper 2GBytes.
+     *
+     * The size
+     * reserved-memory {
+     *     bootcache_reserved: bootcache-reserved@BFFF0000 {
+     *         no-map;
+     *         reg = <0x00 0xBFFF0000 0x00 0x10000>;
+     *         label = "bootcache_backend_memory";
+     *     };
+     * }
+     */
+
+    bootcache-backend@BFFF0000 {
+        compatible = "linux,backend-backend-memory";
+        reg = <0x00 0xBFFF0000 0x00 0x10000>;
+        memory-region = <&bootcache_reserved>;
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 73679686d49ac653382ecb32b9b3b500a4509383..d547fe2fa77f6fabdd19be3c0a68526d2f6d2d4d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4422,6 +4422,7 @@ BOOT CACHE
 M:	Andrea Campanella <acampanella@thegoodpenguin.co.uk>
 M:	Marc Kelly <mkelly@thegoodpenguin.co.uk>
 S:	Maintained
+F:	Documentation/devicetree/bindings/bootcache/linux,bootcache-backend-memory.yaml
 F:	drivers/base/bootcache.c
 F:	drivers/base/bootcache_*
 F:	include/linux/bootcache.h

-- 
2.48.1


  parent reply	other threads:[~2025-09-23 14:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23 14:23 [PATCH PREVIEW RFC 0/6] Add support for boot-time caching acampanella-thegoodpenguin
2025-09-23 14:23 ` [PATCH PREVIEW RFC 1/6] base: bootcache: initial commit acampanella-thegoodpenguin
2025-09-29 23:38   ` Bird, Tim
2025-09-30  8:24     ` Andrea Campanella
2025-09-23 14:23 ` [PATCH PREVIEW RFC 2/6] raid6: Add bootcache acampanella-thegoodpenguin
2025-09-23 14:23 ` [PATCH PREVIEW RFC 3/6] crypto: use bootcache to cache fastest algorithm acampanella-thegoodpenguin
2025-09-29 23:48   ` Bird, Tim
2025-09-30 11:37     ` Andrew Murray
2025-09-23 14:23 ` [PATCH PREVIEW RFC 4/6] base: bootcache: Add bootcache test backend acampanella-thegoodpenguin
2025-09-23 14:23 ` [PATCH PREVIEW RFC 5/6] base: bootcache: Add bootcache memory backend acampanella-thegoodpenguin
2025-09-24 14:42   ` Dan Scally
2025-09-24 15:13     ` Andrea Campanella
2025-09-26 17:34     ` Marc Kelly
2025-09-26 20:09       ` Dan Scally
2025-09-23 14:23 ` acampanella-thegoodpenguin [this message]
2025-09-30 12:49 ` [PATCH PREVIEW RFC 0/6] Add support for boot-time caching Rob Landley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250923-bootcache-v1-6-4f86fdc38b4e@thegoodpenguin.co.uk \
    --to=acampanella@thegoodpenguin.co.uk \
    --cc=linux-embedded@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).