VirtualBox

Changeset 17251 in vbox for trunk/include


Ignore:
Timestamp:
Mar 2, 2009 1:55:31 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43584
Message:

VMM,REM,DevPcArch: VBOX_WITH_NEW_PHYS_CODE changes.

Location:
trunk/include/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/mm.h

    r14597 r17251  
    4444 */
    4545
     46#ifndef VBOX_WITH_NEW_PHYS_CODE
    4647/** @name RAM Page Flags
    4748 * Since internal ranges have a byte granularity it's possible for a
     
    5354 * @{
    5455 */
    55 #if 1
    5656/** Reserved - Not RAM, ROM nor MMIO2.
    5757 * If this bit is cleared the memory is assumed to be some kind of RAM.
     
    8282 */
    8383#define MM_RAM_FLAGS_MMIO2              RT_BIT(3)
    84 #endif
    85 
    86 #ifndef VBOX_WITH_NEW_PHYS_CODE
     84
    8785/** Physical backing memory is allocated dynamically. Not set implies a one time static allocation. */
    8886#define MM_RAM_FLAGS_DYNAMIC_ALLOC      RT_BIT(11)
    89 #endif /* !VBOX_WITH_NEW_PHYS_CODE */
    9087
    9188/** The shift used to get the reference count. */
     
    107104/** @} */
    108105
    109 #ifndef VBOX_WITH_NEW_PHYS_CODE
    110106/** @name MMR3PhysRegisterEx registration type
    111107 * @{
     
    121117} MMPHYSREG;
    122118/** @} */
    123 #endif
     119#endif /* !VBOX_WITH_NEW_PHYS_CODE */
    124120
    125121/**
     
    353349 * @ingroup grp_mm_r3
    354350 * @{ */
     351#ifndef VBOX_WITH_NEW_PHYS_CODE
    355352VMMR3DECL(int)      MMR3PhysRegister(PVM pVM, void *pvRam, RTGCPHYS GCPhys, unsigned cb, unsigned fFlags, const char *pszDesc);
    356 #ifndef VBOX_WITH_NEW_PHYS_CODE
    357353VMMR3DECL(int)      MMR3PhysRegisterEx(PVM pVM, void *pvRam, RTGCPHYS GCPhys, unsigned cb, unsigned fFlags, MMPHYSREG enmType, const char *pszDesc);
    358 #endif
    359354VMMR3DECL(int)      MMR3PhysRomRegister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, const void *pvBinary, bool fShadow, const char *pszDesc);
    360355VMMR3DECL(int)      MMR3PhysRomProtect(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange);
    361356VMMR3DECL(int)      MMR3PhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange, const char *pszDesc);
     357#endif
    362358VMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM);
    363359/** @} */
  • trunk/include/VBox/pdmdev.h

    r16021 r17251  
    4141#include <VBox/cfgm.h>
    4242#include <VBox/dbgf.h>
    43 #include <VBox/mm.h>
     43#ifndef VBOX_WITH_NEW_PHYS_CODE
     44# include <VBox/mm.h>
     45#endif
    4446#include <VBox/err.h>
    4547#include <VBox/pci.h>
     
    26602662
    26612663    /**
    2662      * Write protects a shadow ROM mapping.
    2663      *
    2664      * This is intented for use by the system BIOS or by the device that
    2665      * employs a shadow ROM BIOS, so that the shadow ROM mapping can be
    2666      * write protected once the POST is over.
     2664     * Changes the protection of shadowed ROM mapping.
     2665     *
     2666     * This is intented for use by the system BIOS, chipset or device in question to
     2667     * change the protection of shadowed ROM code after init and on reset.
    26672668     *
    26682669     * @param   pDevIns     Device instance.
    2669      * @param   GCPhysStart Where the shadow ROM mapping starts.
    2670      * @param   cbRange     The size of the shadow ROM mapping.
    2671      */
    2672     DECLR3CALLBACKMEMBER(int, pfnROMProtectShadow,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange));
     2670     * @param   GCPhysStart Where the mapping starts.
     2671     * @param   cbRange     The size of the mapping.
     2672     * @param   enmProt     The new protection type.
     2673     */
     2674    DECLR3CALLBACKMEMBER(int, pfnROMProtectShadow,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, PGMROMPROT enmProt));
    26732675
    26742676    /**
     
    32943296 * @copydoc PDMDEVHLPR3::pfnROMProtectShadow
    32953297 */
    3296 DECLINLINE(int) PDMDevHlpROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange)
    3297 {
    3298     return pDevIns->pDevHlpR3->pfnROMProtectShadow(pDevIns, GCPhysStart, cbRange);
     3298DECLINLINE(int) PDMDevHlpROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, PGMROMPROT enmProt)
     3299{
     3300    return pDevIns->pDevHlpR3->pfnROMProtectShadow(pDevIns, GCPhysStart, cbRange, enmProt);
    32993301}
    33003302
     
    35113513}
    35123514
     3515#ifndef VBOX_WITH_NEW_PHYS_CODE
    35133516/**
    35143517 * @copydoc PDMDEVHLPR3::pfnPhysReserve
     
    35183521    return pDevIns->pDevHlpR3->pfnPhysReserve(pDevIns, GCPhys, cbRange, pszDesc);
    35193522}
     3523#endif
    35203524
    35213525/**
  • trunk/include/VBox/pgm.h

    r17134 r17251  
    273273 */
    274274#define PGMMODE_IS_LONG_MODE(enmMode) ((enmMode) == PGMMODE_AMD64_NX || (enmMode) == PGMMODE_AMD64)
    275 
    276 /**
    277  * The current ROM page protection.
    278  */
    279 typedef enum PGMROMPROT
    280 {
    281     /** The customary invalid value. */
    282     PGMROMPROT_INVALID = 0,
    283     /** Read from the virgin ROM page, ignore writes.
    284      * Map the virgin page, use write access handler to ignore writes. */
    285     PGMROMPROT_READ_ROM_WRITE_IGNORE,
    286     /** Read from the virgin ROM page, write to the shadow RAM.
    287      * Map the virgin page, use write access handler change the RAM. */
    288     PGMROMPROT_READ_ROM_WRITE_RAM,
    289     /** Read from the shadow ROM page, ignore writes.
    290      * Map the shadow page read-only, use write access handler to ignore writes. */
    291     PGMROMPROT_READ_RAM_WRITE_IGNORE,
    292     /** Read from the shadow ROM page, ignore writes.
    293      * Map the shadow page read-write, disabled write access handler. */
    294     PGMROMPROT_READ_RAM_WRITE_RAM,
    295     /** The end of valid values. */
    296     PGMROMPROT_END,
    297     /** The usual 32-bit type size hack. */
    298     PGMROMPROT_32BIT_HACK = 0x7fffffff
    299 } PGMROMPROT;
    300275
    301276/**
  • trunk/include/VBox/rem.h

    r13832 r17251  
    8282#endif
    8383REMR3DECL(void) REMR3NotifyPhysRomRegister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb, void *pvCopy, bool fShadow);
    84 REMR3DECL(void) REMR3NotifyPhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cb);
     84REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb);
    8585REMR3DECL(void) REMR3NotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler);
    8686REMR3DECL(void) REMR3NotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS cb, bool fHasHCHandler, bool fRestoreAsRAM);
  • trunk/include/VBox/types.h

    r17136 r17251  
    543543typedef PDMDATASEG const *PCPDMDATASEG;
    544544
     545
     546/**
     547 * The current ROM page protection.
     548 */
     549typedef enum PGMROMPROT
     550{
     551    /** The customary invalid value. */
     552    PGMROMPROT_INVALID = 0,
     553    /** Read from the virgin ROM page, ignore writes.
     554     * Map the virgin page, use write access handler to ignore writes. */
     555    PGMROMPROT_READ_ROM_WRITE_IGNORE,
     556    /** Read from the virgin ROM page, write to the shadow RAM.
     557     * Map the virgin page, use write access handler change the RAM. */
     558    PGMROMPROT_READ_ROM_WRITE_RAM,
     559    /** Read from the shadow ROM page, ignore writes.
     560     * Map the shadow page read-only, use write access handler to ignore writes. */
     561    PGMROMPROT_READ_RAM_WRITE_IGNORE,
     562    /** Read from the shadow ROM page, ignore writes.
     563     * Map the shadow page read-write, disabled write access handler. */
     564    PGMROMPROT_READ_RAM_WRITE_RAM,
     565    /** The end of valid values. */
     566    PGMROMPROT_END,
     567    /** The usual 32-bit type size hack. */
     568    PGMROMPROT_32BIT_HACK = 0x7fffffff
     569} PGMROMPROT;
     570
     571
    545572/** @} */
    546573
Note: See TracChangeset for help on using the changeset viewer.

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