Commit graph

366 commits

Author SHA1 Message Date
Shawn Anastasio 3465f14dac ossl: Add support for powerpc64/powerpc64le
Summary:
Add support for building ossl(4) on powerpc64* by implementing ossl_cpuid and
other support functions for powerpc. The required assembly files for ppc were
already present in-tree.

Test Plan: The changes were tested using the in-tree tools/tools/crypto/cryptocheck.c tool on both powerpc64 and powerpc64le on a POWER9 system.

Reviewed by:	#powerpc, jhibbits, jhb
Differential Revision: https://reviews.freebsd.org/D41837
2024-06-21 03:29:04 -04:00
Warner Losh b8a7548399 LINT: Don't build bnxt on 32-bit platforms
Sponsored by: Netflix
Fixes: acd884dec9 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
2024-05-29 10:50:27 -06:00
HP van Braam c733dc7a6f ahc(4): Default to memory mapped IO
When this driver was written it made sense to make this default to off,
but these days almost all BIOSses will do the right thing. Furthermore
non-mmio communication only works on Intel architectures.

So lets default to allowing mmio, but not change the semantics of the
AHC_ALLOW_MEMIO flag to not break existing installs. Also document the
already existing hint.ahc.<unit>.allow_memio.

Signed-off-by: HP van Braam <hp@tmm.cx>
Reviewed by: imp (small style tweak)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1219
2024-05-09 20:15:08 -06:00
Lexi Winter 8a8daeafaf sys/*/conf: do not use "../../conf/" when including std.*
Since config(8) searches sys/conf by default, there's no need to specify
the full relative path here; replace it by the filename alone.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1124
2024-04-23 15:13:31 -06:00
Lexi Winter 4f8f9d708e sys: add conf/std.debug, generic debugging options
The new sys/conf/std.debug contains the list of debugging options
enabled by default in -CURRENT, so they don't need to be listed
individually in every kernel config.

The enabled options are the set of all debug options which were enabled
for the GENERIC kernel on any platform.  This means some architectures
now have debugging options enabled in GENERIC which weren't previously
enabled:

- amd64: [1]
- arm64: [2]
- arm: [2]. [3]
- i386: [1], [2]
- powerpc: [1], [2], [3]
- riscv: [2]

[1] ALT_BREAK_TO_DEBUGGER is now enabled.
[2] BUF_TRACKING, FULL_BUF_TRACKING, and QUEUE_MACRO_DEBUG_TRASH are now
    enabled.
[3] DEADLKRES is now enabled.

While here, move the documentation for the (commented out) K*SAN options
for amd64 from GENERIC to NOTES.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1124
2024-04-23 15:13:31 -06:00
Bjoern A. Zeeb 89c1e54a71 ath(4): always enable 11n
Enabling 11n for ath(4) so far was handled by a kernel option, which
was only enabled for certain kernel configurations.
In order to allow loading ath(4) as a module with 11n support on
all platforms, remove the kernel option and unconditionally enable
11n in ath(4).

Reported by:	pkubaj
Discussed with:	adrian in D43549.
Reviewed by:	adrian, imp
Differential Revision: https://reviews.freebsd.org/D43964
2024-02-22 22:34:17 +00:00
Kristof Provost 84d12f887c Add a COMPAT_FREEBSD14 kernel option
Use it wherever COMPAT_FREEBSD13 is currently specified.

Reviewed by:	brooks, zlei
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D42100
2023-10-10 11:48:22 +02:00
Warner Losh 031beb4e23 sys: Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:58 -06:00
Marius Strobl 37c8ee8847 ath(4): Remove MIPS AHB frontend and join PCI one w/ main support again
Following the removal of general MIPS support, there's no longer a need
to have the AHB bus-frontend in place, which according to Linux sources
also isn't used with any non-MIPS SoCs. For simplicity, PCI bus support
is only made conditional on the main one again, i. e. device ath_pci is
removed, and built into the main module, i. e. if_ath_pci.ko obsoleted,
respectively.
Effectively, this reverts the following commits and associated changes:
dba9c85977
e849bb3ecb

Approved by:	adrian
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D41354
2023-08-08 22:30:13 +02:00
Alexander V. Chernikov 3091d980f5 netlink: add NETLINK to the DEFAULTS for each architecture
NETLINK is going to replace rtsock and a number of other ioctl/sysctl interfaces.
In-base utilies such as route(8), netstat(8) and soon ifconfig(8)
 are being converted to use netlink sockets as a transport between
 kernel and userland.
In the current configuration, it still possible have the kernel
 without NETLINK (`nooptions NETLINK`) and use the aforementioned
 utilies by buidling the world with `WITHOUT_NETLINK` src.conf knob.
However, this approach does not cover the cases when person unintentionally
 builds a custom kernel without netlink and tries to use the standard userland.

This change adds `option NETLINK` to the default options for each
 architecture, fixing the custom kernel issue.
For arm, this change uses `std.armv6` and `std.armv7` (netlink already in)
 instead of DEFAULTS.

Reviewed By: imp
Differential Revision: https://reviews.freebsd.org/D39339
2023-04-02 15:27:21 +00:00
Piotr Kubaj e552cac3d7 powerpc64*: port mlx5, OFED, KTLS and krping
Summary:
This review ports mlx5 driver, kernel's OFED stack (userland is already enabled), KTLS and krping to powerpc64 and powerpc64le.

krping requires a small change since it uses assembly for amd64 / i386.

NOTE: On powerpc64le RDMA works fine in the userspace with libmlx5, but on powerpc64 it does not. The problem is that contrib/ofed/libmlx5/doorbell.h checks for SIZEOF_LONG but this macro exists on neither powerpc64* nor amd64. Thus, the file silently goes to the fallback function written for 32-bit architectures. It works fine on little-endian architectures, but causes a hard fail on big-endian. It's possible it may also cause some runtime issues on little-endian.
Thus, on powerpc64 I verified that RDMA works with krping.

Reviewers: #powerpc, hselasky

Subscribers: bdrewery, imp, emaste, jhibbits

Differential Revision: https://reviews.freebsd.org/D38786
2023-02-26 23:38:33 +01:00
Piotr Kubaj f5a1c871e6 Revert "powerpc64*: port mlx5, OFED, KTLS and krping"
Wrong push, another commit was supposed to be pushed.

This reverts commit 83d6d8877e.
2023-02-26 00:57:41 +01:00
Piotr Kubaj 83d6d8877e powerpc64*: port mlx5, OFED, KTLS and krping
Summary:
This review ports mlx5 driver, kernel's OFED stack (userland is already enabled), KTLS and krping to powerpc64 and powerpc64le.

krping requires a small change since it uses assembly for amd64 / i386.

NOTE: On powerpc64le RDMA works fine in the userspace with libmlx5, but on powerpc64 it does not. The problem is that contrib/ofed/libmlx5/doorbell.h checks for SIZEOF_LONG but this macro exists on neither powerpc64* nor amd64. Thus, the file silently goes to the fallback function written for 32-bit architectures. It works fine on little-endian architectures, but causes a hard fail on big-endian. It's possible it may also cause some runtime issues on little-endian.
Thus, on powerpc64 I verified that RDMA works with krping.

Reviewers: #powerpc, hselasky

Subscribers: bdrewery, imp, emaste, jhibbits

Differential Revision: https://reviews.freebsd.org/D38786
2023-02-26 00:56:37 +01:00
Mike Karels 8995b96f34 powerpc kernel config: clean up whitespace
Most options in kernel config files use "options<space><tab>OPTION".
This allows the option to be commented out without shifting columns.
A few options had two tabs, and some had spaces.  Make them consistent.
2023-02-24 08:36:29 -06:00
Alexander V. Chernikov e80699a809 netlink: add NETLINK to GENERIC.
This is a followup of 692e19cf51 (add netlink to GENERIC@amd64).

Netlink is a communication protocol defined in RFC 3549. It is async,
TLV-based protocol, providing 1-1 and 1-many communications between kernel
and userland. Netlink is currently used in Linux kernel to modify, read and
subscribe for nearly all networking states. Interface state, addresses, routes,
firewall, rules, fibs, etc, are controlled via Netlink.

Netlink support was added in D36002. It has got a number of improvements and
first customers since then:
* net/bird2 got netlink support, enabling route multipath in FreeBSD
* netlink-based devd notifications are being worked on ( D37574 ).
* linux(4) fully supports and depends on Netlink

Enabling Netlink in GENERIC targets two goals.
The first one is to provide stability for the third-party userland applications,
so they can rely on the fact that netlink always exists since 14.0 and potentially 13.2.
Loadable module makes life of the app delepers harder. For example, `net/bird2` can be
either build with netlink or rtsock support, but not both.

The second goal is to enable gradual conversion of the base userland tools
to use netlink(4) interfaces. Converting tools like netstat (D36529), route,
ifconfig one-by-one simplifies testing and addressing the feedback.
Othewise, switching all base to use netlink at once may be too big of a leap.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D37783
2023-01-31 14:22:11 +00:00
Richard Scheffenegger bb1d472d79 tcp: make CUBIC the default congestion control mechanism.
This changes the default TCP Congestion Control (CC) to CUBIC.
For small, transactional exchanges (e.g. web objects <15kB), this
will not have a material effect. However, for long duration data
transfers, CUBIC allocates a slightly higher fraction of the
available bandwidth, when competing against NewReno CC.

Reviewed By: tuexen, mav, #transport, guest-ccui, emaste
Relnotes: Yes
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D36537
2022-09-13 12:09:21 +02:00
Justin Hibbits 35ce7d40f9 powerpc/booke: Clamp MAXCPU to 32 for Book-E platforms
Since the likelihood of new Book-E PowerPC SoCs being produced is near
zero clamp MAXCPU to around the highest number of cores/threads
available currently, for both 64-bit and 32-bit.  Even though the
current highest core/thread count is 24, the cap is set at 32 in case
there is code that assumes power of 2.
2022-08-06 11:42:19 -04:00
Alfredo Dal'Ava Junior 8b57548e9a powerpcspe: make GEOM_LABEL kernel built-in
Make powerpspe kernel config in sync with other targets making
GEOM_LABEL built-in to allow use of labels when mounting partitions.

MFC after:	2 days
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
2022-08-02 18:17:09 -03:00
Piotr Kubaj 25768526bb powerpc: enable wlan and ath modules in GENERIC64*
Reviewed by:	jhibbits (src)
Differential Revision: https://reviews.freebsd.org/D35089
2022-04-28 11:42:39 +02:00
Piotr Kubaj 1d307cc85c powerpc: add GENERIC64LE-NODEBUG config and improve GENERIC64-NODEBUG
Also remove whitespace from GENERIC-NODEBUG.

Approved by: jhibbits (src)
Differential review:	https://reviews.freebsd.org/D34785
2022-04-22 01:06:13 +02:00
Alfredo Dal'Ava Junior aa37fbc200 powerpcspe: add virtio in-kernel support
Adding it in order to make easier using powerpcspe images under qemu

Reviewed by:	jhibbits
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D34554
2022-03-15 09:34:22 -03:00
Alfredo Dal'Ava Junior c3b6408ee8 powerpc: FreeBSD kernel compatibility cleanup
Adjust FreeBSD kernel backward compatibility list

Reviewed by:	jhibbits, pkubaj
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D33421
2022-03-07 14:30:26 -03:00
John Baldwin c227269e2f Stop adding -Wredundant-decls to CWARNFLAGS.
clang doesn't implement it, and Linux doesn't enforce it.  As a
result, new instances keep cropping up both in FreeBSD's code and in
upstream sources from vendors.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D34144
2022-02-07 12:47:51 -08:00
Piotr Kubaj a0f3abb098 powerpc: enable ice in GENERIC64LE
Approved by:	erj
Differential Revision: https://reviews.freebsd.org/D33974
2022-01-21 02:17:46 +01:00
Justin Hibbits 4873653519 powerpc64le: enable ISA_206_ATOMICS option
powerpc64le requires at minimum POWER8 hardware, so ISA 2.06 atomic
instructions are always available.

This isn't so for powerpc64 (BE), so isn't enabled by default there.
2022-01-13 21:47:05 -06:00
Alfredo Dal'Ava Junior 8d1ab5ad84 powerpc: kernel config style
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
Reviewed by:	imp
2021-12-14 21:01:25 -03:00
Alfredo Dal'Ava Junior e671037b3c powerpc64le: add LINT64LE kernel config
Add configuration file to be used by "FreeBSD-<branch>-powerpc64le-LINT"
CI/Jenkins job

Reviewed by:	lwhsu
MFC after:	2 days
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D33136
2021-11-29 12:08:26 -03:00
Kristof Provost 4e85b64890 Add a COMPAT_FREEBSD13 kernel option
Use it wherever COMPAT_FREEBSD11 is currently specified.

Reviewed by:	jhb (previous version)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D33005
2021-11-17 03:08:40 +01:00
Warner Losh 7e3c9ec906 tcp: better congestion control defaults
Define CC_NEWRENO in all the appropriate DEFAULTS and std.* config
files. It's the default congestion control algorithm.  Add code to cc.c
so that CC_DEFAULT is "newreno" if it's not overriden in the config
file.

Sponsored by: Netflix
Fixes: b8d60729de ("tcp: Congestion control cleanup.")
Revired by: manu, hselasky, jhb, glebius, tuexen
Differential Revision:	https://reviews.freebsd.org/D32964
2021-11-12 12:16:11 -07:00
Randall Stewart b8d60729de tcp: Congestion control cleanup.
NOTE: HEADS UP read the note below if your kernel config is not including GENERIC!!

This patch does a bit of cleanup on TCP congestion control modules. There were some rather
interesting surprises that one could get i.e. where you use a socket option to change
from one CC (say cc_cubic) to another CC (say cc_vegas) and you could in theory get
a memory failure and end up on cc_newreno. This is not what one would expect. The
new code fixes this by requiring a cc_data_sz() function so we can malloc with M_WAITOK
and pass in to the init function preallocated memory. The CC init is expected in this
case *not* to fail but if it does and a module does break the
"no fail with memory given" contract we do fall back to the CC that was in place at the time.

This also fixes up a set of common newreno utilities that can be shared amongst other
CC modules instead of the other CC modules reaching into newreno and executing
what they think is a "common and understood" function. Lets put these functions in
cc.c and that way we have a common place that is easily findable by future developers or
bug fixers. This also allows newreno to evolve and grow support for its features i.e. ABE
and HYSTART++ without having to dance through hoops for other CC modules, instead
both newreno and the other modules just call into the common functions if they desire
that behavior or roll there own if that makes more sense.

Note: This commit changes the kernel configuration!! If you are not using GENERIC in
some form you must add a CC module option (one of CC_NEWRENO, CC_VEGAS, CC_CUBIC,
CC_CDG, CC_CHD, CC_DCTCP, CC_HTCP, CC_HD). You can have more than one defined
as well if you desire. Note that if you create a kernel configuration that does not
define a congestion control module and includes INET or INET6 the kernel compile will
break. Also you need to define a default, generic adds 'options CC_DEFAULT=\"newreno\"
but you can specify any string that represents the name of the CC module (same names
that show up in the CC module list under net.inet.tcp.cc). If you fail to add the
options CC_DEFAULT in your kernel configuration the kernel build will also break.

Reviewed by: Michael Tuexen
Sponsored by: Netflix Inc.
RELNOTES:YES
Differential Revision: https://reviews.freebsd.org/D32693
2021-11-11 06:28:18 -05:00
Konstantin Belousov 4cc167a352 Restore PPS_SYNC in NOTES
This partially reverts e81e77c5a0, leaving the option both in
GENERICs on amd64/arm64/arm, and in global NOTES file.  Apparently
this better matches existing practice, where we do not try to hard
to make LINT and GENERIC complimentary.

Requested and reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2021-10-12 23:10:35 +03:00
Konstantin Belousov e81e77c5a0 Enable PPS_SYNC on amd64, arm64 and armv7
Remove the option from NOTES/LINT, and add to NOTES for powerpc and
riscv.

PR:	259036
Requested by:	John Hay <john@sanren.ac.za>
Discussed with:	ian, imp
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2021-10-10 22:34:40 +03:00
Ceri Davies c1a148873d sys/*/conf/*, docs: fix links to handbook
While here, fix all links to older en_US.ISO8859-1 documentation
in the src/ tree.

PR:             255026
Reported by:    Michael Büker <freebsd@michael-bueker.de>
Reviewed by:    dbaio
Approved by:    blackend (mentor), re (gjb)
MFC after:      10 days
Differential Revision: https://reviews.freebsd.org/D30265
2021-05-20 09:27:10 +01:00
Brandon Bergren 0c9f52d4ce powerpc: Fix programmer's switch driver and add to GENERIC
Older G4 and G3 models have a programmer's switch that can be used to
generate an interrupt to drop into the debugger.

This code hadn't been tested for a long time. It had been broken back
in 2005 in r153050.

Repair and modernize the code and add it to GENERIC.

Reviewed by:	jhibbits (approved w/ removal of unused sc_dev var)
Sponsored by:	Tag1 Consulting, Inc.
Differential Revision:	https://reviews.freebsd.org/D29131
2021-04-05 12:04:12 -05:00
Alfredo Dal'Ava Junior 231633a2e9 [PowerPC64] add mpr to GENERIC64 and GENERIC64LE
Submitted by:	Andre Fernando da Silva <andre.silva@eldorado.org.br>
Reviewed by:	luporl, alfredo, Sreekanth Reddy <sreekanth.reddy@broadcom.com> (by email)
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25785
2021-03-02 22:21:43 -03:00
Piotr Kubaj 8b804ee616 powerpc64le: readd COMPAT_FREEBSD11 and COMPAT_FREEBSD12
lang/rust needs COMPAT_FREEBSD11 to build, even though powerpc64le itself is supported only since 13.0.
I also corrected a comment, because if we ever have lib32 for powerpc64le, it will be for powerpcle.

Reviewed by:	bdragon (on IRC)
2021-02-06 03:21:55 +01:00
Alfredo Dal'Ava Junior eaffd270d8 [POWERPC64LE] add mrsas to GENERIC64LE
Reviewed by:	bdragon
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28475
2021-02-05 19:47:57 -03:00
Alfredo Dal'Ava Junior 9fac05ba79 [POWERPC64BE] add mrsas driver to GENERIC64
Submitted by:   Andre Fernando da Silva <andre.silva@eldorado.org.br>
Reviewed by:    luporl, alfredo, kadesai (on email)
Sponsored by:   Eldorado Research Institute (eldorado.org.br)
Differential Revision:  https://reviews.freebsd.org/D26531
2021-02-03 22:06:29 -03:00
Piotr Kubaj c0a9a0cb1f powerpc64le: don't enable COMPAT_* options in GENERIC64LE
Support for powerpc64le appeared in 13, so there's no point to enable COMPAT_* for older releases.

Also disable COMPAT_FREEBSD32, since there's no powerpcle. Since that may change in the future, leave the option commented out.

Approved by:	bdragon, jhibbits (on IRC)
2021-01-22 17:39:15 +01:00
Andrew Turner 6eebda3bba Split out the NODEBUG options to a common file
This is the superset of the nooptions found in the -DEBUG kernels.

Reviewed by:	emaste, manu
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D28152
2021-01-14 16:57:53 +00:00
Vladimir Kondratyev 1975878673 hid: Import functions and constants required by new subsystem
This does an import of quirk stubs, debugging macros from USB code and
numerous usage constants used by dependent drivers.

Besides, this change renames some functions to get a better matching
with userland library and NetBSD/OpenBSD HID code. Namely:

- Old hid_report_size() renamed to hid_report_size_max()
- New hid_report_size() calculates size of given report rather than
  maximum size of all reports.
- hid_get_data_unsigned() renamed to hid_get_udata()
- hid_put_data_unsigned() renamed to hid_put_udata()

Compat shim functions are provided in usbhid.h to make possible compile
of legacy code unmodified after this change.

Reviewed by:	manu, hselasky
Differential revision:	https://reviews.freebsd.org/D27887
2021-01-08 02:18:42 +03:00
Vladimir Kondratyev 67de2db262 Factor-out hardware-independent part of USB HID support to new module
It will be used by the upcoming HID-over-i2C implementation.  Should be
no-op, except hid.ko module dependency is to be added to affected drivers.

Reviewed by:	hselasky, manu
Differential revision:	https://reviews.freebsd.org/D27867
2021-01-08 02:18:42 +03:00
Alexander V. Chernikov d5fe384b4d Enable ROUTE_MPATH support in GENERIC kernels.
Ability to load-balance traffic over multiple path is a must-have thing for routers.
It may be used by the servers to balance outgoing traffic over multiple default gateways.

The previous implementation, RADIX_MPATH stayed in the shadow for too long.
It was not well maintained, which lead us to a vicious circle - people were using
 non-contiguous mask or firewalls to achieve similar goals. As a result, some routing
 daemons implementation still don't have multipath support enabled for FreeBSD.

Turning on ROUTE_MPATH by default would fix it. It will allow to reduce networking
 feature gap to other operating systems. Linux and OpenBSD enabled similar support
 at least 5 years ago.

ROUTE_MPATH does not consume memory unless actually used. It enables around ~1k LOC.

It does not bring any behaviour changes for userland.
Additionally, feature is (temporarily) turned off by the net.route.multipath sysctl
 defaulting to 0.

Differential Revision:	https://reviews.freebsd.org/D27428
2020-12-14 22:23:08 +00:00
Warner Losh 7e46dafa58 Create in-tree LINT files
Now that config(8) has supported include for 19 years, transition to
including the NOTES files. include support didn't exist at the time,
nor did the envvar stuff recently added. Now that it does, eliminate
the building of LINT files by just including everything you need.

Note: This may cause conflicts with updating in some cases.
	find sys -name LINT\* -rm
is suggested across this commit to remove the generated LINT
files.

Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D26540
2020-10-09 01:48:14 +00:00
Emmanuel Vadot 90b8c0ea10 Fix LINT: Add backlight to NOTES 2020-10-02 20:52:09 +00:00
Brandon Bergren 6e5dbfb2bf [PowerPC64LE] Initial GENERIC64LE kernel config.
This is slightly stripped down from GENERIC64, as PowerMac G5 machines
are incapable of running in LE mode (so we can skip the Mac drivers.)

While technically POWER6 and POWER7 have the hardware capability of running
in LE mode, they have a tendency to trap excessively when a load/store is
misaligned. (an extremely common occurrence in LE code, and one of the main
reasons I consider BE to be superior, as it turns potential security issues
into immediately obvious mangled numbers.)

Additionally, there was no mechanism to control what endian interrupts
are delivered in, so supporting LE operation on POWER6 and POWER7 involves
some really dirty tricks in the interrupt vectors that I would rather
avoid.

IBM drew the line in the sand at POWER8 some time around 2013, embracing
full support for LE in the platform, and making a push across the board
for LE code to target POWER8 as a minimum requirement. As such, usage of
LE kernels on POWER6 and POWER7 is practically nil, despite it being
technically possible to do.

The so-called "TRUELE" feature bit which is the baseline requirement for
 needed for PowerPC64LE was introduced in POWER8.

Sponsored by:	Tag1 Consulting, Inc.
2020-09-23 01:07:55 +00:00
Brandon Bergren 4efb1ca7d2 [PowerPC64LE] Work around qemu TCG bug in mtmsrd emulation.
The TCG implementation of mtmsrd in qemu blindly copies the entire register
to the MSR, instead of the specific bit positions listed in the ISA.

This means that qemu will prematurely switch endian out from under the
running code instead of waiting for the rfid, causing an immediate trap
as it attempts to interpret the next instruction in the wrong endianness.

To work around this, ensure PSL_LE is still set before doing the mtmsrd.

In the future, we may wish to just turn off translation and unconditionally
use rfid to switch to the ofmsr instead of quasi-switching to the ofmsr.

Add a new platform option so this can be disabled. (And so that we can
conditonalize additional QEMU-specific hacks in the platform code.)

Sponsored by:	Tag1 Consulting, Inc.
2020-09-23 00:09:29 +00:00
Alex Richardson b798ef6490 Include TMPFS in all the GENERIC kernel configs
Being able to use tmpfs without kernel modules is very useful when building
small MFS_ROOT kernels without a real file system.
Including TMPFS also matches arm/GENERIC and the MIPS std.MALTA configs.

Compiling TMPFS only adds 4 .c files so this should not make much of a
difference to NO_MODULES build times (as we do for our minimal RISC-V
images).

Reviewed By: br (earlier version for riscv), brooks, emaste
Differential Revision: https://reviews.freebsd.org/D25317
2020-07-24 08:40:04 +00:00
Mark Johnston e64080e79c Switch from SCTP to SCTP_SUPPORT in GENERIC configs.
This removes SCTP from in-tree kernel configuration files.  Now, SCTP
can be enabled by simply loading the module, as discussed on
freebsd-net@.

Reviewed by:	tuexen
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D25611
2020-07-16 15:09:04 +00:00
Brandon Bergren fb0543afa8 [PowerPC] Add virtio to GENERIC
Due to kldxref not being able to generate hints for nonnative platforms,
any cross built VM images do not have /boot/kernel/linker.hints.

This prevents the virtio modules from being loaded, as the fallback code
will always fail the version check when the hints are missing.

Since we want to be able to generate VM images for 32 bit powerpc, add the
virtio modules to GENERIC like we do on powerpc64.

Reviewed by:	jhibbits
Sponsored by:	Tag1 Consulting, Inc.
Differential Revision:	https://reviews.freebsd.org/D25271
2020-06-19 18:43:13 +00:00