VirtualBox

Changeset 49966 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Dec 17, 2013 8:43:23 PM (11 years ago)
Author:
vboxsync
Message:

CPUM: Added AMD Athlon64 3200+ (130nm) and Pentium4 (mod 4, w/ 64-bit).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp

    r49927 r49966  
    221221
    222222
     223/** @callback_method_impl{FNCPUMRDMSR} */
     224static DECLCALLBACK(int) cpumMsrRd_Ia32BiosSignId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     225{
     226    /** @todo fake microcode update. */
     227    *puValue = pRange->uInitOrReadValue;
     228    return VINF_SUCCESS;
     229}
     230
     231
     232/** @callback_method_impl{FNCPUMWRMSR} */
     233static DECLCALLBACK(int) cpumMsrWr_Ia32BiosSignId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     234{
     235    return VERR_CPUM_RAISE_GP_0;
     236}
     237
     238
    223239/** @callback_method_impl{FNCPUMWRMSR} */
    224240static DECLCALLBACK(int) cpumMsrWr_Ia32BiosUpdateTrigger(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     
    695711    /** @todo implement IA32_PERFSTATUS. */
    696712    *puValue = pRange->uInitOrReadValue;
     713    return VINF_SUCCESS;
     714}
     715
     716
     717/** @callback_method_impl{FNCPUMWRMSR} */
     718static DECLCALLBACK(int) cpumMsrWr_Ia32PerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     719{
     720    /* Pentium4 allows writing, but all bits are ignored. */
    697721    return VINF_SUCCESS;
    698722}
     
    14651489
    14661490/** @callback_method_impl{FNCPUMRDMSR} */
     1491static DECLCALLBACK(int) cpumMsrRd_IntelP4EbcHardPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     1492{
     1493    /** @todo P4 hard power on config */
     1494    *puValue = pRange->uInitOrReadValue;
     1495    return VINF_SUCCESS;
     1496}
     1497
     1498
     1499/** @callback_method_impl{FNCPUMWRMSR} */
     1500static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcHardPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1501{
     1502    /** @todo P4 hard power on config */
     1503    return VINF_SUCCESS;
     1504}
     1505
     1506
     1507/** @callback_method_impl{FNCPUMRDMSR} */
     1508static DECLCALLBACK(int) cpumMsrRd_IntelP4EbcSoftPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     1509{
     1510    /** @todo P4 soft power on config  */
     1511    *puValue = pRange->uInitOrReadValue;
     1512    return VINF_SUCCESS;
     1513}
     1514
     1515
     1516/** @callback_method_impl{FNCPUMWRMSR} */
     1517static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcSoftPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1518{
     1519    /** @todo P4 soft power on config */
     1520    return VINF_SUCCESS;
     1521}
     1522
     1523
     1524/** @callback_method_impl{FNCPUMRDMSR} */
     1525static DECLCALLBACK(int) cpumMsrRd_IntelP4EbcFrequencyId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     1526{
     1527    /** @todo P4 bus frequency config  */
     1528    *puValue = pRange->uInitOrReadValue;
     1529    return VINF_SUCCESS;
     1530}
     1531
     1532
     1533/** @callback_method_impl{FNCPUMWRMSR} */
     1534static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcFrequencyId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1535{
     1536    /** @todo P4 bus frequency config  */
     1537    return VINF_SUCCESS;
     1538}
     1539
     1540
     1541/** @callback_method_impl{FNCPUMRDMSR} */
    14671542static DECLCALLBACK(int) cpumMsrRd_IntelPlatformInfo100MHz(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
    14681543{
     
    28132888
    28142889/** @callback_method_impl{FNCPUMRDMSR} */
     2890static DECLCALLBACK(int) cpumMsrRd_AmdK8FidVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     2891{
     2892    /** @todo AMD FIDVID_CTL. */
     2893    *puValue = pRange->uInitOrReadValue;
     2894    return VINF_SUCCESS;
     2895}
     2896
     2897
     2898/** @callback_method_impl{FNCPUMWRMSR} */
     2899static DECLCALLBACK(int) cpumMsrWr_AmdK8FidVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2900{
     2901    /** @todo AMD FIDVID_CTL. */
     2902    return VINF_SUCCESS;
     2903}
     2904
     2905
     2906/** @callback_method_impl{FNCPUMRDMSR} */
     2907static DECLCALLBACK(int) cpumMsrRd_AmdK8FidVidStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     2908{
     2909    /** @todo AMD FIDVID_STATUS. */
     2910    *puValue = pRange->uInitOrReadValue;
     2911    return VINF_SUCCESS;
     2912}
     2913
     2914
     2915/** @callback_method_impl{FNCPUMRDMSR} */
    28152916static DECLCALLBACK(int) cpumMsrRd_AmdK8McCtlMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
    28162917{
     
    34533554{
    34543555    /** @todo Changing CPUID leaf 0x80000001. */
     3556    return VINF_SUCCESS;
     3557}
     3558
     3559
     3560/** @callback_method_impl{FNCPUMRDMSR} */
     3561static DECLCALLBACK(int) cpumMsrRd_AmdK8PatchLevel(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     3562{
     3563    /** @todo Fake AMD microcode patching.  */
     3564    *puValue = pRange->uInitOrReadValue;
     3565    return VINF_SUCCESS;
     3566}
     3567
     3568
     3569/** @callback_method_impl{FNCPUMWRMSR} */
     3570static DECLCALLBACK(int) cpumMsrWr_AmdK8PatchLoader(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3571{
     3572    /** @todo Fake AMD microcode patching.  */
    34553573    return VINF_SUCCESS;
    34563574}
     
    41444262    cpumMsrRd_Ia32ApicBase,
    41454263    cpumMsrRd_Ia32FeatureControl,
     4264    cpumMsrRd_Ia32BiosSignId,
    41464265    cpumMsrRd_Ia32SmmMonitorCtl,
    41474266    cpumMsrRd_Ia32PmcN,
     
    42174336
    42184337    cpumMsrRd_IntelEblCrPowerOn,
     4338    cpumMsrRd_IntelP4EbcHardPowerOn,
     4339    cpumMsrRd_IntelP4EbcSoftPowerOn,
     4340    cpumMsrRd_IntelP4EbcFrequencyId,
    42194341    cpumMsrRd_IntelPlatformInfo100MHz,
    42204342    cpumMsrRd_IntelPlatformInfo133MHz,
     
    43044426    cpumMsrRd_AmdK8HwThermalCtrl,
    43054427    cpumMsrRd_AmdK8SwThermalCtrl,
     4428    cpumMsrRd_AmdK8FidVidControl,
     4429    cpumMsrRd_AmdK8FidVidStatus,
    43064430    cpumMsrRd_AmdK8McCtlMaskN,
    43074431    cpumMsrRd_AmdK8SmiOnIoTrapN,
     
    43414465    cpumMsrRd_AmdK8CpuIdCtlStd01hEdcx,
    43424466    cpumMsrRd_AmdK8CpuIdCtlExt01hEdcx,
     4467    cpumMsrRd_AmdK8PatchLevel,
    43434468    cpumMsrRd_AmdK7DebugStatusMaybe,
    43444469    cpumMsrRd_AmdK7BHTraceBaseMaybe,
     
    43934518    cpumMsrWr_Ia32ApicBase,
    43944519    cpumMsrWr_Ia32FeatureControl,
     4520    cpumMsrWr_Ia32BiosSignId,
    43954521    cpumMsrWr_Ia32BiosUpdateTrigger,
    43964522    cpumMsrWr_Ia32SmmMonitorCtl,
     
    44154541    cpumMsrWr_Ia32Dca0Cap,
    44164542    cpumMsrWr_Ia32PerfEvtSelN,
     4543    cpumMsrWr_Ia32PerfStatus,
    44174544    cpumMsrWr_Ia32PerfCtl,
    44184545    cpumMsrWr_Ia32FixedCtrN,
     
    44464573
    44474574    cpumMsrWr_IntelEblCrPowerOn,
     4575    cpumMsrWr_IntelP4EbcHardPowerOn,
     4576    cpumMsrWr_IntelP4EbcSoftPowerOn,
     4577    cpumMsrWr_IntelP4EbcFrequencyId,
    44484578    cpumMsrWr_IntelPkgCStConfigControl,
    44494579    cpumMsrWr_IntelPmgIoCaptureBase,
     
    45114641    cpumMsrWr_AmdK8HwThermalCtrl,
    45124642    cpumMsrWr_AmdK8SwThermalCtrl,
     4643    cpumMsrWr_AmdK8FidVidControl,
    45134644    cpumMsrWr_AmdK8McCtlMaskN,
    45144645    cpumMsrWr_AmdK8SmiOnIoTrapN,
     
    45474678    cpumMsrWr_AmdK8CpuIdCtlStd01hEdcx,
    45484679    cpumMsrWr_AmdK8CpuIdCtlExt01hEdcx,
     4680    cpumMsrWr_AmdK8PatchLoader,
    45494681    cpumMsrWr_AmdK7DebugStatusMaybe,
    45504682    cpumMsrWr_AmdK7BHTraceBaseMaybe,
     
    47854917    CPUM_ASSERT_RD_MSR_FN(Ia32ApicBase);
    47864918    CPUM_ASSERT_RD_MSR_FN(Ia32FeatureControl);
     4919    CPUM_ASSERT_RD_MSR_FN(Ia32BiosSignId);
    47874920    CPUM_ASSERT_RD_MSR_FN(Ia32SmmMonitorCtl);
    47884921    CPUM_ASSERT_RD_MSR_FN(Ia32PmcN);
     
    48574990
    48584991    CPUM_ASSERT_RD_MSR_FN(IntelEblCrPowerOn);
     4992    CPUM_ASSERT_RD_MSR_FN(IntelP4EbcHardPowerOn);
     4993    CPUM_ASSERT_RD_MSR_FN(IntelP4EbcSoftPowerOn);
     4994    CPUM_ASSERT_RD_MSR_FN(IntelP4EbcFrequencyId);
    48594995    CPUM_ASSERT_RD_MSR_FN(IntelPlatformInfo100MHz);
    48604996    CPUM_ASSERT_RD_MSR_FN(IntelPlatformInfo133MHz);
     
    49445080    CPUM_ASSERT_RD_MSR_FN(AmdK8HwThermalCtrl);
    49455081    CPUM_ASSERT_RD_MSR_FN(AmdK8SwThermalCtrl);
     5082    CPUM_ASSERT_RD_MSR_FN(AmdK8FidVidControl);
     5083    CPUM_ASSERT_RD_MSR_FN(AmdK8FidVidStatus);
    49465084    CPUM_ASSERT_RD_MSR_FN(AmdK8McCtlMaskN);
    49475085    CPUM_ASSERT_RD_MSR_FN(AmdK8SmiOnIoTrapN);
     
    49815119    CPUM_ASSERT_RD_MSR_FN(AmdK8CpuIdCtlStd01hEdcx);
    49825120    CPUM_ASSERT_RD_MSR_FN(AmdK8CpuIdCtlExt01hEdcx);
     5121    CPUM_ASSERT_RD_MSR_FN(AmdK8PatchLevel);
    49835122    CPUM_ASSERT_RD_MSR_FN(AmdK7DebugStatusMaybe);
    49845123    CPUM_ASSERT_RD_MSR_FN(AmdK7BHTraceBaseMaybe);
     
    50235162    CPUM_ASSERT_WR_MSR_FN(Ia32ApicBase);
    50245163    CPUM_ASSERT_WR_MSR_FN(Ia32FeatureControl);
     5164    CPUM_ASSERT_WR_MSR_FN(Ia32BiosSignId);
    50255165    CPUM_ASSERT_WR_MSR_FN(Ia32BiosUpdateTrigger);
    50265166    CPUM_ASSERT_WR_MSR_FN(Ia32SmmMonitorCtl);
     
    50455185    CPUM_ASSERT_WR_MSR_FN(Ia32Dca0Cap);
    50465186    CPUM_ASSERT_WR_MSR_FN(Ia32PerfEvtSelN);
     5187    CPUM_ASSERT_WR_MSR_FN(Ia32PerfStatus);
    50475188    CPUM_ASSERT_WR_MSR_FN(Ia32PerfCtl);
    50485189    CPUM_ASSERT_WR_MSR_FN(Ia32FixedCtrN);
     
    50755216
    50765217    CPUM_ASSERT_WR_MSR_FN(IntelEblCrPowerOn);
     5218    CPUM_ASSERT_WR_MSR_FN(IntelP4EbcHardPowerOn);
     5219    CPUM_ASSERT_WR_MSR_FN(IntelP4EbcSoftPowerOn);
     5220    CPUM_ASSERT_WR_MSR_FN(IntelP4EbcFrequencyId);
    50775221    CPUM_ASSERT_WR_MSR_FN(IntelPkgCStConfigControl);
    50785222    CPUM_ASSERT_WR_MSR_FN(IntelPmgIoCaptureBase);
     
    51405284    CPUM_ASSERT_WR_MSR_FN(AmdK8HwThermalCtrl);
    51415285    CPUM_ASSERT_WR_MSR_FN(AmdK8SwThermalCtrl);
     5286    CPUM_ASSERT_WR_MSR_FN(AmdK8FidVidControl);
    51425287    CPUM_ASSERT_WR_MSR_FN(AmdK8McCtlMaskN);
    51435288    CPUM_ASSERT_WR_MSR_FN(AmdK8SmiOnIoTrapN);
     
    51765321    CPUM_ASSERT_WR_MSR_FN(AmdK8CpuIdCtlStd01hEdcx);
    51775322    CPUM_ASSERT_WR_MSR_FN(AmdK8CpuIdCtlExt01hEdcx);
     5323    CPUM_ASSERT_WR_MSR_FN(AmdK8PatchLoader);
    51785324    CPUM_ASSERT_WR_MSR_FN(AmdK7DebugStatusMaybe);
    51795325    CPUM_ASSERT_WR_MSR_FN(AmdK7BHTraceBaseMaybe);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette