Commit graph

2029 commits

Author SHA1 Message Date
Ad Schellevis
56b85fc10c stand: add EFI support for mmio serial consoles
When no legacy serial is found, we may be looking at a non-legacy mmio
serial device mapping, in which case the efi_devpath_name() for name
ConOutDev looks like this:

    VenHw(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX,0090DCFE00000000)/Uart(115200,8,N,1)/VenVt100()

Which should tell the kernel to attach a console to 0xfedc9000
(little endian 64 bit value).  The value is stored behind the
VENDOR_DEVICE_PATH struct as a byte stream hence we need to check
if said address is appended behind the node.  Also enforce use for
uart by requiring the console speed read from the same device.

There is no scientific process for "rs:2" derivation, but evidence would
indicate that this is the correct setting for existing MMIO EFI consoles.

See also: http://bsdimp.blogspot.com/2018/07/how-to-get-memory-mapped-serial-console.html
2025-07-09 10:05:48 +02:00
Alexander Ziaee
f50ca9a01b
stand/lua manuals: Describe better
The lua boot loader module manuals were getting pulled into search
results for FreeBSD, but not for "boot" or "loader". Reword them to
increase clarity for boot or loader searches, as well as the FreeBSD
search term which we've been scoping to system topic overview manuals.

MFC after:	3 days
Reviewed by:	imp, mhorne
Approved by:	mhorne (mentor)
Approved by:	re (cperciva)
Pull Request:	https://github.com/freebsd/freebsd-src/pulls/1628

(cherry picked from commit 5d59c1b4f14e2fa6388b1d75ee3243085f1c69f2)
(cherry picked from commit 651102873e96174e4e799d4e06538e1d841e182a)
2025-05-21 22:58:35 -04:00
Alexander Ziaee
5d9e62e1cd
cdboot.8: Initial manual page
Add cdboot to the reference manual, fixing an undocumented bug where it
is undocumented. There's almost nothing here, but that's better than
"only imp and jhb know what this is".

MFC after:		3 days
Reported by:		jhb, imp
Reviewed by:		mhorne
Approved by:		mhorne (mentor)
Approved by:		re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D50274

(cherry picked from commit ecdb0b79bf93a2b8392694bd266c5930ca42bab5)
(cherry picked from commit d659366cc62a70b4863bddf226f6209d13ab65c0)
2025-05-21 22:58:21 -04:00
Ahmad Khalifa
1d111b39e5 loader: provide error message in command_errmsg instead of printing
Also provide an error message when argc is too long instead of printing
"no error message".

Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1381

(cherry picked from commit 6fdb07d5b7e9293a6851a23b7ecb26636cf1ec1e)
2025-04-27 21:43:31 -06:00
Ahmad Khalifa
8ec2792258 loader: remove unneeded variable
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1381

(cherry picked from commit a698c15a41afca19f87e11d4f8ce5664f992673b)
2025-04-27 21:43:31 -06:00
Ahmad Khalifa
806e2accc3 loader: actually change the staging slop
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1381

(cherry picked from commit c10511375252e53d6c9fe47f97e254f1380a89c5)
2025-04-27 21:43:30 -06:00
Ravi Pokala
b337e9fd11 loader: Add the CPU identification string to the data which is visible
in the bootloader.

Reviewed by:	imp
MFC after:	1 week
Sponsored by:	Vdura
Differential Revision: https://reviews.freebsd.org/D49708

(cherry picked from commit 3adae4f27d600f0be7904eb1bb30e79d90386793)
2025-04-20 00:01:18 -07:00
Olivier Certner
0c5d22eacf
loader.kboot: smbios: Add a comment about v3 entry point being favored
Note that the behavior here is consistent with BIOS and EFI boot.

Reviewed by:    imp, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49293

(cherry picked from commit 0f492f79084f2f88c9d5ade92f900e26cc47a7d0)
2025-04-08 15:38:29 +02:00
Olivier Certner
807d51be80
loader.efi: smbios: Favor the v3 (64-bit) entry point
Be consistent with what we are now doing with non-EFI boot (but with the
difference that EFI runs in 64-bit mode on 64-bit platforms, so there is
no restriction that the v3 entry point should be below 4GB).

