1 // Copyright 2018 The Fuchsia Authors
2 //
3 // Use of this source code is governed by a MIT-style
4 // license that can be found in the LICENSE file or at
5 // https://opensource.org/licenses/MIT
6 
7 #pragma once
8 
9 #include <sys/types.h>
10 #include <zircon/compiler.h>
11 #include <zircon/types.h>
12 
13 __BEGIN_CDECLS
14 
15 // adds a new peripheral range
16 zx_status_t add_periph_range(paddr_t base_phys, size_t length);
17 
18 // called after virtual memory is started to reserve peripheral ranges
19 // in the kernel's address space
20 void reserve_periph_ranges(void);
21 
22 // translates peripheral physical address to virtual address in the big kernel map
23 vaddr_t periph_paddr_to_vaddr(paddr_t paddr);
24 
25 __END_CDECLS
26