Changeset 108794 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
- Timestamp:
- Mar 31, 2025 11:31:09 AM (2 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168237
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-164365 /vendor/edk2/current 103735-103757,103769-103776,129194-168232
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
r101291 r108794 1112 1112 VOID *AllocAddress; 1113 1113 1114 MemType = EFI_MEMORY_XP; 1115 1114 1116 if (HostAddress == NULL) { 1115 1117 return EFI_INVALID_PARAMETER; … … 1153 1155 // type supported by the region. 1154 1156 // 1155 MemType = EFI_MEMORY_WC;1157 MemType |= EFI_MEMORY_WC; 1156 1158 } else { 1157 MemType = EFI_MEMORY_UC;1159 MemType |= EFI_MEMORY_UC; 1158 1160 } 1159 1161 … … 1172 1174 // 1173 1175 InsertHeadList (&Dev->UncachedAllocationList, &Alloc->List); 1176 1177 // 1178 // Ensure that EFI_MEMORY_XP is in the capability set 1179 // 1180 if ((GcdDescriptor.Capabilities & EFI_MEMORY_XP) != EFI_MEMORY_XP) { 1181 Status = gDS->SetMemorySpaceCapabilities ( 1182 (PHYSICAL_ADDRESS)(UINTN)AllocAddress, 1183 EFI_PAGES_TO_SIZE (Pages), 1184 GcdDescriptor.Capabilities | EFI_MEMORY_XP 1185 ); 1186 1187 // if we were to fail setting the capability, this would indicate an internal failure of the GCD code. We should 1188 // assert here to let a platform know something went crazy, but for a release build we can let the allocation occur 1189 // without the EFI_MEMORY_XP bit set, as that was the existing behavior 1190 if (EFI_ERROR (Status)) { 1191 DEBUG (( 1192 DEBUG_ERROR, 1193 "%a failed to set EFI_MEMORY_XP capability on 0x%llx for length 0x%llx. Attempting to allocate without XP set.\n", 1194 __func__, 1195 AllocAddress, 1196 EFI_PAGES_TO_SIZE (Pages) 1197 )); 1198 1199 ASSERT_EFI_ERROR (Status); 1200 1201 MemType &= ~EFI_MEMORY_XP; 1202 } 1203 } 1174 1204 1175 1205 Status = gDS->SetMemorySpaceAttributes (
Note:
See TracChangeset
for help on using the changeset viewer.