All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Will Liang (梁永鉉)" <Will.Liang@quantatw.com>
To: "Stefan Schaeckeler (sschaeck)" <sschaeck@cisco.com>,
	Andrew Jeffery <andrew@aj.id.au>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: RE: ECC memory of BMC
Date: Fri, 22 Feb 2019 07:48:50 +0000	[thread overview]
Message-ID: <2cac43305f8044ff8f94e372b30da637@quantatw.com> (raw)
In-Reply-To: <B5923117-0BB8-4728-9C9F-E8977EE096BF@cisco.com>


> 
> Hello Will,
> 
> 
> One more thing about enabling ECC:
> 
> > ECC needs to be enabled in u-boot. The reason is explained in my first
> > upload https://patchwork.kernel.org/patch/10732769/
> >
> > Our u-boot engineer did it for us. I see u-boot code is full of #ifdef
> CONFIG_DRAM_ECC blocks.
> > In theory, enabling this option should be enough.
> >
> >
> > - A good indication of having ECC successfully enabled is linux actually
> booting.
> > - Another indication is available memory being 8/9th of what it used
> > to be (check /proc/meminfo)
> > - Then, my driver should not log any errors in its probe function (check
> dmesg).
> 
> 
> While you have not set up ECC mode in u-boot yet, you might be able to use
> the edac driver by removing the following code in aspeed_probe()
> 
> 	/* bail out if ECC mode is not configured */
> 	regmap_read(aspeed_regmap, ASPEED_MCR_CONF, &reg04);
> 	if (!(reg04 & ASPEED_MCR_CONF_ECC)) {
> 		dev_err(&pdev->dev, "ECC mode is not configured in u-boot\n");
> 		return -EPERM;
> 	}
> 
> This will run the probe function hopefully to the end and expose the sysfs
> nodes.
> I have not tested it. Maybe you need to further butcher down the driver?
> 
> 
> You can then inject fake ecc errors via the kernel debug framework:
> 
> root@aspeed-arm:/# echo 42 > /sys/kernel/debug/edac/mc0/fake_inject
> 
> root@aspeed-arm:/# dmesg | tail -1
> [  293.020000] EDAC MC0: 1 CE FAKE ERROR on mc#0csrow#0channel#0
> (csrow:0 channel:0 page:0x0 offset:0x0 grain:0 syndrome:0x0 - for EDAC
> testing only)
> 
> root@aspeed-arm:/# cat /sys/devices/system/edac/mc/mc0/ce*
> 1
> 0
> 
> 
> BTW, here are my notes on EDAC and ECC on Aspeed which you might find
> interesting: http://students.engr.scu.edu/~sschaeck/misc/aspeed-edac.html
> 
> 
> 
> Hope that helps, Stefan

Hi Stefan,

Thanks for the updated information.
Instead of extending the kernel space, we are developing services in user space.

Will

  reply	other threads:[~2019-02-22  7:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21  6:25 ECC memory of BMC Will Liang (梁永鉉)
2019-02-21  7:10 ` Andrew Jeffery
2019-02-21  7:27   ` Will Liang (梁永鉉)
2019-02-21 16:56     ` Stefan Schaeckeler (sschaeck)
2019-02-22  5:52       ` Stefan Schaeckeler (sschaeck)
2019-02-22  7:48         ` Will Liang (梁永鉉) [this message]
2019-02-22  0:28     ` Andrew Jeffery
2019-02-22  2:00       ` Will Liang (梁永鉉)
2019-02-22  5:52         ` Stefan Schaeckeler (sschaeck)
2019-02-22  5:55           ` Andrew Jeffery
2019-02-22  6:37             ` Will Liang (梁永鉉)

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=2cac43305f8044ff8f94e372b30da637@quantatw.com \
    --to=will.liang@quantatw.com \
    --cc=andrew@aj.id.au \
    --cc=openbmc@lists.ozlabs.org \
    --cc=sschaeck@cisco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.