[EMAIL PROTECTED] wrote this message on Thu, May 11, 2006 at 17:45 +0800:
> To access sg_table in kernel address, I need to map the starting physical
> address of a segment into a kernel address. As I know that, we can use
> phystovirt()/bustovirt(), or kmap()/kmap_atomic() to map a bus/physical
> address or a physical page into a kernel address in Linux, but I did not
> find such a function in FreeBSD. Please help me on this, it is very urgent!

That's what bus_space is used for...  You need to allocate the resource
that contains the sg_table, and then you can use the bus_space macros
to access the table..  you could use bus_space_write_region to copy
the table from kernel memory to your device, or just write the updated
values...

-- 
  John-Mark Gurney                              Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to