Question about ioremap and io_remap_page_range

=?GB2312?Q?=CA=E6=B9=FA=C7=BF?= (
Thu, 27 Sep 2001 14:4:42 +0800

Here is some rather basic questions I want ask ,any reply or comment please
CC to my emailbox,thank you very much.

When I work with kernel 2.4.2 in Intel X86 , I use

VIRT_ADDR = ioremap(BUS_ADDR); to map a section of PCI memory, and
X_ADDR = virt_to_phys(VIRT_ADDR);

I think in x86 platform X_ADDR should equel with BUS_ADDR, but it turns to be
NOT, can you explain ?

In X86 platform ,Can I use return value of ioremap() as a memory pointer?

I use io_remap_page_range(BUS_ADDR,,) in mmap() function,but the result is
that the memory I map is READ ONLY from user space,when I try to write to it,
a "do_sw_pg. bogus page(XXXXXXXX)" appears. Can you explain to me?

I know these questions are childish,but I need the answer urgently,thanks!

George Shu