1 // Copyright 2016 The Fuchsia Authors
2 // Copyright (c) 2009 Corey Tabaka
3 //
4 // Use of this source code is governed by a MIT-style
5 // license that can be found in the LICENSE file or at
6 // https://opensource.org/licenses/MIT
7 
8 #pragma once
9 
10 #include <lib/cbuf.h>
11 #include <sys/types.h>
12 #include <zircon/compiler.h>
13 #include <zircon/types.h>
14 
15 extern cbuf_t console_input_buf;
16 
17 __BEGIN_CDECLS
18 
19 /* Do not use anything above this address for PCIe stuff.  A bunch of
20  * architectural devices often occupy this area */
21 #define HIGH_ADDRESS_LIMIT 0xfec00000
22 
23 extern paddr_t pcie_mem_lo_base;
24 extern size_t pcie_mem_lo_size;
25 
26 extern uint16_t pcie_pio_base;
27 extern uint16_t pcie_pio_size;
28 
29 void pc_init_debug_default_early(void);
30 void pc_init_debug_early(void);
31 void pc_init_debug(void);
32 void pc_init_timer_percpu(void);
33 void pc_mem_init(void);
34 
35 void pc_prep_suspend_timer(void);
36 void pc_resume_timer(void);
37 void pc_resume_debug(void);
38 void pc_suspend_debug(void);
39 
40 typedef void (*enumerate_e820_callback)(uint64_t base, uint64_t size, bool is_mem, void* ctx);
41 zx_status_t enumerate_e820(enumerate_e820_callback callback, void* ctx);
42 
43 __END_CDECLS
44