From patchwork Wed May 16 12:56:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 8687 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 20BD523EAB for ; Wed, 16 May 2012 12:58:30 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id E18CAA188BA for ; Wed, 16 May 2012 12:58:29 +0000 (UTC) Received: by ggnf1 with SMTP id f1so772648ggn.11 for ; Wed, 16 May 2012 05:58:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:date:from :to:cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent:x-gm-message-state; bh=/OXgXSnuDuQQwgmCA7t22KJmIhbOVbyXqzrvMWatAUg=; b=VKMBcQAETS70S1GLbx4OOhnp/KXyiFssU+i/Gdb6vKKrlE2c/h6Ly9VJeKE9/JyL9u rhpxW2e5byX/nq70I2qq/ddKRodwshNEl13IZtHw4W5GlfFumrC0BD1s/ud0CgJFgrrT qsw2xm2ydMi0DhRH5BYRoC8GFWZ90d8uDnbwE2ZfXnJWbD7yti1tpkJ1x8Hw3qhPjpDh 7CyizfWCd3BrkW0axafO9+desiFtPjW0NHKTs/3Qiro9UmBGTUgPziTbO7S77k8WYkMv b9G4pEBS7SNZI9VvWUY1fDjIynOxEAjUPN+V65jet8b/tfxJRbiAb+FiQQHr8INHPzCk uYZw== Received: by 10.42.119.129 with SMTP id b1mr1582984icr.48.1337173109125; Wed, 16 May 2012 05:58:29 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.35.72 with SMTP id o8csp491493ibd; Wed, 16 May 2012 05:58:28 -0700 (PDT) Received: by 10.68.223.234 with SMTP id qx10mr15677671pbc.154.1337173108297; Wed, 16 May 2012 05:58:28 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id s4si6723840pbc.225.2012.05.16.05.58.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 May 2012 05:58:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) smtp.mail=anton.vorontsov@linaro.org Received: by mail-pb0-f50.google.com with SMTP id rr4so1323608pbb.37 for ; Wed, 16 May 2012 05:58:28 -0700 (PDT) Received: by 10.68.227.169 with SMTP id sb9mr16119786pbc.157.1337173107988; Wed, 16 May 2012 05:58:27 -0700 (PDT) Received: from localhost (c-71-204-165-222.hsd1.ca.comcast.net. [71.204.165.222]) by mx.google.com with ESMTPS id py5sm5415173pbb.1.2012.05.16.05.58.25 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 May 2012 05:58:27 -0700 (PDT) Date: Wed, 16 May 2012 05:56:58 -0700 From: Anton Vorontsov To: Greg Kroah-Hartman , Kees Cook , Colin Cross , Tony Luck Cc: Arnd Bergmann , John Stultz , Shuah Khan , arve@android.com, Rebecca Schultz Zavin , Jesper Juhl , Randy Dunlap , Stephen Boyd , Thomas Meyer , Andrew Morton , Marco Stornelli , WANG Cong , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com Subject: [PATCH 4/6] pstore/ram: Add some more documentation and examples Message-ID: <20120516125658.GD20475@lizard> References: <20120516125330.GA15460@lizard> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120516125330.GA15460@lizard> User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQkBpLXbrrZC1e7mhElC6GgaUoDVibGL4f8EFC47k1wWuQ05VPcdFXDffK51n9ABusvJDl1t Suggested-by: Shuah Khan Signed-off-by: Anton Vorontsov --- Documentation/ramoops.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/ramoops.txt b/Documentation/ramoops.txt index 4ba7db2..138823b 100644 --- a/Documentation/ramoops.txt +++ b/Documentation/ramoops.txt @@ -40,6 +40,12 @@ corrupt, but usually it is restorable. Setting the ramoops parameters can be done in 2 different manners: 1. Use the module parameters (which have the names of the variables described as before). + For quick debugging, you can also reserve parts of memory during boot + and then use the reserved memory for ramoops. For example, assuming a machine + with > 128 MB of memory, the following kernel command line will tell the + kernel to use only the first 128 MB of memory, and place ECC-protected ramoops + region at 128 MB boundary: + "mem=128M ramoops.mem_address=0x8000000 ramoops.ecc=1" 2. Use a platform device and set the platform data. The parameters can then be set through that platform data. An example of doing that is: @@ -70,6 +76,15 @@ if (ret) { return ret; } +You can specify either RAM memory or peripheral devices' memory. However, when +specifying RAM, be sure to reserve the memory by issuing memblock_reserve() +very early in the architecture code, just before platform device registration, +e.g.: + +#include + +memblock_reserve(ramoops_data.mem_address, ramoops_data.mem_size); + 3. Dump format The data dump begins with a header, currently defined as "====" followed by a