Re: [edk2-devel] [PATCH] EmbeddedPkg/PrePiMemoryAllocationLib: Add check for space on offset allocation

2022-09-07 Thread Jeff Brasen via groups.io
I'll post another version to fix the formatting issue in a bit, but before the patch the issue was we applied the alignment offset before we did a space check. -Jeff > -Original Message- > From: Ard Biesheuvel > Sent: Wednesday, September 7, 2022 2:34 AM > To: Jeff Brasen > Cc: devel@

Re: [edk2-devel] [PATCH] EmbeddedPkg/PrePiMemoryAllocationLib: Add check for space on offset allocation

2022-09-07 Thread Ard Biesheuvel
On Thu, 30 Jun 2022 at 21:06, Jeff Brasen wrote: > > Update check for enough space to occur prior to alignment offset. > This prevents cases where EfiFreeMemoryTop < EfiFreeMemoryBottom. > So prior to this patch, we would - check for enough space - apply the alignment - potentially exceed the ava

[edk2-devel] [PATCH] EmbeddedPkg/PrePiMemoryAllocationLib: Add check for space on offset allocation

2022-06-30 Thread Jeff Brasen via groups.io
Update check for enough space to occur prior to alignment offset. This prevents cases where EfiFreeMemoryTop < EfiFreeMemoryBottom. Signed-off-by: Jeff Brasen --- .../MemoryAllocationLib.c | 53 +++ 1 file changed, 30 insertions(+), 23 deletions(-) di