* Help with Logo Display Problems
@ 2020-05-10 3:00 jim slaughter
2020-05-11 16:41 ` [edk2-devel] " Laszlo Ersek
2020-05-11 18:27 ` Andrew Fish
0 siblings, 2 replies; 6+ messages in thread
From: jim slaughter @ 2020-05-10 3:00 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
Hello,
I have followed previous directions provided and the build works ok. I
built an IA32 generic binary.
I cannot tell if the logo code is working since I cannot see the logo on my
display.
I do see a file in
the ~/src/edk2-stable202002/Build/MdeModule/DEBUG_GCC5/IA32/$ directory,
called LogoDxe.efi and another called LogoDxe. This leads me to
believe that the Logo entry point is in the image.
After the build I did find an empty map file? How do I get a map of the
build?
How do I debug this problem? I have no debugger. Can I freely use
DEBUG((...........)); .
Any help please. I am stuck. Thank you.
--
Jim Slaughter
[-- Attachment #2: Type: text/html, Size: 903 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] Help with Logo Display Problems
2020-05-10 3:00 Help with Logo Display Problems jim slaughter
@ 2020-05-11 16:41 ` Laszlo Ersek
2020-05-11 17:12 ` jim slaughter
[not found] ` <160E089A62B6865C.18245@groups.io>
2020-05-11 18:27 ` Andrew Fish
1 sibling, 2 replies; 6+ messages in thread
From: Laszlo Ersek @ 2020-05-11 16:41 UTC (permalink / raw)
To: devel, jim.slaughter
On 05/10/20 05:00, jim slaughter wrote:
> Hello,
>
> I have followed previous directions provided and the build works ok. I
> built an IA32 generic binary.
> I cannot tell if the logo code is working since I cannot see the logo on my
> display.
>
> I do see a file in
> the ~/src/edk2-stable202002/Build/MdeModule/DEBUG_GCC5/IA32/$ directory,
> called LogoDxe.efi and another called LogoDxe. This leads me to
> believe that the Logo entry point is in the image.
>
> After the build I did find an empty map file? How do I get a map of the
> build?
>
> How do I debug this problem? I have no debugger. Can I freely use
> DEBUG((...........)); .
>
> Any help please. I am stuck. Thank you.
>
Does your PlatformBootManagerLib instance call BootLogoEnableLogo() in
PlatformBootManagerAfterConsole()?
Thanks,
Laszlo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] Help with Logo Display Problems
2020-05-11 16:41 ` [edk2-devel] " Laszlo Ersek
@ 2020-05-11 17:12 ` jim slaughter
[not found] ` <160E089A62B6865C.18245@groups.io>
1 sibling, 0 replies; 6+ messages in thread
From: jim slaughter @ 2020-05-11 17:12 UTC (permalink / raw)
To: Laszlo Ersek; +Cc: devel
[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]
Hello,
I do not know. Will look into this.
Is this call, BootLogoEnableLogo(), normally in the code?
I have not added any code in this area.
Jim S.
;
On Mon, May 11, 2020 at 11:41 AM Laszlo Ersek <lersek@redhat.com> wrote:
> On 05/10/20 05:00, jim slaughter wrote:
> > Hello,
> >
> > I have followed previous directions provided and the build works ok. I
> > built an IA32 generic binary.
> > I cannot tell if the logo code is working since I cannot see the logo on
> my
> > display.
> >
> > I do see a file in
> > the ~/src/edk2-stable202002/Build/MdeModule/DEBUG_GCC5/IA32/$ directory,
> > called LogoDxe.efi and another called LogoDxe. This leads me to
> > believe that the Logo entry point is in the image.
> >
> > After the build I did find an empty map file? How do I get a map of the
> > build?
> >
> > How do I debug this problem? I have no debugger. Can I freely use
> > DEBUG((...........)); .
> >
> > Any help please. I am stuck. Thank you.
> >
>
> Does your PlatformBootManagerLib instance call BootLogoEnableLogo() in
> PlatformBootManagerAfterConsole()?
>
> Thanks,
> Laszlo
>
>
--
Jim Slaughter
[-- Attachment #2: Type: text/html, Size: 1739 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] Help with Logo Display Problems
[not found] ` <160E089A62B6865C.18245@groups.io>
@ 2020-05-11 18:04 ` jim slaughter
2020-05-11 21:26 ` Laszlo Ersek
0 siblings, 1 reply; 6+ messages in thread
From: jim slaughter @ 2020-05-11 18:04 UTC (permalink / raw)
To: devel, jim slaughter; +Cc: Laszlo Ersek
[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]
Hello,
Yes BootLogoEnableLogo() appears in several files and is not commented out.
Files:
PlatformBm.c
BdsPlatform.c
BootLogoLib.c
BootLogoLib.h
PlatformBm.c
Jim Slaughter
;
On Mon, May 11, 2020 at 12:12 PM jim slaughter via groups.io <jim.slaughter=
sage-micro.com@groups.io> wrote:
> Hello,
>
> I do not know. Will look into this.
>
> Is this call, BootLogoEnableLogo(), normally in the code?
> I have not added any code in this area.
>
> Jim S.
> ;
>
> On Mon, May 11, 2020 at 11:41 AM Laszlo Ersek <lersek@redhat.com> wrote:
>
>> On 05/10/20 05:00, jim slaughter wrote:
>> > Hello,
>> >
>> > I have followed previous directions provided and the build works ok. I
>> > built an IA32 generic binary.
>> > I cannot tell if the logo code is working since I cannot see the logo
>> on my
>> > display.
>> >
>> > I do see a file in
>> > the ~/src/edk2-stable202002/Build/MdeModule/DEBUG_GCC5/IA32/$ directory,
>> > called LogoDxe.efi and another called LogoDxe. This leads me to
>> > believe that the Logo entry point is in the image.
>> >
>> > After the build I did find an empty map file? How do I get a map of the
>> > build?
>> >
>> > How do I debug this problem? I have no debugger. Can I freely use
>> > DEBUG((...........)); .
>> >
>> > Any help please. I am stuck. Thank you.
>> >
>>
>> Does your PlatformBootManagerLib instance call BootLogoEnableLogo() in
>> PlatformBootManagerAfterConsole()?
>>
>> Thanks,
>> Laszlo
>>
>>
>
> --
> Jim Slaughter
>
>
>
--
Jim Slaughter
[-- Attachment #2: Type: text/html, Size: 2964 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] Help with Logo Display Problems
2020-05-10 3:00 Help with Logo Display Problems jim slaughter
2020-05-11 16:41 ` [edk2-devel] " Laszlo Ersek
@ 2020-05-11 18:27 ` Andrew Fish
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Fish @ 2020-05-11 18:27 UTC (permalink / raw)
To: devel, jim slaughter
[-- Attachment #1: Type: text/plain, Size: 8225 bytes --]
Jim,
Sorry wrote this yesterday and did not hit send....
All my example are from OVMF using QEMU on a Mac. You should be able to run OVMF too as a way to learn things.
> On May 9, 2020, at 8:00 PM, jim slaughter <jim.slaughter@sage-micro.com> wrote:
>
> Hello,
>
> I have followed previous directions provided and the build works ok. I built an IA32 generic binary.
> I cannot tell if the logo code is working since I cannot see the logo on my display.
>
> I do see a file in the ~/src/edk2-stable202002/Build/MdeModule/DEBUG_GCC5/IA32/$ directory, called LogoDxe.efi and another called LogoDxe. This leads me to believe that the Logo entry point is in the image.
>
So that means it got built.
> After the build I did find an empty map file? How do I get a map of the build?
>
You can generate a build log by adding '-y build.log' to the build command. Here is a OVMF example [1].
If you just want to inspect a FD or FV (Firmware Device is the ROM image composed of Firmware Volumes and other bits). Here is an OVMF example. Here is an OVMF example [2].
> How do I debug this problem? I have no debugger. Can I freely use DEBUG((...........)); .
>
In general yes. The DEBUG_ERROR level should always print out.
You should see this in the serial output when the driver loads:
Loading driver at 0x00007ABE000 EntryPoint=0x00007AC02BB LogoDxe.efi
It failed for me as Xcode currently does not support injecting resource sections in to PE/COFF images. I'm just mention this as I can't show you the expected output, but your toolchain should do the right thing.
HII Image Package with logo not found in PE/COFF resource section
Error: Image at 00007ABE000 start failed: Unsupported
But that brings up the point of what LogoDxe is doing. If we look at the driver entry point, called InitializeLogo [3], it does the following:
1) Locates some Hii protocols
2) Grabes the gEfiHiiPackageListProtocolGuid from the drivers image handle.
a) The logo.bmp file was injected into the resource section of the PE/COFF image and this data is made availible when the driver loads.
3) Puts the Logo (Hii Package List) into the Hii database
4) Publishes a protocol (API) that has a member function that returns the logo.
So loading the LogoDxe driver just publishes an API that lets some one else grab a logo.
OK so lets take a look [4].
1) When the gEdkiiPlatformLogoProtocolGuid is installed you should see something like this on the serial log (XXX is me being lazy and it will be upper case):
InstallProtocolInterface: 53cd299f-2bc1-11D2-40c0-XXXXXXXX 721C040
2) Looks like the consumer of gEdkiiPlatformLogoProtocolGuid is BootLogoLib. It looks like BootLogoEnableLogo() does the magic.
a) BootLogoEnableLogo() is called from the PlatformBootManagerLib [5]
b) So lets see who is using that lib [6].
c) It looks like PlatformBootManagerAfterConsole() calls BootLogoEnableLogo ().
d) And that is called from BdsEntry().
The BDS driver loads earlier in the boot process, but the BdsEntry is only called after all the drivers have dispatched. So look for this in the serial output to see when BdsEntry() is called :
[Bds] Entry..
The other thing to look out for is there can be more than one copy of a library [7]. You platforms *.DSC file picks the library instance your platform is using [8]. In the lingo the Library Class is the definition of the API, the public .h file, and the Library Instance is which library you chose to use.
> Any help please. I am stuck. Thank you.
[1] build -p OvmfPkg/OvmfPkgX64.dsc -a X64 -t XCODE5 -y build.log
[2] VolInfo Build/OvmfX64/DEBUG_XCODE5/FV/OVMF_CODE.fd
[3] If look in LogoDxe.inf you will see `ENTRY_POINT = InitializeLogo` and this is how we find the entry point of the driver.
[4] git grep -i gEdkiiPlatformLogoProtocolGuid
MdeModulePkg/Include/Protocol/PlatformLogo.h:65:extern EFI_GUID gEdkiiPlatformLogoProtocolGuid;
MdeModulePkg/Library/BootLogoLib/BootLogoLib.c:66: Status = gBS->LocateProtocol (&gEdkiiPlatformLogoProtocolGuid, NULL, (VOID **) &PlatformLogo);
MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf:49: gEdkiiPlatformLogoProtocolGuid ## CONSUMES
MdeModulePkg/Logo/Logo.c:148: &gEdkiiPlatformLogoProtocolGuid, &mPlatformLogo,
MdeModulePkg/Logo/LogoDxe.inf:49: gEdkiiPlatformLogoProtocolGuid ## PRODUCES
MdeModulePkg/MdeModulePkg.dec:570: gEdkiiPlatformLogoProtocolGuid = { 0x53cd299f, 0x2bc1, 0x40c0, { 0x8c, 0x07, 0x23, 0xf6, 0x4f, 0xdb, 0x30, 0xe0 } }
[5] git grep BootLogoEnableLogo
ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c:682: Status = BootLogoEnableLogo ();
ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c:814: BootLogoEnableLogo ();
EmulatorPkg/Library/PlatformBmLib/PlatformBm.c:270: BootLogoEnableLogo ();
MdeModulePkg/Include/Library/BootLogoLib.h:21:BootLogoEnableLogo (
MdeModulePkg/Library/BootLogoLib/BootLogoLib.c:34:BootLogoEnableLogo (
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c:1504: BootLogoEnableLogo ();
[6] git grep PlatformBootManagerLib -- *.inf | grep -v "=" | grep -v "#"
MdeModulePkg/Universal/BdsDxe/BdsDxe.inf:53: PlatformBootManagerLib
[7] git grep PlatformBootManagerLib | grep "LIBRARY_CLASS"
ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf:19: LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf:18: LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
EmulatorPkg/Library/PlatformBmLib/PlatformBmLib.inf:19: LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManagerLibNull.inf:16: LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf:15: LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf:15: LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
[8] git grep PlatformBootManagerLib -- *.dsc
ArmPkg/ArmPkg.dsc:141: ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
ArmVirtPkg/ArmVirtQemu.dsc:71: PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
ArmVirtPkg/ArmVirtQemuKernel.dsc:69: PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
ArmVirtPkg/ArmVirtXen.dsc:48: PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
EmulatorPkg/EmulatorPkg.dsc:95: PlatformBootManagerLib|EmulatorPkg/Library/PlatformBmLib/PlatformBmLib.inf
MdeModulePkg/MdeModulePkg.dsc:87: PlatformBootManagerLib|MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManagerLibNull.inf
MdeModulePkg/MdeModulePkg.dsc:305: MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManagerLibNull.inf
OvmfPkg/OvmfPkgIa32.dsc:362: PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
OvmfPkg/OvmfPkgIa32X64.dsc:366: PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
OvmfPkg/OvmfPkgX64.dsc:366: PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
OvmfPkg/OvmfXen.dsc:306: PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
SignedCapsulePkg/SignedCapsulePkg.dsc:84: PlatformBootManagerLib|MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManagerLibNull.inf
UefiPayloadPkg/UefiPayloadPkgIa32.dsc:179: PlatformBootManagerLib|UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc:180: PlatformBootManagerLib|UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
Thanks,
Andrew Fish
PS If we broke out BaseTools parser for edk2 build config files we could build a smart git grep. Something like:
$ edk2-git-grep -p OvmfPkg/OvmfPkgX64.dsc
Then you only see files that are used by your project.
> --
> Jim Slaughter
>
[-- Attachment #2: Type: text/html, Size: 38141 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] Help with Logo Display Problems
2020-05-11 18:04 ` jim slaughter
@ 2020-05-11 21:26 ` Laszlo Ersek
0 siblings, 0 replies; 6+ messages in thread
From: Laszlo Ersek @ 2020-05-11 21:26 UTC (permalink / raw)
To: jim slaughter, devel
On 05/11/20 20:04, jim slaughter wrote:
> Hello,
>
> Yes BootLogoEnableLogo() appears in several files and is not commented out.
>
> Files:
> PlatformBm.c
> BdsPlatform.c
> BootLogoLib.c
> BootLogoLib.h
> PlatformBm.c
That doesn't answer my question.
Does the PlatformBootManagerLib instance that is *specifically* linked
into BdsDxe in *your* firmware platform call BootLogoEnableLogo()?
Build your firmware with "--report-file=report.txt", and look up the
following part:
Module Name: BdsDxe
[...]
Module INF Path: MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
[...]
Library
[...]
<IMPORTANT-LINE-HERE>
{PlatformBootManagerLib: Time = ...ms}
The pathname just before the "PlatformBootManagerLib: Time" line gives
you the INF file path that is relevant. Check the C files listed in that
INF file, for a BootLogoEnableLogo() call. The call should be made in
PlatformBootManagerAfterConsole().
Thanks
Laszlo
>
> Jim Slaughter
> ;
>
> On Mon, May 11, 2020 at 12:12 PM jim slaughter via groups.io <jim.slaughter=
> sage-micro.com@groups.io> wrote:
>
>> Hello,
>>
>> I do not know. Will look into this.
>>
>> Is this call, BootLogoEnableLogo(), normally in the code?
>> I have not added any code in this area.
>>
>> Jim S.
>> ;
>>
>> On Mon, May 11, 2020 at 11:41 AM Laszlo Ersek <lersek@redhat.com> wrote:
>>
>>> On 05/10/20 05:00, jim slaughter wrote:
>>>> Hello,
>>>>
>>>> I have followed previous directions provided and the build works ok. I
>>>> built an IA32 generic binary.
>>>> I cannot tell if the logo code is working since I cannot see the logo
>>> on my
>>>> display.
>>>>
>>>> I do see a file in
>>>> the ~/src/edk2-stable202002/Build/MdeModule/DEBUG_GCC5/IA32/$ directory,
>>>> called LogoDxe.efi and another called LogoDxe. This leads me to
>>>> believe that the Logo entry point is in the image.
>>>>
>>>> After the build I did find an empty map file? How do I get a map of the
>>>> build?
>>>>
>>>> How do I debug this problem? I have no debugger. Can I freely use
>>>> DEBUG((...........)); .
>>>>
>>>> Any help please. I am stuck. Thank you.
>>>>
>>>
>>> Does your PlatformBootManagerLib instance call BootLogoEnableLogo() in
>>> PlatformBootManagerAfterConsole()?
>>>
>>> Thanks,
>>> Laszlo
>>>
>>>
>>
>> --
>> Jim Slaughter
>>
>>
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-11 21:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-10 3:00 Help with Logo Display Problems jim slaughter
2020-05-11 16:41 ` [edk2-devel] " Laszlo Ersek
2020-05-11 17:12 ` jim slaughter
[not found] ` <160E089A62B6865C.18245@groups.io>
2020-05-11 18:04 ` jim slaughter
2020-05-11 21:26 ` Laszlo Ersek
2020-05-11 18:27 ` Andrew Fish
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox