diff mbox series

[2/2] ARM: dts: tacoma: Add reserved memory for ramoops

Message ID 20201016043513.119841-3-andrew@aj.id.au
State Changes Requested, archived
Headers show
Series ARM: dts: Enable ramoops for Rainier and Tacoma | expand

Commit Message

Andrew Jeffery Oct. 16, 2020, 4:35 a.m. UTC
Reserve a 1.5MiB region of memory to record kmsg dumps, console and
userspace message state into 16kiB ring-buffer slots. The sizing allows
for up to 32 dumps to be captured and read out.

Set max-reason to KMSG_DUMP_EMERG to capture bad-path reboots.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Joel Stanley Oct. 21, 2020, 5:05 a.m. UTC | #1
On Fri, 16 Oct 2020 at 04:36, Andrew Jeffery <andrew@aj.id.au> wrote:
>
> Reserve a 1.5MiB region of memory to record kmsg dumps, console and
> userspace message state into 16kiB ring-buffer slots. The sizing allows
> for up to 32 dumps to be captured and read out.
>
> Set max-reason to KMSG_DUMP_EMERG to capture bad-path reboots.
>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts b/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
> index 46f2f538baba..4f7e9b490e1a 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
> @@ -26,6 +26,15 @@ reserved-memory {
>                 #size-cells = <1>;
>                 ranges;
>
> +               ramoops@b9e80000 {
> +                       compatible = "ramoops";
> +                       reg = <0xb9e80000 0x180000>;

I take that r-b back. When booting, we see:

[    0.000000] region@ba000000 (0xb8000000--0xbc000000) overlaps with
ramoops@b9e80000 (0xb9e80000--0xba000000)

Which appears to be a true statement.

> +                       record-size = <0x4000>;
> +                       console-size = <0x4000>;
> +                       pmsg-size = <0x4000>;
> +                       max-reason = <3>; /* KMSG_DUMP_EMERG */
> +               };
> +
>                 flash_memory: region@ba000000 {
>                         no-map;
>                         reg = <0xb8000000 0x4000000>; /* 64M */
> --
> 2.25.1
>
Andrew Jeffery Oct. 21, 2020, 5:42 a.m. UTC | #2
On Wed, 21 Oct 2020, at 15:35, Joel Stanley wrote:
> On Fri, 16 Oct 2020 at 04:36, Andrew Jeffery <andrew@aj.id.au> wrote:
> >
> > Reserve a 1.5MiB region of memory to record kmsg dumps, console and
> > userspace message state into 16kiB ring-buffer slots. The sizing allows
> > for up to 32 dumps to be captured and read out.
> >
> > Set max-reason to KMSG_DUMP_EMERG to capture bad-path reboots.
> >
> > Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> > ---
> >  arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts b/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
> > index 46f2f538baba..4f7e9b490e1a 100644
> > --- a/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
> > +++ b/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
> > @@ -26,6 +26,15 @@ reserved-memory {
> >                 #size-cells = <1>;
> >                 ranges;
> >
> > +               ramoops@b9e80000 {
> > +                       compatible = "ramoops";
> > +                       reg = <0xb9e80000 0x180000>;
> 
> I take that r-b back. When booting, we see:
> 
> [    0.000000] region@ba000000 (0xb8000000--0xbc000000) overlaps with
> ramoops@b9e80000 (0xb9e80000--0xba000000)
> 
> Which appears to be a true statement.

Yep:

> 
> > +                       record-size = <0x4000>;
> > +                       console-size = <0x4000>;
> > +                       pmsg-size = <0x4000>;
> > +                       max-reason = <3>; /* KMSG_DUMP_EMERG */
> > +               };
> > +
> >                 flash_memory: region@ba000000 {
> >                         no-map;
> >                         reg = <0xb8000000 0x4000000>; /* 64M */

Looks like I derived the ramoops address from the flash_memory node label, but 
that's mismatched with its reg value.
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts b/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
index 46f2f538baba..4f7e9b490e1a 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
@@ -26,6 +26,15 @@  reserved-memory {
 		#size-cells = <1>;
 		ranges;
 
+		ramoops@b9e80000 {
+			compatible = "ramoops";
+			reg = <0xb9e80000 0x180000>;
+			record-size = <0x4000>;
+			console-size = <0x4000>;
+			pmsg-size = <0x4000>;
+			max-reason = <3>; /* KMSG_DUMP_EMERG */
+		};
+
 		flash_memory: region@ba000000 {
 			no-map;
 			reg = <0xb8000000 0x4000000>; /* 64M */