/* Pcsx2 - Pc Ps2 Emulator * Copyright (C) 2002-2009 Pcsx2 Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #pragma once // this is all that needs to be called and will fill up the below structs extern void cpudetectInit(); ////////////////////////////////////////////////////////////////////////////////////////// // cpu capabilities structure // struct CAPABILITIES { u32 hasFloatingPointUnit; u32 hasVirtual8086ModeEnhancements; u32 hasDebuggingExtensions; u32 hasPageSizeExtensions; u32 hasTimeStampCounter; u32 hasModelSpecificRegisters; u32 hasPhysicalAddressExtension; u32 hasCOMPXCHG8BInstruction; u32 hasAdvancedProgrammableInterruptController; u32 hasSEPFastSystemCall; u32 hasMemoryTypeRangeRegisters; u32 hasPTEGlobalFlag; u32 hasMachineCheckArchitecture; u32 hasConditionalMoveAndCompareInstructions; u32 hasFGPageAttributeTable; u32 has36bitPageSizeExtension; u32 hasProcessorSerialNumber; u32 hasCFLUSHInstruction; u32 hasDebugStore; u32 hasACPIThermalMonitorAndClockControl; u32 hasMultimediaExtensions; u32 hasFastStreamingSIMDExtensionsSaveRestore; u32 hasStreamingSIMDExtensions; u32 hasStreamingSIMD2Extensions; u32 hasSelfSnoop; u32 hasMultiThreading; // is TRUE for both mutli-core and Hyperthreaded CPUs. u32 hasThermalMonitor; u32 hasIntel64BitArchitecture; u32 hasStreamingSIMD3Extensions; u32 hasSupplementalStreamingSIMD3Extensions; u32 hasStreamingSIMD4Extensions; u32 hasStreamingSIMD4Extensions2; // AMD-specific CPU Features u32 hasMultimediaExtensionsExt; u32 hasAMD64BitArchitecture; u32 has3DNOWInstructionExtensionsExt; u32 has3DNOWInstructionExtensions; u32 hasStreamingSIMD4ExtensionsA; }; ////////////////////////////////////////////////////////////////////////////////////////// // struct CPUINFO { u32 x86Family; // Processor Family u32 x86Model; // Processor Model u32 x86PType; // Processor Type u32 x86StepID; // Stepping ID u32 x86Flags; // Feature Flags u32 x86Flags2; // More Feature Flags u32 x86EFlags; // Extended Feature Flags u32 x86EFlags2; // Extended Feature Flags pg2 u32 PhysicalCores; u32 LogicalCores; char x86ID[16]; // Vendor ID //the vendor creator (in %s) char x86Type[20]; //cpu type in char format //the cpu type (in %s) char x86Fam[50]; // family in char format //the original cpu name string (in %s) u32 cpuspeed; // speed of cpu //this will give cpu speed (in %d) }; ////////////////////////////////////////////////////////////////////////////////////////// extern CAPABILITIES cpucaps; extern CPUINFO cpuinfo; extern u8 g_globalMMXSaved, g_globalXMMSaved; extern bool g_EEFreezeRegs; // when using mmx/xmm regs, use; 0 is load // freezes no matter the state extern void FreezeXMMRegs(int save); extern void FreezeMMXRegs(int save); extern void FreezeRegs(int save);