Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When displaying a file, use knownguids to display its "name" in parens if there is no USER_INTERFACE #277

Open
rminnich opened this issue Jul 12, 2019 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rminnich
Copy link
Contributor

Sometimes companies leave out the EFI_SECTION_USER_INTERFACE section for files in the FV, so all we can see is the GUID (Hi Intel!). Equally bad, programs like UefiTool now transparently substitute names for known file GUIDs, so when you look at a ROM image with UEFITool and with utk they look very different, and you're not sure why.

It would be nice in table format if the print were changed as follows:

Before:

   File     F9D88642-0737-49BC-81B5-6889CD57D9EA      EFI_FV_FILETYPE_DRIVER                   0x3bba

After:

   File     F9D88642-0737-49BC-81B5-6889CD57D9EA      EFI_FV_FILETYPE_DRIVER                   0x3bba (name)

i.e. put the name in parens for each line. Further, it would be good to know if the name from from the EFI_SECTION_USER_INTERFACE or known GUIDS, maybe something like

File F9D88642-0737-49BC-81B5-6889CD57D9EA EFI_FV_FILETYPE_DRIVER 0x3bba (UI=Shell)

File F9D88642-0737-49BC-81B5-6889CD57D9EA EFI_FV_FILETYPE_DRIVER 0x3bba (KG=shell)

This would also make grepping for names easier:
utk wc_tiny_kernel.bin table|grep DRIVER

would show most of what we want: GUID, and name.

Finally, let's pretend that some IBV creates a file where the EFI_SECTION_USER_INTERFACE and known guid name differ -- it would be very nice to print something out too:

File F9D88642-0737-49BC-81B5-6889CD57D9EA EFI_FV_FILETYPE_DRIVER 0x3bba (UI=SomeStupidName,KG=Shell)

so we'd know things were a bit weird.

@rminnich rminnich added enhancement New feature or request good first issue Good for newcomers labels Jul 12, 2019
@GanShun
Copy link
Member

GanShun commented Jul 12, 2019

One way to do this is to add a Name function to File that returns two strings, one from KG, one from a UI section. The irritating bit is that the file name is not part of the file, but the section, and it can even be in a nested section and not a direct child of the file.

@rjoleary
Copy link
Member

We should also have a separate command called "uefi2english" which annotates GUIDs from stdin. For example:

$ echo "Starting F9D88642-0737-49BC-81B5-6889CD57D9EA..." | uefi2english
Starting F9D88642-0737-49BC-81B5-6889CD57D9EA (Shell)...

The command can also have an additional format argument (-f) to control formatting. For example:

$ echo "Starting F9D88642-0737-49BC-81B5-6889CD57D9EA..." | uefi2english -f "{{.Name}} ({{.GUID}})"
Starting Shell (F9D88642-0737-49BC-81B5-6889CD57D9EA)...

@NikolajSchlej
Copy link

@rminnich, you can do "File->Unload GUID database" in UEFITool and reopen the current image for it to not substitute GUIDs for names by default. I'll make an issue about having a checkbox like "View->BootGuard Markings" if somebody wants GUIDs to be visible by default instead of the names.

@ALL, please create issues in UEFITool's repo if you don't like something about the changes made, have ideas about improving the UI, or for any other reason, we'll appreciate your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants