<div dir="ltr"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt;1. use early_param to get the physical start address and size of test_region, or you can just ignore this step and hard code to 510M and 2M for test purpose only.</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">

<br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt;2. use ioremap_nocache() to map this region to a virtual region. note that this funtion may fail if you are asking a very large vitual memroy region.</span><br>

<div style><font color="#500050" face="arial, sans-serif">I did the following things,</font></div><div style><font color="#500050" face="arial, sans-serif">1) Reserved 3MB memory through ATAGS</font></div><div style><font color="#500050" face="arial, sans-serif">2) Wrote small driver to ioremap that memory in following way,</font></div>

<div style><font color="#500050" face="arial, sans-serif">&nbsp;</font></div><div style><font color="#500050" face="arial, sans-serif">&nbsp;void *tcpm_base = ioremap_nocache(0x03B00000, SZ_3MB);</font></div><div><font color="#500050" face="arial, sans-serif">&nbsp;27 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(tcpm_base!=NULL)</font></div>

<div><font color="#500050" face="arial, sans-serif">&nbsp;28 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</font></div><div><font color="#500050" face="arial, sans-serif">&nbsp;29 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printk(&quot;Jiffies %x %ld\n\n\n\n&quot;, jiffies, jiffies);</font></div>

<div><font color="#500050" face="arial, sans-serif">&nbsp;30 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(i=0;i&lt;SZ_4KB;i++)</font></div><div><font color="#500050" face="arial, sans-serif">&nbsp;31 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src = readl(tcpm_base+i);</font></div><div><font color="#500050" face="arial, sans-serif">&nbsp;32 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printk(&quot;Jiffies %x %ld\n\n\n\n&quot;, jiffies, jiffies);</font></div>

<div><font color="#500050" face="arial, sans-serif">&nbsp;33 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</font></div><div><font color="#500050" face="arial, sans-serif">&nbsp;34 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</font></div><div><font color="#500050" face="arial, sans-serif">&nbsp;35 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printk(&quot;unable to map 3MB\n&quot;);</font></div>

<div><font color="#500050" face="arial, sans-serif"><br></font></div><div style><font color="#500050" face="arial, sans-serif">3) I am getting the following error,</font></div><div style><font color="#500050" face="arial, sans-serif"><br>

</font></div><div><div>[ &nbsp; &nbsp;1.876647] Unable to handle kernel paging request at virtual address ea82c000</div><div>[ &nbsp; &nbsp;1.880950] pgd = c0004000</div><div>[ &nbsp; &nbsp;1.883636] [ea82c000] *pgd=49818811, *pte=00000000, *ppte=00000000</div>

