[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pmap_extract(9) (was Re: xmd(4) (Re: XIP))
I think pmap_extract(9) is a bad API.
After MD bootstrap code detects all physical memories, it gives
all the informations to UVM, including available KVA. At this
point UVM knows all the available resources of virtual/physical
addresses. UVM is responsible to manage all of these.
Calling pmap_extract(9) means that some kernel code asks pmap(9)
to look up a physical address. pmap(9) is only responsible to
handle CPU and MMU. Using it as a lookup database is an abuse.
The only reasonable use of pmap_extract(9) is for debugging purpose.
I think that pmap_extract(9) should be changed like:
bool pmap_mapped_p(struct pmap *, vaddr_t);
and allow it to be used for KASSERT()s.
The only right way to retrieve P->V translation is to lookup from
vm_map (== the fault handler). If we honour this principle, VM
and I/O code will be much more consistent.
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635
Main Index |
Thread Index |