| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Reviewed by: kib
Tested by: kbowling
Differential Revision: https://reviews.freebsd.org/D32146
(cherry picked from commit fb640be4e9443f1890680c27b213825300bc65f4)
|
| |
|
|
|
|
| |
PR: 256101
(cherry picked from commit eaf00819bcfa90ab7ac8af324826eb985197d8c8)
|
| |
|
|
|
|
| |
PR: 255556
(cherry picked from commit 8f1562430fbb83f6cedff6450e1aa1b593e3d7e7)
|
| |
|
|
|
|
| |
PR: 255556
(cherry picked from commit 5b8b6b26e40a81320f02a46df98b96bd8e93295a)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It has been observed that some systems are often unable to resume from
ddb after entering with debug.kdb.enter=1. Checking the status further
shows the terminal is blocked waiting in tty_drain(), but it never makes
progress in clearing the output queue, because sc->sc_txbusy is high.
I noticed that when entering polling mode for the debugger, IER_TXRDY is
set in the failure case. Since this bit is never tracked by the softc,
it will not be restored by ns8250_bus_ungrab(). This creates a race in
which a TX interrupt can be lost, creating the hang described above.
Ensuring that this bit is restored is enough to prevent this, and resume
from ddb as expected.
The solution is to track this bit in the sc->ier field, for the same
lifetime that TX interrupts are enabled.
PR: 223917, 240122
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7e7f7beee732810d3afcc83828341ac3e139b5bd)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix AccessWidth and BitWidth parsing in SPCR table
The ACPI Specification defines a Generic Address Structure (GAS),
which is used to describe UART controller register layout in the
SPCR table. The driver responsible for parsing it (uart_cpu_acpi)
wrongly associates the Access Size field to the uart_bas's regshft
and the register BitWidth to the regiowidth - according to
the definitions it should be opposite.
This problem remained hidden most likely because the majority of platforms
use 32-bit registers (BitWidth) which are accessed with the according
size (Dword). However on Marvell Armada 8k / Cn913x platforms,
the 32-bit registers should be accessed with Byte granulity, which
unveiled the issue.
This patch fixes above by proper values assignment and slightly improved
parsing.
Note that handling of the AccessWidth set to EFI_ACPI_6_0_UNDEFINED is
needed to work around a buggy SPCR table on EC2 x86 "bare metal" instances.
Reviewed by: manu, imp, cperciva, greg_unrelenting.technology
Obtained from: Semihalf
Notes:
svn path=/stable/12/; revision=366942
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
r364430 | imp | 2020-08-20 11:19:40 -0600 (Thu, 20 Aug 2020) | 6 lines
Tag pccard drivers with gone in 13.
MFC After: 3 days
Reviewed by: emaste, brooks, adrian (on twitter)
Differential Revision: https://reviews.freebsd.org/D26095
Notes:
svn path=/stable/12/; revision=365539
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
uart(4) backends currently detect RX FIFO overrun errors and report
them to the uart(4) core layer. They are then reported to the generic
TTY layer which promptly ignores them. As a result, there is
currently no good way to determine if a uart is experiencing RX FIFO
overruns. One could add a generic per-tty counter, but there did not
appear to be a good way to export those. Instead, add a sysctl under
the uart(4) sysctl tree to export the count of overruns.
Notes:
svn path=/stable/12/; revision=365480
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shifting right by 1 is not the same as dividing by 2 for signed
values. In particular, dividing a signed value by 2 gives the integer
ceiling of the (e.g. -5 / 2 == -2) whereas shifting right by 1 always
gives the floor (-5 >> 1 == -3).
An embedded board with a 25 Mhz base clock results in an error of
-30.5% when used with a baud rate of 115200. Using division, this
truncates to -30% and is permitted. Using the shift, this fails and
is rejected causing TIOCSETA requests to fail with EINVAL and breaking
getty(8).
Using division gives the same error range for both over and under baud
rates and also makes the code match the behavior documented in the
existing comment about supporting boards with 25 Mhz clocks.
Notes:
svn path=/stable/12/; revision=365476
|
| |
|
|
|
|
|
|
|
| |
Add Denverton UART PCI ID
Sponsored by: Juniper Networks, Inc
Notes:
svn path=/stable/12/; revision=358551
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The genkbd version of these remains exposed for stable branches, but
keyboard drivers that just want to use the defaults can simply not provide
their own. There shouldn't be any unset in the wild.
r355796:
kbd: provide default implementations of get_fkeystr/diag
Most keyboard drivers are using the genkbd implementations as it is;
formally use them for any that aren't set.
r355797:
chrome_kb: remove default get_fkeystr/diag implementations
This file was missed in r355796, but no harm would have come from this.
r355799:
kbd: patch linker set methods, too
This is needed after r355796. Some double-registration of kbd drivers needs
to be sorted out, then this sysinit will simply add these drivers into the
normal list and kill off any other bits in the driver that are aware of the
linker set, for simplicity.
Notes:
svn path=/stable/12/; revision=356013
|
| |
|
|
| |
Notes:
svn path=/stable/12/; revision=356007
|
| |
|
|
|
|
|
|
|
|
|
| |
Since TX interrupt is generated when THRE is set, wait for TEMT set means
wait for full character transmission time. At low speeds that may take
awhile, burning CPU time while holding sc_hwmtx lock, also congested.
This is partial revert of r317659.
Notes:
svn path=/stable/12/; revision=352861
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r345405: Obey SPCR AccessWidth parameter.
r345406: Initialize uart_bus_space_mem on arm64.
r346228: Add quirk to ignore AccessWidth on PL011 UART.
r346657: Handle SPCR BaudRate = 0.
r348195: Extract arm64 SPCR code and make it MI; use on x86 too.
r348198: Fix for r348195.
This unbreaks the console on EC2 a1.* and *.metal instances.
Sponsored by: https://www.patreon.com/cperciva
Notes:
svn path=/stable/12/; revision=348342
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The only source of documentation for this device is verilog,
so driver is minimalistic.
Reviewed by: Dr Jonathan Kimmitt <jrrk2@cam.ac.uk>
Approved by: re (kib)
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=339330
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent changes in Linux updated Marvell Armada 38x
UART compatible string. As a result the FreeBSD driver
(uart_dev_snps) does not probe. This commit fixes the
situation, however not applying any functional modification
to the driver methods.
Approved by: re (kib)
Obtained from: Semihalf
Notes:
svn path=/head/; revision=339280
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove unused and easy to misuse PNP macro parameter
Inspired by r338025, just remove the element size parameter to the
MODULE_PNP_INFO macro entirely. The 'table' parameter is now required to
have correct pointer (or array) type. Since all invocations of the macro
already had this property and the emitted PNP data continues to include the
element size, there is no functional change.
Mostly done with the coccinelle 'spatch' tool:
$ cat modpnpsize0.cocci
@normaltables@
identifier b,c;
expression a,d,e;
declarer MODULE_PNP_INFO;
@@
MODULE_PNP_INFO(a,b,c,d,
-sizeof(d[0]),
e);
@singletons@
identifier b,c,d;
expression a;
declarer MODULE_PNP_INFO;
@@
MODULE_PNP_INFO(a,b,c,&d,
-sizeof(d),
1);
$ rg -l MODULE_PNP_INFO -- sys | \
xargs spatch --in-place --sp-file modpnpsize0.cocci
(Note that coccinelle invokes diff(1) via a PATH search and expects diff to
tolerate the -B flag, which BSD diff does not. So I had to link gdiff into
PATH as diff to use spatch.)
Tinderbox'd (-DMAKE_JUST_KERNELS).
Approved by: re (glen)
Notes:
svn path=/head/; revision=338948
|
| |
|
|
|
|
|
|
|
|
|
|
| |
as an NS8250 UART.
Reviewed by: sbruno, imp
Approved by: re (delphij)
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D17250
Notes:
svn path=/head/; revision=338921
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an amalgam of a patch by Doug Ambrisko to
generalize uart_acpi_find_device, imp moving the
ACPI table to uart_dev_ns8250.c and advice by jhb
to work around a bug in the EPYC 3151 BIOS
(the BIOS incorrectly marks the serial ports as
disabled)
Reviewed by: imp
MFC after: 8 weeks
Differential Revision: https://reviews.freebsd.org/D16432
Notes:
svn path=/head/; revision=338074
|
| |
|
|
|
|
|
|
|
|
| |
I was not aware Warner was making or planning to make forward progress in
this area and have since been informed of that.
It's easy to apply/reapply when churn dies down.
Notes:
svn path=/head/; revision=338037
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by r338025, just remove the element size parameter to the
MODULE_PNP_INFO macro entirely. The 'table' parameter is now required to
have correct pointer (or array) type. Since all invocations of the macro
already had this property and the emitted PNP data continues to include the
element size, there is no functional change.
Mostly done with the coccinelle 'spatch' tool:
$ cat modpnpsize0.cocci
@normaltables@
identifier b,c;
expression a,d,e;
declarer MODULE_PNP_INFO;
@@
MODULE_PNP_INFO(a,b,c,d,
-sizeof(d[0]),
e);
@singletons@
identifier b,c,d;
expression a;
declarer MODULE_PNP_INFO;
@@
MODULE_PNP_INFO(a,b,c,&d,
-sizeof(d),
1);
$ rg -l MODULE_PNP_INFO -- sys | \
xargs spatch --in-place --sp-file modpnpsize0.cocci
(Note that coccinelle invokes diff(1) via a PATH search and expects diff to
tolerate the -B flag, which BSD diff does not. So I had to link gdiff into
PATH as diff to use spatch.)
Tinderbox'd (-DMAKE_JUST_KERNELS).
Notes:
svn path=/head/; revision=338035
|
| |
|
|
|
|
|
|
|
| |
for the console, set our override in the bas as well.
Tested by: emaste@
Notes:
svn path=/head/; revision=336648
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change allows one to set the busy_detect flag
required by the synopsys UART at the loader prompt.
This is needed by the EPYC 3000 SoC.
This will give users a working console up to the point where getty is required:
hw.uart.console="mm:0xfedc9000,rs:2,bd:1"
Reviewed by: imp
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D16399
Notes:
svn path=/head/; revision=336623
|
| |
|
|
|
|
|
|
|
| |
Reviewed by: andrew
Approved by: andrew
Differential Revision: https://reviews.freebsd.org/D15684
Notes:
svn path=/head/; revision=334997
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds a new optional console method cn_resume and a kernel
console interface cnresume. Consoles that may need to re-initialize
their hardware after suspend (e.g., because firmware does not care to do
it) will implement cn_resume. Note that it is called in rather early
environment not unlike early boot, so the same restrictions apply.
Platform specific code, for platforms that support hardware suspend,
should call cnresume early after resume, before any console output is
expected.
This change fixes a problem with a system of mine failing to resume when
a serial console is used. I found that the serial port was in a strange
configuration and an attempt to write to it likely resulted in an
infinite loop.
To avoid adding cn_resume method to every console driver, CONSOLE_DRIVER
macro has been extended to support optional methods.
Reviewed by: imp, mav
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D15552
Notes:
svn path=/head/; revision=334340
|
| |
|
|
|
|
|
|
|
| |
Move the allwinner early printf support to the snps driver as it
should work with all implementation.
While here add instruction for enabling it on 64bits SoCs.
Notes:
svn path=/head/; revision=333138
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
opt_compat.h is mentioned in nearly 180 files. In-progress network
driver compabibility improvements may add over 100 more so this is
closer to "just about everywhere" than "only some files" per the
guidance in sys/conf/options.
Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of
sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h
is created on all architectures.
Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the
set of compiled files.
Reviewed by: kib, cem, jhb, jtl
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14941
Notes:
svn path=/head/; revision=332122
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It calls OF_* functions to check if it needs to implement workarounds.
This may not be the case on arm64 where we support both FDT and ACPI.
Fix this by checking if we are booting on FDT before calling these checks.
Reviewed by: ian
Sponsored by: DARPA, AFRL
Sponsored by: Cavium (Hardware)
Differential Revision: https://reviews.freebsd.org/D14515
Notes:
svn path=/head/; revision=330111
|
| |
|
|
|
|
|
| |
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=330016
|
| |
|
|
|
|
|
|
|
|
|
| |
the Server Base System Architecture to be a subset of the pl011 r1p5. As
we don't use the removed features it is safe to just attach to the existing
driver as is.
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=329991
|
| |
|
|
|
|
|
| |
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=329990
|
| |
|
|
|
|
|
|
|
| |
to use EARLY_PRINTF on other SoCs.
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=328662
|
| |
|
|
|
|
|
|
|
|
|
| |
Code hasn't been touch this it's original commit in 2012 beside api changes.
Reviewed by: ian
Differential Revision: https://reviews.freebsd.org/D13625
Discussed with: freebsd-arm@freebsd.org (no reply)
Notes:
svn path=/head/; revision=328380
|
| |
|
|
|
|
|
|
|
| |
not a final baud rate. The value for this register has to be calculated.
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=328133
|
| |
|
|
|
|
|
|
|
|
|
| |
Tested on DragonBoard 410c.
Reviewed by: andrew
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D13972
Notes:
svn path=/head/; revision=328132
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reduces noise when kernel is compiled by newer GCC versions,
such as one used by external toolchain ports.
Reviewed by: kib, andrew(sys/arm and sys/arm64), emaste(partial), erj(partial)
Reviewed by: jhb (sys/dev/pci/* sys/kern/vfs_aio.c and sys/kern/kern_synch.c)
Differential Revision: https://reviews.freebsd.org/D10385
Notes:
svn path=/head/; revision=327173
|
| |
|
|
|
|
|
|
|
|
| |
ISA PNP card support (replace by hand version in if_ed). Move module
declarations to the end of some files. Fix PCCARD_PNP_INFO to use
nitems(). Remove some stale comments about pc98, turns out the comment
was simply wrong.
Notes:
svn path=/head/; revision=327102
|
| |
|
|
|
|
|
|
|
| |
set when finding the uart from the device tree.
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=326683
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Notes:
svn path=/head/; revision=326255
|
| |
|
|
|
|
|
|
| |
Submitted by: Zakary Nafziger <worldofzak@gmail.com>
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=324503
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for UART in Armada 3700 family.
It exposes both low-level UART interface, as well as
standard driver methods.
Submitted by: Patryk Duda <pdk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Semihalf
Differential Revision: https://reviews.freebsd.org/D12250
Notes:
svn path=/head/; revision=323359
|
| |
|
|
|
|
|
|
|
| |
PR: 215837
Submitted by: joe@thrallingpenguin.com
MFC after: 2 weeks
Notes:
svn path=/head/; revision=321603
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The stdout-path chosen property may include the serial connection details,
e.g. the baud rate. When passing the device to OF_finddevice we need to
strip off this information as it will cause the lookup to fail.
Reviewed by: emaste, manu
Differential Revision: https://reviews.freebsd.org/D6846
Notes:
svn path=/head/; revision=319494
|
| |
|
|
|
|
|
|
|
|
|
| |
I adjusted the description to be similar to existing AMT entries.
PR: 219384
Submitted by: "Tooker"
MFC after: 1 week
Notes:
svn path=/head/; revision=318974
|
| |
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=317752
|
| |
|
|
|
|
|
|
|
|
|
| |
At least with Tx FIFO enabled it shows me ~10% reduction of verbose boot
time with serial console at 115200 baud.
Reviewed by: marcel
MFC after: 2 weeks
Notes:
svn path=/head/; revision=317659
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hardware but lack the larger fifos rev 5 hardware should have.
The linux world (where our FDT data comes from) solved this by adding
a new property to pl011 nodes, "arm,primecell-periphid". When this
property is present, its values override the values in the hardware
periphid registers. For pl011 rev 5 hardware with small fifos, they
override the id so that it appears to be rev 4 hardware.
The driver now uses the new property when present. It also continues
to check the device compat string, to handle older fdt data that may
still be in use on existing systems (on RPi systems it is common to
update system software without updating fdt data which is part of the
boot firmware).
Reviewed by: imp
Notes:
svn path=/head/; revision=315090
|
| |
|
|
|
|
|
|
|
| |
accidental duplicate of WACF004.
PR: 217306
Notes:
svn path=/head/; revision=314919
|
| |
|
|
|
|
|
|
| |
PR: 217306
Submitted by: large.hadron.collider@gmx.com
Notes:
svn path=/head/; revision=314918
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with rev 5 (which is inexplicably indicated by a version number
of '3' in the Peripheral ID register), the pl011 doubled the size of the
rx and tx fifos, to 32 bytes, so read the ID register and set the size
variables in the softc accordingly.
An interesting wrinkle in this otherwise-simple concept is that the
bcm2835 SoC, used in Raspberry Pi systems among others, has the rev 5
pl011 hardware, but somehow also has the older 16-byte fifos. We check
the FDT data to see if the hardware is part of a bcm283x system and use
the smaller size if so.
Thanks to jchandra@ for pointing out that newer hardware has bigger fifos.
Notes:
svn path=/head/; revision=314917
|