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

Changes/fixes on top of v11 AMD patches for non-PSP case #26

Draft
wants to merge 26 commits into
base: grub-sl-2.12-v11-amd
Choose a base branch
from

Commits on Nov 19, 2024

  1. loader/slaunch/psp.c: don't cause use of __udivmoddi4()

    Just use grub_divmod64() explicitly like all other code does.
    
    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    6c173bd View commit details
    Browse the repository at this point in the history
  2. grub-core: fix non-EFI build

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    c9ffe3f View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2024

  1. Configuration menu
    Copy the full SHA
    682497d View commit details
    Browse the repository at this point in the history
  2. loader: fix pointer <-> integer conversions

    The behaviour is implementation specific and in case of GCC 32-bit
    pointers are **sign-extended** on conversions to a larger integer type,
    thus producing invalid values.
    
    The opposite isn't dangerous, but still generates compiler warnings.
    
    Go through `grub_addr_t` in both cases.
    
    https://gcc.gnu.org/onlinedocs/gcc/Arrays-and-pointers-implementation.html
    
    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    8147876 View commit details
    Browse the repository at this point in the history
  3. loader/slaunch: fix invalid format specifiers

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    025f421 View commit details
    Browse the repository at this point in the history
  4. loader/slaunch/txt.c: FIXME cleanup

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    8b80806 View commit details
    Browse the repository at this point in the history
  5. i386/txt: Initialize TPM 1.2 event log in TXT heap

    Signed-off-by: Michał Żygowski <[email protected]>
    Signed-off-by: Krystian Hebel <[email protected]>
    Signed-off-by: Sergii Dmytruk <[email protected]>
    miczyg1 authored and SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    e69ea65 View commit details
    Browse the repository at this point in the history
  6. loader/slaunch: make SKINIT work on AMD without PSP

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    0231aa9 View commit details
    Browse the repository at this point in the history
  7. loader/slaunch: {SKL,SLB}_MIN_A{,L}IGNMENT

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    561f864 View commit details
    Browse the repository at this point in the history
  8. loader/slaunch/skl.c: fix allocating SKL and placing SLRT

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    3fbbb79 View commit details
    Browse the repository at this point in the history
  9. loader/slaunch: fix reading mle_header

    Only the case of legacy boot has slparams->mle_start and
    slparams->mle_mem different.  Other places are updated for consistency.
    
    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    81876ee View commit details
    Browse the repository at this point in the history
  10. loader/slaunch: allow multiple "slaunch_module" commands

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    b883adc View commit details
    Browse the repository at this point in the history
  11. loader/slaunch/skl.c: improve grub_skl_set_module() checks

    Make them more comprehensive and remove the `skl_size <
    (8*GRUB_PAGE_SIZE)` one which doesn't make much sense.
    
    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    8a69289 View commit details
    Browse the repository at this point in the history
  12. loader/slaunch/dlstub.c: better checks/errors

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    4d853d2 View commit details
    Browse the repository at this point in the history
  13. loader/slaunch/dlstub.c: start with zeroed relocator state

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    d4b61e3 View commit details
    Browse the repository at this point in the history
  14. loader/slaunch/skl.c: better errors and checks

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    b64de8b View commit details
    Browse the repository at this point in the history
  15. include/grub/i386/txt.h: add missing #include

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    5fc2a42 View commit details
    Browse the repository at this point in the history
  16. loader/slaunch/slrt.c: add NULL checks

    Not all boot methods are Linux EFI boot methods.
    
    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    54100f5 View commit details
    Browse the repository at this point in the history
  17. include/grub/slaunch.h: add missing forward declaration

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    d92ba09 View commit details
    Browse the repository at this point in the history
  18. loader/slaunch/skl.c: fix a comment typo

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    6e77edd View commit details
    Browse the repository at this point in the history
  19. slaunch: introduce a hook for filling SLRT policy

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    8c705ef View commit details
    Browse the repository at this point in the history
  20. multiboot: Make GRUB_MULTIBOOT(make_mbi) return MBI's size

    GRUB_MULTIBOOT(get_mbi_size) returns an upper bound on MBI's size
    instead of the actual size.  It could also be used for measurements
    after zeroing unused parts of the buffer, but using an actual size seems
    like a better option as the same MBI will always have the same hash
    regardless of the amount of extra memory that follows it.
    
    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    d00a1a6 View commit details
    Browse the repository at this point in the history
  21. multiboot2: Support TXT and SKINIT slaunch

    The code makes sure that MBI entry goes first in DRTM, so the payload
    can measure it first on launch.  Then goes SLRT and other typical
    entries, while MB2 modules are added at the end.
    
    Signed-off-by: Michał Żygowski <[email protected]>
    Signed-off-by: Tomasz Żyjewski <[email protected]>
    Signed-off-by: Krystian Hebel <[email protected]>
    Signed-off-by: Sergii Dmytruk <[email protected]>
    miczyg1 authored and SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    e383612 View commit details
    Browse the repository at this point in the history
  22. grub-core/loader/slaunch/psp.c: simplify is_drtm_device()

    Just return bool.
    
    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    a655a9e View commit details
    Browse the repository at this point in the history
  23. grub-core/loader/slaunch/psp.c: fix comment capitalization

    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    8b35409 View commit details
    Browse the repository at this point in the history
  24. grub-core/loader/slaunch/psp.c: drop extra assignments from init_drtm…

    …_device()
    
    Signed-off-by: Sergii Dmytruk <[email protected]>
    SergiiDmytruk committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    805d4f3 View commit details
    Browse the repository at this point in the history