Skip to content
  • Leif Lindholm's avatar
    efidisk: Respect block_io_protocol buffer alignment · 51f375d6
    Leif Lindholm authored
    Returned from the OpenProtocol operation, the grub_efi_block_io_media
    structure contains the io_align field, specifying the minimum alignment
    required for buffers used in any data transfers with the device.
    
    Make grub_efidisk_readwrite() allocate a temporary buffer, aligned to
    this boundary, if the buffer passed to it does not already meet the
    requirements.
    
    Also sanity check the io_align field in grub_efidisk_open() for
    power-of-two-ness and bail if invalid.
    51f375d6