内存访问

我想访问ISA总线上的一段内存,从0xD0000~0xDFFFF
通过mmap_device_memory()函数映射后,直接对映射后的地址进行写操作,发现读出来的值没有变化。
我的访问方式是不是有问题?
uint32_t *ptr;
volatile uint32_t *tp;

ThreadCtl(_NTO_TCTL_IO,0);

ptr = (uint32_t *)mmap_device_memory(NULL,0x1000,(PROT_READ|PROT_WRITE),MAP_SHARED,0xd0000);
if ( ptr == MAP_FAILED ) {
perror( “mmap_device_memory for physical address 0xd0000 failed” );
exit( EXIT_FAILURE );
}
tp = ptr + 0x100;
*tp = 0;
printf(“The value writen to memory is 0x%x”,*tp);
*tp = 0x10;
printf(“The value writen to memory is 0x%x”,*tp);
请大家帮忙看看,谢谢

用out**(base+offset,value)试试 像out32() out16() out8() 还有in**()用来读数据

你把第一个参数有0换成0d0000试试