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
15extern 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
23extern paddr_t pcie_mem_lo_base;
24extern size_t pcie_mem_lo_size;
25
26extern uint16_t pcie_pio_base;
27extern uint16_t pcie_pio_size;
28
29void pc_init_debug_default_early(void);
30void pc_init_debug_early(void);
31void pc_init_debug(void);
32void pc_init_timer_percpu(void);
33void pc_mem_init(void);
34
35void pc_prep_suspend_timer(void);
36void pc_resume_timer(void);
37void pc_resume_debug(void);
38void pc_suspend_debug(void);
39
40typedef void (*enumerate_e820_callback)(uint64_t base, uint64_t size, bool is_mem, void* ctx);
41zx_status_t enumerate_e820(enumerate_e820_callback callback, void* ctx);
42
43__END_CDECLS
44