Subject: Re: alpha pci pio problems
To: None <thorpej@zembu.com>
From: Simon Burge <simonb@NetBSD.ORG>
List: port-alpha
Date: 06/27/2000 15:05:05
Jason R Thorpe wrote:
> On Mon, Jun 26, 2000 at 06:14:33PM +1000, Simon Burge wrote:
>
> > > Didn't think of checking that. I'll check it out.
> >
> > I'm not a native ddb driver, but looked sorta ok to me. Ten finger
> > copy:
>
> Using the object here isn't useful -- display the physical addresses
> passed to pmap_enter after d_mmap is called.
Good call! uvm_fault only used an int for the offset to pass to d_mmap.
With the following, the offsets passed to d_mmap look good and I can
now run a basically unaltered SuperProbe although it tells me it can't
find any PCI cards - although that's better than wedging my machine!
Any hassles with the following patch?
Simon.
--
Index: uvm_device.c
===================================================================
RCS file: /cvsroot/syssrc/sys/uvm/uvm_device.c,v
retrieving revision 1.26
diff -p -u -r1.26 uvm_device.c
--- uvm_device.c 2000/06/26 14:21:17 1.26
+++ uvm_device.c 2000/06/27 05:04:19
@@ -406,8 +406,7 @@ udv_fault(ufi, vaddr, pps, npages, cente
struct vm_map_entry *entry = ufi->entry;
struct uvm_object *uobj = entry->object.uvm_obj;
struct uvm_device *udv = (struct uvm_device *)uobj;
- vaddr_t curr_va;
- int curr_offset;
+ vaddr_t curr_va, curr_offset;
paddr_t paddr, mdpgno;
int lcv, retval;
dev_t device;
@@ -448,7 +447,7 @@ udv_fault(ufi, vaddr, pps, npages, cente
* addresses in a submap must match the main map, this is ok.
*/
/* udv offset = (offset from start of entry) + entry's offset */
- curr_offset = (int)((vaddr - entry->start) + entry->offset);
+ curr_offset = (vaddr - entry->start) + entry->offset;
/* pmap va = vaddr (virtual address of pps[0]) */
curr_va = vaddr;
@@ -473,8 +472,8 @@ udv_fault(ufi, vaddr, pps, npages, cente
paddr = pmap_phys_address(mdpgno);
mapprot = ufi->entry->protection;
UVMHIST_LOG(maphist,
- " MAPPING: device: pm=0x%x, va=0x%x, pa=0x%x, at=%d",
- ufi->orig_map->pmap, curr_va, (int)paddr, mapprot);
+ " MAPPING: device: pm=0x%x, va=0x%x, pa=0x%lx, at=%d",
+ ufi->orig_map->pmap, curr_va, paddr, mapprot);
if (pmap_enter(ufi->orig_map->pmap, curr_va, paddr,
mapprot, PMAP_CANFAIL | mapprot) != KERN_SUCCESS) {
/*