Hi, I'm using this as a substitute for getting a virtual address for a specific 
physical address on Solaris for my driver. If you see any issues in this 
approach please let me know.

page_t            p;
      struct buf  b;

      memset(&p, 0, sizeof(p));
      memset(&b, 0, sizeof(b));

      p.p_pagenum = <your_page_frame_number>;

      b.b_flags = B_PAGEIO;
      b.b_pages = &p;
      b.b_bcount = PAGE_SIZE;
      bp_mapin(&b, 0);
      if (bp->b_un.b_addr != NULL) {
            /* Success */
      }
      if (hat_getpfnum(kas.a_hat, b.b_un.b_addr) == <your_page_rame_number>)
            /* Success */

This seems to be working for me.
Regards,
Bhaskar.

_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to