void *buffer)
{
loff_t actread;
- /* fs_read expects buffer address, not pointer */
- uintptr_t buffer_addr = (uintptr_t)map_to_sysmem(buffer);
- if (fs_read(fh->path, buffer_addr, fh->offset,
+ if (fs_read(fh->path, map_to_sysmem(buffer), fh->offset,
*buffer_size, &actread))
return EFI_DEVICE_ERROR;
goto error;
}
- if (fs_write(fh->path, (ulong)buffer, fh->offset, *buffer_size,
+ if (fs_write(fh->path, map_to_sysmem(buffer), fh->offset, *buffer_size,
&actwrite)) {
ret = EFI_DEVICE_ERROR;
goto error;