summaryrefslogtreecommitdiff
path: root/sys/arch/arm64/stand
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2019-07-29 22:33:27 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2019-07-29 22:33:27 +0000
commitf9e1a90d048719cdb2087fa8a4dd79f85c55a9f4 (patch)
treeddf66053befba18d64b2237e3190d04dd80a12b6 /sys/arch/arm64/stand
parent2d55442798f590cac84ebdab8d90639f49ca7c9f (diff)
Support disk write in efiboot for armv7 and arm64.
ok patrick deraadt
Diffstat (limited to 'sys/arch/arm64/stand')
-rw-r--r--sys/arch/arm64/stand/efiboot/efidev.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/arm64/stand/efiboot/efidev.c b/sys/arch/arm64/stand/efiboot/efidev.c
index a39e2610c9a..dbbbb1c313a 100644
--- a/sys/arch/arm64/stand/efiboot/efidev.c
+++ b/sys/arch/arm64/stand/efiboot/efidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efidev.c,v 1.4 2019/01/31 14:35:06 patrick Exp $ */
+/* $OpenBSD: efidev.c,v 1.5 2019/07/29 22:33:26 yasuoka Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -100,8 +100,12 @@ efid_io(int rw, efi_diskinfo_t ed, u_int off, int nsect, void *buf)
case F_WRITE:
if (ed->blkio->Media->ReadOnly)
goto on_eio;
- /* XXX not yet */
- goto on_eio;
+ memcpy(data, buf, nsect * DEV_BSIZE);
+ status = EFI_CALL(ed->blkio->WriteBlocks,
+ ed->blkio, ed->mediaid, off,
+ nsect * DEV_BSIZE, data);
+ if (EFI_ERROR(status))
+ goto on_eio;
break;
}
return (EFI_SUCCESS);