Re: [edk2-devel] [PATCH v2] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt
On Thu, Aug 3, 2023 at 6:00 AM chitralekha ck wrote: > > https://bugzilla.tianocore.org/show_bug.cgi?id=4507 > AllocatePool limits to allocate memory of 64 KB at most in PEI Phase. > AllocatePool() is being avoided due to its 64k allocation size limit > when the library is incorporated into a PEI component. > > change the function debug string to __func__ > > Cc: Ray Ni > Cc: Zhichao Gao > Cc: Ashraf Ali S > Cc: Chinni B Duggapu > Signed-off-by: chitralekha ck ? Why are you resubmitting without addressing any of my feedback? https://edk2.groups.io/g/devel/message/107305 -- Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107530): https://edk2.groups.io/g/devel/message/107530 Mute This Topic: https://groups.io/mt/100520797/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt
Please don't mix the two changes in one patch. The two changes are: 1. change to use __func__ 2. AllocatePages > -Original Message- > From: Ck, Chitralekha > Sent: Thursday, August 3, 2023 1:00 PM > To: devel@edk2.groups.io > Cc: Ck, Chitralekha ; Ni, Ray ; > Gao, > Zhichao ; S, Ashraf Ali ; > Duggapu, Chinni B > Subject: [PATCH v2] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt > > https://bugzilla.tianocore.org/show_bug.cgi?id=4507 > AllocatePool limits to allocate memory of 64 KB at most in PEI Phase. > AllocatePool() is being avoided due to its 64k allocation size limit > when the library is incorporated into a PEI component. > > change the function debug string to __func__ > > Cc: Ray Ni > Cc: Zhichao Gao > Cc: Ashraf Ali S > Cc: Chinni B Duggapu > Signed-off-by: chitralekha ck > --- > .../Library/BaseBmpSupportLib/BmpSupportLib.c | 58 +++ > 1 file changed, 33 insertions(+), 25 deletions(-) > > diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > index c5e885d7a6..d0833a721f 100644 > --- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > +++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > @@ -52,7 +52,7 @@ const BMP_IMAGE_HEADER mBmpImageHeaderTemplate > = { > /** >Translate a *.BMP graphics image to a GOP blt buffer. If a NULL Blt buffer >is passed in a GopBlt buffer will be allocated by this routine using > - EFI_BOOT_SERVICES.AllocatePool(). If a GopBlt buffer is passed in it will > be > + EFI_BOOT_SERVICES.AllocatePages(). If a GopBlt buffer is passed in it will > be >used if it is big enough. > >@param[in] BmpImage Pointer to BMP file. > @@ -113,14 +113,14 @@ TranslateBmpToGopBlt ( >} > >if (BmpImageSize < sizeof (BMP_IMAGE_HEADER)) { > -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpImageSize too > small\n")); > +DEBUG ((DEBUG_ERROR, "%a: BmpImageSize too small\n", __func__)); > return RETURN_UNSUPPORTED; >} > >BmpHeader = (BMP_IMAGE_HEADER *)BmpImage; > >if ((BmpHeader->CharB != 'B') || (BmpHeader->CharM != 'M')) { > -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpHeader->Char fields > incorrect\n")); > +DEBUG ((DEBUG_ERROR, "%a: BmpHeader->Char fields incorrect\n", > __func__)); > return RETURN_UNSUPPORTED; >} > > @@ -128,12 +128,12 @@ TranslateBmpToGopBlt ( >// Doesn't support compress. >// >if (BmpHeader->CompressionType != 0) { > -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: Compression Type > unsupported.\n")); > +DEBUG ((DEBUG_ERROR, "%a: Compression Type unsupported\n", > __func__)); > return RETURN_UNSUPPORTED; >} > >if ((BmpHeader->PixelHeight == 0) || (BmpHeader->PixelWidth == 0)) { > -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpHeader->PixelHeight > or BmpHeader->PixelWidth is 0.\n")); > +DEBUG ((DEBUG_ERROR, "%a: BmpHeader PixelHeight or PixelWidth is 0\n", > __func__)); > return RETURN_UNSUPPORTED; >} > > @@ -144,7 +144,8 @@ TranslateBmpToGopBlt ( >if (BmpHeader->HeaderSize != sizeof (BMP_IMAGE_HEADER) - OFFSET_OF > (BMP_IMAGE_HEADER, HeaderSize)) { > DEBUG (( >DEBUG_ERROR, > - "TranslateBmpToGopBlt: BmpHeader->Headership is not as expected. > Headersize is 0x%x\n", > + "%a: BmpHeader->Headership is not as expected. Headersize is 0x%x\n", > + __func__, >BmpHeader->HeaderSize >)); > return RETURN_UNSUPPORTED; > @@ -161,7 +162,8 @@ TranslateBmpToGopBlt ( >if (EFI_ERROR (Status)) { > DEBUG (( >DEBUG_ERROR, > - "TranslateBmpToGopBlt: invalid BmpImage... PixelWidth:0x%x > BitPerPixel:0x%x\n", > + "%a: invalid BmpImage. PixelWidth:0x%x BitPerPixel:0x%x\n", > + __func__, >BmpHeader->PixelWidth, >BmpHeader->BitPerPixel >)); > @@ -172,7 +174,8 @@ TranslateBmpToGopBlt ( >if (EFI_ERROR (Status)) { > DEBUG (( >DEBUG_ERROR, > - "TranslateBmpToGopBlt: invalid BmpImage... DataSizePerLine:0x%x\n", > + "%a: invalid BmpImage. DataSizePerLine:0x%x\n", > + __func__, >DataSizePerLine >)); > > @@ -189,7 +192,8 @@ TranslateBmpToGopBlt ( >if (EFI_ERROR (Status)) { > DEBUG (( >DEBUG_ERROR, > - "TranslateBmpToGopBlt: invalid BmpImage... DataSizePerLine:0x%x > PixelHeight:0x%x\n", > + "%a: invalid BmpImage. DataSizePerLine:0x%x PixelHeight:0x%x\n", > + __func__, >DataSizePerLine, >BmpHeader->PixelHeight >)); > @@ -206,7 +210,8 @@ TranslateBmpToGopBlt ( >if (EFI_ERROR (Status)) { > DEBUG (( >DEBUG_ERROR, > - "TranslateBmpToGopBlt: invalid BmpImage... PixelHeight:0x%x > DataSizePerLine:0x%x\n", > + "%a: invalid BmpImage. PixelHeight:0x%x DataSizePerLine:0x%x\n", > + __func__, >BmpHeader->PixelHeight, >DataSizePerLine >)); > @@ -218,11 +223,11 @@ TranslateBmpToGopBlt (
[edk2-devel] [PATCH v2] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt
https://bugzilla.tianocore.org/show_bug.cgi?id=4507 AllocatePool limits to allocate memory of 64 KB at most in PEI Phase. AllocatePool() is being avoided due to its 64k allocation size limit when the library is incorporated into a PEI component. change the function debug string to __func__ Cc: Ray Ni Cc: Zhichao Gao Cc: Ashraf Ali S Cc: Chinni B Duggapu Signed-off-by: chitralekha ck --- .../Library/BaseBmpSupportLib/BmpSupportLib.c | 58 +++ 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c index c5e885d7a6..d0833a721f 100644 --- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c +++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c @@ -52,7 +52,7 @@ const BMP_IMAGE_HEADER mBmpImageHeaderTemplate = { /** Translate a *.BMP graphics image to a GOP blt buffer. If a NULL Blt buffer is passed in a GopBlt buffer will be allocated by this routine using - EFI_BOOT_SERVICES.AllocatePool(). If a GopBlt buffer is passed in it will be + EFI_BOOT_SERVICES.AllocatePages(). If a GopBlt buffer is passed in it will be used if it is big enough. @param[in] BmpImage Pointer to BMP file. @@ -113,14 +113,14 @@ TranslateBmpToGopBlt ( } if (BmpImageSize < sizeof (BMP_IMAGE_HEADER)) { -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpImageSize too small\n")); +DEBUG ((DEBUG_ERROR, "%a: BmpImageSize too small\n", __func__)); return RETURN_UNSUPPORTED; } BmpHeader = (BMP_IMAGE_HEADER *)BmpImage; if ((BmpHeader->CharB != 'B') || (BmpHeader->CharM != 'M')) { -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpHeader->Char fields incorrect\n")); +DEBUG ((DEBUG_ERROR, "%a: BmpHeader->Char fields incorrect\n", __func__)); return RETURN_UNSUPPORTED; } @@ -128,12 +128,12 @@ TranslateBmpToGopBlt ( // Doesn't support compress. // if (BmpHeader->CompressionType != 0) { -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: Compression Type unsupported.\n")); +DEBUG ((DEBUG_ERROR, "%a: Compression Type unsupported\n", __func__)); return RETURN_UNSUPPORTED; } if ((BmpHeader->PixelHeight == 0) || (BmpHeader->PixelWidth == 0)) { -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpHeader->PixelHeight or BmpHeader->PixelWidth is 0.\n")); +DEBUG ((DEBUG_ERROR, "%a: BmpHeader PixelHeight or PixelWidth is 0\n", __func__)); return RETURN_UNSUPPORTED; } @@ -144,7 +144,8 @@ TranslateBmpToGopBlt ( if (BmpHeader->HeaderSize != sizeof (BMP_IMAGE_HEADER) - OFFSET_OF (BMP_IMAGE_HEADER, HeaderSize)) { DEBUG (( DEBUG_ERROR, - "TranslateBmpToGopBlt: BmpHeader->Headership is not as expected. Headersize is 0x%x\n", + "%a: BmpHeader->Headership is not as expected. Headersize is 0x%x\n", + __func__, BmpHeader->HeaderSize )); return RETURN_UNSUPPORTED; @@ -161,7 +162,8 @@ TranslateBmpToGopBlt ( if (EFI_ERROR (Status)) { DEBUG (( DEBUG_ERROR, - "TranslateBmpToGopBlt: invalid BmpImage... PixelWidth:0x%x BitPerPixel:0x%x\n", + "%a: invalid BmpImage. PixelWidth:0x%x BitPerPixel:0x%x\n", + __func__, BmpHeader->PixelWidth, BmpHeader->BitPerPixel )); @@ -172,7 +174,8 @@ TranslateBmpToGopBlt ( if (EFI_ERROR (Status)) { DEBUG (( DEBUG_ERROR, - "TranslateBmpToGopBlt: invalid BmpImage... DataSizePerLine:0x%x\n", + "%a: invalid BmpImage. DataSizePerLine:0x%x\n", + __func__, DataSizePerLine )); @@ -189,7 +192,8 @@ TranslateBmpToGopBlt ( if (EFI_ERROR (Status)) { DEBUG (( DEBUG_ERROR, - "TranslateBmpToGopBlt: invalid BmpImage... DataSizePerLine:0x%x PixelHeight:0x%x\n", + "%a: invalid BmpImage. DataSizePerLine:0x%x PixelHeight:0x%x\n", + __func__, DataSizePerLine, BmpHeader->PixelHeight )); @@ -206,7 +210,8 @@ TranslateBmpToGopBlt ( if (EFI_ERROR (Status)) { DEBUG (( DEBUG_ERROR, - "TranslateBmpToGopBlt: invalid BmpImage... PixelHeight:0x%x DataSizePerLine:0x%x\n", + "%a: invalid BmpImage. PixelHeight:0x%x DataSizePerLine:0x%x\n", + __func__, BmpHeader->PixelHeight, DataSizePerLine )); @@ -218,11 +223,11 @@ TranslateBmpToGopBlt ( (BmpHeader->Size < BmpHeader->ImageOffset) || (BmpHeader->Size - BmpHeader->ImageOffset != DataSize)) { -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: invalid BmpImage... \n")); -DEBUG ((DEBUG_ERROR, " BmpHeader->Size: 0x%x\n", BmpHeader->Size)); -DEBUG ((DEBUG_ERROR, " BmpHeader->ImageOffset: 0x%x\n", BmpHeader->ImageOffset)); -DEBUG ((DEBUG_ERROR, " BmpImageSize: 0x%lx\n", (UINTN)BmpImageSize)); -DEBUG ((DEBUG_ERROR, " DataSize: 0x%lx\n", (UINTN)DataSize)); +DEBUG ((DEBUG_ERROR, "%a: invalid BmpImage... \n", __func__)); +DEBUG ((DEBUG_ERROR, " Size: 0x%x\n", BmpHeader->Size)); +
Re: [edk2-devel] [PATCH v2] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt
On Thu, Jul 27, 2023 at 4:40 PM chitralekha ck wrote: > > https://bugzilla.tianocore.org/show_bug.cgi?id=4507 > AllocatePool limits to allocate memory of 64 KB at most in PEI Phase. > AllocatePool() is being avoided due to its 64k allocation size limit > when the library is incorporated into a PEI component. > > change the function debug string to __func__ If you really want to change this (why??), change this separately (as another commit/patch), like Ard told you before. This patch should only have AllocatePool -> AllocatePages changes. > > Cc: Ray Ni > Cc: Zhichao Gao > Cc: Ashraf Ali S > Cc: Chinni B Duggapu > Signed-off-by: chitralekha ck > --- > .../Library/BaseBmpSupportLib/BmpSupportLib.c | 58 +++ > 1 file changed, 33 insertions(+), 25 deletions(-) > > diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > index c5e885d7a6..d0833a721f 100644 > --- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > +++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c > @@ -52,7 +52,7 @@ const BMP_IMAGE_HEADER mBmpImageHeaderTemplate = { > /** >Translate a *.BMP graphics image to a GOP blt buffer. If a NULL Blt buffer >is passed in a GopBlt buffer will be allocated by this routine using > - EFI_BOOT_SERVICES.AllocatePool(). If a GopBlt buffer is passed in it will > be > + EFI_BOOT_SERVICES.AllocatePages(). If a GopBlt buffer is passed in it will > be >used if it is big enough. > >@param[in] BmpImage Pointer to BMP file. > @@ -113,14 +113,14 @@ TranslateBmpToGopBlt ( >} > >if (BmpImageSize < sizeof (BMP_IMAGE_HEADER)) { > -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpImageSize too small\n")); > +DEBUG ((DEBUG_ERROR, "%a: BmpImageSize too small\n", __func__)); > return RETURN_UNSUPPORTED; >} > >BmpHeader = (BMP_IMAGE_HEADER *)BmpImage; > >if ((BmpHeader->CharB != 'B') || (BmpHeader->CharM != 'M')) { > -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpHeader->Char fields > incorrect\n")); > +DEBUG ((DEBUG_ERROR, "%a: BmpHeader->Char fields incorrect\n", > __func__)); > return RETURN_UNSUPPORTED; >} > > @@ -128,12 +128,12 @@ TranslateBmpToGopBlt ( >// Doesn't support compress. >// >if (BmpHeader->CompressionType != 0) { > -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: Compression Type > unsupported.\n")); > +DEBUG ((DEBUG_ERROR, "%a: Compression Type unsupported\n", __func__)); > return RETURN_UNSUPPORTED; >} > >if ((BmpHeader->PixelHeight == 0) || (BmpHeader->PixelWidth == 0)) { > -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpHeader->PixelHeight or > BmpHeader->PixelWidth is 0.\n")); > +DEBUG ((DEBUG_ERROR, "%a: BmpHeader PixelHeight or PixelWidth is 0\n", > __func__)); > return RETURN_UNSUPPORTED; >} > > @@ -144,7 +144,8 @@ TranslateBmpToGopBlt ( >if (BmpHeader->HeaderSize != sizeof (BMP_IMAGE_HEADER) - OFFSET_OF > (BMP_IMAGE_HEADER, HeaderSize)) { > DEBUG (( >DEBUG_ERROR, > - "TranslateBmpToGopBlt: BmpHeader->Headership is not as expected. > Headersize is 0x%x\n", > + "%a: BmpHeader->Headership is not as expected. Headersize is 0x%x\n", > + __func__, >BmpHeader->HeaderSize >)); > return RETURN_UNSUPPORTED; > @@ -161,7 +162,8 @@ TranslateBmpToGopBlt ( >if (EFI_ERROR (Status)) { > DEBUG (( >DEBUG_ERROR, > - "TranslateBmpToGopBlt: invalid BmpImage... PixelWidth:0x%x > BitPerPixel:0x%x\n", > + "%a: invalid BmpImage. PixelWidth:0x%x BitPerPixel:0x%x\n", > + __func__, >BmpHeader->PixelWidth, >BmpHeader->BitPerPixel >)); > @@ -172,7 +174,8 @@ TranslateBmpToGopBlt ( >if (EFI_ERROR (Status)) { > DEBUG (( >DEBUG_ERROR, > - "TranslateBmpToGopBlt: invalid BmpImage... DataSizePerLine:0x%x\n", > + "%a: invalid BmpImage. DataSizePerLine:0x%x\n", > + __func__, >DataSizePerLine >)); > > @@ -189,7 +192,8 @@ TranslateBmpToGopBlt ( >if (EFI_ERROR (Status)) { > DEBUG (( >DEBUG_ERROR, > - "TranslateBmpToGopBlt: invalid BmpImage... DataSizePerLine:0x%x > PixelHeight:0x%x\n", > + "%a: invalid BmpImage. DataSizePerLine:0x%x PixelHeight:0x%x\n", > + __func__, >DataSizePerLine, >BmpHeader->PixelHeight >)); > @@ -206,7 +210,8 @@ TranslateBmpToGopBlt ( >if (EFI_ERROR (Status)) { > DEBUG (( >DEBUG_ERROR, > - "TranslateBmpToGopBlt: invalid BmpImage... PixelHeight:0x%x > DataSizePerLine:0x%x\n", > + "%a: invalid BmpImage. PixelHeight:0x%x DataSizePerLine:0x%x\n", > + __func__, >BmpHeader->PixelHeight, >DataSizePerLine >)); > @@ -218,11 +223,11 @@ TranslateBmpToGopBlt ( >(BmpHeader->Size < BmpHeader->ImageOffset) || >(BmpHeader->Size - BmpHeader->ImageOffset != DataSize)) >{ > -DEBUG ((DEBUG_ERROR,
[edk2-devel] [PATCH v2] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt
https://bugzilla.tianocore.org/show_bug.cgi?id=4507 AllocatePool limits to allocate memory of 64 KB at most in PEI Phase. AllocatePool() is being avoided due to its 64k allocation size limit when the library is incorporated into a PEI component. change the function debug string to __func__ Cc: Ray Ni Cc: Zhichao Gao Cc: Ashraf Ali S Cc: Chinni B Duggapu Signed-off-by: chitralekha ck --- .../Library/BaseBmpSupportLib/BmpSupportLib.c | 58 +++ 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c index c5e885d7a6..d0833a721f 100644 --- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c +++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c @@ -52,7 +52,7 @@ const BMP_IMAGE_HEADER mBmpImageHeaderTemplate = { /** Translate a *.BMP graphics image to a GOP blt buffer. If a NULL Blt buffer is passed in a GopBlt buffer will be allocated by this routine using - EFI_BOOT_SERVICES.AllocatePool(). If a GopBlt buffer is passed in it will be + EFI_BOOT_SERVICES.AllocatePages(). If a GopBlt buffer is passed in it will be used if it is big enough. @param[in] BmpImage Pointer to BMP file. @@ -113,14 +113,14 @@ TranslateBmpToGopBlt ( } if (BmpImageSize < sizeof (BMP_IMAGE_HEADER)) { -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpImageSize too small\n")); +DEBUG ((DEBUG_ERROR, "%a: BmpImageSize too small\n", __func__)); return RETURN_UNSUPPORTED; } BmpHeader = (BMP_IMAGE_HEADER *)BmpImage; if ((BmpHeader->CharB != 'B') || (BmpHeader->CharM != 'M')) { -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpHeader->Char fields incorrect\n")); +DEBUG ((DEBUG_ERROR, "%a: BmpHeader->Char fields incorrect\n", __func__)); return RETURN_UNSUPPORTED; } @@ -128,12 +128,12 @@ TranslateBmpToGopBlt ( // Doesn't support compress. // if (BmpHeader->CompressionType != 0) { -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: Compression Type unsupported.\n")); +DEBUG ((DEBUG_ERROR, "%a: Compression Type unsupported\n", __func__)); return RETURN_UNSUPPORTED; } if ((BmpHeader->PixelHeight == 0) || (BmpHeader->PixelWidth == 0)) { -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: BmpHeader->PixelHeight or BmpHeader->PixelWidth is 0.\n")); +DEBUG ((DEBUG_ERROR, "%a: BmpHeader PixelHeight or PixelWidth is 0\n", __func__)); return RETURN_UNSUPPORTED; } @@ -144,7 +144,8 @@ TranslateBmpToGopBlt ( if (BmpHeader->HeaderSize != sizeof (BMP_IMAGE_HEADER) - OFFSET_OF (BMP_IMAGE_HEADER, HeaderSize)) { DEBUG (( DEBUG_ERROR, - "TranslateBmpToGopBlt: BmpHeader->Headership is not as expected. Headersize is 0x%x\n", + "%a: BmpHeader->Headership is not as expected. Headersize is 0x%x\n", + __func__, BmpHeader->HeaderSize )); return RETURN_UNSUPPORTED; @@ -161,7 +162,8 @@ TranslateBmpToGopBlt ( if (EFI_ERROR (Status)) { DEBUG (( DEBUG_ERROR, - "TranslateBmpToGopBlt: invalid BmpImage... PixelWidth:0x%x BitPerPixel:0x%x\n", + "%a: invalid BmpImage. PixelWidth:0x%x BitPerPixel:0x%x\n", + __func__, BmpHeader->PixelWidth, BmpHeader->BitPerPixel )); @@ -172,7 +174,8 @@ TranslateBmpToGopBlt ( if (EFI_ERROR (Status)) { DEBUG (( DEBUG_ERROR, - "TranslateBmpToGopBlt: invalid BmpImage... DataSizePerLine:0x%x\n", + "%a: invalid BmpImage. DataSizePerLine:0x%x\n", + __func__, DataSizePerLine )); @@ -189,7 +192,8 @@ TranslateBmpToGopBlt ( if (EFI_ERROR (Status)) { DEBUG (( DEBUG_ERROR, - "TranslateBmpToGopBlt: invalid BmpImage... DataSizePerLine:0x%x PixelHeight:0x%x\n", + "%a: invalid BmpImage. DataSizePerLine:0x%x PixelHeight:0x%x\n", + __func__, DataSizePerLine, BmpHeader->PixelHeight )); @@ -206,7 +210,8 @@ TranslateBmpToGopBlt ( if (EFI_ERROR (Status)) { DEBUG (( DEBUG_ERROR, - "TranslateBmpToGopBlt: invalid BmpImage... PixelHeight:0x%x DataSizePerLine:0x%x\n", + "%a: invalid BmpImage. PixelHeight:0x%x DataSizePerLine:0x%x\n", + __func__, BmpHeader->PixelHeight, DataSizePerLine )); @@ -218,11 +223,11 @@ TranslateBmpToGopBlt ( (BmpHeader->Size < BmpHeader->ImageOffset) || (BmpHeader->Size - BmpHeader->ImageOffset != DataSize)) { -DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: invalid BmpImage... \n")); -DEBUG ((DEBUG_ERROR, " BmpHeader->Size: 0x%x\n", BmpHeader->Size)); -DEBUG ((DEBUG_ERROR, " BmpHeader->ImageOffset: 0x%x\n", BmpHeader->ImageOffset)); -DEBUG ((DEBUG_ERROR, " BmpImageSize: 0x%lx\n", (UINTN)BmpImageSize)); -DEBUG ((DEBUG_ERROR, " DataSize: 0x%lx\n", (UINTN)DataSize)); +DEBUG ((DEBUG_ERROR, "%a: invalid BmpImage... \n", __func__)); +DEBUG ((DEBUG_ERROR, " Size: 0x%x\n", BmpHeader->Size)); +