Changeset 88407 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Apr 8, 2021 8:26:26 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp
r88406 r88407 841 841 842 842 /** 843 * Initializes read-writeregisters in the DMAR unit.843 * Initializes all registers in the DMAR unit. 844 844 * 845 845 * @param pDevIns The IOMMU device instance. 846 846 */ 847 static void dmarR3RegsInitMutable(PPDMDEVINS pDevIns) 848 { 849 NOREF(pDevIns); 847 static void dmarR3RegsInit(PPDMDEVINS pDevIns) 848 { 849 PDMAR pThis = PDMDEVINS_2_DATA(pDevIns, PDMAR); 850 RT_ZERO(pThis->abRegs0); 851 RT_ZERO(pThis->abRegs1); 852 853 /* Initialize immutable registers prior to other registers. */ 854 dmarR3RegsInitImmutable(pDevIns); 855 856 /* FECTL_REG */ 857 { 858 uint32_t const uReg = RT_BF_MAKE(VTD_BF_FECTL_REG_IM, 1); 859 dmarRegWriteRaw32(pThis, VTD_MMIO_OFF_FECTL_REG, uReg); 860 } 861 /* ICETL_REG */ 862 { 863 uint32_t const uReg = RT_BF_MAKE(VTD_BF_IECTL_REG_IM, 1); 864 dmarRegWriteRaw32(pThis, VTD_MMIO_OFF_IECTL_REG, uReg); 865 } 866 867 #ifdef VBOX_STRICT 868 uint64_t const fExtCap = dmarRegRead64(pThis, VTD_MMIO_OFF_ECAP_REG); 869 Assert(!RT_BF_GET(fExtCap, VTD_BF_ECAP_REG_PRS)); /* PECTL_REG - Reserved if don't support PRS. */ 870 Assert(!RT_BF_GET(fExtCap, VTD_BF_ECAP_REG_MTS)); /* MTRRCAP_REG - Reserved if we don't support MTS. */ 871 #endif 850 872 } 851 873 … … 987 1009 * Initialize all DMAR registers (order is important). 988 1010 */ 989 dmarR3RegsInitImmutable(pDevIns); 990 dmarR3RegsInitMutable(pDevIns); 1011 dmarR3RegsInit(pDevIns); 991 1012 992 1013 LogRel(("%s: Capabilities=%#RX64 Extended-Capabilities=%#RX64\n", DMAR_LOG_PFX, dmarRegRead64(pThis, VTD_MMIO_OFF_CAP_REG),
Note:
See TracChangeset
for help on using the changeset viewer.