Lines Matching defs:NextResourceHob

263   EFI_HOB_RESOURCE_DESCRIPTOR        *NextResourceHob;
274 NextResourceHob = NULL;
322 NextResourceHob = NextHob.ResourceDescriptor;
324 // test if range described in this NextResourceHob is system memory and have the same attribute.
327 if (NextResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY &&
328 (((NextResourceHob->ResourceAttribute^ResourceHob->ResourceAttribute)&(~EFI_RESOURCE_ATTRIBUTE_TESTED)) == 0)){
331 // See if the memory range described in ResourceHob and NextResourceHob is adjacent
333 if ((ResourceHob->PhysicalStart <= NextResourceHob->PhysicalStart &&
334 ResourceHob->PhysicalStart + ResourceHob->ResourceLength >= NextResourceHob->PhysicalStart)||
335 (ResourceHob->PhysicalStart >= NextResourceHob->PhysicalStart&&
336 ResourceHob->PhysicalStart <= NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength)) {
338 MemoryRangeEnd = ((ResourceHob->PhysicalStart + ResourceHob->ResourceLength)>(NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength)) ?
339 (ResourceHob->PhysicalStart + ResourceHob->ResourceLength):(NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength);
341 ResourceHob->PhysicalStart = (ResourceHob->PhysicalStart < NextResourceHob->PhysicalStart) ?
342 ResourceHob->PhysicalStart : NextResourceHob->PhysicalStart;
349 // Delete the NextResourceHob by marking it as unused.
374 NextResourceHob = NextHob.ResourceDescriptor;
378 if (NextResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY && NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength > MAX_ADDRESS) {
384 if (MemoryHob->AllocDescriptor.MemoryBaseAddress >= NextResourceHob->PhysicalStart &&
385 MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength <= NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength) {
389 if (MemoryHob->AllocDescriptor.MemoryBaseAddress > NextResourceHob->PhysicalStart) {
392 NextResourceHob->ResourceAttribute,
393 NextResourceHob->PhysicalStart,
394 (MemoryHob->AllocDescriptor.MemoryBaseAddress - NextResourceHob->PhysicalStart)
397 if (MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength < NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength) {
400 NextResourceHob->ResourceAttribute,
402 (NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength -(MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength))
405 NextResourceHob->PhysicalStart = MemoryHob->AllocDescriptor.MemoryBaseAddress;
406 NextResourceHob->ResourceLength = MemoryHob->AllocDescriptor.MemoryLength;