From 0e24592cb32f61bb59caad30ea9acc524974c6dd Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 18 Apr 2024 15:06:22 -0400 Subject: kernel: vm: Add device pager Signed-off-by: Ian Moffett --- sys/include/vm/pager.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/include/vm') diff --git a/sys/include/vm/pager.h b/sys/include/vm/pager.h index 5f36bfc..e57afe1 100644 --- a/sys/include/vm/pager.h +++ b/sys/include/vm/pager.h @@ -38,10 +38,14 @@ struct vm_object; struct vm_pagerops { int(*get)(struct vm_object *obj, off_t off, size_t len, struct vm_page *pg); int(*store)(struct vm_object *obj, off_t off, size_t len, struct vm_page *pg); + /* TODO: Remove this and add demand paging */ + int(*get_paddr)(struct vm_object *obj, paddr_t *paddr, vm_prot_t prot); }; extern struct vm_pagerops g_vnode_pagerops; +extern struct vm_pagerops g_dev_pagerops; int vm_pager_get(struct vm_object *obj, off_t off, size_t len, struct vm_page *pg); +int vm_pager_paddr(struct vm_object *obj, paddr_t *paddr, vm_prot_t prot); #endif /* !_VM_PAGER_H_ */ -- cgit v1.2.3