Subject: question about pmap_enter()
To: None <port-mac68k@netbsd.org>
From: John Valdes <valdes@macavity.uchicago.edu>
List: port-mac68k
Date: 06/05/1999 17:56:32
All,
OK, last question for today (except maybe follow ups... ;) ).
I'm in the process of updating the DayStar '030 accelerator patch from
1.3 to 1.4. For the most part, this has just been a matter of
updating the patch diffs for different offsets in the source files.
There is one exception however. In mac68k/pmap.c, a function is
defined to map the daystar hardware. This function calls pmap_enter()
to do this. In 1.3 the interface to pmap_enter() was:
void
pmap_enter(pmap, va, pa, prot, wired)
register pmap_t pmap;
vm_offset_t va;
register vm_offset_t pa;
vm_prot_t prot;
boolean_t wired;
However, in 1.4, pmap_enter now has an additional parameter, access_type:
void
pmap_enter(pmap, va, pa, prot, wired, access_type)
pmap_t pmap;
vaddr_t va;
paddr_t pa;
vm_prot_t prot;
boolean_t wired;
vm_prot_t access_type;
What is the purpose of "access_type", and how is it different from
"prot"? Or perhaps more to the point, the map_daystar() function in
1.3 called pmap_enter with, eg:
pmap_enter (pmap_kernel(), 0x52040000, 0x52040000,
VM_PROT_READ | VM_PROT_WRITE, TRUE);
What should be used for access_type? I tried copying the flags passed
to prot:
pmap_enter (pmap_kernel(), 0x52040000, 0x52040000,
VM_PROT_READ | VM_PROT_WRITE, TRUE,
VM_PROT_READ | VM_PROT_WRITE);
and that *seems* to work OK. The addresses mapped w/ pmap_enter() are
only tested (read), eg:
asm ("tstb 0x52040000 | disable writeback cache");
Does that mean access_type should only be VM_PROT_READ (or does it not
really matter in this case)?
Thanks,
John