VirtualBox

Changeset 108791 in vbox for trunk/include


Ignore:
Timestamp:
Mar 28, 2025 9:58:31 PM (3 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168226
Message:

VMM/IEM: More ARM target work. jiraref:VBP-1598

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pgm.h

    r108444 r108791  
    580580 * attributes as well as a myriade of feature dependent field interpretations.
    581581 *
    582  * The stage 1 effective access attributes are placed in bits 47:32, with some
    583  * room reserved for new stuff. A set of leaf bits are copied raw, but NSE had
    584  * to be shifted down due to nG confusion.
     582 * The stage 1 effective access attributes are placed in bits 41:32.  A set of
     583 * leaf bits are copied raw, but NSE had to be shifted down due to nG confusion.
    585584 *
    586585 * The stage 2 effective access attributes are placed in bit 31:24.  Bits taken
     
    641640#define PGM_PTATTRS_S2_TL1_SHIFT                    30
    642641#define PGM_PTATTRS_S2_TL1_MASK                     RT_BIT_64(PGM_PTATTRS_S2_TL1_SHIFT)
     642/** Stage 2: Device memory type. */
     643#define PGM_PTATTRS_S2_DEVICE_SHIFT                 31
     644#define PGM_PTATTRS_S2_DEVICE_MASK                  RT_BIT_64(PGM_PTATTRS_S2_DEVICE_SHIFT)
    643645
    644646/** Stage 1: Privileged read access. */
     
    654656#define PGM_PTATTRS_PGCS_SHIFT                      35
    655657#define PGM_PTATTRS_PGCS_MASK                       RT_BIT_64(PGM_PTATTRS_PGCS_SHIFT)
     658/** Stage 1:  Unprivileged read access. */
     659#define PGM_PTATTRS_UR_SHIFT                        36
     660#define PGM_PTATTRS_UR_MASK                         RT_BIT_64(PGM_PTATTRS_UR_SHIFT)
     661/** Stage 1:  Unprivileged write access. */
     662#define PGM_PTATTRS_UW_SHIFT                        37
     663#define PGM_PTATTRS_UW_MASK                         RT_BIT_64(PGM_PTATTRS_UW_SHIFT)
     664/** Stage 1:  Unprivileged execute access. */
     665#define PGM_PTATTRS_UX_SHIFT                        38
     666#define PGM_PTATTRS_UX_MASK                         RT_BIT_64(PGM_PTATTRS_UX_SHIFT)
     667/** Stage 1:  Unprivileged guarded control stack (GCS) access. */
     668#define PGM_PTATTRS_UGCS_SHIFT                      39
     669#define PGM_PTATTRS_UGCS_MASK                       RT_BIT_64(PGM_PTATTRS_UGCS_SHIFT)
    656670/** Stage 1:  Privileged write-implies-no-execute access.
    657671 * @todo not sure if we need expose this bit.  */
    658 #define PGM_PTATTRS_PWXN_SHIFT                      36
     672#define PGM_PTATTRS_PWXN_SHIFT                      40
    659673#define PGM_PTATTRS_PWXN_MASK                       RT_BIT_64(PGM_PTATTRS_PWXN_SHIFT)
    660 
    661 /** Stage 1:  Unprivileged read access. */
    662 #define PGM_PTATTRS_UR_SHIFT                        40
    663 #define PGM_PTATTRS_UR_MASK                         RT_BIT_64(PGM_PTATTRS_UR_SHIFT)
    664 /** Stage 1:  Unprivileged write access. */
    665 #define PGM_PTATTRS_UW_SHIFT                        41
    666 #define PGM_PTATTRS_UW_MASK                         RT_BIT_64(PGM_PTATTRS_UW_SHIFT)
    667 /** Stage 1:  Unprivileged execute access. */
    668 #define PGM_PTATTRS_UX_SHIFT                        42
    669 #define PGM_PTATTRS_UX_MASK                         RT_BIT_64(PGM_PTATTRS_UX_SHIFT)
    670 /** Stage 1:  Unprivileged guarded control stack (GCS) access. */
    671 #define PGM_PTATTRS_UGCS_SHIFT                      43
    672 #define PGM_PTATTRS_UGCS_MASK                       RT_BIT_64(PGM_PTATTRS_UGCS_SHIFT)
    673674/** Stage 1:  Unprivileged write-implies-no-execute access.
    674675 * @todo not sure if we need expose this bit. */
    675 #define PGM_PTATTRS_UWXN_SHIFT                      44
     676#define PGM_PTATTRS_UWXN_SHIFT                      41
    676677#define PGM_PTATTRS_UWXN_MASK                       RT_BIT_64(PGM_PTATTRS_UWXN_SHIFT)
     678/** Stage 1: Device memory type. */
     679#define PGM_PTATTRS_DEVICE_SHIFT                    42
     680#define PGM_PTATTRS_DEVICE_MASK                     RT_BIT_64(PGM_PTATTRS_DEVICE_SHIFT)
    677681
    678682/** Page/block level: Guarded page */
     
    916920/** The query is for a user mode access, so don't set leaf A or D bits
    917921 * unless the effective access allows usermode access.
    918  * Assume supervisor access when not set. */
     922 * Assume supervisor (priveleged) access when not set. */
    919923#define PGMQPAGE_F_USER_MODE    RT_BIT_32(3)
    920 /** Treat CR0.WP as zero when evalutating the access.
     924#if defined( VBOX_VMM_TARGET_X86) || defined(DOXYGEN_RUNNING)
     925/** X86: Treat CR0.WP as zero when evalutating the access.
    921926 * @note Same value as X86_CR0_WP.  */
    922 #define PGMQPAGE_F_CR0_WP0      RT_BIT_32(16)
     927# define PGMQPAGE_F_CR0_WP0     RT_BIT_32(16)
     928#endif
     929/** @todo ARM: security, s2, GCS, ++ */
    923930/** The valid flag mask.   */
    924 #define PGMQPAGE_F_VALID_MASK   UINT32_C(0x0001000f)
     931#if defined( VBOX_VMM_TARGET_X86) || defined(DOXYGEN_RUNNING)
     932# define PGMQPAGE_F_VALID_MASK  UINT32_C(0x0001000f)
     933#else
     934# define PGMQPAGE_F_VALID_MASK  UINT32_C(0x0000000f)
     935#endif
    925936/** @} */
    926937VMM_INT_DECL(int)   PGMGstQueryPageFast(PVMCPUCC pVCpu, RTGCPTR GCPtr, uint32_t fFlags, PPGMPTWALKFAST pWalkFast);
     
    11921203/** @name Flags returned by PGMPhysIemGCPhys2PtrNoLock
    11931204 * @{ */
    1194 #define PGMIEMGCPHYS2PTR_F_NO_WRITE     RT_BIT_32(3)    /**< Not writable (IEMTLBE_F_PG_NO_WRITE). */
    1195 #define PGMIEMGCPHYS2PTR_F_NO_READ      RT_BIT_32(4)    /**< Not readable (IEMTLBE_F_PG_NO_READ). */
    1196 #define PGMIEMGCPHYS2PTR_F_NO_MAPPINGR3 RT_BIT_32(8)    /**< No ring-3 mapping (IEMTLBE_F_NO_MAPPINGR3). */
    1197 #define PGMIEMGCPHYS2PTR_F_UNASSIGNED   RT_BIT_32(9)    /**< Unassgined memory (IEMTLBE_F_PG_UNASSIGNED). */
    1198 #define PGMIEMGCPHYS2PTR_F_CODE_PAGE    RT_BIT_32(10)    /**< Write monitored IEM code page (IEMTLBE_F_PG_CODE_PAGE). */
     1205/** @def PGMIEMGCPHYS2PTR_F_NO_WRITE
     1206 * Not writable (IEMTLBE_F_PG_NO_WRITE). */
     1207/** @def PGMIEMGCPHYS2PTR_F_NO_READ
     1208 * Not readable (IEMTLBE_F_PG_NO_READ). */
     1209/** @def PGMIEMGCPHYS2PTR_F_NO_MAPPINGR3
     1210 * No ring-3 mapping (IEMTLBE_F_NO_MAPPINGR3). */
     1211/** @def PGMIEMGCPHYS2PTR_F_UNASSIGNED
     1212 * Unassigned memory (IEMTLBE_F_PG_UNASSIGNED). */
     1213/** @def PGMIEMGCPHYS2PTR_F_CODE_PAGE
     1214 * Write monitored IEM code page (IEMTLBE_F_PG_CODE_PAGE). */
     1215#if defined(VBOX_VMM_TARGET_X86) || defined(DOXYGEN_RUNNING)
     1216# define PGMIEMGCPHYS2PTR_F_NO_WRITE     RT_BIT_32(3)
     1217# define PGMIEMGCPHYS2PTR_F_NO_READ      RT_BIT_32(4)
     1218# define PGMIEMGCPHYS2PTR_F_NO_MAPPINGR3 RT_BIT_32(8)
     1219# define PGMIEMGCPHYS2PTR_F_UNASSIGNED   RT_BIT_32(9)
     1220# define PGMIEMGCPHYS2PTR_F_CODE_PAGE    RT_BIT_32(10)
     1221#elif defined(VBOX_VMM_TARGET_ARMV8)
     1222# define PGMIEMGCPHYS2PTR_F_NO_READ      RT_BIT_32(13)
     1223# define PGMIEMGCPHYS2PTR_F_NO_WRITE     RT_BIT_32(14)
     1224# define PGMIEMGCPHYS2PTR_F_NO_MAPPINGR3 RT_BIT_32(15)
     1225# define PGMIEMGCPHYS2PTR_F_UNASSIGNED   RT_BIT_32(16)
     1226# define PGMIEMGCPHYS2PTR_F_CODE_PAGE    RT_BIT_32(17)
     1227#endif
    11991228/** @} */
    12001229
  • trunk/include/iprt/armv8.h

    r108702 r108791  
    12541254# define ARMV8_TCR_EL1_AARCH64_SH0_INNER_SHAREABLE              3
    12551255/** Bit 14 - 15 - Translation Granule Size for TTBR0_EL1. */
    1256 #define ARMV8_TCR_EL1_AARCH64_TG0                               (RT_BIT_64(14) | RT_BIT_64(15))
    1257 #define ARMV8_TCR_EL1_AARCH64_TG0_GET(a_Tcr)                    (((a_Tcr) & ARMV8_TCR_EL1_AARCH64_TG0) >> 14)
     1256#define ARMV8_TCR_EL1_AARCH64_TG0_MASK                          (RT_BIT_64(14) | RT_BIT_64(15))
     1257#define ARMV8_TCR_EL1_AARCH64_TG0_SHIFT                         14
     1258#define ARMV8_TCR_EL1_AARCH64_TG0                               ARMV8_TCR_EL1_AARCH64_TG0_MASK
     1259#define ARMV8_TCR_EL1_AARCH64_TG0_GET(a_Tcr)                    (((a_Tcr) & ARMV8_TCR_EL1_AARCH64_TG0) >> ARMV8_TCR_EL1_AARCH64_TG0_SHIFT)
    12581260/** Invalid granule size. */
    12591261# define ARMV8_TCR_EL1_AARCH64_TG0_INVALID                      0
    1260 /** 16KiB granule size. */
     1262/** 16KiB granule size (shifted down). */
    12611263# define ARMV8_TCR_EL1_AARCH64_TG0_16KB                         1
    1262 /** 4KiB granule size. */
     1264/** 4KiB granule size (shifted down). */
    12631265# define ARMV8_TCR_EL1_AARCH64_TG0_4KB                          2
    1264 /** 64KiB granule size. */
     1266/** 64KiB granule size (shifted down). */
    12651267# define ARMV8_TCR_EL1_AARCH64_TG0_64KB                         3
    12661268/** Bit 16 - 21 - Size offset of the memory region addressed by TTBR1_EL1 (2^(64-T1SZ)). */
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