From patchwork Fri May 18 22:26: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: 8827 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 4CBFA23EB5 for ; Fri, 18 May 2012 22:27:38 +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 1C942A186E0 for ; Fri, 18 May 2012 22:27:38 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so4151034ggn.11 for ; Fri, 18 May 2012 15:27: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=JvmZde72qDeVP7IZaSXQqGZg64qZlncJJQQNCV0rOQM=; b=XHsxo1J/TRWOMbLRsPo9RfJE3Sc5/HpYwndShuCh4Ezk31y3zzdxVnUapFGliX4KHP UDDmYef04fs8zQi+4DWtsaLUUxvkMDED6IYQ5I2RaaOA0ENU+ex7UCohn+dURxYrLdOd ARFFUKHoXj9vbfdSbQrE/b7yZ9Um3EOobDPYjt2AShHbA6xD5aLcBCR6znpuyguVmuoy IntheYLhfaQvozvy5LWgAJAC6aGCZT9GHWRwZZDRWRuaKA+pmuI5xqRzAEcUPaGuAk+v crhWSrD/pdB6TyywowUuZvw1v9cmGUxhpGT1SjONsENRiE/94Mn7chqyWWMWnmGDRJzN nxag== Received: by 10.50.203.39 with SMTP id kn7mr1955858igc.53.1337380057756; Fri, 18 May 2012 15:27: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 o8csp135321ibd; Fri, 18 May 2012 15:27:37 -0700 (PDT) Received: by 10.68.125.138 with SMTP id mq10mr12738202pbb.25.1337380056935; Fri, 18 May 2012 15:27:36 -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 t9si17694348pbj.72.2012.05.18.15.27.36 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 May 2012 15:27:36 -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 rr4so5393933pbb.37 for ; Fri, 18 May 2012 15:27:36 -0700 (PDT) Received: by 10.68.212.229 with SMTP id nn5mr2088608pbc.29.1337380056661; Fri, 18 May 2012 15:27: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 pd9sm14144775pbc.26.2012.05.18.15.27.34 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 May 2012 15:27:35 -0700 (PDT) Date: Fri, 18 May 2012 15:26: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 11/14] pstore/ram: Add some more documentation and examples Message-ID: <20120518222606.GK23089@lizard> References: <20120518222314.GA9425@lizard> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120518222314.GA9425@lizard> User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQlsVUdkhP3wce0csTordMLQGajQ2+INh0q25ox9pPjEADYnM4l0Rkn6o3OvKZfOLLyAoTDE 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