Read/write memory-mapped resources through PC/104

Hi,

I can’t post a reply on this topic because it is locked, so I open a new one.

I have a Geode lx800 processor with a ite8888 pci-isa (pc104) bridge. In the future I will have two PC/104 boards. One with I/O ports access and another one with I/O ports and memory-mapped access.

I am able to read/write I/O ports with the first one :

ThreadCtl(_NTO_TCTL_IO, NULL);
out8(address, data);
// data = in8(address);

note : mmap_device_io() isn’t necessary on x86 systems

I have not the second board yet but still I’m trying PC/104 memory access with an oscilloscope (MEMW signal monitoring for PC/104 16 bits access).
Here’s my code:

Of course, my bios is configured to decode PC/104 memory address 0x0F0000.
There is no fluctuation on MEMW line…

I tried a 16-bits read also but with no more success.Same results with 8-bits read/write access (SMEMW, SMEMR).

Any suggestion? :neutral_face:

Thanks!

This is not the answer you want, however…
You have proved that there is a problem the hard way.
As with software, when doing something directly in hardware, there is always the possibility that you have a bug, or rather a procedural error.

I would wait until you get your new board and see if you can’t access the memory on it.

Hi,

A little update. I am now able to write memory.
There was a little bug in the code I posted earlier (2 mismatched parameters in mmap_device_memory and I didn’t dereference MyAddress ) :

[code]MyAddress = (unsigned short )mmap_device_memory( 0, 641024,
PROT_READ | PROT_WRITE | PROT_NOCACHE,
0, 0xF000);

*MyAddress =0xFFFF;
[/code]

Shame on me :blush:

However I still can’t read anything!

I don’t think it is a low-level driver issue nor a problem with my code but here is my code for a 16-bits read :

unsigned short *MyAddress;
unsigned short dummy;
MyAddress = (unsigned short *)mmap_device_memory( 0, 64*1024,
			                                        PROT_READ | PROT_WRITE | PROT_NOCACHE,
			                                        0, 0xF0000);
dummy = *MyAddress;

I can’t figure out what I am missing …

I get my board on Monday. Maybe I will see the light from here :mrgreen:

cheers.

If for *MyAddress = 0; you see the write for variable = *MyAddress you should see the read. If not then I’m pretty sure it’s hardware related, and not some config in the program.

Hello again!

I can eventually read the memory of my board. It seems that I just needed a response from a slave after all. Strange but functionnal.
Maybe the PCI/ISA bridge is designed like this.

Anyway thanks for the support! :stuck_out_tongue: