Page 1 of 1

Comments about UEFI, and UEFI Bare Bones, wiki articles

Posted: Fri Mar 22, 2019 7:14 pm
by osdevu6273
  1. UEFI article:
    TODO - I'd like to show a breakdown of a PE file containing a UEFI application here.
    Not sure what exactly the breakdown is meant to show. Yet both

    Code: Select all

    objdump --all-headers filename
    , and

    Code: Select all

    exiftool filename
    , will show a breakdown. In particular, they will show the type of the UEFI image. That is, the subsystem. exiftool is from https://sno.phy.queensu.ca/~phil/exiftool/
  2. UEFI Bare Bones article:
    I am only a beginner. Yet my little experience is that one detail is wrong. In hello.c, the message will stay on screen until the screen will be filled with more lines. Which it will not in this case. This is in contrast to the comment in the code. Therefore, I suggest the following:

    Code: Select all

    --- hello.c	2019-03-21 23:03:42.301082430 +0000
    +++ -	2019-03-23 00:54:09.103781868 +0000
    @@ -17,8 +17,7 @@
         if (EFI_ERROR(Status))
             return Status;
      
    -    /* Now wait for a keystroke before continuing, otherwise your
    -       message will flash off the screen before you see it.
    +    /* For demonstration purposes, wait for a keystroke before continuing.
      
            First, we need to empty the console input buffer to flush
            out any keystrokes entered before this point */
    

Re: Comments about UEFI, and UEFI Bare Bones, wiki articles

Posted: Mon Mar 25, 2019 10:55 am
by bzt
Hi,
osdevu6273 wrote:Not sure what exactly the breakdown is meant to show.
I believe just as you thought, a byte-by-byte description of a PE header with UEFI app subsystem id. Feel free to add that objdump output to the wiki.
osdevu6273 wrote:Yet my little experience is that one detail is wrong. In hello.c, the message will stay on screen until the screen will be filled with more lines.
Only if you start your app from the UEFI Shell. If you call it from the UEFI Boot Manager (as a normal OS loader), then as soon as it exists, the screen will be redrawn with the boot menu, and you can't read the output. I think that's what the author meant.

Cheers,
bzt