While here, move out the EFI smbios detection code in a separate
sub-routine.

Reviewed by:    imp, markj
MFC after:      2 weeks
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49292

(cherry picked from commit 96f77576e9ea83b3a5d1a02a24da7d54c06a58a8)
2025-04-08 15:38:29 +02:00
Olivier Certner
f6b90dc8af
libsa: smbios_probe(): Strictly obey specified entry point address
When such an address is known, do not search elsewhere, contrary to what
we are doing on non-EFI boot (see SMBIOS_START and SMBIOS_LENGTH).

Reviewed by:    markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49291

(cherry picked from commit 1ee8714950b8d07ccd172f2bcbbbaa91f02ef9e7)
2025-04-08 15:38:28 +02:00
Olivier Certner
d19f1559d0
libsa: smbios_detect(): Return the entry point address
In particular, this allows the caller to know whether the detection was
successful.

Reviewed by:    imp, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49290

(cherry picked from commit 9dad0ba286807c4aa2886f13705fca2334bb4759)
2025-04-08 15:38:28 +02:00
Olivier Certner
9b8e1558c9
libsa: smbios: Allow to run smbios_probe() multiple times
This is in preparation for modifying the EFI loader to favor a v3 table
if present.

As an impact, caller smbios_match() has been changed so that it only
calls smbios_probe() with NULL (non-EFI discovery) once.

While here, expand the original XXXRP comment in smbios_match().

Reviewed by:    imp, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49289

(cherry picked from commit c340797e08d8c20983ea57de88992f988fe7bb9b)
2025-04-08 15:38:28 +02:00
Olivier Certner
7b0350b376
libsa: smbios: Use 64-bit entry point if table below 4GB on non-EFI boot
On amd64, boot blocks and the non-EFI loader are 32-bit compiled as
clients of BTX, so cannot access addresses beyond 4GB.  However, the
64-bit entry point may refer to a structure table below 4GB, which we
want to use if the BIOS does not provide a 32-bit entry point.  The
situation is similar for powerpc64.

Consequently, always compile-in support for the 64-bit entry point, but
ensure that it is not selected on 32-bit-compiled boot loaders if the
structure table it points to grows beyond 4GB (as it is then not
accessible).

PR:             284460
Reviewed by:    markj
MFC after:      2 weeks
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49288

(cherry picked from commit 7f005c6699f429c2f762b4dd8fb39b3bcf5378e2)
2025-04-08 15:38:28 +02:00
Olivier Certner
93af0db0d5
libsa: smbios: Favor the v3 (64-bit) entry point on non-EFI boot
When both the 32-bit and 64-bit entry points are present, the SMBIOS
specification says that the 64-bit entry point always has at least all
the structures the 32-bit entry point refers.  In other words, the
32-bit entry point is provided for compatibility, so we assume the
64-bit one has more chances to be filled with adequate values.

Doing this also increases consistency with the kernel's smbios(4)
driver.

Reviewed by:    imp, markj
MFC after:      2 weeks
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49287

(cherry picked from commit 3f744fb8b2c5528c2170be113e0e4947eee3cffc)
2025-04-08 15:38:27 +02:00
Olivier Certner
5feb3c8ea6
libsa: smbios: Reject a 64-bit entry point with revision 0
According to the specification, such an entry point may have different
data in bytes at offsets 0x0c to 0x17 (included).  In such a case,
interpreting them as the Structure Table Maximum Size and Address fields
could have catastrophic consequences.

Reviewed by:    imp, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49286

