Commit Graph

1766 Commits

Author SHA1 Message Date
Stephen J. Kiernan
b5c3ade765 libsa: Update comments about SMBIOS specification
Summary:
Include details from the SMBIOS 3 specification and some additional
details for SMBIOS 2.1.

Obtained from:	Juniper Networks, Inc.

Reviewers: jmg, manu

Subscribers: imp, dab

Differential Revision: https://reviews.freebsd.org/D39635
2023-04-17 23:21:04 -04:00
Dimitry Andric
1a3ccb8f15 libsa: make single bit bitfields unsigned to avoid clang 16 warning
Clang 16 introduced a warning about single bit bitfields in structs,
which is triggered by a declaration in libsa's tftp.c:

    stand/libsa/tftp.c:382:20: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                                    h->islastblock = 1;     /* very short file */
                                                   ^ ~
    stand/libsa/tftp.c:432:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                    h->islastblock = 1;     /* EOF */
                                   ^ ~

Signed one-bit bitfields can only have values -1 and 0, but the intent
here is to use the field as a boolean, so make it unsigned.

MFC after:	3 days
2023-04-17 18:26:11 +02:00
Cyrus Rahman
0ab68e9272 loader: lua: disable autoboot timer after password entry
In the lua loader, if one sets a password in loader.conf, the
autoboot_delay timer will start before the menu is displayed.  One can
interrupt the autoboot and bring up the menu by entering a keyboard
character before the timer expires.

If this is done a prompt for the password is displayed.  Entering the
password will bring up the menu, but the timer will again start and
another keyboard character must be entered or autoboot will abort the
menu and boot the system.

PR:		265472
Reviewed by:	kevans
MFC after:	3 days
2023-04-15 21:39:56 -05:00
Cyrus Rahman
d7584aa09f loader: lua: unload the kernel when changing BEs
Usually the kernel is loaded later, but there are circumstances where it
could have been loaded earlier than changing BEs.  Unload anything that
is already there so that we know we're using artifacts from the proper
environment.

PR:		265471
Reviewed by:	kevans
MFC after:	3 days
2023-04-15 21:39:52 -05:00
Kyle Evans
ec671f4980 loader: comconsole: don't unconditionally wipe out hw.uart.console
It may be the case that we need to set hw.uart.console manually in some
scenarios that comconsole can't necessarily support.  Avoid clobbering
hw.uart.console unless we've actually selected comconsole so that one
could at least get kernel console output..

Discussed with:	imp
Sponsored by:	Zenith Electronics LLC
Sponsored by:	Klara, Inc.
2023-04-13 23:42:03 -05:00
Mateusz Piotrowski
d8e36cd2b1 gptboot.efi.8: Fix a typo 2023-04-13 13:02:59 +02:00
Martin Matuska
2a58b312b6 zfs: merge openzfs/zfs@431083f75
Notable upstream pull request merges:
  #12194 Fix short-lived txg caused by autotrim
  #13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()
  #13392 Implementation of block cloning for ZFS
  #13741 SHA2 reworking and API for iterating over multiple implementations
  #14282 Sync thread should avoid holding the spa config write lock
         when possible
  #14283 txg_sync should handle write errors in ZIL
  #14359 More adaptive ARC eviction
  #14469 Fix NULL pointer dereference in zio_ready()
  #14479 zfs redact fails when dnodesize=auto
  #14496 improve error message of zfs redact
  #14500 Skip memory allocation when compressing holes
  #14501 FreeBSD: don't verify recycled vnode for zfs control directory
  #14502 partially revert PR 14304 (eee9362a7)
  #14509 Fix per-jail zfs.mount_snapshot setting
  #14514 Fix data race between zil_commit() and zil_suspend()
  #14516 System-wide speculative prefetch limit
  #14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
  #14519 Do not hold spa_config in ZIL while blocked on IO
  #14523 Move dmu_buf_rele() after dsl_dataset_sync_done()
  #14524 Ignore too large stack in case of dsl_deadlist_merge
  #14526 Use .section .rodata instead of .rodata on FreeBSD
  #14528 ICP: AES-GCM: Refactor gcm_clear_ctx()
  #14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
  #14532 Handle unexpected errors in zil_lwb_commit() without ASSERT()
  #14544 icp: Prevent compilers from optimizing away memset()
         in gcm_clear_ctx()
  #14546 Revert zfeature_active() to static
  #14556 Remove bad kmem_free() oversight from previous zfsdev_state_list
         patch
  #14563 Optimize the is_l2cacheable functions
  #14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier
  #14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL
  #14567 spl: Add cmn_err_once() to log a message only on the first call
  #14568 Fix incremental receive silently failing for recursive sends
  #14569 Restore ASMABI and other Unify work
  #14576 Fix detection of IBM Power8 machines (ISA 2.07)
  #14577 Better handling for future crypto parameters
  #14600 zcommon: Refactor FPU state handling in fletcher4
  #14603 Fix prefetching of indirect blocks while destroying
  #14633 Fixes in persistent error log
  #14639 FreeBSD: Remove extra arc_reduce_target_size() call
  #14641 Additional limits on hole reporting
  #14649 Drop lying to the compiler in the fletcher4 code
  #14652 panic loop when removing slog device
  #14653 Update vdev state for spare vdev
  #14655 Fix cloning into already dirty dbufs
  #14678 Revert "Do not hold spa_config in ZIL while blocked on IO"

