VirtualBox

Changeset 8626 in vbox for trunk/src


Ignore:
Timestamp:
May 6, 2008 1:27:07 PM (17 years ago)
Author:
vboxsync
Message:

Renamed the PGMR3PhysRead* and PGMR3PhysWrite* function and added U64 variants.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r8347 r8626  
    5555
    5656/*
    57  * PGMR3PhysReadByte/Word/Dword
    58  * PGMR3PhysWriteByte/Word/Dword
    59  */
    60 /** @todo rename and add U64. */
    61 
    62 #define PGMPHYSFN_READNAME  PGMR3PhysReadByte
    63 #define PGMPHYSFN_WRITENAME PGMR3PhysWriteByte
     57 * PGMR3PhysReadU8-64
     58 * PGMR3PhysWriteU8-64
     59 */
     60#define PGMPHYSFN_READNAME  PGMR3PhysReadU8
     61#define PGMPHYSFN_WRITENAME PGMR3PhysWriteU8
    6462#define PGMPHYS_DATASIZE    1
    6563#define PGMPHYS_DATATYPE    uint8_t
    6664#include "PGMPhys.h"
    6765
    68 #define PGMPHYSFN_READNAME  PGMR3PhysReadWord
    69 #define PGMPHYSFN_WRITENAME PGMR3PhysWriteWord
     66#define PGMPHYSFN_READNAME  PGMR3PhysReadU16
     67#define PGMPHYSFN_WRITENAME PGMR3PhysWriteU16
    7068#define PGMPHYS_DATASIZE    2
    7169#define PGMPHYS_DATATYPE    uint16_t
    7270#include "PGMPhys.h"
    7371
    74 #define PGMPHYSFN_READNAME  PGMR3PhysReadDword
    75 #define PGMPHYSFN_WRITENAME PGMR3PhysWriteDword
     72#define PGMPHYSFN_READNAME  PGMR3PhysReadU32
     73#define PGMPHYSFN_WRITENAME PGMR3PhysWriteU32
    7674#define PGMPHYS_DATASIZE    4
    7775#define PGMPHYS_DATATYPE    uint32_t
     76#include "PGMPhys.h"
     77
     78#define PGMPHYSFN_READNAME  PGMR3PhysReadU64
     79#define PGMPHYSFN_WRITENAME PGMR3PhysWriteU64
     80#define PGMPHYS_DATASIZE    8
     81#define PGMPHYS_DATATYPE    uint64_t
    7882#include "PGMPhys.h"
    7983
  • trunk/src/VBox/VMM/PGMPhys.h

    r8155 r8626  
    11/* $Id$ */
    22/** @file
    3  * PGM - Page Manager and Monitor, Physical Memory Addressing.
     3 * PGM - Page Manager and Monitor, Physical Memory Access Template.
    44 */
    55
  • trunk/src/recompiler/VBoxREMWrapper.cpp

    r8217 r8626  
    644644    { REMPARMDESC_FLAGS_INT,        sizeof(uint8_t), NULL }
    645645};
    646 static const REMPARMDESC g_aArgsPGMGetGuestMode[] = 
     646static const REMPARMDESC g_aArgsPGMGetGuestMode[] =
    647647{
    648648    { REMPARMDESC_FLAGS_INT,        sizeof(PVM), NULL },
     
    10611061    { "PGMChangeMode",                          (void *)(uintptr_t)&PGMChangeMode,                  &g_aArgsPGMChangeMode[0],                   ELEMENTS(g_aArgsPGMChangeMode),                     REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
    10621062    { "PGMFlushTLB",                            (void *)(uintptr_t)&PGMFlushTLB,                    &g_aArgsPGMFlushTLB[0],                     ELEMENTS(g_aArgsPGMFlushTLB),                       REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
    1063     { "PGMR3PhysReadByte",                      (void *)(uintptr_t)&PGMR3PhysReadByte,              &g_aArgsPGMR3PhysReadUxx[0],                ELEMENTS(g_aArgsPGMR3PhysReadUxx),                  REMFNDESC_FLAGS_RET_INT,    sizeof(uint8_t),    NULL },
    1064     { "PGMR3PhysReadDword",                     (void *)(uintptr_t)&PGMR3PhysReadDword,             &g_aArgsPGMR3PhysReadUxx[0],                ELEMENTS(g_aArgsPGMR3PhysReadUxx),                  REMFNDESC_FLAGS_RET_INT,    sizeof(uint32_t),   NULL },
    1065     { "PGMR3PhysReadWord",                      (void *)(uintptr_t)&PGMR3PhysReadWord,              &g_aArgsPGMR3PhysReadUxx[0],                ELEMENTS(g_aArgsPGMR3PhysReadUxx),                  REMFNDESC_FLAGS_RET_INT,    sizeof(uint16_t),   NULL },
    1066     { "PGMR3PhysWriteByte",                     (void *)(uintptr_t)&PGMR3PhysWriteByte,             &g_aArgsPGMR3PhysWriteU8[0],                ELEMENTS(g_aArgsPGMR3PhysWriteU8),                  REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
    1067     { "PGMR3PhysWriteDword",                    (void *)(uintptr_t)&PGMR3PhysWriteDword,            &g_aArgsPGMR3PhysWriteU32[0],               ELEMENTS(g_aArgsPGMR3PhysWriteU32),                 REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
    1068     { "PGMR3PhysWriteWord",                     (void *)(uintptr_t)&PGMR3PhysWriteWord,             &g_aArgsPGMR3PhysWriteU16[0],               ELEMENTS(g_aArgsPGMR3PhysWriteU16),                 REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
     1063    { "PGMR3PhysReadU8",                        (void *)(uintptr_t)&PGMR3PhysReadU8,                &g_aArgsPGMR3PhysReadUxx[0],                ELEMENTS(g_aArgsPGMR3PhysReadUxx),                  REMFNDESC_FLAGS_RET_INT,    sizeof(uint8_t),    NULL },
     1064    { "PGMR3PhysReadU16",                       (void *)(uintptr_t)&PGMR3PhysReadU16,               &g_aArgsPGMR3PhysReadUxx[0],                ELEMENTS(g_aArgsPGMR3PhysReadUxx),                  REMFNDESC_FLAGS_RET_INT,    sizeof(uint16_t),   NULL },
     1065    { "PGMR3PhysReadU32",                       (void *)(uintptr_t)&PGMR3PhysReadU32,               &g_aArgsPGMR3PhysReadUxx[0],                ELEMENTS(g_aArgsPGMR3PhysReadUxx),                  REMFNDESC_FLAGS_RET_INT,    sizeof(uint32_t),   NULL },
     1066    { "PGMR3PhysReadU64",                       (void *)(uintptr_t)&PGMR3PhysReadU64,               &g_aArgsPGMR3PhysReadUxx[0],                ELEMENTS(g_aArgsPGMR3PhysReadUxx),                  REMFNDESC_FLAGS_RET_INT,    sizeof(uint64_t),   NULL },
     1067    { "PGMR3PhysWriteU8",                       (void *)(uintptr_t)&PGMR3PhysWriteU8,               &g_aArgsPGMR3PhysWriteU8[0],                ELEMENTS(g_aArgsPGMR3PhysWriteU8),                  REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
     1068    { "PGMR3PhysWriteU16",                      (void *)(uintptr_t)&PGMR3PhysWriteU16,              &g_aArgsPGMR3PhysWriteU16[0],               ELEMENTS(g_aArgsPGMR3PhysWriteU16),                 REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
     1069    { "PGMR3PhysWriteU32",                      (void *)(uintptr_t)&PGMR3PhysWriteU32,              &g_aArgsPGMR3PhysWriteU32[0],               ELEMENTS(g_aArgsPGMR3PhysWriteU32),                 REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
     1070    { "PGMR3PhysWriteU64",                      (void *)(uintptr_t)&PGMR3PhysWriteU64,              &g_aArgsPGMR3PhysWriteU64[0],               ELEMENTS(g_aArgsPGMR3PhysWriteU32),                 REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
    10691071    { "SSMR3GetGCPtr",                          (void *)(uintptr_t)&SSMR3GetGCPtr,                  &g_aArgsSSMR3GetGCPtr[0],                   ELEMENTS(g_aArgsSSMR3GetGCPtr),                     REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
    10701072    { "SSMR3GetMem",                            (void *)(uintptr_t)&SSMR3GetMem,                    &g_aArgsSSMR3GetMem[0],                     ELEMENTS(g_aArgsSSMR3GetMem),                       REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
  • trunk/src/recompiler/VBoxRecompiler.c

    r8217 r8626  
    19031903    pVM->rem.s.Env.kernelgsbase = pCtx->msrKERNELGSBASE;
    19041904#endif
    1905     /* Note that FS_BASE & GS_BASE are already synced; QEmu keeps them in the hidden selector registers. 
     1905    /* Note that FS_BASE & GS_BASE are already synced; QEmu keeps them in the hidden selector registers.
    19061906     * So we basically assume the hidden registers are in sync with these MSRs (vt-x & amd-v). Correct??
    19071907     */
     
    29332933    STAM_PROFILE_ADV_START(&gStatMemRead, a);
    29342934    VBOX_CHECK_ADDR(SrcGCPhys);
    2935     val = PGMR3PhysReadByte(cpu_single_env->pVM, SrcGCPhys);
     2935    val = PGMR3PhysReadU8(cpu_single_env->pVM, SrcGCPhys);
    29362936    STAM_PROFILE_ADV_STOP(&gStatMemRead, a);
    29372937    return val;
     
    29492949    STAM_PROFILE_ADV_START(&gStatMemRead, a);
    29502950    VBOX_CHECK_ADDR(SrcGCPhys);
    2951     val = PGMR3PhysReadByte(cpu_single_env->pVM, SrcGCPhys);
     2951    val = PGMR3PhysReadU8(cpu_single_env->pVM, SrcGCPhys);
    29522952    STAM_PROFILE_ADV_STOP(&gStatMemRead, a);
    29532953    return val;
     
    29652965    STAM_PROFILE_ADV_START(&gStatMemRead, a);
    29662966    VBOX_CHECK_ADDR(SrcGCPhys);
    2967     val = PGMR3PhysReadWord(cpu_single_env->pVM, SrcGCPhys);
     2967    val = PGMR3PhysReadU16(cpu_single_env->pVM, SrcGCPhys);
    29682968    STAM_PROFILE_ADV_STOP(&gStatMemRead, a);
    29692969    return val;
     
    29812981    STAM_PROFILE_ADV_START(&gStatMemRead, a);
    29822982    VBOX_CHECK_ADDR(SrcGCPhys);
    2983     val = PGMR3PhysReadWord(cpu_single_env->pVM, SrcGCPhys);
     2983    val = PGMR3PhysReadU16(cpu_single_env->pVM, SrcGCPhys);
    29842984    STAM_PROFILE_ADV_STOP(&gStatMemRead, a);
    29852985    return val;
     
    29972997    STAM_PROFILE_ADV_START(&gStatMemRead, a);
    29982998    VBOX_CHECK_ADDR(SrcGCPhys);
    2999     val = PGMR3PhysReadDword(cpu_single_env->pVM, SrcGCPhys);
     2999    val = PGMR3PhysReadU32(cpu_single_env->pVM, SrcGCPhys);
    30003000    STAM_PROFILE_ADV_STOP(&gStatMemRead, a);
    30013001    return val;
     
    30133013    STAM_PROFILE_ADV_START(&gStatMemRead, a);
    30143014    VBOX_CHECK_ADDR(SrcGCPhys);
    3015     val = PGMR3PhysReadDword(cpu_single_env->pVM, SrcGCPhys);
     3015    val = PGMR3PhysReadU32(cpu_single_env->pVM, SrcGCPhys);
    30163016    STAM_PROFILE_ADV_STOP(&gStatMemRead, a);
    30173017    return val;
     
    30293029    STAM_PROFILE_ADV_START(&gStatMemRead, a);
    30303030    VBOX_CHECK_ADDR(SrcGCPhys);
    3031     val =            PGMR3PhysReadDword(cpu_single_env->pVM, SrcGCPhys)
    3032         | ((uint64_t)PGMR3PhysReadDword(cpu_single_env->pVM, SrcGCPhys + 4) << 32); /** @todo fix me! */
     3031    val = PGMR3PhysReadU64(cpu_single_env->pVM, SrcGCPhys);
    30333032    STAM_PROFILE_ADV_STOP(&gStatMemRead, a);
    30343033    return val;
     
    30623061    STAM_PROFILE_ADV_START(&gStatMemWrite, a);
    30633062    VBOX_CHECK_ADDR(DstGCPhys);
    3064     PGMR3PhysWriteByte(cpu_single_env->pVM, DstGCPhys, val);
     3063    PGMR3PhysWriteU8(cpu_single_env->pVM, DstGCPhys, val);
    30653064    STAM_PROFILE_ADV_STOP(&gStatMemWrite, a);
    30663065}
     
    30773076    STAM_PROFILE_ADV_START(&gStatMemWrite, a);
    30783077    VBOX_CHECK_ADDR(DstGCPhys);
    3079     PGMR3PhysWriteWord(cpu_single_env->pVM, DstGCPhys, val);
     3078    PGMR3PhysWriteU16(cpu_single_env->pVM, DstGCPhys, val);
    30803079    STAM_PROFILE_ADV_STOP(&gStatMemWrite, a);
    30813080}
     
    30923091    STAM_PROFILE_ADV_START(&gStatMemWrite, a);
    30933092    VBOX_CHECK_ADDR(DstGCPhys);
    3094     PGMR3PhysWriteDword(cpu_single_env->pVM, DstGCPhys, val);
     3093    PGMR3PhysWriteU32(cpu_single_env->pVM, DstGCPhys, val);
    30953094    STAM_PROFILE_ADV_STOP(&gStatMemWrite, a);
    30963095}
     
    31073106    STAM_PROFILE_ADV_START(&gStatMemWrite, a);
    31083107    VBOX_CHECK_ADDR(DstGCPhys);
    3109     PGMR3PhysWriteDword(cpu_single_env->pVM, DstGCPhys, (uint32_t)val); /** @todo add U64 interface. */
    3110     PGMR3PhysWriteDword(cpu_single_env->pVM, DstGCPhys + 4, val >> 32);
     3108    PGMR3PhysWriteU64(cpu_single_env->pVM, DstGCPhys, val);
    31113109    STAM_PROFILE_ADV_STOP(&gStatMemWrite, a);
    31123110}
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