Fwd: RTEMS on x86, PC/104 board. Access to ISA bus through memory mapped I/O.
Chris Johns
chrisj at rtems.org
Thu Sep 22 22:08:38 UTC 2016
On 22/09/2016 21:15, Павел Жданов wrote:
> Hello!
>
> I'm working on the educational project based on CPU-1421 processor board
> (http://www.eurotech.com/en/products/CPU-1421
> <http://www.eurotech.com/en/products/CPU-1421>).
> I have a simple self-made "PC/104 device" which is connected to CPU-1421
> through the ISA bus. CPU-1421 runs under RTEMS.
Awesome, and welcome.
> My goal is to control my PC/104 device
> through the memory mapped I/O. In Linux I can use ioremap() function for
> this purpose and it works. How can I get an access to my device in
> RTEMS? I use RTEMS 4.11 with bsp=pc486.
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.
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:
https://git.rtems.org/rtems/tree/c/src/lib/libbsp/i386/pc386/console/outch.c#n292
and the address is defined here:
https://git.rtems.org/rtems/tree/c/src/lib/libbsp/i386/pc386/include/crt.h#n26
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.
Chris
More information about the users
mailing list