(cherry picked from commit 64fc51a9cf71b2308399b7b7dee8a9bc9468877b)
2025-04-08 15:38:27 +02:00
Olivier Certner
330f1a4281
libsa: smbios: Stop parsing on an End-of-Table structure
This structure exists since SMBIOS v2.2 and indicates that there are no
structures to be parsed beyond this point.  For backwards compatibility,
the standard recommends that system software ensures that this structure
covers the rest of the SMBIOS structure table area as reported by the
Structure Table Address, and the Structure Table Maximum Size (64-bit
entry point) or the Structure Table Length (32-bit entry point), which
makes existing parsers continue to work correctly as they usually ignore
unknown structure types.  However, this is not a requirement, so be
bullet proof and immediately stop parsing in this case.

Reviewed by:    imp, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49285

(cherry picked from commit 7e61fc76400cce08de39adde99b879f0bca21b7d)
2025-04-08 15:38:27 +02:00
Olivier Certner
19a5b6aaab
libsa: smbios: probe: BCD revision parsing is v2-only code; Expand comments
The code parsing the BCD revision is only meaningful on v2, so move it
away into the appropriate 'if' branch to ease reading (and to avoid
a useless test).

Expand comments.  In particular, make it clear that setting
'smbios.count' to '-1' removes the limit of the number of structures to
parse.

No functional change.

Reviewed by:    imp, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49284

(cherry picked from commit d1f351fcb22f46805ff0a0cecf6ce787f84d31d5)
2025-04-08 15:38:27 +02:00
Olivier Certner
2337cd86dc
libsa: smbios: Export the used entry point type to the kernel
Via the kenv 'smbios.entry_point_type'.

Reviewed by:    imp, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49283

(cherry picked from commit 3b2303ba3dba4e33ee0866953b4390c5481cac83)
2025-04-08 15:38:26 +02:00
Olivier Certner
4b7fbd67ed
libsa: smbios: Make 'is_64bit_ep' a field of 'smbios'
No functional change.

Reviewed by:    imp, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49282

(cherry picked from commit a39ab17c9abb74019f15b02970d8739c97d4185c)
2025-04-08 15:38:26 +02:00
Olivier Certner
0a2c8f6691
libsa: smbios: Rename 64-bit entry point's guards
Rename HAS_SMBV3 to SMBIOS_64BIT_EP, as it will soon be externally
defined in some cases, and 'isv3' to 'is_64bit_ep'.  These are more
accurate names for what they actually control/indicate.

No functional change.

Reviewed by:    imp, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49281

(cherry picked from commit 2aa0067548a9dd68af263b3154923c0c25d8f600)
2025-04-08 15:38:26 +02:00
Olivier Certner
4af7f393ec
libsa: smbios: style(9): Entry point parsing comments
Move the comments so that lines stay of reasonable length.

Remove comments that state the obvious.

Reviewed by:    markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49280

(cherry picked from commit a609592ddcdf4e33a5126ffcdd12e6a609078d4c)
2025-04-08 15:38:26 +02:00
Olivier Certner
6a937165f9
libsa: smbios: style(9): SMBIOS_GET8(): Split overlong line
No functional change.

Reviewed by:    markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49279

(cherry picked from commit 085c8bdec5bcb01acff5c6e9cd2d8864f44a20cd)
2025-04-08 15:38:25 +02:00
Ahmad Khalifa
3b496eb1bd loader: Fix 32-bit compatibility
main.c - Fix rsdp cast.
framebuffer.c -
 	- Use temp variable instead of directly passing pointer when
          EFI_PHYSICAL_ADDRESS is expected.
	  Also fix FreePages cast.
	- Mask framebuffer address given to us by UEFI.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098

(cherry picked from commit 6818ff7797c6a9ab104e5d7e91d4e422874bf50d)
2025-03-27 10:21:55 -07:00
Ahmad Khalifa
0ca77a6363 loader: Allow overriding NEWVERSWHAT
This can be useful when making alternate versions of the loader.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098

(cherry picked from commit dcc7b3698d03b2aedc68e88b4e05a0b32b435429)
2025-03-25 19:28:39 -06:00
Ahmad Khalifa
43dc900d75 loader: Fix G overflowing for G(4) on 32-bit builds
Prevent G(4) and over from overflowing for 32-bit builds.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098

(cherry picked from commit 5360d017be83d2502ba262f391ef45b07e0de680)
2025-03-25 19:28:38 -06:00
Ahmad Khalifa
7d7dc14d6b stand/efi: Add a 32-bit variant of libefi
In preparation for supporting 64-bit machines with 32-bit UEFI firmware,
add a 32-bit variant of libefi since we need to compile both the 64-bit
version and the 32-bit version at the same time.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098

(cherry picked from commit f0d5b1bdf075c68ddb1dcfbc5a0eda0214510b5b)
2025-03-25 19:28:38 -06:00
Ahmad Khalifa
92aa078752 loader: Fix shadow_fb allocation
Using AllocateMaxAddress here means that gfx_state->tg_shadow_fb is
treated as the highest address we can receive. Since
gfx_state->tg_shadow_fb is NULL, we never receive anything. Use
AllocateAnyPages instead.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098

(cherry picked from commit 95f75b0e6e5f71d34e4eef151f43822e33838663)
2025-03-25 19:28:38 -06:00
Ahmad Khalifa
ce02470205 stand: Add support for 64-bit machines with 32-bit UEFI implementations
Some machines have 64-bit capable cpus but are stuck on 32-bit uefi
firmware.

Add support for them by building a new "loader_ia32" with
LOADER_DEFAULT_INTERP along with the 64-bit one. The loader
can be disabled using MK_LOADER_IA32.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098

(cherry picked from commit f8ca5d45c3c1829759ecd87cb95d53e5ab7d0811)
2025-03-25 19:28:38 -06:00
Ahmad Khalifa
703287df5e loader.conf.5: Correct terminal size
Signed-off-by: Ahmad Khalifa <ahmadkhalifa570@gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1292

(cherry picked from commit 1dbbce9744500f2fa4d6ca5ec888835c0f7b9161)
2025-03-25 19:28:37 -06:00
Ahmad Khalifa
0a4a5b8cef efi_console: Stay inline with the UEFI spec
The UEFI spec states that the minimum garunteed terminal resolution is
80x25.

Signed-off-by: Ahmad Khalifa <ahmadkhalifa570@gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1292
(cherry picked from commit 3b68c491d37196bb76a95bce3c02f7c6d5ba22fd)
2025-03-25 19:28:37 -06:00
Ahmad Khalifa
df872d66f2 loader: Increase buffer size to accommodate longer commands
The longest command we have is "efi-autoresizecons". That combined with
the two spaces before and after the command gives us a total of 23
characters including the null-terminator.

Also move the two trailing spaces to their own pager_output call so they
don't get truncated if the command is too long and increase the minimum
string length to 20 in order to fix alignment issues caused by the
increased buffer size.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1277

(cherry picked from commit ab08da5328b4175e399d8e59adc4dfad0eea24f1)
2025-03-25 19:28:37 -06:00
Warner Losh
454938d04b loader.conf: Document boot_verbose
And for the moment, point people to loader.efi(8) for all boot_*
variables.

Sponsored by: Netflix
MFC After: 1 week

(cherry picked from commit 36f1db7a37aed8e831ec385a542ef3377890bfce)
2025-03-11 22:14:42 -06:00
Jose Luis Duran
8f652eb792
stand: Fix brand positioning on framebuffer console
The drawer.lua script ignores the values in loader_brand_x and
loader_brand_y on framebuffer consoles, always positioning the brand at
(1, 1).

Allow it to be positioned by accepting the x and y values just like the
text version.  For example:

/boot/lua/gfx-nanobsd.lua:

    return {
    	brand = {
    		graphic = {
    			""
    		},
    		requires_color = true,
    		image = "/boot/images/freebsd-logo-rev.png"
    	}
    }

/boot/loader.conf.d/bootloader.conf:

    loader_logo="none"
    loader_brand="nanobsd"
    loader_brand_x="15"

PR:		255202
Reviewed by:	manu, imp
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D49092

