Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Jonathan Gray's avatar
    b6e9e097
    efi_loader: initialise partition_signature memory · b6e9e097
    Jonathan Gray authored
    
    Zero partition_signature in the efi_device_path_hard_drive_path
    structure when signature_type is 0 (no signature) as required by the
    UEFI specification.
    
    This is required so that efi_dp_match() will work as expected
    when doing memcmp() comparisons.  Previously uninitialised memory
    would cause it not match nodes when it should have when the signature
    type was not GUID.
    
    Corrects a problem where the loaded image protocol would not return a
    device path with MEDIA_DEVICE causing the OpenBSD bootloader to fail
    on rpi_3 and other targets.
    
    v2: Also handle signature_type 1 (MBR) as described in the specification
    
    Signed-off-by: default avatarJonathan Gray <jsg@jsg.id.au>
    Tested-by: default avatarArtturi Alm <artturi.alm@gmail.com>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    b6e9e097
    History
    efi_loader: initialise partition_signature memory
    Jonathan Gray authored
    
    Zero partition_signature in the efi_device_path_hard_drive_path
    structure when signature_type is 0 (no signature) as required by the
    UEFI specification.
    
    This is required so that efi_dp_match() will work as expected
    when doing memcmp() comparisons.  Previously uninitialised memory
    would cause it not match nodes when it should have when the signature
    type was not GUID.
    
    Corrects a problem where the loaded image protocol would not return a
    device path with MEDIA_DEVICE causing the OpenBSD bootloader to fail
    on rpi_3 and other targets.
    
    v2: Also handle signature_type 1 (MBR) as described in the specification
    
    Signed-off-by: default avatarJonathan Gray <jsg@jsg.id.au>
    Tested-by: default avatarArtturi Alm <artturi.alm@gmail.com>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>