Porting QNX on DNP9200 Problem

Hello,
actually I am trying to port QNX onto the DNP9200 Board.

My problem is that I got stuck when writing Callout routines for the Startup
programm for the DNP9200 Board.

As reference implementation I am using the Integrator BSP and the problem is
as follows:


The Integrator Callout function calls some Patch code at first.
CALLOUT_START(interrupt_mask_integrator, 0, interrupt_patch)


This Patch code is using a constant which is used in other implementations
for other boards as well.
It is called #INTEGRATOR_INTR_SIZE:


mov r0, #INTEGRATOR_INTR_SIZE
ldr r1, Lpaddr
bl callout_io_map


Lpaddr: .word INTEGRATOR_INTR_BASE



For the Integrator Board this constant is 0xf0 for another board the ixp2400
it is 0x210.

I dont’t get the meaning of this constant and its function. I would be glad
if you could help me out.

Thanks a lot in advance!!

Jan

The callout_io_map function is used to map the registers
for use by the callout once the kernel is running.

The 1st parameter (r0) is size of the registers to map.
The 2nd parameter (r1) is the physical address of the registers.
It returns a virtual address, and the CALLOUT_PATCH macro is
used to modify the callout code to use this virtual address.

Since virtual address mappings are always 4K page size multiples,
the actual size mapped is rounded up to a 4K boundary.

The start of most callout routines consist of a sequence of
instructions that put a 32-bit value into a register, used as
the base address of the I/O registers being accessed.

The CALLOUT_PATCH macro modifies those instructions so that they
generate the value returned by callout_io_map().

Sunil.

Jan Raddatz wrote:

Hello,
actually I am trying to port QNX onto the DNP9200 Board.

My problem is that I got stuck when writing Callout routines for the Startup
programm for the DNP9200 Board.

As reference implementation I am using the Integrator BSP and the problem is
as follows:


The Integrator Callout function calls some Patch code at first.
CALLOUT_START(interrupt_mask_integrator, 0, interrupt_patch)


This Patch code is using a constant which is used in other implementations
for other boards as well.
It is called #INTEGRATOR_INTR_SIZE:


mov r0, #INTEGRATOR_INTR_SIZE
ldr r1, Lpaddr
bl callout_io_map


Lpaddr: .word INTEGRATOR_INTR_BASE



For the Integrator Board this constant is 0xf0 for another board the ixp2400
it is 0x210.

I dont’t get the meaning of this constant and its function. I would be glad
if you could help me out.

Thanks a lot in advance!!

Jan

Dear Sunil,
thanks a lot for your detailed description!

It helped a lot!

Greetings
Jan


“Sunil Kittur” <skittur@qnx.com> schrieb im Newsbeitrag
news:e3nlef$erj$1@inn.qnx.com

The callout_io_map function is used to map the registers
for use by the callout once the kernel is running.

The 1st parameter (r0) is size of the registers to map.
The 2nd parameter (r1) is the physical address of the registers.
It returns a virtual address, and the CALLOUT_PATCH macro is
used to modify the callout code to use this virtual address.

Since virtual address mappings are always 4K page size multiples,
the actual size mapped is rounded up to a 4K boundary.

The start of most callout routines consist of a sequence of
instructions that put a 32-bit value into a register, used as
the base address of the I/O registers being accessed.

The CALLOUT_PATCH macro modifies those instructions so that they
generate the value returned by callout_io_map().

Sunil.

Jan Raddatz wrote:
Hello,
actually I am trying to port QNX onto the DNP9200 Board.

My problem is that I got stuck when writing Callout routines for the
Startup programm for the DNP9200 Board.

As reference implementation I am using the Integrator BSP and the problem
is as follows:


The Integrator Callout function calls some Patch code at first.
CALLOUT_START(interrupt_mask_integrator, 0, interrupt_patch)


This Patch code is using a constant which is used in other
implementations for other boards as well.
It is called #INTEGRATOR_INTR_SIZE:


mov r0, #INTEGRATOR_INTR_SIZE
ldr r1, Lpaddr
bl callout_io_map


Lpaddr: .word INTEGRATOR_INTR_BASE



For the Integrator Board this constant is 0xf0 for another board the
ixp2400 it is 0x210.

I dont’t get the meaning of this constant and its function. I would be
glad if you could help me out.

Thanks a lot in advance!!

Jan