Difference in semantic between QNX 4 and 6? (inp and in8)

bridged with qdn.public.ddk
Post Reply
Andre Goddard Rosa

Difference in semantic between QNX 4 and 6? (inp and in8)

Post by Andre Goddard Rosa » Mon Oct 13, 2003 8:36 pm

Hi, there! I am getting crazy!
Please, some guru, try to respond this:

QNX4

I use inp(an_io_base_address) to get an 8 bit value and it bring it to me
correctly.


QNX6

I use in8(an_io_base_address) to get an 8 bit value but it do not bring me
the value correctly.

After some research I found that using:

in32(an_io_base_address) >> 24 bring me the same information as QNX4.

For example:

QNX6
in8() = 33h
in32() = 12000033h
in32() >> 24 = 13h
QNX4
inp() = 13h


WHY? (It is an endian issue (both are x86) or an alignment issue)


Thanks for any help explaining this,

Best regards,

Andre

Andre Goddard Rosa

Re: Difference in semantic between QNX 4 and 6? (inp and in8

Post by Andre Goddard Rosa » Mon Oct 13, 2003 8:37 pm

Please, master David Gibbs, can you reset my mind? ;)

Thanks,

Andre

Andre Goddard Rosa

Re: Difference in semantic between QNX 4 and 6? (inp and in8

Post by Andre Goddard Rosa » Tue Oct 14, 2003 7:28 pm

Okey, just found by myself this one.

I dont know why, but using mmap_device_io() on x86 as stated in
"Talking with hardware under QNX Neutrino by Dave Donohoe, QNX Software
Systems Ltd."
was giving me a wrong base address. The correct was supposed to be 0xe000
and using that
function as stated on that document was returning 0xe001 to me.

Now, I am just using the value PCI_IO_ADDR(info.CpuBaseAddress[index]).

So, I think that document is wrong.

Where I read:
uintptr_t iobase;
iobase = mmap_device_io(info.BaseAddressSize[2], info.CpuBaseAddress[2]);

Should I read:
uintptr_t iobase;
iobase = mmap_device_io(info.BaseAddressSize[2],
PCI_IO_ADDR(info.CpuBaseAddress[2]));

or, on x86, just:
uintptr_t iobase;
iobase = PCI_IO_ADDR(info.CpuBaseAddress[2]);


Thanks,

Andre

David Gibbs

Re: Difference in semantic between QNX 4 and 6? (inp and in8

Post by David Gibbs » Tue Oct 21, 2003 6:28 pm

Andre Goddard Rosa <goddard@audiolab.com.br> wrote:
Please, master David Gibbs, can you reset my mind? ;)
The master was on holiday.

Apparently the student has attained enlightenment without him.

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Post Reply

Return to “qdn.public.ddk”