/* @this block IO protocol @media_id media id @lba start of the write in logical blocks @buffer_size number of bytes to read @buffer source buffer  */
static efi_status_t EFIAPI write_blocks(struct efi_block_io *this, u32 media_id, u64 lba, efi_uintn_t buffer_size, void *buffer)
/* @this block IO protocol @media_id media id @lba start of the write in logical blocks @buffer_size number of bytes to read @buffer source buffer  */
static efi_status_t EFIAPI write_blocks(struct efi_block_io *this, u32 media_id, u64 lba, efi_uintn_t buffer_size, void *buffer)
{
	u8 *start;
	if ((lba << LB_BLOCK_SIZE) + buffer_size > img.length)
		return EFI_INVALID_PARAMETER;
	start = image + (lba << LB_BLOCK_SIZE);
	boottime->copy_mem(start, buffer, buffer_size);
	return EFI_SUCCESS;
}