Obtained from:	OpenZFS
OpenZFS commit:	431083f75b
2023-04-03 16:49:30 +02:00
Gleb Smirnoff
4358928e23 amd64 loader: plug hard hang with serial console enabled
The hang basically bricks a physical box and it can be recovered
only if you are able to boot from alternate media.  This isn't a
perfect fix, but throw it in before loader experts decide on
proper one.

Submitted by:	whu
Fixes:		927358dd98
2023-03-31 11:19:25 -07:00
Wei Hu
927358dd98 amd64 loader: Use efiserialio for Hyper-V booted systems
UEFI provides ConIn/ConOut handles for consoles that it supports,
which include the text-video and serial ports. When the serial port
is available, use the UEFI driver instead of direct io-port accesses
to avoid conflicts between the firmware and direct hardware access, as
happens on Hyper-V (Azure) setups.

This change enables efiserialio to be built for efi-amd64 and has
higher order priority vs comconsole, and only uses efiserialio
if the hypervisor is Hyper-V. When efiserialio successfully
probes, it will set efi_comconsole_avail=true which will prevent
comconsole from probing in this setup.

Tested on Hyper-V, ESXi and Azure VMs.

PR:		264267
Reviewed by:	kevans, whu
Tested by:	whu
Obtained from:	Rubicon Communications, LLC (Netgate)
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (Netgate)
2023-03-18 07:07:35 +00:00
Allan Jude
a849842f51 loader: Add support for booting from a ZFS snapshot
When booting from a snapshot we need to follow a different code path
to turn the objset ID into the name, and for forward lookups we need
to walk the parent's snapnames_zap.

With this, it is possible to set the pools BOOTFS property to a
snapshot and boot with a read-only filesystem of that snapshot.

Reviewed by:	tsoome, rew, imp
Sponsored By:	Beckhoff Automation GmbH & Co. KG
Sponsored By:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D38600
2023-03-14 14:18:29 +00:00
Warner Losh
7f3c360646 Parse /kboot.conf
If there's a kboot.conf, prase it after the command line args are
parsed. It's not always easy to get all the right command line args
depending on the environment. Allow an escape hatch. While we can't do
everything one might like in this file, we can do enough.

Sponsored by:		Netflix
2023-03-13 20:45:50 -06:00
John-Mark Gurney
13597be965
length for the 64-bit entry is 32-bits, not 16-bits.
Reported by:	Jérôme Duval  (korli on github)
2023-03-02 17:03:57 -08:00
Warner Losh
7b4299eb4e kboot: Fix hostdisk_override
We were assuming that hostdisk_override was both a directory and a
file, which is not going to work very well. It's supposed to be a
single file, so recode it as such. Simplify erorr handling a little as
well and fix a return type-mismatch that doesn't matter for the
generated code (return NULL is the same as return false in this
context)

