Skip to content

Commit

Permalink
Updated logic to allocate more data once it needs to query memory map (
Browse files Browse the repository at this point in the history
…#547)

## Description

This change updates the logic to allocate 1KB extra data for the
subsequent GetMemoryMap function call to avoid once and done failure in
the test app.

Fixes microsoft/mu_tiano_platforms#1017.

- [x] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [x] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

This was tested on QEMU Q35 and verified fixed the original issue.

## Integration Instructions

N/A
  • Loading branch information
kuqin12 authored Aug 11, 2024
1 parent a962688 commit cf4b663
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,8 @@ InitializeTestEnvironment (
return EFI_UNSUPPORTED;
}

// Allocate extra memory in case this allocation caused the memory to change.
MapSize += SIZE_1KB;
EfiMemoryMap = AllocateZeroPool (MapSize);
if (!EfiMemoryMap) {
return EFI_OUT_OF_RESOURCES;
Expand Down

0 comments on commit cf4b663

Please sign in to comment.