Skip to contentSkip to conversation

pstore/ram: Add ramoops support for the Flattened Device Tree.

PATCH Superseded Bryan Freed 2 participants 2 messages Jun 26, 2012

Subsystems (3)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 pstore/ram: Add ramoops support for the Flattened Device Tree.

When called with a non-zero of_node, fill out a new ramoops_platform_data with data from the specified Flattened Device Tree node. Update ramoops documentation with the new FDT interface. Update devicetree/binding documentation with pstore/ramoops.txt.

---
 .../devicetree/bindings/pstore/ramoops.txt         |   17 +++++++
 Documentation/ramoops.txt                          |    7 ++-
 fs/pstore/ram.c                                    |   48 ++++++++++++++++++++
 3 files changed, 70 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pstore/ramoops.txt
Documentation/devicetree/bindings/pstore/ramoops.txt new file +17 -0
new file mode 100644
index 0000000..4590c5d
@@ -0,0 +1,17 @@
+Ramoops oops/panic logger
+
+Required properties:
+- compatible: Must be "ramoops".
+- reg: Specifies the base physical address and size of preserved memory.
+- record-size: Specifies the size of each record in preserved memory.
+
+Example:
+
+ramoops {
+	compatible = "ramoops";
+	reg = <0x41f00000 0x00100000>;
+	record-size = <0x00020000>;
+};
+The "reg = <0x41f00000 0x00100000>" line specifies a preserved memory
+size of 1MB at physical address 0x41f00000.
+The "record-size = <0x00020000>" line specifies a record size of 128KB.
Documentation/ramoops.txt +5 -2
index 4ba7db2..80a6173 100644
@@ -3,7 +3,7 @@ Ramoops oops/panic logger
 
 Sergiu Iordache <[email protected]>
 
-Updated: 17 November 2011
+Updated: 5 June 2012
 
 0. Introduction
 
@@ -37,7 +37,7 @@ corrupt, but usually it is restorable.
 
 2. Setting the parameters
 
-Setting the ramoops parameters can be done in 2 different manners:
+Setting the ramoops parameters can be done in 3 different manners:
  1. Use the module parameters (which have the names of the variables described
  as before).
  2. Use a platform device and set the platform data. The parameters can then
@@ -70,6 +70,9 @@ if (ret) {
 	return ret;
 }
 
+ 3. Use the Flattened Device Tree to set the platform data.
+ This is described in devicetree/bindings/pstore/ramoops.txt.
+
 3. Dump format
 
 The data dump begins with a header, currently defined as "====" followed by a
fs/pstore/ram.c +48 -0

81 lines not on this page · raw message

Signature · 1 line
1.7.7.3
Acked-by on v5 1/1
#1 lore raw
Quoted 6 lines · Bryan Freed

When called with a non-zero of_node, fill out a new ramoops_platform_data with data from the specified Flattened Device Tree node. Update ramoops documentation with the new FDT interface. Update devicetree/binding documentation with pstore/ramoops.txt.

-Kees

Signature · 2 lines
Kees Cook
Chrome OS Security