<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error during pstore/ramoops initialization in imx6ull in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Error-during-pstore-ramoops-initialization-in-imx6ull/m-p/765310#M118900</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;P&gt;Hi,

I am working on a ARM imx6ull board with custom kernel. I have some freeze issue. I would
like to be able to save across reboot the kernel panic log thanks to ramoops feature.
I dont have physical access to the board during the kernel panic. Only way for me to understand
and fix the issue is to save and store the kernel panic log to send the log to a server later

To enable ramoops, I update my kernel config :

&lt;/P&gt;&lt;/PRE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE&gt;&lt;P&gt;[arthur] cat output/build/linux-4.1.15_2.1.07/.config | grep PSTORE&lt;/P&gt;&lt;P&gt;CONFIG_PSTORE=y
CONFIG_PSTORE_CONSOLE=y
# CONFIG_PSTORE_PMS&lt;/P&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;I configure the ramoops platform data in the board config file of the kernel tree :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arthur * 4.1.15_2.0.0_nano] git diff arch/arm&lt;BR /&gt;diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c&lt;BR /&gt;index dcabfb1..5b1d74c 100644&lt;BR /&gt;--- a/arch/arm/mach-imx/mach-imx6ul.c&lt;BR /&gt;+++ b/arch/arm/mach-imx/mach-imx6ul.c&lt;BR /&gt;@@ -23,6 +23,22 @@&lt;BR /&gt; #include "common.h"&lt;BR /&gt; #include "cpuidle.h"&lt;BR /&gt; #include "hardware.h"&lt;BR /&gt;+#include &amp;lt;linux/pstore_ram.h&amp;gt;&lt;BR /&gt;+#include &amp;lt;linux/memblock.h&amp;gt;&lt;BR /&gt;+static struct ramoops_platform_data ramoops_data = {&lt;BR /&gt;+ .mem_address = 0x80000000,&lt;BR /&gt;+ .mem_size = 0x00005000, // 5 Mb ??&lt;BR /&gt;+ .record_size = 0x00001000, // 1 Mb&lt;BR /&gt;+ .dump_oops = 1,&lt;BR /&gt;+};&lt;BR /&gt;+&lt;BR /&gt;+static struct platform_device ramoops_dev = {&lt;BR /&gt;+ .name = "ramoops",&lt;BR /&gt;+ .dev = {&lt;BR /&gt;+ .platform_data = &amp;amp;ramoops_data,&lt;BR /&gt;+ },&lt;BR /&gt;+};&lt;BR /&gt;+&lt;/P&gt;&lt;P&gt;static void __init imx6ul_enet_clk_init(void)&lt;BR /&gt;{&lt;BR /&gt;@@ -169,6 +185,15 @@ static inline void imx6ul_enet_init(void)&lt;BR /&gt;static void __init imx6ul_init_machine(void)&lt;BR /&gt;{&lt;BR /&gt; struct device *parent;&lt;BR /&gt;+ int ret;&lt;BR /&gt;+&lt;BR /&gt;+ ret = platform_device_register(&amp;amp;ramoops_dev);&lt;BR /&gt;+ if (ret) {&lt;BR /&gt;+ printk(KERN_ERR "unable to register platform device\n");&lt;BR /&gt;+ return;&lt;BR /&gt;+ }&lt;BR /&gt;+ /* Do I need that ???? */&lt;BR /&gt;+ //memblock_reserve(ramoops_data.mem_address, ramoops_data.mem_size);&lt;/P&gt;&lt;P&gt;parent = imx_soc_device_init();&lt;BR /&gt; if (parent == NULL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I tried to mount the pstore partition :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;# mount -t pstore -o kmsg_bytes=1000 - /sys/fs/pstore
TUTU size : -335633131
 ------------[ cut here ]------------
