| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=325834
|
| |
|
|
|
|
|
|
|
|
|
| |
The loader strategy() function is assuming 512B blocks, so we need to adjust
ptblread() for other sector sizes.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D12847
Notes:
svn path=/head/; revision=325248
|
| |
|
|
|
|
|
|
| |
Submitted by: Zakary Nafziger <worldofzak@gmail.com>
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=324700
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Makefile.inc has a specific meaning in the tree, and
common/Makefile.inc doesn't quite fit into that. Rename it to
loader.mk and it will be a place to collect common things to all
/boot/loader programs there.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324649
|
| |
|
|
| |
Notes:
svn path=/head/; revision=324648
|
| |
|
|
|
|
|
|
|
|
| |
keep cleaer that common is just for the MI files for /boot/loader
programs.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324647
|
| |
|
|
|
|
|
|
|
| |
there.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324559
|
| |
|
|
|
|
|
|
|
|
|
| |
Move ufsread.c from sys/boot/common (which used to be all the common
files for /boot/loader, but grew to be all the common files for
sys/boot, but that's now sys/boot/libsa's job) to sys/boot/libsa.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324556
|
| |
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324554
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
re-rooting. Remove deprecation notice for it. init_chroot likely is
still better served with reroot.
Notes:
svn path=/head/; revision=323379
|
| |
|
|
| |
Notes:
svn path=/head/; revision=323367
|
| |
|
|
|
|
|
|
|
| |
Reviewed by: ae
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12066
Notes:
svn path=/head/; revision=322628
|
| |
|
|
|
|
|
|
|
|
| |
The variable servip is unused. One leftover printf and small cstyle nit.
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D10980
Notes:
svn path=/head/; revision=319084
|
| |
|
|
|
|
|
|
|
|
|
| |
really doing
Reported by: rgrimes
Reviewed by: rgrimes
Differential Revision: https://reviews.freebsd.org/D10959
Notes:
svn path=/head/; revision=318999
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While it sounds like a good idea to extract the RFC1048 data from PXE, in the
end it is not and it is causing lots of issues. Our pxeloader might need
options which are incompatible with other pxe servers (for example iPXE, but
not only).
Our pxe loaders are also now settings their own user class, so it is useful to
issue our own pxe request at startup
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D10953
Notes:
svn path=/head/; revision=318990
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the code are now only issueing one single dhcp request at startup of the
loader meaning we can always request a the PXE informations from the
dhcp server.
Previous code lost that information, meaning no option 55 anymore (meaning not
working with the kea dhcp server) and no request for rootpath etc, no user class
Remove the flags from the bootp function which is not needed anymore
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D10952
Notes:
svn path=/head/; revision=318989
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather that previous attempts to add tftpfs support at the same time as NFS
support. This time decide on a proper URI parser rather than hacks.
root-path can now be define the following way:
For tftpfs:
tftp://ip/path
tftp:/path (this one will consider the tftp server is the same as the one where
the pxeboot file was fetched from)
For nfs:
nfs:/path
nfs://ip/path
The historical
ip:/path
/path
are kept on NFS
Reviewed by: tsoom, rgrimes
Differential Revision: https://reviews.freebsd.org/D10947
Notes:
svn path=/head/; revision=318987
|
| |
|
|
|
|
|
|
|
|
|
| |
Submitted by: kczekirda
Reviewed by: tsoome, bapt, jhb, oshogbo
MFC after: 3 weeks
Sponsored by: Oktawave
Differential Revision: https://reviews.freebsd.org/D10726
Notes:
svn path=/head/; revision=318678
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't use DHCP 150 option to decide which protocol use to netboot. When
root-path includes ip address - go thru NFS, if ip address not exists in
root-path - go thru TFTP from server which ip address is in next-server. But
there is one limitation - only one tftp server in network to provide loader and
everything else. Does enybody use more than only one?
Submitted by: kczekirda
Sponsored by: Oktawave
MFC after: 3 weeks
Relnote: Yes
Differential Revision: https://reviews.freebsd.org/D8740
Notes:
svn path=/head/; revision=317886
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Reported by: Coverity (CWE-120)
CID: 1006704
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=316771
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current multiboot loader code doesn't clean the metadata added to the
kernel after the bi_load64 dry run, which breaks accounting of the required
memory for the metadata.
This issue didn't show itself before because all the metadata items where small
(8bytes), but after r316343 there's a big blob in the metadata, which triggers
this. Fix it by cleaning the metadata added to the kernel after the bi_load64
dry run. Also add a comment describing the memory layout when booting using
multiboot (Xen Dom0).
This unbreaks booting a FreeBSD/Xen Dom0 after r316343.
MFC after: 3 weeks
Sponsored by: Citrix Systems R&D
Notes:
svn path=/head/; revision=316754
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While we have mechanisms in place to protect ourselves against the read
behind the disk end, there is still one corner case. As the GPT
partition table has backup table at the end of the disk, and we yet
do not know the size of the disk (if the wrong size is provided by the
firmware/bios), we need to limit the reads to avoid read ahead in such case.
Note: this update does add constant into stand.h, so the incremental build
will need to get local stand.h updated first.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D10187
Notes:
svn path=/head/; revision=316578
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The description tells it all, as an side note, I am using uint8_t instead of
u_char as the partition table data really is handled as byte stream, not
char array.
Reviewed by: allanjude, imp
Differential Revision: https://reviews.freebsd.org/D10180
Notes:
svn path=/head/; revision=316577
|
| |
|
|
|
|
|
|
|
|
|
| |
With some file system the ls is unable to display file types.
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D10066
Notes:
svn path=/head/; revision=316112
|
| |
|
|
|
|
|
|
|
|
|
| |
This variable has been unused since its inception in r40106.
MFC after: 3 days
Reported by: amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=316108
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This fixes a -Wempty-body warning with gcc 6.3.0 when PART_DEBUG is undefined.
MFC after: 3 days
Reported by: Jenkins (FreeBSD-head-amd64-gcc job)
Tested with: amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=316102
|
| |
|
|
|
|
|
|
|
|
|
| |
This saves a negligible amount of memory for non-geli enabled
bootloaders.
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=316076
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the uset can set dhcp.interface-mtu, we need to try to validate the
value. So we verify if the conversion to int is successful and we will not
allow to set value greater than max IPv4 packet size.
Also use snprintf for safety.
Reviewed by: allanjude, bapt
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8492
Notes:
svn path=/head/; revision=315653
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
A follow-up to r313475.
Submitted by: Gaurav Gangalwar <Gaurav.Gangalwar at emc.com>
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=314882
|
| |
|
|
|
|
|
|
|
| |
Found with: devel/coccinelle
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D9694
Notes:
svn path=/head/; revision=314068
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)
Also prefix ext2's and nandfs's NDADDR and NIADDR with EXT2_ and NANDFS_
Reviewed by: kib, mckusick
Obtained from: NetBSD
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9536
Notes:
svn path=/head/; revision=313780
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity detected the possible NULL pointer dereference case.
Also updated comment as was suggested in illumos review.
CID: 1371008
Reported by: Coverity
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9496
Notes:
svn path=/head/; revision=313451
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The loader bcache is implementing simple read-ahead to boost the cache.
The bcache is built based on 512B block sizes, and the read ahead is attempting
to read number of cache blocks, based on amount of the free bcache space.
However, there are devices using larger sector sizes than 512B, most obviously
the CD media is based on 2k sectors. This means the read-ahead can not be just
random number of blocks, but we should use value suitable also for use with
larger sectors, as for example, with CD devices, we should read multiple of 2KB.
Since the sector size from disk interface is not too reliable, i guess we can
just use "good enough" value, so the implementation is rounding down the read
ahead block count to be multiple of 16.
This means we have covered sector sizes to 8k.
In addition, the update does implement the end of cache marker, to help to
detect the possible memory corruption - I have not seen it happening so far,
but it does not hurt to have the detection mechanism in place.
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9179
Notes:
svn path=/head/; revision=313332
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Need interface to extract information about disk abstraction,
to read disk or partition size depending on the provided argument
and adjust disk size based on information in partition table.
The disk handle from disk_open() has d_offset field to point to
partition start. So we can use this fact to return either whole disk
size or partition size. For this we only need to record partition size
we get from disk_open() anyhow.
In addition, this will also make it possible to adjust the disk media size
based on information from partition table. The problem with disk size is
about some BIOS systems reporting bogus disk size for 2+TB disks, but
since such disks are using GPT partitioning, and GPT does have information
about disk size (alternate LBA + 1), we can use this fact to record disk
size based on partition table.
This patch does exactly this: implements DIOCGSECTORSIZE and DIOCGMEDIASIZE
ioctl, and DIOCGMEDIASIZE will report either disk media size or partition size.
Adds ptable_getsize() call to read partition size in bytes from ptable pointer.
Updates disk_open() to use ptable_getsize() to update mediasize value.
Implements GPT detection function to update ptable size (used by
ptable_getsize()) according to alternate lba (which is location of backup copy
of GPT header table).
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8594
Notes:
svn path=/head/; revision=313328
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The disk_* and part_* api is using 64bit values for media size and
offsets. However, the current api is using off_t type, which is signed
64-bit int.
In this context the signed media size does not make any sense, and
the offsets are used to mark absolute, not relative locations.
Also, the data from GPT partition table and some other sources is
already using uint64_t data type, so using signed off_t can cause sign
issues.
Reviewed by: imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D8710
Notes:
svn path=/head/; revision=313047
|
| |
|
|
|
|
|
|
|
| |
I thank all developers and contributors for pc98.
Relnotes: yes
Notes:
svn path=/head/; revision=312910
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
after it, which has a conflicting definition of errno. This leads to
the following warning with clang 4.0.0:
In file included from sys/boot/common/reloc_elf32.c:6:
In file included from sys/boot/common/reloc_elf.c:37:
/usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
extern int errno;
^
sys/sys/errno.h:46:26: note: expanded from macro 'errno'
#define errno (* __error())
^
MFC after: 3 days
Notes:
svn path=/head/; revision=311929
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently the libstand dosfs optimization is a bit too optimistic
and did introduce possible memory corruption.
This patch is backing out the bad part and since this results in
dosfs reading full blocks now, we can also remove extra offset argument
from dv_strategy callback.
The analysis of the issue and the backout patch is provided by Mikhail Kupchik.
PR: 214423
Submitted by: Mikhail Kupchik
Reported by: Mikhail Kupchik
Reviewed by: bapt, allanjude
Approved by: allanjude (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8644
Notes:
svn path=/head/; revision=310850
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When WITH_REPRODUCIBLE_BUILD=yes is set in src.conf(5), eliminate the
time, user, and host from the loader's version information. This allows
builds to produce bit-for-bit identical output.
Reviewed by: bapt
MFC after: 1 month
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8842
Notes:
svn path=/head/; revision=310268
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Makefile rule to create vers.c for loader version info was
previously duplicated in each of the various loader Makefiles.
Instead, share a common rule in Makefile.inc.
Reviewed by: bapt
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8841
Notes:
svn path=/head/; revision=310267
|
| |
|
|
| |
Notes:
svn path=/head/; revision=310236
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of repeating "%s, Revision %s" "(%s %s)" in each loader, just
create the full version string in vers.c
Reviewed by: bapt
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8823
Notes:
svn path=/head/; revision=310225
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this change the loader self relocation code interpreted amd64's
rela relocations as if they were rel relocations, discarding the addend.
This "works" because GNU ld 2.17.50 stores the addend value in both the
r_addend field of the relocation (as expected) and at the target of the
relocation.
Other linkers, and possibly other versions of GNU ld, won't have this
behaviour, so interpret the relocations correctly.
Reported by: George Rimar
Reviewed by: andrew
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8681
Notes:
svn path=/head/; revision=309360
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lsdev command does walk over devsw list, prints list element name and
will use dv_print() callback to print the device list.
Unfortunately this approach will add unneeded noise when there are no
particular devices detected.
To remove "empty" device section headers, the dv_print() callback
should print the header instead.
In addition, fixed dv_print callback for md module.
Reviewed by: imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D8551
Notes:
svn path=/head/; revision=308827
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/loader.rc) to specify a Forth file to read from the pkgfs tarball and
process by Ficl.
This allows for the tarball to do runtime things like load a
platform-specific FDT blob, among other things.
Reviewed by: imp
Approved by: sjg (mentor)
MFC after: 2 weeks
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D8494
Notes:
svn path=/head/; revision=308535
|