diff options
author | kib <kib@FreeBSD.org> | 2012-05-12 20:42:56 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-05-12 20:42:56 +0000 |
commit | 9ff1ec42a4c0d37d3675e60e7b68cae42df1a954 (patch) | |
tree | 0b49fefb6622aaedac7bf526163774e487e14627 /sys/vm/vm_phys.h | |
parent | 1ad1048d19f6c3f268b6cd701a9aa01021fea708 (diff) | |
download | FreeBSD-src-9ff1ec42a4c0d37d3675e60e7b68cae42df1a954.zip FreeBSD-src-9ff1ec42a4c0d37d3675e60e7b68cae42df1a954.tar.gz |
Add a facility to register a range of physical addresses to be used
for allocation of fictitious pages, for which PHYS_TO_VM_PAGE()
returns proper fictitious vm_page_t. The range should be de-registered
after consumer stopped using it.
De-inline the PHYS_TO_VM_PAGE() since it now carries code to iterate
over registered ranges.
A hash container might be developed instead of range registration
interface, and fake pages could be put automatically into the hash,
were PHYS_TO_VM_PAGE() could look them up later. This should be
considered before the MFC of the commit is done.
Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 1 month
Diffstat (limited to 'sys/vm/vm_phys.h')
-rw-r--r-- | sys/vm/vm_phys.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/vm_phys.h b/sys/vm/vm_phys.h index 047e4a9..902659b 100644 --- a/sys/vm/vm_phys.h +++ b/sys/vm/vm_phys.h @@ -57,6 +57,10 @@ vm_page_t vm_phys_alloc_contig(u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary); vm_page_t vm_phys_alloc_freelist_pages(int flind, int pool, int order); vm_page_t vm_phys_alloc_pages(int pool, int order); +int vm_phys_fictitious_reg_range(vm_paddr_t start, vm_paddr_t end, + vm_memattr_t memattr); +void vm_phys_fictitious_unreg_range(vm_paddr_t start, vm_paddr_t end); +vm_page_t vm_phys_fictitious_to_vm_page(vm_paddr_t pa); void vm_phys_free_contig(vm_page_t m, u_long npages); void vm_phys_free_pages(vm_page_t m, int order); void vm_phys_init(void); |