WARNING: CPU: 0 PID: 547 at mm/page_alloc.c:2668 __alloc_pages_nodemask+0x19c/0x838()
Modules linked in: bcmdhd
CPU: 0 PID: 547 Comm: mount Not tainted 4.1.15 #27
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[&amp;lt;800144bc&amp;gt;] (unwind_backtrace) from [&amp;lt;800121ec&amp;gt;] (show_stack+0x10/0x14)
[&amp;lt;800121ec&amp;gt;] (show_stack) from [&amp;lt;80034444&amp;gt;] (warn_slowpath_common+0x80/0xac)
[&amp;lt;80034444&amp;gt;] (warn_slowpath_common) from [&amp;lt;8003450c&amp;gt;] (warn_slowpath_null+0x1c/0x24)
[&amp;lt;8003450c&amp;gt;] (warn_slowpath_null) from [&amp;lt;800a2704&amp;gt;] (__alloc_pages_nodemask+0x19c/0x838)
[&amp;lt;800a2704&amp;gt;] (__alloc_pages_nodemask) from [&amp;lt;800b5a60&amp;gt;] (kmalloc_order+0x10/0x20)
[&amp;lt;800b5a60&amp;gt;] (kmalloc_order) from [&amp;lt;80253fa8&amp;gt;] (persistent_ram_save_old+0x118/0x134)
[&amp;lt;80253fa8&amp;gt;] (persistent_ram_save_old) from [&amp;lt;80253154&amp;gt;] (ramoops_get_next_prz+0x6c/0x78)
[&amp;lt;80253154&amp;gt;] (ramoops_get_next_prz) from [&amp;lt;802531a0&amp;gt;] (ramoops_pstore_read+0x40/0x254)
[&amp;lt;802531a0&amp;gt;] (ramoops_pstore_read) from [&amp;lt;80252990&amp;gt;] (pstore_get_records+0xa8/0x2e0)
[&amp;lt;80252990&amp;gt;] (pstore_get_records) from [&amp;lt;80251da8&amp;gt;] (pstore_fill_super+0xa8/0xbc)
[&amp;lt;80251da8&amp;gt;] (pstore_fill_super) from [&amp;lt;800db540&amp;gt;] (mount_single+0x88/0xac)
[&amp;lt;800db540&amp;gt;] (mount_single) from [&amp;lt;800db5d4&amp;gt;] (mount_fs+0x14/0xa4)
[&amp;lt;800db5d4&amp;gt;] (mount_fs) from [&amp;lt;800f4688&amp;gt;] (vfs_kern_mount+0x48/0x114)
[&amp;lt;800f4688&amp;gt;] (vfs_kern_mount) from [&amp;lt;800f7744&amp;gt;] (do_mount+0x198/0xc28)
[&amp;lt;800f7744&amp;gt;] (do_mount) from [&amp;lt;800f84fc&amp;gt;] (SyS_mount+0x74/0xa0)
[&amp;lt;800f84fc&amp;gt;] (SyS_mount) from [&amp;lt;8000f2a0&amp;gt;] (ret_fast_syscall+0x0/0x3c)
persistent_ram: failed to allocate buffer&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the function &lt;STRONG&gt;persistent_ram_save_old&lt;/STRONG&gt; for unknow reason the size is negative. Do I miss&lt;BR /&gt;something ? When I try to use other value for ramoops configuration, most of the time my&lt;BR /&gt;kernel is not able to boot anymore.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jan 2018 08:56:07 GMT</pubDate>
    <dc:creator>arthur_rythm</dc:creator>
    <dc:date>2018-01-29T08:56:07Z</dc:date>
    <item>
      <title>Error during pstore/ramoops initialization in imx6ull</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Error-during-pstore-ramoops-initialization-in-imx6ull/m-p/765310#M118900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;P&gt;Hi,

I am working on a ARM imx6ull board with custom kernel. I have some freeze issue. I would
like to be able to save across reboot the kernel panic log thanks to ramoops feature.
I dont have physical access to the board during the kernel panic. Only way for me to understand
and fix the issue is to save and store the kernel panic log to send the log to a server later

To enable ramoops, I update my kernel config :