(cherry picked from commit 7d1d7f42302d80c33243501601b77323acc0717f)
2025-03-03 05:29:47 +00:00
John Baldwin
b67839d769 stand/kshim: Replace devclass_equal with calls to strcmp
Reviewed by:	imp, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D48412

(cherry picked from commit 40d7ba08773751ff7d0df1a3f112b32d1d04e5ec)
2025-02-27 10:25:39 -05:00
John Baldwin
aa2b4a1726 stand/usb: Quiet warnings so this builds again
Reviewed by:	markj, emaste
Differential Revision:	https://reviews.freebsd.org/D48411

(cherry picked from commit f6f5aa8a2df5910b0769ab7cd0e6199c9b2ab624)
2025-02-27 10:25:10 -05:00
John Baldwin
bc8f3704f1 stand/kshim: Update for devclass being removed from DRIVER_MODULE
The kshim code abused the devclass argument to DRIVER_MODULE in some
odd ways.  Instead, refactor the devclass handling to more closely
mirror what new-bus does in the kernel by having a linked list of
devclasses looked up by name and associate devices with a devclass.

Devices are now only associated with a module while probing and
attaching.

Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D48409

(cherry picked from commit ee15875c01593b287e55147c482b914e3ab01152)
2025-02-27 10:23:52 -05:00
Alexander Ziaee
cf522ceef8
ports/filesystems: Fix fallout
A new filesystems category was created in the ports tree, with 142
filesystem related ports moved to there, some of them renamed.
Update all references in the src tree to the new locations.

PR:		283881
Fixes:		ports:6e2da9672f79f44 (filesystems: add new category)
MFC after:	1 month
Reviewed by:	fuz, mhorne, bapt
Accepted by:	mhorne (mentor)
Differential Revision:	https://reviews.freebsd.org/D48406

(cherry picked from commit 066ef2aec187ae93a9df01d25fa8e47d67ff972b)
2025-02-26 20:14:37 -05:00
Li-Wen Hsu
ef3ed0726f Canonicalize the name of the FreeBSD Foundation
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit dab59af3bcc7cb7ba01569d3044894b3e860ad56)
2025-02-19 09:58:47 -05:00
Kirk McKusick
5572827428 Defer the January 19, 2038 date limit in UFS1 filesystems to February 7, 2106
Standardize the definition of a UFS dinode

Differential Revision: https://reviews.freebsd.org/D48472

(cherry picked from commit 1111a44301da39d7b7459c784230e1405e8980f8)
(cherry picked from commit aa90fbed151de512ab6e59f75df009533a15751f)
(cherry picked from commit 256389eaf158acaf67f0530764be8af68edee78c)
(cherry picked from commit 6cd973d903c8f214d84daf91eb75047631bf1618)
(cherry picked from commit e1ebda4458bbaf7d85fb803e20f3afc5441f24d9)
2025-02-06 11:25:09 -08:00
Warner Losh
708c8a926a loader: Use Cyan instead of Blue for some menu items
BLUE often translates to DARK BLUE. On BLACK this is hard to
read. Instead, use CYAN which looks good on both black and white
backgrounds.

Discussed with: kevans
Sponsored by: Netflix