Sponsored by: Netflix
2023-03-02 11:12:10 -07:00
Warner Losh
35b4acad2f kboot: Use MIN instead of min
MIN works for any type, while min() is only for integers. So we were
rounding down to 0 since that's the size of 4GB truncated to an int.

Sponsored by: Netflix
2023-03-02 11:12:10 -07:00
Warner Losh
3a616b10d8 kboot: Better default boot device
Provide a better message when we can't find a boot device.

Sponsored by: Netflix
2023-03-02 11:12:09 -07:00
Warner Losh
6c47abb63b kboot: Hack for running on FreeBSD host
When we're running on a FreeBSD host, we can't open /proc/iomem.  So,
for now, just assume that we have 32GB of ram starting at 4GB.

Sponsored by: Netflix
2023-03-02 11:12:09 -07:00
Alfonso
68160fbd1f stand: Minor cleanup
Replace a cast '0' for a null pointers with NULL
Replace a 'goto loop' with a do-while loop in ufs and ext2fs.
Cast cp pointer to uintptr_t to test to see if it's aligned rather than long.

[ minor tweaks based on my & hps' review, reworded commit message ]
Reviewed by: imp, hps
Pull Request: https://github.com/freebsd/freebsd-src/pull/547
2023-02-27 16:26:49 -07:00
Robert Wing
c5f0198070 stand: fix buffer overflow in getrootmount()
Reviewed by:	imp, allanjude
Sponsored By:   Beckhoff Automation GmbH & Co. KG
Sponsored By:   Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D38734
2023-02-25 09:37:32 +00:00
Michael Paepcke
4d59545d0c stand: fix build userboot without zfs
Fix regression in building userboot -DWITHOUT_LOADER_ZFS

Fixes: e307eb94ae
MFC After: 3 days
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/665
2023-02-25 10:14:07 -07:00
John-Mark Gurney
ee97f198b4 Support SMBIOS v3 for 64-bit entry systems
Summary:
Under QEMU on arm64 systems, the smbios table is above 4GB
requiring a 64-bit address to access.

Reviewers: manu

Subscribers: imp, bcran, dab

Differential Revision: https://reviews.freebsd.org/D38721
2023-02-22 04:10:12 +00:00
Warner Losh
e9eee0f256 lua: Export loaded modules env vars via environment
To make auditing and debugging easier, export foo_load=XXX foo_name=yyy
etc to the loader env that we export to the kernel.

Original by:		dhw
Sponsored by:		Netflix
Discussed with:		kevans
Differential Revsion:	https://reviews.freebsd.org/D38466
2023-02-09 11:56:20 -07:00
Warner Losh
8c784bb8cf lua: Update to 5.4.4
Merge commit '755d9301ca89f02956fd17858b9d4d821ab5c972' from the
vendor branch. This updates us from lua 5.4.2 to 5.4.4.

In addition, it switches around how we flavor liblua for the boot loader
and flua. This is done to reduce diffs with upstream and make it easier
to import new versions (the current method has too many conflicts to
resolve by hand): we include luaconf.local.h from luaconf.h (the only
change to this file is now that #include at the end). We then define
what we need to: for flua (which does very little) and one for stand
(which creates the new FLOAT type out of int64).

Sponsored by:		Netflix
2023-02-08 10:33:26 -07:00
Simon J. Gerraty
3cc3c1eb79 Skip EFI framebuffer information if there is none
Avoid several lines of useless info if there is no EFI framebuffer

Reviewed by:	stevek, imp
Differential Revision:	https://reviews.freebsd.org/D38393
2023-02-05 17:23:09 -08:00
Mitchell Horne
dfbe8f6483 loader.efi: include help.fdt for FDT-enabled loader 2023-02-03 16:35:08 -04:00
Mitchell Horne
8859960436 loader: always install help files
Address two issues with current help file logic:

The existing condition prevents the common help file from being
installed when there are no additional help files defined. This results
in no loader.help on EFI platforms, for example.

Second, due to the fact that we build and install multiple loader types,
each successive install will clobber the previous loader.help. The
result is that we could lose type-specific commands, or possibly list
them in loaders that do not have such commands.

Instead, give each loader type a uniquely named help file. The EFI
loader will look for /boot/loader.help.efi, userboot will look for
/boot/loader.help.userboot, etc. The interpreter variant has no effect
on which help file is loaded.

This leaves the old /boot/loader.help unused.

Some credit for the final approach goes to Mathieu <sigsys@gmail.com>
for their version of the fix in https://reviews.freebsd.org/D22951.

PR:		267134
Reported by:	Daniel O'Connor <darius@dons.net.au>
Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28591
2023-02-03 16:35:06 -04:00
Warner Losh
335e3daaf0 kboot: Keep track of what's used in the segment
Keep track of how much is used in the segment as we allocate it to the
application. Set memsz to 0 first, and increment it as used. Adjust the
bufsz before we call kexec so the kernel copies the right amount (it's
an error for bufsz to be bigger than memsz, so we set them == when we
retrieve the segment). Make sure we round to the page size, otherwise
kexec_load gets cranky.

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D38315
2023-02-03 08:41:41 -07:00
Warner Losh
db8d0c0cd9 kboot: Allocate a really big first segment
Allocate a huge segment for the first kexec_load segments. We limit the
lessor of:
	allocation to the size of the remaining memory segment
	45% of available memory
	95% of the memory we can allocate

This allows us to have really large RAM disks. We likely need to limit
this to the amount we actually used, though, since this can be a lot of
memory.

We have to do this complicated calculation for a few reasons: First, we
need 2 copies of the loaded kernel in the memory: The kernel can copy
everything to a temporary buffer. Next, malloc (via mmap) is limited to
a certain amount due to over commit, so we have to not allocate all we
can (only most of what we can).

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D38314
2023-02-03 08:41:41 -07:00
Warner Losh
1d3a7e849b kboot: Remove externs
kboot_get_phys_load_segment is defined in kboot.h, so remove them from
the .c files.

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D38310
2023-02-03 08:41:41 -07:00
Warner Losh
045fa2801a kboot: Try to read UEFI memory from physical memory on aarch64
Try to open /dev/mem to read in the UEFI memory map. If we can't, then
we'll read it in the trampoline.

Retain reading in /proc/iomem to find reserved areas in Linux. We need
to know them for good places to put the kernel. These are not reflected
in the UEFI memory map. However, we should not adjust the UEFI memory
map since these reserved areas of the Linux kernel are free to be used
once we enter the kexec trampoline...

Sponsored by:		Netflix
Reviewed by:		tsoome, kevans, andrew
Differential Revision:	https://reviews.freebsd.org/D38264
2023-02-03 08:41:41 -07:00
Warner Losh
2b51791053 kboot: Don't need an arch pointer to get segments
There's no need for an arch pointer to get segments. We can call the
routine directly since we don't need this code to be called from
different context where a pointer is needed.

Sponsored by:		Netflix
Reviewed by:		kevans, andrew
Differential Revision:	https://reviews.freebsd.org/D38266
2023-02-03 08:41:40 -07:00
Warner Losh
84eb9b2306 kboot: MI fixups to enable aarch64 booting
A number of bug fixes to loading kernels and modules on aarch64 and amd64.
Fix offset calcuations.
Add a number of debugs, commented out for now (will GC them in the future)

With this, and the MD aarch64 commands, we can linux boot in qemu and on
real hardware.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D38261
2023-02-03 08:41:40 -07:00
Warner Losh
2069a2a08f kboot: Improve amd64 booting
Copy more of the necessary state for FreeBSD to boot:
o Copy EFI memory tables
o Create custom page tables needed for the kernel to find itself
o Simplify the passing of args to the trampoline by putting them
  on the stack rather than in dedicated memory.

This is only partially successful... we get only part way through the
amd64 startup code before dying. However, it's much further than before
the changes.

Sponsored by:		Netflix
Reviewed by:		tsoome, kevans
Differential Revision:	https://reviews.freebsd.org/D38259
2023-02-03 08:41:40 -07:00
Warner Losh
dfcca21075 kboot: aarch64 trampoline implementation
Update exec.c (copyied from efi/loader/arch/arm64/exec.c) to allow
execution of aarch64 kernels. This includes a new trampoline code that
handles copying the UEFI memory map, if available from the Linux FDT
provided PA. This is a complete implementation now, able to boot from
the LinuxBoot environment on an aarch64 server that only offers
LinuxBoot (though a workaround for the gicv3 inability to re-init is not
yet in FreeBSD). Many 'fit and finish' issues will be addressed in
subsequent commits.

Sponsored by:		Netflix
Reviewed by:		tsoome, kevans, andrew
Differential Revision:	https://reviews.freebsd.org/D38258
2023-02-03 08:41:40 -07:00
Warner Losh
0928550c3e stand: share bootinfo.c between EFI and KBOOT
Connect efi's bootinfo.c to the kboot build, and adjust to use
the kboot specific routines.

The getrootmount() call is independent of EFI. Remove ifdefs so it's
called for kboot too.

The differences between the kboot and efi bootinfo.c files are now tiny.
This could use some more refactoring, but this is a working checkpoint.

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D38350
2023-02-03 08:41:40 -07:00
Warner Losh
e49773296c kboot: aarch64 bi_loadsmap
Since aarch64 is different, it needs a different smap. We first see if
we have the PA of the table from the FDT info. If so, we copy that and
quit. Otherwise, we do the best we can in translating the /proc/iomap
into EFI Memory Table format.

We also send the system table to the kernel.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D38255
2023-02-03 08:41:40 -07:00
Warner Losh
b6755eabcc kboot: bi_loadsmap for amd64
Copy the EFI memory tables we were able to get into the MODINFOMD_SMAP
metadata area for the kernel.

Sponsored by:		Netflix
Reviewed by:		tsoome, kevans
Differential Revision:	https://reviews.freebsd.org/D38254
2023-02-03 08:41:40 -07:00
Warner Losh
6e99dc1375 kboot: Powerpc provide bi_loadsmap
It's just a stub, since the kernel learns of memory via FDT.

Sponsored by:		Netflix
Reviewed by:		tsoome, kevans
Differential Revision:	https://reviews.freebsd.org/D38253
2023-02-03 08:41:39 -07:00
Warner Losh
d1a3cc0abe kboot: Define bi_loadsmap for loading memory maps
Each architecture will soon be required to provide this to load memory
maps as metadata for the platforms that require it (or a stub function
for those that don't).

Sponsored by:		Netflix
Reviewed by:		tsoome, kevans
Differential Revision:	https://reviews.freebsd.org/D38252
2023-02-03 08:41:39 -07:00
Warner Losh
2e53353280 kboot: Call enumerate_memory_arch()
Now that all architectures provide this, enumerate the platform's memory
before we go to interact(). This needs to be done only once, but relies
on our ability to open host: files on some platforms, so it needs to be
done after devinit().

Sponsored by:		Netflix
Reviewed by:		tsoome, kevans
Differential Revision:	https://reviews.freebsd.org/D38251
2023-02-03 08:41:39 -07:00
Warner Losh
a967cd4db2 kboot: Update amd64 to use enumerate_memory_arch()
Move memory enumeration to the enumerate_memory_arch(), tweak the code a
bit to make that fit into that framework.

Also fix a bug in the name of the end location. The old code never found
memory (though amd64 doesn't yet work, this lead to using fallback
addresses that were good enough for QEMU...).

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D38250
2023-02-03 08:41:39 -07:00
Warner Losh
1c98cd1569 kboot: aarch64 memory enumeration enumerate_memory_arch()
We have an odd situation with aarch64 memory enumeration. The fdt that
we can get has a PA of the UEFI memory map, as modified by the current
running Linux kernel so it can retain those pages it needs for EFI and
other services. We have to pass in this EFI tablem but don't have access
to it in the boot loader. We do in the trampoline code, so a forthcoming
commit will copy it there for the kernel to use. All for want of /dev/mem
in the target environment sometimes.

However, we also have to find a place to load the kernel, so we have to
fallback to /proc/iomem when we can't read the UEFI memory map directly
from /dev/mem. It will give us good enough results to do this task. This
table isn't quite suitable to be converted to the EFI table, so we use
both methods. We'll fall back to this method also if there's no EFI
table advertised in the fdt. There's no /sys file on aarch64 that has
this information, hence using the old-style /proc/iomem. We're unlikely
to work if there's no EFI, though.

Note: The underlying Linux mechanism is different than the amd64 method
which seems like it should be MI, but unimplemented on aarch64.

Sponsored by:		Netflix
Discussed with:		kevans
Differential Revision:	https://reviews.freebsd.org/D38249
2023-02-03 08:41:39 -07:00
Warner Losh
1d5f967fa7 kboot: Add powerpc stub for enumerate_memory_arch()
Add stub for new MI interface for enumerating memory. Right now powerpc
looks in the FDT table at a later point in boot since we don't need to
pass a specific memory table to the kernel. Leave it like that for now,
but note plans for the future.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D38248
2023-02-03 08:41:39 -07:00
Warner Losh
81fbd74a4b kboot: space_avail -- how much space exists from 'start' to end of segment
Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D38313
2023-02-03 08:41:39 -07:00
Warner Losh
33e5b27254 kboot: Add parsing of /proc/iomem into seg.c
We'll be using this code for most / all of the platforms since iomem is
the only interface that can tell us of the reserved to the linux kernel
areas that we cannot place the new kernel into, but that we are free to
use once we hit trampoline. aarch64 will use this shortly, and similar
code in amd64 will be refactored when I make that platform work.

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D38309
2023-02-03 08:41:39 -07:00
Warner Losh
08779e839a kboot: Create segment handling code at main level
Create segment handling code up to the top level. Move it all into
seg.c, and make necessary adjustments for it being in a new file,
including inventing print_avail() and first_avail() to print the array
and find the first large enough memory hole.  aarch64 will use this,
and I'll refactor the other platforms to use it as I make them work.

Sponsored by:		Netflix
Discussed with:		kevans
Differential Revision:	https://reviews.freebsd.org/D38308
2023-02-03 08:41:39 -07:00
Warner Losh
9e50222131 kboot: MI part of the memory enumeration code
enumerate_memory_arch is called once early in kboot's startup to allow
us to discover the memory layout, reserved areas, etc of the system
memory. Add the MI interface part of this.

Sponsored by:		Netflix
Reviewed by:		tsoome, kevans
Differential Revision:	https://reviews.freebsd.org/D38247
2023-02-03 08:41:38 -07:00
Warner Losh
fb26a14fc4 kboot: Add aarch64 fdt fixup
Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D38256
2023-02-03 08:41:38 -07:00
Warner Losh
d76330efd9 kboot: Probe all disks and partitions for a kernel
Guess where to boot from when bootdev= isn't on the command line or
other config. Search all the disks and partitions for one that looks
like it could be a boot partition (same as we do when probing
zpools). Return the first one we find.

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D38319
2023-02-03 08:41:38 -07:00
Toomas Soome
a1f8a0c793 efiserialio: use port settings (sio->Mode) for initial setup
Use serial port setup done by system firmware.
ARM64 Hyper-V does hung if we attempt to override the defaults,
therefore we should default to use settings from firmware.

Tested by: schakrabarti@microsoft.com
PR:		266248
MFC after:	1 week
2023-02-03 11:53:32 +02:00
Warner Losh
ab926ba4c3 kboot: Remove kboot_loadaddr
Turns out that the loadaddr interface is not sufficiently expressive to
do the loading we need to do. Instead, we'll emulate some of its
features with inline math in copyin/copyout.

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D38260
2023-02-02 14:09:55 -07:00