Doesn't do much but provided the detection path for it and ability to hold initialized state. The higher level platform code is going to need to use it directly so will mostly just provide an api for access to it. Moved ACPI sniffing back to just after the VM is initialized instead of all the way into platform_init(). This should try to ensure that all drivers that come up afterwards will have ioapics discovered in case future development tries to enable and use them, kicking the machine out of virtual-wire-mode.
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
/*
|
|
* Copyright (c) 2009 Corey Tabaka
|
|
*
|
|
* Use of this source code is governed by a MIT-style
|
|
* license that can be found in the LICENSE file or at
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
#pragma once
|
|
|
|
#include <lib/cbuf.h>
|
|
#include <platform/timer.h>
|
|
|
|
extern cbuf_t console_input_buf;
|
|
|
|
void platform_init_debug_early(void);
|
|
void platform_init_debug(void);
|
|
void platform_init_interrupts(void);
|
|
void platform_init_interrupts_postvm(void);
|
|
void platform_init_timer(void);
|
|
|
|
// legacy programmable interrupt controller
|
|
void pic_init(void);
|
|
void pic_enable(unsigned int vector, bool enable);
|
|
void pic_eoi(unsigned int vector);
|
|
void pic_mask_interrupts(void);
|
|
|
|
// programable interval timer
|
|
void pit_init(void);
|
|
status_t pit_set_periodic_timer(platform_timer_callback callback, void *arg, lk_time_t interval);
|
|
status_t pit_set_oneshot_timer(platform_timer_callback callback, void *arg, lk_time_t interval);
|
|
void pit_cancel_timer(void);
|
|
void pit_stop_timer(void);
|
|
lk_time_t pit_current_time(void);
|
|
lk_bigtime_t pit_current_time_hires(void);
|
|
uint64_t pit_calibrate_tsc(void);
|
|
|
|
// secondary cpus
|
|
void platform_start_secondary_cpus(void);
|