(cherry picked from commit baa7e9cd3083ccaed8f26e9ad786ff9657ab85fc)
2024-12-28 11:14:58 -07:00
Warner Losh
28e212c740 loader: Fix 0 vs 1 confusion for column numbers
In two places we use '0' for a column number. However, the upper left
hand corner of the screen is 1, 1. Fix those two confusions. Also, fix
a comment that flipped the coordinates in a comment (I'm used to the
vt100 convention where it's row, column (eg y, x)) and didn't notice
the rest of the code uses x, y.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D46777

(cherry picked from commit 604919c47fa4092db08dadd282851afc9cba0a90)
2024-12-28 11:14:41 -07:00
Warner Losh
940984f4c1 loader: Use printc instead of print to fit in 24,80
print automatically adds a newline, while printc does not. Use printc in
preference to print for managing the autoboot message. This means we can
use line 24 safely on a 24x80 terminal, restoring some functionality
that was lost in 101afbc6ee2f0.

Note: we still set the default curosor position to 25,1 in screen.lua,
but real VT100s (and successors) will treat any row larger than the
pnumber of rows in a cursor motion command to be the last physical row
(this is so you can move to 9999,9999 and do a cursor location query to
get the size of the screen). Keeping that as is looks better on a
typical VGA console.

Fixes: 101afbc6ee2f0
Sponsored by: Netflix
Reviewed by: kevans
Differential Revision:	https://reviews.freebsd.org/D46771

(cherry picked from commit 3fb656f8ef21332d96de8097521aaa51ddeb649d)
2024-12-28 11:14:27 -07:00
Warner Losh
3463f0d85a loader/4th: Move from hint.acpi.0.rsdp to acpi.rsdp
Use acpi.rsdp to test for ACPI. 4th wasn't updated with the old compat
was dropped a while ago.

MFC After:	1 week
Sponsored by:	Netflix

(cherry picked from commit 37798b1d5dd12cd5e842b6f99135a2e4af8cf9e0)
2024-12-28 11:13:19 -07:00
Warner Losh
7f2d1cac4e loader/menu: tweak for added line
I added a line to the menu, but didn't adjust so things were a
line off. Make the necessary adjustments.

Fixes: 7cb65be96d47
Sponsored by: Netflix
MFC After: 3 days

(cherry picked from commit 101afbc6ee2f06f77e6886f1f3ffe115c579967c)
2024-12-28 11:12:26 -07:00
Tatsuki Makino
09cfc202bc btx: Align the PXE prompt with other options
To fit within in the same space, drop the newline before the PXE
prompt to make room for the additional space character.

PR:		281494
(cherry picked from commit 4fa4693dcdd8176f1d12cce5f026eb2052036dfc)
2024-11-30 21:46:03 -05:00
Graham Percival
260a432417 manuals: Misc syntax fixes
These were reported by `mandoc -T lint ...` as errors.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1472

(cherry picked from commit 759ddb4d246f5db5963369a82f1ab165d0dfccce)
2024-11-04 12:15:27 -04:00
Graham Percival
666d4c2bbd manuals: Misc syntax fixes
These were reported by `mandoc -T lint ...` as errors.

The rendered output (in ascii and html) is not affected by this commit.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1459

(cherry picked from commit 229381deb270e8e240d20b572c63234a61cbd977)
2024-11-04 12:13:50 -04:00
Graham Percival
6a65bb7ed8 manuals: Fix "missing end of block" errors
These were reported by `mandoc -T lint ...` as errors.

The rendered output (in ascii and html) is not affected by this commit.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1454

(cherry picked from commit 643fc698203b9b0ed386b0583c2200c428135c9d)
2024-11-04 12:08:13 -04:00
Tatiana
adce5eaab9 loader.efi: Fix LOADER_NET_SUPPORT=no builds
We include too many references to networking things in the
non-networking build for loader.efi. Ifdef out netserver command when we
are disabling network support to resolve.

PR: 277528
MFC After: 2 days
Reviewed by: imp

(cherry picked from commit 47ef2a131091508e049ab10cad7f91a3c1342cd9)
2024-11-03 17:51:25 -07:00
Warner Losh
f2103edaf5 loader: Fix boot menu on BIOS
Only the gfx-enabled boot loader supports unicode. Otherwise, we have to
use the old cons25 / ibmpc upper code page drawing characters. Check to
see if we have the gfx.term_drawbox function. If we do, we support the
unicode drawing characters. If we don't, then we have an older loader
that doesn't support it *OR* we have the reduced function, text-only
boot loader. In either of those cases, we need to use the old graphics
characters. Abstract all those details into core.hasUnicode function.

PR: 282465
MFC After: 2 day
Sponsored by: Netflix
Differential Revision:	https://reviews.freebsd.org/D47403

(cherry picked from commit c2ba66d4d01f23303352bfe3cbd50ff5d9a05947)
2024-11-03 17:51:24 -07:00