Skip navigation.
Home
The QNX Community Portal

View topic - Porting QNX on DNP9200 Problem

Porting QNX on DNP9200 Problem

Read-only archive of qnx.bsp (Discuss building an image, flashing a board or using a BSP) at inn.qnx.com

Porting QNX on DNP9200 Problem

Postby Jan Raddatz » Mon May 08, 2006 2:23 pm

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
Jan Raddatz
 

Re: Porting QNX on DNP9200 Problem

Postby Sunil Kittur » Mon May 08, 2006 2:50 pm

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

Sunil Kittur
 

Re: Porting QNX on DNP9200 Problem

Postby Jan Raddatz » Tue May 09, 2006 6:39 am

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
Jan Raddatz
 


Return to qnx.bsp

Who is online

Users browsing this forum: No registered users and 1 guest