opnsense-src/sys/boot/efi/libefi
Toomas Soome 4479aa540f loader: efipart should check disk size from partition table
While testing 32bit UEFI OVMF (which has bug about how the disk size
is presented), I did witness the errors from blkio->ReadBlocks().

It became apparent we can not entirely trust UEFI interfaces either,
so additional checks are needed.

So we use disk_ioctl(DIOCGMEDIASIZE) for disks, with fallback of
Media->LastBlock for other media.

In addition, we need to check if there is media present.

+ small fixes for error printout, and avoiding multiple blk * 512.

Reviewed by:	allanjude
Approved by:	allanjude (mentor)
Differential Revision:	https://reviews.freebsd.org/D10197
2017-03-30 16:23:31 +00:00
..
delay.c
devpath.c loader: Replace EFI part devices. 2017-02-06 09:18:47 +00:00
efi_console.c When the EFI implementation (like U-Boot) does not support WaitForKey, we 2016-08-29 20:01:53 +00:00
efichar.c Share UCS2/UTF8 routines between boot loader and userland. 2017-03-09 00:24:01 +00:00
efinet.c sys: Replace zero with NULL for pointers. 2017-02-22 02:35:59 +00:00
efipart.c loader: efipart should check disk size from partition table 2017-03-30 16:23:31 +00:00
env.c loader: libefi/env.c warnings in arm build 2017-02-03 16:39:10 +00:00
errno.c Major rework of the ia64 loaders. The two primary objectives are: 2006-11-05 22:03:04 +00:00
handles.c Add EFI ZFS boot support 2016-01-15 02:33:47 +00:00
libefi.c A new implementation of the loader block cache 2016-04-18 23:09:22 +00:00
Makefile efipart is also using the '%S' printf format, add -Wno-format for it. 2017-02-07 15:16:01 +00:00
Makefile.depend META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
time.c The getsecs() function is implemented in platform- and bootfw-specific 2016-09-22 06:24:40 +00:00
time_event.c The getsecs() function is implemented in platform- and bootfw-specific 2016-09-22 06:24:40 +00:00
wchar.c loader.efi environment related cleanups 2017-02-01 08:46:59 +00:00