&lt;/P&gt;&lt;/PRE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE&gt;&lt;P&gt;[arthur] cat output/build/linux-4.1.15_2.1.07/.config | grep PSTORE&lt;/P&gt;&lt;P&gt;CONFIG_PSTORE=y
CONFIG_PSTORE_CONSOLE=y
# CONFIG_PSTORE_PMS&lt;/P&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;I configure the ramoops platform data in the board config file of the kernel tree :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arthur * 4.1.15_2.0.0_nano] git diff arch/arm&lt;BR /&gt;diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c&lt;BR /&gt;index dcabfb1..5b1d74c 100644&lt;BR /&gt;--- a/arch/arm/mach-imx/mach-imx6ul.c&lt;BR /&gt;+++ b/arch/arm/mach-imx/mach-imx6ul.c&lt;BR /&gt;@@ -23,6 +23,22 @@&lt;BR /&gt; #include "common.h"&lt;BR /&gt; #include "cpuidle.h"&lt;BR /&gt; #include "hardware.h"&lt;BR /&gt;+#include &amp;lt;linux/pstore_ram.h&amp;gt;&lt;BR /&gt;+#include &amp;lt;linux/memblock.h&amp;gt;&lt;BR /&gt;+static struct ramoops_platform_data ramoops_data = {&lt;BR /&gt;+ .mem_address = 0x80000000,&lt;BR /&gt;+ .mem_size = 0x00005000, // 5 Mb ??&lt;BR /&gt;+ .record_size = 0x00001000, // 1 Mb&lt;BR /&gt;+ .dump_oops = 1,&lt;BR /&gt;+};&lt;BR /&gt;+&lt;BR /&gt;+static struct platform_device ramoops_dev = {&lt;BR /&gt;+ .name = "ramoops",&lt;BR /&gt;+ .dev = {&lt;BR /&gt;+ .platform_data = &amp;amp;ramoops_data,&lt;BR /&gt;+ },&lt;BR /&gt;+};&lt;BR /&gt;+&lt;/P&gt;&lt;P&gt;static void __init imx6ul_enet_clk_init(void)&lt;BR /&gt;{&lt;BR /&gt;@@ -169,6 +185,15 @@ static inline void imx6ul_enet_init(void)&lt;BR /&gt;static void __init imx6ul_init_machine(void)&lt;BR /&gt;{&lt;BR /&gt; struct device *parent;&lt;BR /&gt;+ int ret;&lt;BR /&gt;+&lt;BR /&gt;+ ret = platform_device_register(&amp;amp;ramoops_dev);&lt;BR /&gt;+ if (ret) {&lt;BR /&gt;+ printk(KERN_ERR "unable to register platform device\n");&lt;BR /&gt;+ return;&lt;BR /&gt;+ }&lt;BR /&gt;+ /* Do I need that ???? */&lt;BR /&gt;+ //memblock_reserve(ramoops_data.mem_address, ramoops_data.mem_size);&lt;/P&gt;&lt;P&gt;parent = imx_soc_device_init();&lt;BR /&gt; if (parent == NULL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I tried to mount the pstore partition :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;# mount -t pstore -o kmsg_bytes=1000 - /sys/fs/pstore
TUTU size : -335633131
 ------------[ cut here ]------------
