home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 4,037 of 4,255   
   wolfgang kern to James Harris   
   Re: Q1-4: in UEFI boot basics   
   03 Dec 23 11:06:37   
   
   From: nowhere@never.at   
      
   On 02/12/2023 13:11, James Harris wrote:   
      
   >>> That said, there are some standard locations, most notably   
   >>   
   >>>    /efi/boot/   
   >>   
   >> is this folder tree mandatory or just convenient ?   
   >   
   > According to   
   >   
   >    https://wiki.osdev.org/UEFI   
   >   
   > Bootable UEFI applications   
   >   
   > The boot order NVRAM variables determine where firmware will look for   
   > UEFI applications to be launched at boot. Although this can be changed   
   > (for example, an OS installer might customize the boot entry for the   
   > hard drive to which it was installed) firmware typically looks for a   
   > UEFI application named "BOOTIA32.efi" (for 32-bit applications) or   
   > "BOOTX64.efi" (for 64-bit applications) stored in the "/EFI/BOOT" path   
   > in the boot device's file system. This is the default path and name for   
   > OVMF.   
      
   OK, it may be mandatory. But you know me, I'm a revolutioneer and always   
   try to overrule "reported" needs and get rid of all useless stuff.   
   I let you know how it works on real hardware when I'm there.   
      
   >> [about relocation needs]   
   >>> Note, though, that in the previously posted disassembly the PE file   
   >>> appeared to do its own relocation.   
   >>   
   >> you mean the RIP here?  so it has no relocation table?   
   >   
   > No, remember the very start of the disassembly (at label _start) began with   
   >   
   > 0000000000002030 <_start>:   
   >      2030:    48 83 ec 08              sub    rsp,0x8   
   >      2034:    51                       push     
   rcx   
   >      2035:    52                       push     
   rdx   
   >      2036:    48 8d 3d c3 df ff ff     lea   
   > rdi,[rip+0xffffffffffffdfc3]    # 0 <_text-0x2000>   
   >      203d:    48 8d 35 bc 2f 00 00     lea    rsi   
   [rip+0x2fbc]        #   
   > 5000 <_DYNAMIC>   
   >      2044:    59                       pop      
   rcx   
   >      2045:    5a                       pop      
   rdx   
   >      2046:    51                       push     
   rcx   
   >      2047:    52                       push     
   rdx   
   >      2048:    e8 13 00 00 00           call   2060   
   <_relocate>   
   >   
   > which sure sounds like it's doing its own relocation rather than UEFI   
   > firmware doing the relocation.   
   >   
   > I haven't followed it through but it looks as though it is using the   
   > dynamic relocation section (_DYNAMIC) from the PE file.   
      
   so your PE contains a relocation table, how large is it ?   
   how would a relocation table look like if there is not a single   
   reference in it ?   
      
   I checked Herbert's PE, seems it's a 32 bit format w/o any relocation.   
   __   
   wolfgang   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca