linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: "Guilherme G. Piccoli" <gpiccoli@igalia.com>,
	computersforpeace@gmail.com
Cc: "Guilherme G. Piccoli" <kernel@gpiccoli.net>,
	opendmb@gmail.com, gpowell@broadcom.com, justinpopo6@gmail.com,
	mmayer@broadcom.com, bcm-kernel-feedback-list@broadcom.com,
	kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: Question about the Broadcom Always On register panic handling
Date: Mon, 21 Mar 2022 09:32:19 -0700	[thread overview]
Message-ID: <781cafb0-8d06-8b56-907a-5175c2da196a@gmail.com> (raw)
In-Reply-To: <6dac422b-d509-b863-0b31-98a07808ac0d@igalia.com>

On 3/21/22 09:15, Guilherme G. Piccoli wrote:
> Hi Brian and Florian, I'm studying the panic notifiers and found one
> added by you in the commit 0b741b8234c ("soc: bcm: brcmstb: Add support
> for S2/S3/S5 suspend states (ARM)". Basically, the handler is very
> simple and the only thing it does is:
> 
> /* from drivers/soc/bcm/brcmstb/pm/aon_defs.h */
> #define AON_REG_PANIC		0x20
> #define BRCMSTB_PANIC_MAGIC	0x512E115E
> 
> /* from drivers/soc/bcm/brcmstb/pm/pm-arm.c*/
> brcmstb_pm_panic_notify() {
> 	writel_relaxed(BRCMSTB_PANIC_MAGIC, ctrl.aon_sram + AON_REG_PANIC);
> }
> 
> This write happens on panic time, but I couldn't find any
> information/documentation about the AON register and what effectively
> happens when this write is completed. Does the SoC reboots or anything
> like that?

The AON (standing for always-on) is a small domain in the SoC that can 
retain its state across various system wide sleep states and specific 
reset conditions. The AON DATA RAM is a small ram of a few words (< 1KB) 
which can store persistent information across such events.

The purpose of this write was initially to help with indicating to the 
boot loader that a panic occurred and so that it should try its best to 
preserve the DRAM contents holding that buffer for recovery by the Linux 
kernel as opposed to wiping out DRAM clean again. I cannot go into the 
mechanics of what happens publicly unfortunately.

> 
> Any information that helps me to document such panic event is very
> welcome, and in case you have AON documentation, it'd be also pretty great!

Why are you asking specifically about this if I may ask? If you are a 
legitimate Broadcom STB customer you can reach out to our support and I 
am sure the question will come back for me to answer.
-- 
Florian

  reply	other threads:[~2022-03-21 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 16:15 Question about the Broadcom Always On register panic handling Guilherme G. Piccoli
2022-03-21 16:32 ` Florian Fainelli [this message]
2022-03-21 18:04   ` Guilherme G. Piccoli

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=781cafb0-8d06-8b56-907a-5175c2da196a@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=computersforpeace@gmail.com \
    --cc=gpiccoli@igalia.com \
    --cc=gpowell@broadcom.com \
    --cc=justinpopo6@gmail.com \
    --cc=kernel@gpiccoli.net \
    --cc=kexec@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmayer@broadcom.com \
    --cc=opendmb@gmail.com \
    /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).