Move state out of instructions_0f.rs

This commit is contained in:
Fabian 2020-12-31 19:14:29 -06:00
parent 17d98256d6
commit 8c8f42902b
3 changed files with 4 additions and 4 deletions

View file

@ -1,2 +1,3 @@
pub const LOG_PAGE_FAULTS: bool = false;
pub const FORCE_DISABLE_JIT: bool = false;
pub const ENABLE_ACPI: bool = false;

View file

@ -253,6 +253,8 @@ pub static mut tsc_offset: u64 = 0;
pub static mut valid_tlb_entries: [i32; 10000] = [0; 10000];
pub static mut valid_tlb_entries_count: i32 = 0;
pub static mut apic_enabled: bool = false;
pub enum LastJump {
Interrupt {
phys_addr: u32,

View file

@ -47,9 +47,6 @@ use cpu2::misc_instr::{
};
use cpu2::sse_instr::*;
pub static mut apic_enabled: bool = false;
const ENABLE_ACPI: bool = false;
#[no_mangle]
pub unsafe fn instr_0F00_0_mem(addr: i32) {
// sldt
@ -1240,7 +1237,7 @@ pub unsafe fn instr_0F32() {
}
else if !(index == IA32_PLATFORM_ID) {
if index == IA32_APIC_BASE_MSR {
if ENABLE_ACPI {
if ::config::ENABLE_ACPI {
low = APIC_ADDRESS;
if apic_enabled {
low |= IA32_APIC_BASE_EN