headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / kernel / arch / generic / generic_vm_physical_page_mapper.h
blob827e8941370ce99c460aba064c066bf74c5229c3
1 /*
2 * Copyright 2006-2010, Ingo Weinhold <ingo_weinhold@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5 #ifndef _KERNEL_GENERIC_VM_PHYSICAL_PAGE_MAPPER_H
6 #define _KERNEL_GENERIC_VM_PHYSICAL_PAGE_MAPPER_H
9 #include <boot/kernel_args.h>
12 // flags for generic_get_physical_page()
13 enum {
14 PHYSICAL_PAGE_DONT_WAIT = 0x01
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
21 typedef status_t (*generic_map_iospace_chunk_func)(addr_t virtualAddress,
22 phys_addr_t physicalAddress, uint32 flags);
24 status_t generic_get_physical_page(phys_addr_t pa, addr_t *va, uint32 flags);
25 status_t generic_put_physical_page(addr_t va);
26 status_t generic_vm_physical_page_mapper_init(kernel_args *args,
27 generic_map_iospace_chunk_func mapIOSpaceChunk, addr_t *ioSpaceBase,
28 size_t ioSpaceSize, size_t ioSpaceChunkSize);
29 status_t generic_vm_physical_page_mapper_init_post_area(kernel_args *args);
30 status_t generic_vm_physical_page_mapper_init_post_sem(kernel_args *args);
32 #ifdef __cplusplus
34 #endif
37 #endif // _KERNEL_GENERIC_VM_PHYSICAL_PAGE_MAPPER_H