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

Allow elfloader to put kernel images directly after firmware on RISCV #135

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Feb 22, 2022

  1. elfloader: port fixup_image_base to C

    Porting from assembly to a higher level language makes this function
    more portable.
    
    Signed-off-by: Kent McLeod <[email protected]>
    kent-mcleod committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    4afb9e5 View commit details
    Browse the repository at this point in the history
  2. elfloader,RISC-V: Relax kernel alignment checks

    It's not necessary to require the kernel and ELFloader images are loaded
    at the start of page boundaries.
    
    Signed-off-by: Kent McLeod <[email protected]>
    kent-mcleod committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    a265630 View commit details
    Browse the repository at this point in the history
  3. elfloader,RISC-V: clear_bss unconditionally

    When booting via opensbi, the image format is a binary image and so if
    the .bss section is at the end it must be initialized unconditionally.
    
    Signed-off-by: Kent McLeod <[email protected]>
    kent-mcleod committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    6f20da5 View commit details
    Browse the repository at this point in the history
  4. Revert "riscv: Reposition .rodata to after .bss"

    This reverts commit 8de8c9f.
    
    Signed-off-by: Kent McLeod <[email protected]>
    kent-mcleod committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    83064a6 View commit details
    Browse the repository at this point in the history
  5. elfloader, RISC-V: Move the elfloader during boot

    The SBI implementation usually loads the elfloader where the kernel
    would prefer to also be loaded. Allow the elfloader to move itself to a
    higher address before loading the kernel and user images.
    This requires ensuring that the stacks are not overwritten during the
    merge, and so must be placed before the _archive_cpio section in the
    linker script.
    
    Signed-off-by: Kent McLeod <[email protected]>
    kent-mcleod committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    9dd2537 View commit details
    Browse the repository at this point in the history
  6. elfloader: Don't overwrite the platform DTB

    If a DTB has been passed in from an earlier stage boot loader during an
    elfloader image relocation, make sure that it doesn't get overwritten.
    
    On Arm this isn't relevant as the protocol when relocation happens
    doesn't also pass in a DTB.
    
    Signed-off-by: Kent McLeod <[email protected]>
    kent-mcleod committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    0675897 View commit details
    Browse the repository at this point in the history