Bruce Griffith (Bruce.Griffith@se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3250
-gerrit
commit 0f232d8691d040232fed5c5490f96efefd48e58b Author: Bruce Griffith Bruce.Griffith@se-eng.com Date: Wed May 15 23:31:56 2013 -0600
AMD Inagua: PlatformGnbPcie.c: Allocate exact needed size for buffer
The following commit
commit 05f3b117dd44776ed17bc57318f260766039b7e8 Author: Paul Menzel paulepanter@users.sourceforge.net Date: Tue May 14 09:28:26 2013 +0200
AMD Inagua: PlatformGnbPcie.c: Allocate exact needed size for buffer
Reviewed-on: http://review.coreboot.org/3246
Changed one calculation for the size of the array PortList[] to reflect only four elements, but neglected three additional calculations of the size of the same table.
Correct that by setting the size for four array elements in all four calculations.
[1] http://review.coreboot.org/#/c/3239/3/src/mainboard/amd/inagua/PlatformGnbPc...
Change-Id: Ib66b7b2b388d847888663e9eb6d1c8c9d50b9939 Reported-by: Bruce Griffith Bruce.Griffith@se-eng.com Signed-off-by: Bruce Griffith Bruce.Griffith@se-eng.com --- src/mainboard/amd/inagua/PlatformGnbPcie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mainboard/amd/inagua/PlatformGnbPcie.c b/src/mainboard/amd/inagua/PlatformGnbPcie.c index 20351ac..c1fc77f 100644 --- a/src/mainboard/amd/inagua/PlatformGnbPcie.c +++ b/src/mainboard/amd/inagua/PlatformGnbPcie.c @@ -126,7 +126,7 @@ OemCustomizeInitEarly ( AllocHeapParams.BufferPtr += sizeof (PCIe_COMPLEX_DESCRIPTOR); BrazosPciePortPtr = (PCIe_PORT_DESCRIPTOR *)AllocHeapParams.BufferPtr;
- AllocHeapParams.BufferPtr += sizeof (PCIe_PORT_DESCRIPTOR) * 5; + AllocHeapParams.BufferPtr += sizeof (PCIe_PORT_DESCRIPTOR) * 4; BrazosPcieDdiPtr = (PCIe_DDI_DESCRIPTOR *) AllocHeapParams.BufferPtr;
LibAmdMemFill (BrazosPcieComplexListPtr, @@ -136,7 +136,7 @@ OemCustomizeInitEarly (
LibAmdMemFill (BrazosPciePortPtr, 0, - sizeof (PCIe_PORT_DESCRIPTOR) * 5, + sizeof (PCIe_PORT_DESCRIPTOR) * 4, &InitEarly->StdHeader);
LibAmdMemFill (BrazosPcieDdiPtr, @@ -145,7 +145,7 @@ OemCustomizeInitEarly ( &InitEarly->StdHeader);
LibAmdMemCopy (BrazosPcieComplexListPtr, &Brazos, sizeof (PCIe_COMPLEX_DESCRIPTOR), &InitEarly->StdHeader); - LibAmdMemCopy (BrazosPciePortPtr, &PortList[0], sizeof (PCIe_PORT_DESCRIPTOR) * 5, &InitEarly->StdHeader); + LibAmdMemCopy (BrazosPciePortPtr, &PortList[0], sizeof (PCIe_PORT_DESCRIPTOR) * 4, &InitEarly->StdHeader); LibAmdMemCopy (BrazosPcieDdiPtr, &DdiList[0], sizeof (PCIe_DDI_DESCRIPTOR) *2, &InitEarly->StdHeader);