| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=325834
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, move generation of loader.help into loader.mk. Set HELP_FILES=
to disable this (so we only install one help file, for now). At the
same time remove some duplicate -I lines. Fix several FILES= and
CLEANFILES= into the += form since we're touching both of those in the
.mk files. Make sure we only build one loader.help file per platform
in a unified way (we were building many on some, with the last to
install winning, though often they were the same text).
Also, we're now installing loader.rc and menu.rc everywhere. arm and
mips uboot installed these as menu.rc.sample, but there's no need
since the loader.rc for those platforms doesn't do menu.rc processing
by default. pcibios.4th is now installed everywhere, but will failsafe
on non x86 platforms (it isn't loaded by default anywhere).
These changes are too intertwined to do separately since aspects of
each are required to have a bug-free commit.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=325694
|
|
|
|
|
|
|
|
|
|
|
| |
efi_devpath_is_prefix() is currently returning values 0 or 1, which means
it really should return bool.
Additionally, use unsigned len, because we only get unsigned values from
DevicePathNodeLength().
Notes:
svn path=/head/; revision=325641
|
|
|
|
|
|
|
|
|
|
|
| |
The strategy() calls are assuming 512B sectors, so we need to adjust the
offset accordingly.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D12849
Notes:
svn path=/head/; revision=325286
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a separate copy of zfs for userboot. However, we don't need it
if we compile both 32 and 64 bit ZFS libraries. Remove redunant copies
of zfs related .o files now that both versions are
available. Introduce ZFSSRC and use it everywhere.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=325175
|
|
|
|
|
|
|
|
|
|
|
| |
Define EFISRC, EFIINC and EFIINCMD. Use them, as well as using other
symbols defined in defs.mk. Prefer <bsd.init.mk> to ../../Makefile.inc
or <src.opts.mk>.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=325093
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Back out the unification commit to boot1. There's some issues on the
arm and arm64 platforms that need to be addressed with code
changes. There's also a discussion on arch@ about the future of
boot1.efi vs just using loader.efi that needs to play out. So take a
pause on these changes until the arm issues can be fixed and it's
clear boot1.efi will survive into FreeBSD 12.
OK'd by: Eric@meatspace
Notes:
svn path=/head/; revision=324709
|
|
|
|
| |
Notes:
svn path=/head/; revision=324653
|
|
|
|
|
|
|
|
| |
There's a number of copies of basically identical code to enable
building forth in /boot/loader. Move it all into ficl.mk.
Notes:
svn path=/head/; revision=324652
|
|
|
|
| |
Notes:
svn path=/head/; revision=324648
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor boot1 to use the same I/O code as /boot/loader uses. Refactor
to use the common efi_main.c.
Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D10447
Notes:
svn path=/head/; revision=324646
|
|
|
|
|
|
|
|
|
|
| |
always include it. Remove places where we explicitly include it. This
also helps reduce the 'cut-and-paste' factor of these Makefiles.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324460
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define SASRC to point to the current libstand sources. Include
../Makefile.inc early enough in a few places so we can .include
"${SASRC}/Makefile" and have it work. Create a new pass-up
Makefile.inc in sys/boot/userboot to allow this pattern to work.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324450
|
|
|
|
|
|
|
|
|
|
|
| |
Move the retrieval of the image information into loader's main instead
of doing it in efizfs.c
Differential Revision: https://reviews.freebsd.org/D12564
Submitted by: Eric McCorkle
Notes:
svn path=/head/; revision=324360
|
|
|
|
|
|
|
|
|
|
| |
efi_devpath_is_prefix determines if a path matches a passed-in prefix.
Differential Revision: https://reviews.freebsd.org/D12564
Submitted by: Eric McCorkle
Notes:
svn path=/head/; revision=324359
|
|
|
|
|
|
|
| |
The current efipart_floppy() implementation is leaking the acpi pointer.
Notes:
svn path=/head/; revision=323991
|
|
|
|
|
|
|
| |
Define EISA PNP constants and use them, also fix ID for 0x701
Notes:
svn path=/head/; revision=323909
|
|
|
|
|
|
|
| |
Use errno for error checking.
Notes:
svn path=/head/; revision=323908
|
|
|
|
|
|
|
| |
The else statement should have { }
Notes:
svn path=/head/; revision=323907
|
|
|
|
|
|
|
|
| |
We should return ENXIO to indicate the situation with device present,
but no media.
Notes:
svn path=/head/; revision=323906
|
|
|
|
|
|
|
| |
DevicePathNodeLength() will always return unsigned value.
Notes:
svn path=/head/; revision=323895
|
|
|
|
|
|
|
|
| |
The device specific *_add functions are using malloc() + memset,
should use calloc instead.
Notes:
svn path=/head/; revision=323886
|
|
|
|
|
|
|
|
| |
The current implementation of efi_devpath_match() is returning values 0 or 1,
so it should be updated to return bool.
Notes:
svn path=/head/; revision=323885
|
|
|
|
|
|
|
|
| |
Remove duplicated free()+return statements, default unit to 0
and improve strtol error processing.
Notes:
svn path=/head/; revision=323867
|
|
|
|
|
|
|
| |
Need to check rsize before dereferencing it.
Notes:
svn path=/head/; revision=323541
|
|
|
|
|
|
|
|
|
|
| |
In case of error from disk_open(), we should clean up properly.
Reviewed by: allanjude, imp
Differential Revision: https://reviews.freebsd.org/D12340
Notes:
svn path=/head/; revision=323497
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the efipart rewrite, the chain command was looking for device
handle using interface applicable only for net devices. Disk
partitions and zfs pools need their own approach to find the proper handle.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D12287
Notes:
svn path=/head/; revision=323389
|
|
|
|
|
|
|
|
| |
Noticed by: tsoome@
Sponsored by: Netflix
Notes:
svn path=/head/; revision=323272
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename boot1's wcslen to ucs2len, which we can't use in userland
because wchar in userland is unsigned, not short. Move it into
efichar.c. Also spell '* 2' as '* sizeof(efi_char)' and add 1 for the
trailing NUL to transition the FreeBSD boot env vars to being NUL
terminated on the same line...
Sponsored by: Netflix
Notes:
svn path=/head/; revision=323258
|
|
|
|
|
|
|
|
|
| |
Make efichar.c routines available to libefi as well as
libefivar. Define LIBEFI when building so we can conditionally include
stand.h vs the normal userland stuff.
Notes:
svn path=/head/; revision=323062
|
|
|
|
|
|
|
|
|
|
|
| |
Add libefi to the list of libraries we'll link in. Move EFI table
definitions back to libefi so we don't have drift between the two
efi_main routines.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322938
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the efi_main routine out of libefi into sys/boot/efi/loader.
Since boot1 has its own efi_main routine, this effectively prevents
boot1 from linking with libefi. By moving it out, we can share code
better (though though some refactoring with boot1's efi_main and
loader.efi's efi_main is definitely in order).
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322930
|
|
|
|
|
|
|
|
|
|
|
|
| |
libefi/time.c is mix of different styles, this update does cleanup.
Also fix 0 versus NULL, and zero the tv structure for case we get error
from UEFI firmware.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D11861
Notes:
svn path=/head/; revision=322074
|
|
|
|
|
|
|
|
|
|
|
| |
This patch moves code necessary for the fmtdev functionality from
loader to libefi, allowing other applications to make use of it
Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11862
Notes:
svn path=/head/; revision=322056
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds additional EFI utility functions to convert errno
values to EFI_STATUS errors, as well as EFI times to UNIX times.
Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11858
Notes:
svn path=/head/; revision=322040
|
|
|
|
|
|
|
|
|
|
|
| |
This patch moves some EFI ZFS functions from loader to libefi,
allowing them to be used by anything that links against libefi.
Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11855
Notes:
svn path=/head/; revision=322039
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds definitions and utility code for creating EFI drivers
using the EFI_DRIVER_BINDING_PROTOCOL.
Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11852
Notes:
svn path=/head/; revision=322038
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this to be too restrictive. We need to have both broadcast and unicast
enabled for loader to work. Set them in all cases to ensure this is true.
This allows the Cavium ThunderX 2s in the netperf cluster to netboot using
a USB NIC.
PR: 221001
Reviewed by: emaste, tsoome
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11732
Notes:
svn path=/head/; revision=321621
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes an integer underflow in efipart_realstrategy, which causes
crashes when an I/O operation's start point is after the end of the disk.
This can happen when trying to detect filesystems on very small disks.
This can occur if a BIOS freebsd-boot partition exists on a system when the
EFI loader is being used.
PR: 219000
Submitted by: Eric McCorkle <eric@metricspace.net>
Reviewed by: cem (previous version), tsoome (previous version)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10559
Notes:
svn path=/head/; revision=320553
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current read from network is working from up to down - we have some
protocol needing the data from the network, so we build the buffer space
for that protocol, add the extra space for headers and pass this buffer
down to be filled by nif get call in hope, we have guessed the incoming
packet size right. Amazingly enough this approach mostly does work, but
not always...
So, this update does work from down to up - we allocate buffer (based
on MTU or frame size info), fill it up, and pass on for upper layers.
The obvious problem is that when we should free the buffer - if at all.
In the current implementation the upper layer will free the packet on error
or when the packet is no longer needed.
While working on the issue, the additional issue did pop up - the bios
implementation does not have generic get/put interface but is using pxe
udpsend/udpreceive instead. So the udp calls are gone and undi interface
is implemented instead. Which in turn means slight other changes as we
do not need to have duplicated pxe implementation and can just use dev_net.
To align packet content, the actual read from nic is using shifted buffer by
ETHER_ALIGN (2).
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D10232
Notes:
svn path=/head/; revision=317887
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The work to make it possible to avoid bcache via using F_NORA modifier did
miss the fact that not all loader platforms are using the bcache, and so
it is possible the modifier is not cleared, as bcache strategy function is
not used.
For fix, we make sure the checks are dont with masked flag.
This patch does fix boot for platforms which do not use bcache.
Reported by: emaste
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D10422
Notes:
svn path=/head/; revision=317097
|
|
|
|
|
|
|
|
|
|
|
| |
GNU GCC does does recognise it as a valid option and we already
use -mgeneral-regs-only that has the desired effect.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D10306
Notes:
svn path=/head/; revision=316625
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=316279
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we provide the disk size verification and correction via disk_ioctl
and disk state provided by disk_open(), we can not share the partition
state in disk_devdesc structure. Also the sharing does make a lot of sense
with ufs, as only one partition is open at any given time, but zfs pools
do keep the disk devices open.
To make sure we do get the correct information about the open device,
just remove the cache.
Reviewed by: allanjude, smh
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9757
Notes:
svn path=/head/; revision=315408
|
|
|
|
|
|
|
|
|
|
| |
Move the UCS2 to UTF8 routines over into sys/boot/efi and have
libefivar grab them from there.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=314925
|
|
|
|
|
|
|
|
|
| |
Found with: devel/coccinelle
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D9694
Notes:
svn path=/head/; revision=314068
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cleaned up some spaces where tabs should be.
efipart_ioctl() DIOCGMEDIASIZE needs to use uint64_t, not off_t
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9562
Notes:
svn path=/head/; revision=313710
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The efipart rework did break the ARM systems as the new code is
using more exact filters to sort the devices and we need to
add support for MEDIA_FILEPATH_DP device paths.
PR: 216940
Reported by: karl@denninger.net
Reviewed by: allanjude, manu
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9520
Notes:
svn path=/head/; revision=313645
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix bugs found by Coverity in efipart.c.
The Issue is that efi_devpath_last_node() can return NULL pointer, and
therefore we should check for it. In real life we really do not
expect to see it to happen, so we will just error out from the test.
CID: 1371004
Reported by: Coverity
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9490
Notes:
svn path=/head/; revision=313442
|
|
|
|
|
|
|
| |
This fix building for armv6.
Notes:
svn path=/head/; revision=313389
|