Changeset 5667 in vbox for trunk/include
- Timestamp:
- Nov 11, 2007 4:28:47 AM (17 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/dbgf.h
r5605 r5667 131 131 /** A flat address. */ 132 132 #define DBGFADDRESS_FLAGS_FLAT 3 133 /** A physical address. */ 134 #define DBGFADDRESS_FLAGS_PHYS 4 133 135 /** The address type mask. */ 134 #define DBGFADDRESS_FLAGS_TYPE_MASK 3136 #define DBGFADDRESS_FLAGS_TYPE_MASK 7 135 137 136 138 /** Set if the address is valid. */ 137 #define DBGFADDRESS_FLAGS_VALID RT_BIT( 2)139 #define DBGFADDRESS_FLAGS_VALID RT_BIT(3) 138 140 139 141 /** The address is within the hypervisor memoary area (HMA). 140 142 * If not set, the address can be assumed to be a guest address. */ 141 #define DBGFADDRESS_FLAGS_HMA RT_BIT( 3)143 #define DBGFADDRESS_FLAGS_HMA RT_BIT(4) 142 144 143 145 /** Checks if the mixed address is flat or not. */ 144 146 #define DBGFADDRESS_IS_FLAT(pAddress) ( ((pAddress)->fFlags & DBGFADDRESS_FLAGS_TYPE_MASK) == DBGFADDRESS_FLAGS_FLAT ) 147 /** Checks if the mixed address is flat or not. */ 148 #define DBGFADDRESS_IS_PHYS(pAddress) ( ((pAddress)->fFlags & DBGFADDRESS_FLAGS_TYPE_MASK) == DBGFADDRESS_FLAGS_PHYS ) 145 149 /** Checks if the mixed address is far 16:16 or not. */ 146 150 #define DBGFADDRESS_IS_FAR16(pAddress) ( ((pAddress)->fFlags & DBGFADDRESS_FLAGS_TYPE_MASK) == DBGFADDRESS_FLAGS_FAR16 ) … … 150 154 #define DBGFADDRESS_IS_FAR64(pAddress) ( ((pAddress)->fFlags & DBGFADDRESS_FLAGS_TYPE_MASK) == DBGFADDRESS_FLAGS_FAR64 ) 151 155 /** Checks if the mixed address is valid. */ 152 #define DBGFADDRESS_IS_VALID(pAddress) ( (pAddress)->fFlags & DBGFADDRESS_FLAGS_VALID ) 156 #define DBGFADDRESS_IS_VALID(pAddress) ( !!((pAddress)->fFlags & DBGFADDRESS_FLAGS_VALID) ) 157 /** Checks if the address is flagged as within the HMA. */ 158 #define DBGFADDRESS_IS_HMA(pAddress) ( !!((pAddress)->fFlags & DBGFADDRESS_FLAGS_HMA) ) 153 159 /** @} */ 154 160 … … 172 178 */ 173 179 DBGFR3DECL(void) DBGFR3AddrFromFlat(PVM pVM, PDBGFADDRESS pAddress, RTGCUINTPTR FlatPtr); 180 181 /** 182 * Creates a mixed address from a guest physical address. 183 * 184 * @param pVM The VM handle. 185 * @param pAddress Where to store the mixed address. 186 * @param PhysAddr The guest physical address. 187 */ 188 DBGFR3DECL(void) DBGFR3AddrFromPhys(PVM pVM, PDBGFADDRESS pAddress, RTGCPHYS PhysAddr); 174 189 175 190 /** -
trunk/include/VBox/err.h
r5513 r5667 224 224 /** The breakpoint already exists. */ 225 225 #define VINF_DBGF_BP_ALREADY_EXIST 1207 226 /** The byte string was not found. */ 227 #define VERR_DBGF_MEM_NOT_FOUND (-1208) 226 228 /** @} */ 227 229 -
trunk/include/VBox/pgm.h
r5040 r5667 810 810 /** 811 811 * Invalidates the GC page mapping TLB. 812 * 812 * 813 813 * @param pVM The VM handle. 814 814 */ … … 817 817 /** 818 818 * Invalidates the ring-0 page mapping TLB. 819 * 819 * 820 820 * @param pVM The VM handle. 821 821 */ … … 824 824 /** 825 825 * Invalidates the ring-3 page mapping TLB. 826 * 826 * 827 827 * @param pVM The VM handle. 828 828 */ 829 829 PDMDECL(void) PGMPhysInvalidatePageR3MapTLB(PVM pVM); 830 830 831 /** 831 /** 832 832 * Page mapping lock. 833 * 834 * @remarks This doesn't work in structures shared between 833 * 834 * @remarks This doesn't work in structures shared between 835 835 * ring-3, ring-0 and/or GC. 836 836 */ … … 857 857 * scarse resources (R0 and GC) in the mapping cache. When you're done 858 858 * with the page, call PGMPhysReleasePageMappingLock() ASAP to release it. 859 * 860 * This API will assume your intention is to write to the page, and will 861 * therefore replace shared and zero pages. If you do not intend to modify 859 * 860 * This API will assume your intention is to write to the page, and will 861 * therefore replace shared and zero pages. If you do not intend to modify 862 862 * the page, use the PGMPhysGCPhys2CCPtrReadOnly() API. 863 863 * … … 899 899 * @thread Any thread. 900 900 */ 901 PGMDECL(int) PGMPhysGCPhys2CCPtrReadOnly(PVM pVM, RTGCPHYS GCPhys, void * const*ppv, PPGMPAGEMAPLOCK pLock);901 PGMDECL(int) PGMPhysGCPhys2CCPtrReadOnly(PVM pVM, RTGCPHYS GCPhys, void const **ppv, PPGMPAGEMAPLOCK pLock); 902 902 903 903 /** … … 908 908 * with the page, call PGMPhysReleasePageMappingLock() ASAP to release it. 909 909 * 910 * This API will assume your intention is to write to the page, and will 911 * therefore replace shared and zero pages. If you do not intend to modify 910 * This API will assume your intention is to write to the page, and will 911 * therefore replace shared and zero pages. If you do not intend to modify 912 912 * the page, use the PGMPhysGCPtr2CCPtrReadOnly() API. 913 913 * … … 953 953 * @thread EMT 954 954 */ 955 PGMDECL(int) PGMPhysGCPtr2CCPtrReadOnly(PVM pVM, RTGCPTR GCPtr, void * const*ppv, PPGMPAGEMAPLOCK pLock);955 PGMDECL(int) PGMPhysGCPtr2CCPtrReadOnly(PVM pVM, RTGCPTR GCPtr, void const **ppv, PPGMPAGEMAPLOCK pLock); 956 956 957 957 /** 958 958 * Release the mapping of a guest page. 959 * 959 * 960 960 * This is the counter part of PGMPhysGCPhys2CCPtr, PGMPhysGCPhys2CCPtrReadOnly 961 961 * PGMPhysGCPtr2CCPtr and PGMPhysGCPtr2CCPtrReadOnly. … … 969 969 /** 970 970 * Checks if the lock structure is valid 971 * 971 * 972 972 * @param pVM The VM handle. 973 973 * @param pLock The lock structure initialized by the mapping function. … … 1311 1311 * @{ 1312 1312 */ 1313 /** 1313 /** 1314 1314 * Worker function for PGMR3PhysAllocateHandyPages and pgmPhysEnsureHandyPage. 1315 * 1315 * 1316 1316 * @returns The following VBox status codes. 1317 1317 * @retval VINF_SUCCESS on success. FF cleared. 1318 1318 * @retval VINF_EM_NO_MEMORY if we're out of memory. The FF is set in this case. 1319 * 1320 * @param pVM The VM handle. 1321 * 1319 * 1320 * @param pVM The VM handle. 1321 * 1322 1322 * @remarks Must be called from within the PGM critical section. 1323 1323 */ … … 1325 1325 1326 1326 /** @} */ 1327 #endif 1327 #endif 1328 1328 1329 1329 … … 1784 1784 /** 1785 1785 * For VMMCALLHOST_PGM_MAP_CHUNK, considered internal. 1786 * 1786 * 1787 1787 * @returns see pgmR3PhysChunkMap. 1788 1788 * @param pVM The VM handle. … … 1793 1793 /** 1794 1794 * Invalidates the TLB for the ring-3 mapping cache. 1795 * 1795 * 1796 1796 * @param pVM The VM handle. 1797 1797 */ … … 1800 1800 /** 1801 1801 * Response to VM_FF_PGM_NEED_HANDY_PAGES and VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES. 1802 * 1802 * 1803 1803 * @returns VBox status code. 1804 1804 * @retval VINF_SUCCESS on success. FF cleared. 1805 1805 * @retval VINF_EM_NO_MEMORY if we're out of memory. The FF is not cleared in this case. 1806 * 1806 * 1807 1807 * @param pVM The VM handle. 1808 1808 */ … … 1819 1819 1820 1820 /** 1821 * Converts a HC pointer to a GC physical address. 1822 * 1821 * Converts a HC pointer to a GC physical address. 1822 * 1823 1823 * Only for the debugger. 1824 1824 * … … 1826 1826 * @retval VINF_SUCCESS on success, *pGCPhys is set. 1827 1827 * @retval VERR_INVALID_POINTER if the pointer is not within the GC physical memory. 1828 * 1828 * 1829 1829 * @param pVM The VM handle. 1830 1830 * @param HCPtr The HC pointer to convert. … … 1840 1840 * @retval VERR_PGM_PHYS_PAGE_RESERVED it it's a valid GC physical page but has no physical backing. 1841 1841 * @retval VERR_INVALID_POINTER if the pointer is not within the GC physical memory. 1842 * 1842 * 1843 1843 * @param pVM The VM handle. 1844 1844 * @param HCPtr The HC pointer to convert. … … 1849 1849 /** 1850 1850 * Converts a HC physical address to a GC physical address. 1851 * 1851 * 1852 1852 * Only for the debugger. 1853 1853 * … … 1855 1855 * @retval VINF_SUCCESS on success, *pGCPhys is set. 1856 1856 * @retval VERR_INVALID_POINTER if the HC physical address is not within the GC physical memory. 1857 * 1857 * 1858 1858 * @param pVM The VM handle. 1859 1859 * @param HCPhys The HC physical address to convert. … … 1862 1862 PGMR3DECL(int) PGMR3DbgHCPhys2GCPhys(PVM pVM, RTHCPHYS HCPhys, PRTGCPHYS pGCPhys); 1863 1863 1864 /** 1865 * Scans guest physical memory for a byte string. 1866 * 1867 * Only for the debugger. 1868 * 1869 * @returns VBox status codes: 1870 * @retval VINF_SUCCESS and *pGCPtrHit on success. 1871 * @retval VERR_DBGF_MEM_NOT_FOUND if not found. 1872 * @retval VERR_INVALID_POINTER if any of the pointer arguments are invalid. 1873 * @retval VERR_INVALID_ARGUMENT if any other arguments are invalid. 1874 * 1875 * @param pVM Pointer to the shared VM structure. 1876 * @param GCPhys Where to start searching. 1877 * @param cbRange The number of bytes to search. Max 256 bytes. 1878 * @param pabNeedle The byte string to search for. 1879 * @param cbNeedle The length of the byte string. 1880 * @param pGCPhysHit Where to store the address of the first occurence on success. 1881 */ 1882 PDMR3DECL(int) PGMR3DbgScanPhysical(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cbRange, const uint8_t *pabNeedle, size_t cbNeedle, PRTGCPHYS pGCPhysHit); 1883 1884 /** 1885 * Scans virtual memory for a byte string. 1886 * 1887 * Only for the debugger. 1888 * 1889 * @returns VBox status codes: 1890 * @retval VINF_SUCCESS and *pGCPtrHit on success. 1891 * @retval VERR_DBGF_MEM_NOT_FOUND if not found. 1892 * @retval VERR_INVALID_POINTER if any of the pointer arguments are invalid. 1893 * @retval VERR_INVALID_ARGUMENT if any other arguments are invalid. 1894 * 1895 * @param pVM Pointer to the shared VM structure. 1896 * @param GCPtr Where to start searching. 1897 * @param cbRange The number of bytes to search. Max 256 bytes. 1898 * @param pabNeedle The byte string to search for. 1899 * @param cbNeedle The length of the byte string. 1900 * @param pGCPtrHit Where to store the address of the first occurence on success. 1901 */ 1902 PDMR3DECL(int) PGMR3DbgScanVirtual(PVM pVM, RTGCUINTPTR GCPtr, RTGCUINTPTR cbRange, const uint8_t *pabNeedle, size_t cbNeedle, PRTGCUINTPTR pGCPhysHit); 1903 1864 1904 /** @} */ 1865 1905
Note:
See TracChangeset
for help on using the changeset viewer.