<div>[ &nbsp; &nbsp;1.889892] Internal error: Oops: 7 [#1] PREEMPT</div><div>[ &nbsp; &nbsp;1.894500] Modules linked in:</div><div>[ &nbsp; &nbsp;1.897521] CPU: 0 &nbsp; &nbsp;Not tainted &nbsp;(3.0.31-g1080f34-dirty #106)</div><div>[ &nbsp; &nbsp;1.903442] PC is at sand_misc_init+0x4c/0xac</div>

<div>[ &nbsp; &nbsp;1.907775] LR is at sand_misc_init+0x3c/0xac</div><div>[ &nbsp; &nbsp;1.912109] pc : [&lt;c0022ee0&gt;] &nbsp; &nbsp;lr : [&lt;c0022ed0&gt;] &nbsp; &nbsp;psr: 80000013</div><div>[ &nbsp; &nbsp;1.912139] sp : e982bf98 &nbsp;ip : 00000000 &nbsp;fp : 00000000</div>

<div>[ &nbsp; &nbsp;1.923553] r10: 00000000 &nbsp;r9 : 00000000 &nbsp;r8 : 00000000</div><div>[ &nbsp; &nbsp;1.928771] r7 : 00000000 &nbsp;r6 : c00461b4 &nbsp;r5 : ea828000 &nbsp;r4 : 00000000</div><div>[ &nbsp; &nbsp;1.935272] r3 : 00003fff &nbsp;r2 : 00003ffd &nbsp;r1 : c07ea2cf &nbsp;r0 : 00000063</div>

<div>[ &nbsp; &nbsp;1.941802] Flags: Nzcv &nbsp;IRQs on &nbsp;FIQs on &nbsp;Mode SVC_32 &nbsp;ISA ARM &nbsp;Segment kernel</div><div>[ &nbsp; &nbsp;1.949096] Control: 10c57c7d &nbsp;Table: 00404059 &nbsp;DAC: 00000015</div><div>[ &nbsp; &nbsp;1.954803]&nbsp;</div><div>[ &nbsp; &nbsp;1.954833] PC: 0xc0022e60:</div>

<div>[ &nbsp; &nbsp;1.959075] 2e60 &nbsp;c09105f0 c0366554 c07ea27e c07ea296 e3a01000 e92d4010 e1a02001 eb0a9acd</div><div>[ &nbsp; &nbsp;1.967224] 2e80 &nbsp;e59f3008 e5830008 e3a00001 e8bd8010 c0dd8380 e92d4037 e3a04000 e3a0063b</div><div>[ &nbsp; &nbsp;1.975402] 2ea0 &nbsp;e3a01901 e1a02004 e5cd4007 e5cd4006 eb00b9aa e2505000 0a000019 e59f3070</div>

<div>[ &nbsp; &nbsp;1.983551] 2ec0 &nbsp;e59f0070 e5931000 e5932000 eb18a072 e58d4000 e3033fff ea000007 e59d2000</div><div>[ &nbsp; &nbsp;1.991699] 2ee0 &nbsp;e7952002 f57ff04f e6ef2072 e5cd2007 e59d2000 e2822001 e58d2000 e59d2000</div><div>[ &nbsp; &nbsp;1.999877] 2f00 &nbsp;e1520003 dafffff4 e59f3024 e59f0024 e5931000 e5932000 e28dd00c e8bd4030</div>

<div>[ &nbsp; &nbsp;2.008026] 2f20 &nbsp;ea18a05d e59f0010 e28dd00c e8bd4030 ea18a059 c08ea600 c07ea2cf c07ea2e2</div><div>[ &nbsp; &nbsp;2.016174] 2f40 &nbsp;e59f3040 e3a01000 e92d4010 e59f0038 e5932000 eb0a845a e59f3030 e3500000</div><div>[ &nbsp; &nbsp;2.024353]&nbsp;</div>

<div>[ &nbsp; &nbsp;2.024353] LR: 0xc0022e50:</div><div>[ &nbsp; &nbsp;2.028594] 2e50 &nbsp;e3e00015 e8bd81fc c0dd8380 c07ea279 c09105f0 c0366554 c07ea27e c07ea296</div><div>[ &nbsp; &nbsp;2.036773] 2e70 &nbsp;e3a01000 e92d4010 e1a02001 eb0a9acd e59f3008 e5830008 e3a00001 e8bd8010</div>

<div>[ &nbsp; &nbsp;2.044921] 2e90 &nbsp;c0dd8380 e92d4037 e3a04000 e3a0063b e3a01901 e1a02004 e5cd4007 e5cd4006</div><div>[ &nbsp; &nbsp;2.053070] 2eb0 &nbsp;eb00b9aa e2505000 0a000019 e59f3070 e59f0070 e5931000 e5932000 eb18a072</div><div>[ &nbsp; &nbsp;2.061248] 2ed0 &nbsp;e58d4000 e3033fff ea000007 e59d2000 e7952002 f57ff04f e6ef2072 e5cd2007</div>

<div>[ &nbsp; &nbsp;2.069396] 2ef0 &nbsp;e59d2000 e2822001 e58d2000 e59d2000 e1520003 dafffff4 e59f3024 e59f0024</div><div>[ &nbsp; &nbsp;2.077575] 2f10 &nbsp;e5931000 e5932000 e28dd00c e8bd4030 ea18a05d e59f0010 e28dd00c e8bd4030</div><div>[ &nbsp; &nbsp;2.085723] 2f30 &nbsp;ea18a059 c08ea600 c07ea2cf c07ea2e2 e59f3040 e3a01000 e92d4010 e59f0038</div>

<div>[ &nbsp; &nbsp;2.093872]&nbsp;</div><div>[ &nbsp; &nbsp;2.093902] SP: 0xe982bf18:</div><div>[ &nbsp; &nbsp;2.098144] bf18 &nbsp;382e3120 30393536 00205d35 000000d0 00004fff 00003b00 192d8000 ea82bfff</div><div>[ &nbsp; &nbsp;2.106292] bf38 &nbsp;03b00000 ffffffff e982bf84 c00461b4 00000000 c0044dac 00000063 c07ea2cf</div>

<div>[ &nbsp; &nbsp;2.114440] bf58 &nbsp;00003ffd 00003fff 00000000 ea828000 c00461b4 00000000 00000000 00000000</div><div>[ &nbsp; &nbsp;2.122619] bf78 &nbsp;00000000 00000000 00000000 e982bf98 c0022ed0 c0022ee0 80000013 ffffffff</div><div>[ &nbsp; &nbsp;2.130767] bf98 &nbsp;00003ffd 0000a27e 00000000 c0037b4c c0022e94 c003f3fc e9814a80 00373231</div>

<div>[ &nbsp; &nbsp;2.138946] bfb8 &nbsp;00000000 00000000 00000000 00000236 c0037b4c c003818c c00461b4 00000013</div><div>[ &nbsp; &nbsp;2.147094] bfd8 &nbsp;00000000 00000000 00000000 c0008374 00000000 c0008300 c00461b4 c00461b4</div><div>[ &nbsp; &nbsp;2.155242] bff8 &nbsp;00000000 00000000 00000000 00000001 00000000 e9817940 c08e8ef4 00000000</div>

<div>[ &nbsp; &nbsp;2.163421]&nbsp;</div><div>[ &nbsp; &nbsp;2.163421] R1: 0xc07ea24f:</div><div>[ &nbsp; &nbsp;2.167663] a24c &nbsp;65207265 726f7272 6f6c6220 25206b63 000a646c 706f6f6c 26006425 3e2d6f6c</div><div>[ &nbsp; &nbsp;2.175842] a26c &nbsp;635f6f6c 6d5f6c74 78657475 6f6f6c00 363c0070 6f6f6c3e 6d203a70 6c75646f</div>

<div>[ &nbsp; &nbsp;2.183990] a28c &nbsp;6f6c2065 64656461 363c000a 6f6f6c3e 6f203a70 6f207475 656d2066 79726f6d</div><div>[ &nbsp; &nbsp;2.192138] a2ac &nbsp;6162000a 6e696b63 69665f67 7300656c 6c657a69 74696d69 74756100 656c636f</div><div>[ &nbsp; &nbsp;2.200317] a2cc &nbsp;4a007261 69666669 25207365 6c252078 0a0a0a64 6e75000a 656c6261 206f7420</div>

<div>[ &nbsp; &nbsp;2.208465] a2ec &nbsp;2070616d 0a424d33 656d7000 65725f6d 6e6f6967 333c0073 656d703e 7325286d</div><div>[ &nbsp; &nbsp;2.216613] a30c &nbsp;736b3a29 635f7465 74616572 6e615f65 64615f64 61662064 000a6c69 703e343c</div><div>[ &nbsp; &nbsp;2.224792] a32c &nbsp;3a6d656d 6d6f7320 69687465 6920676e 65762073 77207972 676e6f72 6f79202c</div>

<div>[ &nbsp; &nbsp;2.232940] a34c &nbsp;72612075 6c632065 6e69736f 20612067 62206d76 696b6361 6120676e 6c61206e</div><div>[ &nbsp; &nbsp;2.241119]&nbsp;</div><div>[ &nbsp; &nbsp;2.241119] R5: 0xea827f80:</div><div>[ &nbsp; &nbsp;2.245361] 7f80 &nbsp;******** ******** ******** ******** ******** ******** ******** ********</div>

<div>[ &nbsp; &nbsp;2.253509] 7fa0 &nbsp;******** ******** ******** ******** ******** ******** ******** ********</div><div>[ &nbsp; &nbsp;2.261688] 7fc0 &nbsp;******** ******** ******** ******** ******** ******** ******** ********</div><div>[ &nbsp; &nbsp;2.269836] 7fe0 &nbsp;******** ******** ******** ******** ******** ******** ******** ********</div>

<div>[ &nbsp; &nbsp;2.278015] 8000 &nbsp;00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000</div><div>[ &nbsp; &nbsp;2.286163] 8020 &nbsp;00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000</div><div>[ &nbsp; &nbsp;2.294311] 8040 &nbsp;00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000</div>

<div>[ &nbsp; &nbsp;2.302490] 8060 &nbsp;00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000</div><div>[ &nbsp; &nbsp;2.310638]&nbsp;</div><div>[ &nbsp; &nbsp;2.310638] R6: 0xc0046134:</div><div>[ &nbsp; &nbsp;2.314880] 6134 &nbsp;eb038dff eb02a1f9 e1a03007 e1a00005 e1a02006 eb025566 e59f3008 e5834000</div>

<div>[ &nbsp; &nbsp;2.323059] 6154 &nbsp;e8bd41f0 ea0259b3 c09059d4 c08fbcd4 c064e808 c0791c0d c0958220 e59fc020</div><div>[ &nbsp; &nbsp;2.331207] 6174 &nbsp;e92d4007 e59f301c e59cc000 e1a02001 e59f1014 e58dc000 eb055aab e3a00000</div><div>[ &nbsp; &nbsp;2.339385] 6194 &nbsp;e8bd800e c0958220 c0791c27 c0791c1b e121f007 e1a00004 e1a0e006 e1a0f005</div>

<div>[ &nbsp; &nbsp;2.347534] 61b4 &nbsp;eb02959a e320f000 e59f300c e5932000 e2822001 e5832000 e12fff1e c0958224</div><div>[ &nbsp; &nbsp;2.355682] 61d4 &nbsp;e59f300c e5932000 e2422001 e5832000 e12fff1e c0958224 e12fff1e e12fff1e</div><div>[ &nbsp; &nbsp;2.363861] 61f4 &nbsp;e12fff1e e12fff1e eafffffe e59f3014 e92d4010 e5933004 e3530000 08bd8010</div>

<div>[ &nbsp; &nbsp;2.372009] 6214 &nbsp;e12fff33 e8bd8010 c0958224 e59f3014 e1a01000 e92d4010 e5d30000 e1a0e00f</div><div>[ &nbsp; &nbsp;2.380187] Process swapper (pid: 1, stack limit = 0xe982a2e8)</div><div>[ &nbsp; &nbsp;2.385986] Stack: (0xe982bf98 to 0xe982c000)</div>

<div>[ &nbsp; &nbsp;2.390319] bf80: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 00003ffd 0000a27e</div><div>[ &nbsp; &nbsp;2.398498] bfa0: 00000000 c0037b4c c0022e94 c003f3fc e9814a80 00373231 00000000 00000000</div><div>[ &nbsp; &nbsp;2.406646] bfc0: 00000000 00000236 c0037b4c c003818c c00461b4 00000013 00000000 00000000</div>

<div>[ &nbsp; &nbsp;2.414825] bfe0: 00000000 c0008374 00000000 c0008300 c00461b4 c00461b4 00000000 00000000</div><div>[ &nbsp; &nbsp;2.423004] [&lt;c0022ee0&gt;] (sand_misc_init+0x4c/0xac) from [&lt;c003f3fc&gt;] (do_one_initcall+0xd0/0x1a4)</div>

<div>[ &nbsp; &nbsp;2.431915] [&lt;c003f3fc&gt;] (do_one_initcall+0xd0/0x1a4) from [&lt;c0008374&gt;] (kernel_init+0x74/0x118)</div><div>[ &nbsp; &nbsp;2.440673] [&lt;c0008374&gt;] (kernel_init+0x74/0x118) from [&lt;c00461b4&gt;] (kernel_thread_exit+0x0/0x8)</div>

<div>[ &nbsp; &nbsp;2.449462] Code: e58d4000 e3033fff ea000007 e59d2000 (e7952002)&nbsp;</div><div>[ &nbsp; &nbsp;2.455566] ---[ end trace f76f3c76dcb9b9ef ]---</div><div>[ &nbsp; &nbsp;2.460144] Kernel panic - not syncing: Attempted to kill init!</div><div>

[ &nbsp; &nbsp;2.466064] [&lt;c004ad10&gt;] (unwind_backtrace+0x0/0x12c) from [&lt;c064af70&gt;] (panic+0x90/0x1bc)</div><div>[ &nbsp; &nbsp;2.474304] [&lt;c064af70&gt;] (panic+0x90/0x1bc) from [&lt;c00eb8dc&gt;] (do_exit+0xb8/0x734)</div><div>

[ &nbsp; &nbsp;2.481842] [&lt;c00eb8dc&gt;] (do_exit+0xb8/0x734) from [&lt;c0048f8c&gt;] (die+0x208/0x23c)</div><div>[ &nbsp; &nbsp;2.489318] [&lt;c0048f8c&gt;] (die+0x208/0x23c) from [&lt;c004e158&gt;] (__do_kernel_fault+0x64/0x84)</div><div>

[ &nbsp; &nbsp;2.497558] [&lt;c004e158&gt;] (__do_kernel_fault+0x64/0x84) from [&lt;c004e3e0&gt;] (do_page_fault+0x268/0x288)</div><div>[ &nbsp; &nbsp;2.506683] [&lt;c004e3e0&gt;] (do_page_fault+0x268/0x288) from [&lt;c003f270&gt;] (do_DataAbort+0x34/0x94)</div>

<div>[ &nbsp; &nbsp;2.515350] [&lt;c003f270&gt;] (do_DataAbort+0x34/0x94) from [&lt;c0044dac&gt;] (__dabt_svc+0x4c/0x60)</div><div>[ &nbsp; &nbsp;2.523590] Exception stack(0xe982bf50 to 0xe982bf98)</div><div>[ &nbsp; &nbsp;2.528625] bf40: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 00000063 c07ea2cf 00003ffd 00003fff</div>

<div>[ &nbsp; &nbsp;2.536804] bf60: 00000000 ea828000 c00461b4 00000000 00000000 00000000 00000000 00000000</div><div>[ &nbsp; &nbsp;2.544952] bf80: 00000000 e982bf98 c0022ed0 c0022ee0 80000013 ffffffff</div><div>[ &nbsp; &nbsp;2.551544] [&lt;c0044dac&gt;] (__dabt_svc+0x4c/0x60) from [&lt;c0022ee0&gt;] (sand_misc_init+0x4c/0xac)</div>

<div>[ &nbsp; &nbsp;2.559967] [&lt;c0022ee0&gt;] (sand_misc_init+0x4c/0xac) from [&lt;c003f3fc&gt;] (do_one_initcall+0xd0/0x1a4)</div><div>[ &nbsp; &nbsp;2.568908] [&lt;c003f3fc&gt;] (do_one_initcall+0xd0/0x1a4) from [&lt;c0008374&gt;] (kernel_init+0x74/0x118)</div>

<div>[ &nbsp; &nbsp;2.577667] [&lt;c0008374&gt;] (kernel_init+0x74/0x118) from [&lt;c00461b4&gt;] (kernel_thread_exit+0x0/0x8)</div></div><div><br></div><div><br></div><div style>Any idea what went wrong.&nbsp;</div><div style>I am sure about the ioremap() start address, thats what i reserved in ATAGS.</div>

<div style><br></div><div style>Thanks</div><div style>Sandeep</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 28, 2013 at 10:30 AM, sandeep kumar <span dir="ltr">&lt;<a href="mailto:coolsandyforyou@gmail.com" target="_blank">coolsandyforyou@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im"><span style="font-family:arial,sans-serif;font-size:13px">&gt;1. use early_param to get the physical start address and size of test_region, or you can just ignore this step and hard code to 510M and 2M for test purpose only.</span><br style="font-family:arial,sans-serif;font-size:13px">


<br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">&gt;2. use ioremap_nocache() to map this region to a virtual region. note that this funtion may fail if you are asking a very large vitual memroy region.</span><br>


<div><br></div></div><div><font face="arial, sans-serif">Sounds good, i am gonna try this and let you know.. :)</font></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">