WARNING: CPU: 0 PID: 547 at mm/page_alloc.c:2668 __alloc_pages_nodemask+0x19c/0x838()
Modules linked in: bcmdhd
CPU: 0 PID: 547 Comm: mount Not tainted 4.1.15 #27
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[&amp;lt;800144bc&amp;gt;] (unwind_backtrace) from [&amp;lt;800121ec&amp;gt;] (show_stack+0x10/0x14)
[&amp;lt;800121ec&amp;gt;] (show_stack) from [&amp;lt;80034444&amp;gt;] (warn_slowpath_common+0x80/0xac)
[&amp;lt;80034444&amp;gt;] (warn_slowpath_common) from [&amp;lt;8003450c&amp;gt;] (warn_slowpath_null+0x1c/0x24)
[&amp;lt;8003450c&amp;gt;] (warn_slowpath_null) from [&amp;lt;800a2704&amp;gt;] (__alloc_pages_nodemask+0x19c/0x838)
[&amp;lt;800a2704&amp;gt;] (__alloc_pages_nodemask) from [&amp;lt;800b5a60&amp;gt;] (kmalloc_order+0x10/0x20)
[&amp;lt;800b5a60&amp;gt;] (kmalloc_order) from [&amp;lt;80253fa8&amp;gt;] (persistent_ram_save_old+0x118/0x134)
[&amp;lt;80253fa8&amp;gt;] (persistent_ram_save_old) from [&amp;lt;80253154&amp;gt;] (ramoops_get_next_prz+0x6c/0x78)
[&amp;lt;80253154&amp;gt;] (ramoops_get_next_prz) from [&amp;lt;802531a0&amp;gt;] (ramoops_pstore_read+0x40/0x254)
[&amp;lt;802531a0&amp;gt;] (ramoops_pstore_read) from [&amp;lt;80252990&amp;gt;] (pstore_get_records+0xa8/0x2e0)
[&amp;lt;80252990&amp;gt;] (pstore_get_records) from [&amp;lt;80251da8&amp;gt;] (pstore_fill_super+0xa8/0xbc)
[&amp;lt;80251da8&amp;gt;] (pstore_fill_super) from [&amp;lt;800db540&amp;gt;] (mount_single+0x88/0xac)
[&amp;lt;800db540&amp;gt;] (mount_single) from [&amp;lt;800db5d4&amp;gt;] (mount_fs+0x14/0xa4)
[&amp;lt;800db5d4&amp;gt;] (mount_fs) from [&amp;lt;800f4688&amp;gt;] (vfs_kern_mount+0x48/0x114)
[&amp;lt;800f4688&amp;gt;] (vfs_kern_mount) from [&amp;lt;800f7744&amp;gt;] (do_mount+0x198/0xc28)
[&amp;lt;800f7744&amp;gt;] (do_mount) from [&amp;lt;800f84fc&amp;gt;] (SyS_mount+0x74/0xa0)
[&amp;lt;800f84fc&amp;gt;] (SyS_mount) from [&amp;lt;8000f2a0&amp;gt;] (ret_fast_syscall+0x0/0x3c)
persistent_ram: failed to allocate buffer&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the function &lt;STRONG&gt;persistent_ram_save_old&lt;/STRONG&gt; for unknow reason the size is negative. Do I miss&lt;BR /&gt;something ? When I try to use other value for ramoops configuration, most of the time my&lt;BR /&gt;kernel is not able to boot anymore.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 08:56:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Error-during-pstore-ramoops-initialization-in-imx6ull/m-p/765310#M118900</guid>
      <dc:creator>arthur_rythm</dc:creator>
      <dc:date>2018-01-29T08:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error during pstore/ramoops initialization in imx6ull</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Error-during-pstore-ramoops-initialization-in-imx6ull/m-p/765311#M118901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for freeze issues one can check ddr memory &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-105652"&gt;i.MX6/7 DDR Stress Test Tool V2.80&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and further debug it using AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors&lt;BR /&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN4553.pdf"&gt;https://www.nxp.com/docs/en/application-note/AN4553.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;issues with custom kernels may be also posted on meta-fsl-arm mailing list:&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Flists.yoctoproject.org%2Flistinfo%2Fmeta-freescale" rel="nofollow" target="_blank"&gt;https://lists.yoctoproject.org/listinfo/meta-freescale&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2018 02:08:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Error-during-pstore-ramoops-initialization-in-imx6ull/m-p/765311#M118901</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-01-31T02:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error during pstore/ramoops initialization in imx6ull</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Error-during-pstore-ramoops-initialization-in-imx6ull/m-p/765312#M118902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer Igor. I also send an email to the kernel mailing list.&amp;nbsp;They suggest me to use kdump/kexec instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 13:28:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Error-during-pstore-ramoops-initialization-in-imx6ull/m-p/765312#M118902</guid>
      <dc:creator>arthur_rythm</dc:creator>
      <dc:date>2018-02-01T13:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error during pstore/ramoops initialization in imx6ull</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Error-during-pstore-ramoops-initialization-in-imx6ull/m-p/765313#M118903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working perfectly with 4.9 fsl community kernel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2019 16:26:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Error-during-pstore-ramoops-initialization-in-imx6ull/m-p/765313#M118903</guid>
      <dc:creator>arthur_rythm</dc:creator>
      <dc:date>2019-03-18T16:26:22Z</dc:date>
    </item>
  </channel>
</rss>

