From patchwork Tue May 22 14:17:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 8882 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 1D5E723F0A for ; Tue, 22 May 2012 14:20:51 +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 DE4ADA18B73 for ; Tue, 22 May 2012 14:20:50 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so6684516ggn.11 for ; Tue, 22 May 2012 07:20:50 -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=EWldZJnrllcXE2tuzOTv5Nzmzm+an0GfjTKZ40UkJiMiV7mPVf97pmcoDpMnj8+iyC bRD27TLpWV+fxZvgyP32/IOvff6jchacUsI1MZz1Hg9lF3Zf+pe5LM6X1FLhG52n22TE BRjvvJ0z/LXrJlVYQ+tU+TusJvZf+gZ1y3kPS45MlPce8YghSw8WGEjjdQrMZZJzCPne HMrhg8d43/xTjdfj+2pXpkTlJwqx1OL2VMsCA4A+eBx/FqZ6iKyppRvpQpKng3O+4t5z Z2r8EpS2y4KdESe65+l8WOfGsKiM5yKCAE5tOnbQ9GfxvTPzkLXc/H/CQ5Ast8bSvLBX hosQ== Received: by 10.50.163.99 with SMTP id yh3mr9565545igb.53.1337696450305; Tue, 22 May 2012 07:20:50 -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 o8csp369559ibd; Tue, 22 May 2012 07:20:49 -0700 (PDT) Received: by 10.68.222.74 with SMTP id qk10mr7168856pbc.67.1337696449456; Tue, 22 May 2012 07:20:49 -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 s4si31657300pbc.45.2012.05.22.07.20.49 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 May 2012 07:20:49 -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 rr4so10070402pbb.37 for ; Tue, 22 May 2012 07:20:49 -0700 (PDT) Received: by 10.68.236.129 with SMTP id uu1mr80967405pbc.77.1337696449098; Tue, 22 May 2012 07:20:49 -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 pw10sm26847821pbb.61.2012.05.22.07.20.46 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 May 2012 07:20:48 -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 12/16] pstore/ram: Add some more documentation and examples Date: Tue, 22 May 2012 07:17:55 -0700 Message-Id: <1337696279-8994-12-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.9.2 In-Reply-To: <20120522141717.GA31574@lizard> References: <20120522141717.GA31574@lizard> X-Gm-Message-State: ALoCoQmUejM+4BUZNxbmjZamiQxmadXLzuo4PxMHc3F0rzM3amiipOcKOavRUy95sfhpHTXrQquX 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