soc/amd/common/pi: Fix issue in AGESA heap allocator
The heap allocator would try to split a buffer node that
was too small for another node. In the failing case, the buffer
node was 0x140 bytes and the requested size was 0x133 bytes.
The logic would check that there was room for the header and
buffer and try to split the buffer node. The buffer node header
is 0xC bytes, so 0x13F bytes are need. The problem is that it didn't
leave room for another node header and a little space for a buffer.
TEST= Boot grunt.
Signed-off-by: Marc Jones <firstname.lastname@example.org>
Tested-by: build bot (Jenkins) <email@example.com>
Reviewed-by: Martin Roth <firstname.lastname@example.org>
Reviewed-by: Daniel Kurtz <email@example.com>
2 files changed