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 3,991 of 4,255    |
|    wolfgang kern to James Harris    |
|    Re: Q1-4: in UEFI boot basics    |
|    27 Nov 23 23:43:26    |
      From: nowhere@never.at              On 27/11/2023 16:31, James Harris wrote:              > For boot manager see section 3.       OK.       > Status codes such as we might receive or we might pass back to EFI are       > documented in appendix D.       OK.       ...       >> Yes, I'm not enough familiar with NASM so it may take me a few hours       >> to learn that too, or just get a clue of what all must be in the       >> UEFI.bin.              >> UEFI comes with C-libraries ?       >> I'd delete them immediate :)              > I agree. The reloc library code is not wanted.              > That said, AISI I don't need it at present because my own code is       > position-independent but if I ever need to have non-PIC code then some       > form of PE-reloc code would be necessary.              My code was/is always position independent w/o self-relocation needs       because I know what goes where by using my brain instead of guessing       what assembler/compiler might do.       So I use immediate constants rather than dynamic RIP addressing.              >>> Does the disassembly answer your remaining questions?       >> it may make me raise more questions later :)       > :-)       Questions may come soon :)              =========================================       >>>>> struc efi_systab ;UEFI system table       >>>>> .hdr: resb efi_hdr_size       >>>>> .fvend: resq 1 ;FirmwareVendor       >>>>> .frev: resd 1 ;FirmwareRevision       >>>>> resd 1 ;padding       >>>>> .coninh: resq 1 ;ConsoleInHandle       >>>>> .conin: resq 1 ;ConIn       >>>>> .conouth: resq 1 ;ConsoleOutHandle       >>>>> .conout: resq 1 ;ConOut       >>>>> endstruc       >>       >>>>> The header is       >>>>       >>>>> struc efi_hdr ;Generic header       >>>>> .Signature: resq 1       >>>>> .Revision: resd 1       >>>>> .HeaderSize: resd 1       >>>>> .CRC32: resd 1       >>>>> resd 1 ;reserved       >>>>> endstruc       >>       >> I try to convert the above: (pointed to by RDX)       >> efi_systab:       >> 000 dq ptr to efi_header       >> 008 dq STR16ptr to FirmwareVendor ;UTF16       >> 010 d FirmwareRevision       >> 014 d 0000_0000       >> 018 dq handle for ConsoleIN       >> 020 dq ptr tp ConsoleIN       >> 028 dq handle for ConsoleOut       >> 030 dq ptr to ConsoleOUT       >> ----------------------------       >> efi_header:       >> 000 dq Signature       >> 008 dq Revision       >> 010 q Headersize (in bytes) wouldn't it just say 0000001c ?       >> 014 q CRC32 ;of what ???       >> 018 q reserved ....       =======================              > If the 3-digit numbers are offsets then not quite. If the header is 24       > bytes then when struc efi_systab specifies       >       > .hdr: resb efi_hdr_size       >       > it is reserving 24 bytes at the start of the system table.              I don't get that at all.        would you mind to correct my above translation in my format ?       ...       > Feel free to correct me if I've got something wrong or mention anything       > you find out. This is a learning experience for me, too!              sing along: two blind mice... :)       coz my eyes became worse I need to zoom everything to 200%.       __       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