xref: /haiku/src/add-ons/kernel/drivers/disk/nvme/compat/nvme_mem.h (revision 4b88e723504583a68377602ba696d386d215766d)
1 /*
2  * Copyright 2019, Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Augustin Cavalier <waddlesplash>
7  */
8 #ifndef __NVME_MEMORY_H_
9 #define __NVME_MEMORY_H_
10 
11 #include <OS.h>
12 
13 
14 int nvme_mem_init();
15 void nvme_mem_cleanup();
16 
17 void* nvme_mem_alloc_node(size_t size, size_t align,
18 	unsigned int node_id, phys_addr_t* paddr);
19 void* nvme_malloc_node(size_t size, size_t align,
20 	unsigned int node_id);
21 
22 phys_addr_t nvme_mem_vtophys(void* vaddr);
23 
24 
25 #define NVME_VTOPHYS_ERROR	(~0ULL)
26 
27 #define nvme_node_max()		(1)
28 #define NVME_NODE_MAX		(1)
29 #define nvme_node_id()		(0)
30 
31 
32 #endif /* __NVME_MEMORY_H_ */
33