On Wed, Feb 27, 2013 at 8:19 PM, buyitian <span dir="ltr">&lt;<a href="mailto:buyit@live.cn" target="_blank">buyit@live.cn</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">----------------------------------------<br>
&gt; From: <a href="mailto:buyit@live.cn" target="_blank">buyit@live.cn</a><br>
&gt; To: <a href="mailto:coolsandyforyou@gmail.com" target="_blank">coolsandyforyou@gmail.com</a>; <a href="mailto:kernelnewbies@kernelnewbies.org" target="_blank">kernelnewbies@kernelnewbies.org</a><br>
&gt; Subject: RE: How to measure the RAM read/write performance<br>
&gt; Date: Wed, 27 Feb 2013 22:33:15 +0800<br>
&gt; CC: <a href="mailto:dhylands@gmail.com" target="_blank">dhylands@gmail.com</a><br>
<div>&gt;<br>
&gt; ________________________________<br>
&gt; &gt; From: <a href="mailto:coolsandyforyou@gmail.com" target="_blank">coolsandyforyou@gmail.com</a><br>
&gt; &gt; Date: Tue, 26 Feb 2013 17:01:54 +0530<br>
&gt; &gt; Subject: How to measure the RAM read/write performance<br>
&gt; &gt; To: <a href="mailto:kernelnewbies@kernelnewbies.org" target="_blank">kernelnewbies@kernelnewbies.org</a><br>
&gt; &gt; CC: <a href="mailto:dhylands@gmail.com" target="_blank">dhylands@gmail.com</a><br>
&gt; &gt;<br>
&gt; &gt; Hi All<br>
&gt; &gt; In performance benchmark tools, When we profile read/write timings<br>
&gt; &gt; mostly, those read/writes are done to cache only.<br>
&gt; &gt;<br>
&gt; &gt; I want to measure my DDR(RAM chip) performance.<br>
&gt; &gt; So i want to make sure, every read/write should happen to DDR RAM chip only.<br>
&gt; &gt;<br>
&gt; &gt; How can i achieve this...Any ideas/suggestions...?<br>
&gt;<br>
&gt; try to reserve a large region from bootloader(L4 in Qualcomm platform), let&#39;s say it is 10MB continuous physical memory.<br>
<br>
</div>sorry, to be accurate, reserve physical memory is done by kernel cmdline, this cmdline parameter can be passed from L4 to kernel, or configed by kernel itself.<br>
the cmdline will be like below:<br>
mem=510M@0 test_region=2M@510M<br>
<br>
above example tells kernel you have totally 512MB physical memory, but kernel will only use the first 510MB, the latter 2MB memory is used by you. how to map and use this region depends on you.<br>
<div><br>
&gt; in kernel, map this region to an continuous virtual region, note that the pgprot should be uncachable since you want to test without cache.<br>
<br>
</div>1. use early_param to get the physical start address and size of test_region, or you can just ignore this step and hard code to 510M and 2M for test purpose only.<br>
<br>
2. use ioremap_nocache() to map this region to a virtual region. note that this funtion may fail if you are asking a very large vitual memroy region.<br>
<div><div><br>
&gt; once you configed like this, you can read/write to this vitual region without data cache invovled.<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; With regards,<br>
&gt; &gt; Sandeep Kumar Anantapalli,<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________ Kernelnewbies mailing<br>
&gt; &gt; list <a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
&gt; &gt; <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
&gt; _______________________________________________<br>
&gt; Kernelnewbies mailing list<br>
&gt; <a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
&gt; <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></div></blockquote>


</div><br><br clear="all"><div><br></div>-- <br>With regards,<br>Sandeep Kumar Anantapalli,<br>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>With regards,<br>Sandeep Kumar Anantapalli,<br>
</div>