From patchwork Sat May 26 13:20:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 8997 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 56A6923EB5 for ; Sat, 26 May 2012 13:22:39 +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 27227A18A48 for ; Sat, 26 May 2012 13:22:39 +0000 (UTC) Received: by ggnf1 with SMTP id f1so1687676ggn.11 for ; Sat, 26 May 2012 06:22:38 -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:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=JvmZde72qDeVP7IZaSXQqGZg64qZlncJJQQNCV0rOQM=; b=UZnNNHRv5zBJUOovI/YAaVkFIpIWR1BKf/1n/TtogY4ND9vVLYx+cwdkjxzdgYpwqR uYt0l0zp03LRIzmfeYhIzEan2jXY+fCfXr6B8UihYCtRsbS5N4Q0KAeYArnZdGPnSZwv xHFIpck4K4YJCVcRD/sfN+pmnbgGw8G5jiRidWFLd9RZsYWzPRPnbn16kHw2wU1DW26b y6f+nGPQaBQoiKU6Mv+cwGs4cZq2s1xTa/NhY977j6J/wdZhLsmyLl+QIzLvwMuoSpjr Jr/E5hQGLt8DtuT2zsRgb4mLdCoBWcA5e1GQptGdagxJqOL9lDYeNTGgLboscnPrghlZ 8GEA== Received: by 10.50.203.39 with SMTP id kn7mr942497igc.53.1338038558388; Sat, 26 May 2012 06:22:38 -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.24.148 with SMTP id v20csp86336ibb; Sat, 26 May 2012 06:22:37 -0700 (PDT) Received: by 10.68.231.10 with SMTP id tc10mr7657613pbc.107.1338038557722; Sat, 26 May 2012 06:22:37 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id ku9si1513973pbc.115.2012.05.26.06.22.37 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 May 2012 06:22:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.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-pz0-f50.google.com with SMTP id h15so2722900dan.37 for ; Sat, 26 May 2012 06:22:37 -0700 (PDT) Received: by 10.68.203.73 with SMTP id ko9mr7953304pbc.66.1338038557363; Sat, 26 May 2012 06:22:37 -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 ix5sm12548850pbc.18.2012.05.26.06.22.34 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 May 2012 06:22:36 -0700 (PDT) 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 07/11] pstore/ram: Add some more documentation and examples Date: Sat, 26 May 2012 06:20:25 -0700 Message-Id: <1338038429-21945-7-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.9.2 In-Reply-To: <20120526131747.GA15054@lizard> References: <20120526131747.GA15054@lizard> X-Gm-Message-State: ALoCoQlYD3jopV6LGsQOyGIo2YOm32R1lv41p1Z+V4MvygsbRad8geXjifUSKxSb7XyHLZUvVFY3 Suggested-by: Shuah Khan Signed-off-by: Anton Vorontsov Acked-by: Kees Cook Acked-by: Colin Cross --- Documentation/ramoops.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/ramoops.txt b/Documentation/ramoops.txt index 4ba7db2..59a74a8 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,14 @@ 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, 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