From patchwork Thu May 17 08:41:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 8709 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 7E81623E1B for ; Thu, 17 May 2012 08:42:38 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id 432D7A18103 for ; Thu, 17 May 2012 08:42:38 +0000 (UTC) Received: by obbun3 with SMTP id un3so2857357obb.11 for ; Thu, 17 May 2012 01:42:37 -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=Lk6VqlHPjJVv/woCBoV9C8L4yR/VFmRGhQyJg7wUBn8=; b=ZSVdcYeJ8TgaKNPYVXkKh8SnpuOBPvsiXksE6ggy6R507hfnNALwFtJTEN2GzrcB1j whuT7PakEKRVnlz+vAJckqANN/7Kii71BUP18HmqGK6+LU87Fj6T7jsYaLkl4XytDHs+ JEpRMB9jruw4mTRw8JU0ZAwD9jAsHkf+46D2Pm4/hVdEaGpjF/tBM3nTOXKylxoeEdQe +YR3LVr6JeW+ytj5VER30BQomEMV48NVfKt/jBJNAnnBCr2qbaYC/pZTIux5EsfjhJ03 olnUfslRd3KKohIwO3gPFMSeVf5nJpxpjmObUUsNbtRpAekmsQLyErErk97PobjIkms7 wV3A== Received: by 10.50.87.227 with SMTP id bb3mr4368107igb.57.1337244157493; Thu, 17 May 2012 01:42:37 -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 o8csp12046ibd; Thu, 17 May 2012 01:42:36 -0700 (PDT) Received: by 10.68.194.198 with SMTP id hy6mr26050114pbc.0.1337244156626; Thu, 17 May 2012 01:42:36 -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 qi8si10500110pbc.91.2012.05.17.01.42.36 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 May 2012 01:42:36 -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 h15so2594406dan.37 for ; Thu, 17 May 2012 01:42:36 -0700 (PDT) Received: by 10.68.234.69 with SMTP id uc5mr25793960pbc.50.1337244156379; Thu, 17 May 2012 01:42:36 -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 gq5sm6627702pbc.65.2012.05.17.01.42.33 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 May 2012 01:42:35 -0700 (PDT) Date: Thu, 17 May 2012 01:41:07 -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: <20120517084107.GD31753@lizard> References: <20120517083740.GA25627@lizard> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120517083740.GA25627@lizard> User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQnlKWnA0hbM9f5HXTMNKxErFP6eOcRJTtGf5Xr15I2DyrP6lQ9ftcSgvZ27ZmCHRIcYqtvZ Suggested-by: Shuah Khan Signed-off-by: Anton Vorontsov --- 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