Hi All,<div><br></div><div>I have read about I/O ports recently from many recommended books for linux. Each of the book effectively taught me only two things</div><div>1. Reserving the I/O ports using request_region(...) function</div>
<div>2. Then access the I/O ports using inb, outb functions</div><div><br></div><div>Apart from repeated reading and googling I still have the following queries</div><div><br></div><div>Question 1:</div><div>The one thing that the books haven&#39;t sufficiently answered is &#39;how does linux know to which device it should write or read from when we use inb and outb functions&#39;?</div>
<div>Say for example we are dealing with parallel port for instance. How does linux know that the parallel port is registered at <span style="background-color:rgb(233,241,244);color:rgb(51,51,51);font-family:Monaco,Courier,&#39;Courier new&#39;,monospace;font-size:13px;line-height:18px">0x378</span><span style="color:rgb(51,51,51);font-family:Monaco,Courier,&#39;Courier new&#39;,monospace;font-size:13px;line-height:18px;background-color:rgb(255,255,255)"> ?</span></div>
<div> </div><div>Question 2:</div><div>Who registers the parallel port at <span style="font-size:13px;background-color:rgb(233,241,244);color:rgb(51,51,51);font-family:Monaco,Courier,&#39;Courier new&#39;,monospace;line-height:18px">0x378</span><span style="font-size:13px;color:rgb(51,51,51);font-family:Monaco,Courier,&#39;Courier new&#39;,monospace;line-height:18px;background-color:rgb(255,255,255)"> ?</span></div>
<div>I have read somewhere that all the mapped ports can be found in /proc/ioports. </div><div>Who generates this map. BIOS? or the Kernel?</div><div> </div><div>Question 3:</div><div>How is <b>/proc/ioports</b> different from <b>/proc/iomem</b>(System Memory Map). Is there any overlap between them(because <span style="font-size:13px;background-color:rgb(233,241,244);color:rgb(51,51,51);font-family:Monaco,Courier,&#39;Courier new&#39;,monospace;line-height:18px">0x378</span><span style="font-size:13px;color:rgb(51,51,51);font-family:Monaco,Courier,&#39;Courier new&#39;,monospace;line-height:18px;background-color:rgb(255,255,255)"> </span> is also an address, so it must be some where in the system map. right?) ?</div>
<div><br></div><div>Question 4:</div><div>Is <span style="font-size:13px;background-color:rgb(233,241,244);color:rgb(51,51,51);font-family:Monaco,Courier,&#39;Courier new&#39;,monospace;line-height:18px">0x378</span> the physical address in the system memory map generated by BIOS as stated here </div>
<div><a href="http://www.pcguide.com/ref/mbsys/res/ioSummary-c.html">http://www.pcguide.com/ref/mbsys/res/ioSummary-c.html</a></div><div>Or a logical address from above table remapped inside the RAM which is in turn mapped at <b>0x00100000</b> physical  </div>
<div><br></div><div><br></div><div>I am banging my head with all of these bits and pieces of information without having a clue to stitch all of them together. </div><div>Please give me some pointers to understand them. </div>
<div>Thanks in advance.</div><div><br></div><div><br></div><div>Regards</div><div>Vineel Kumar Reddy Kovvuri</div><div><br></div><div><span style="background-color:rgb(233,241,244);color:rgb(51,51,51);font-family:Monaco,Courier,&#39;Courier new&#39;,monospace;font-size:13px;line-height:18px"><br>
</span></div>