diff options
author | dfr <dfr@FreeBSD.org> | 2000-05-28 15:49:55 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2000-05-28 15:49:55 +0000 |
commit | 3d3263476ea3c9efbc1896de413e89bb3ca6ac2c (patch) | |
tree | d5c2ad0fe38d67d689415b5cd18c8352133ddc8b /sys/cam | |
parent | 2858982d35973c53f73d984305943bce4dfbcbf7 (diff) | |
download | FreeBSD-src-3d3263476ea3c9efbc1896de413e89bb3ca6ac2c.zip FreeBSD-src-3d3263476ea3c9efbc1896de413e89bb3ca6ac2c.tar.gz |
Add a new pmap entry point, pmap_enter_temporary() to be used during
dumps to create temporary page mappings. This replaces the use of CADDR1
which is fairly x86 specific.
Reviewed by: dillon
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index f7fdd55..f41c038 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -631,11 +631,14 @@ dadump(dev_t dev) blkcnt = howmany(PAGE_SIZE, secsize); while (num > 0) { + vm_offset_t va; if (is_physical_memory(addr)) { - pmap_kenter((vm_offset_t)CADDR1, trunc_page(addr)); + va = pmap_enter_temporary(trunc_page(addr), + VM_PROT_READ); } else { - pmap_kenter((vm_offset_t)CADDR1, trunc_page(0)); + va = pmap_enter_temporary(trunc_page(0), + VM_PROT_READ); } xpt_setup_ccb(&csio.ccb_h, periph->path, /*priority*/1); @@ -649,7 +652,7 @@ dadump(dev_t dev) /*minimum_cmd_size*/ softc->minimum_cmd_size, blknum, blkcnt, - /*data_ptr*/CADDR1, + /*data_ptr*/(u_int8_t *) va, /*dxfer_len*/blkcnt * secsize, /*sense_len*/SSD_FULL_SIZE, DA_DEFAULT_TIMEOUT * 1000); |