• Alexander Graf's avatar
    efi: Move grub_reboot() into kernel · 0ba90a7f
    Alexander Graf authored
    The reboot function calls machine_fini() and then reboots the system.
    Currently it lives in lib/ which means it gets compiled into the
    reboot module which lives on the heap.
    In a following patch, I want to free the heap on machine_fini()
    though, so we would free the memory that the code is running in. That
    obviously breaks with smarter UEFI implementations.
    So this patch moves it into the core. That way we ensure that all
    code running after machine_fini() in the UEFI case is running from
    memory that got allocated (and gets deallocated) by the UEFI core.
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    Reviewed-by: default avatarDaniel Kiper <daniel.kiper@oracle.com>
efi.c 25.7 KB