<div dir="ltr">I used PC104 mapping on the pc386 BSP (so it would be identical). I accessed inputs through an interrupt to read from ISA bus.The memory address in RTEMS maps directly to the memory address on the ISA bus and the memory data also just mapped across. It was extremely easy.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 23, 2016 at 8:08 AM, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 22/09/2016 21:15, Павел Жданов wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello!<br>
<br>
I'm working on the educational project based on CPU-1421 processor board<br>
(<a href="http://www.eurotech.com/en/products/CPU-1421" rel="noreferrer" target="_blank">http://www.eurotech.com/en/pr<wbr>oducts/CPU-1421</a><br>
<<a href="http://www.eurotech.com/en/products/CPU-1421" rel="noreferrer" target="_blank">http://www.eurotech.com/en/pr<wbr>oducts/CPU-1421</a>>).<br>
I have a simple self-made "PC/104 device" which is connected to CPU-1421<br>
through the ISA bus. CPU-1421 runs under RTEMS.<br>
</blockquote>
<br>
Awesome, and welcome.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
My goal is to control my PC/104 device<br>
through the memory mapped I/O. In Linux I can use ioremap() function for<br>
this purpose and it works. How can I get an access to my device in<br>
RTEMS? I use RTEMS 4.11 with bsp=pc486.<br>
</blockquote>
<br>
RTEMS is a single address space, consider it a single process. The MMU is normally configured to map 1:1 physical addresses to virtual addresses. All you need to do is make sure the address range you want to access is mapped by the MMU. Once mapped you can access the address space via a normal pointer.<br>
<br>
You need to first determine the 32bit pointer to the address of your device. For example the video driver for the PC BSP sets the video memory address here:<br>
<br>
<a href="https://git.rtems.org/rtems/tree/c/src/lib/libbsp/i386/pc386/console/outch.c#n292" rel="noreferrer" target="_blank">https://git.rtems.org/rtems/tr<wbr>ee/c/src/lib/libbsp/i386/pc386<wbr>/console/outch.c#n292</a><br>
<br>
and the address is defined here:<br>
<br>
<a href="https://git.rtems.org/rtems/tree/c/src/lib/libbsp/i386/pc386/include/crt.h#n26" rel="noreferrer" target="_blank">https://git.rtems.org/rtems/tr<wbr>ee/c/src/lib/libbsp/i386/pc386<wbr>/include/crt.h#n26</a><br>
<br>
I am not sure how the address space for your PC/104 device maps so I hope this example provides some hints. I also do not know if the MMU is set up to cover the whole ISA bus address space. I think it is best to try and see.<br>
<br>
Chris<br>
______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman<wbr>/listinfo/users</a></blockquote></div><br></div>