EARLY_DRIVER_MODULE: use designated initializers
It helps the reader to parse the macro definition, with respect to how
the arguments are mapped to the structure members. No functional change
intended.
Reviewed by: imp, jhb
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48489
machine/param.h: drop __HAVE_ACPI define
It is no longer used anywhere (since 62508c531e0f), and not defined for
arm64 which also supports ACPI.
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D48486
pci: cleanup __PCI_REROUTE_INTERRUPTS
This flag was used as a transition for differing pcib implementations.
Today it is defined for all supported architectures, and can be removed.
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D48485
dtrace: Use size_t instead of uintptr_t to represent buffer offsets
This eases porting of DTrace to CHERI, where uintptr_t and size_t aren't
interchangeable.
No functional change intended.
Reviewed by: Domagoj Stolfa <domagoj.stolfa at gmail.com>
MFC after: 2 weeks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D48625
icmp6: Fix ICMP6 message type counters
Previously this macro would always increment the first counter in the
histogram array.
PR: 279975
Fixes: 60d8dbbef075 ("netinet: add a probe point for IP, IP6, ICMP, ICMP6, UDP and TCP stats counters")
Sponsored by: Klara, Inc.
firewire: Add deprecation notice
This was originally discussed as part of FreeBSD 15 planning, but did
not happen in time. Add the deprecation notice now, with an expectation
that it will be removed before FreeBSD 16.
Reviewed by: brooks, imp
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48598
scmi: Add sysctl transport properties
Expose as read-only the configured transport properties.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47428
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Add optional asynchronous handling of replies
Add the core logic to handle the replies to pending command in an
asynchronous manner.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47426
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Refactor scmi_request internal logic
Split scmi_request internals into a TX and an RX phase, which will be
called, anyway, in sequence as before when a normal transmission is
requested.
No functional change.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47425
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Add scmi_token_reserve helper
During normal operation, the SCMI stack, upon each transmission attempt,
takes care to automatically pick an appropriate, monotonically increasing,
sequence number to fill-in the token field in the egressing message.
This does not cope well with the alternative scenario in which, instead,
a complete and fully formed message is provided upfront: in such a case the
SCMI stack will have to use the already provided sequence number, embedded
in the message, to track such transaction.
Add a method to attempt to reserve a specific sequence number to be used
when a fully firmed (raw) message is handled.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Pull Request: https://reviews.freebsd.org/D47424
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Add SDT traces to the core stack
Add a few basic traces to track SCMI messages lifecycle.
Tested on: Arm Morello Board
Reviewed by: Andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47427
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Fix race on timed out transmissions
When a waited-for outstanding request is determined to have timed out,
mark such request immediately as such, so as to avoid any possible race on
the IRQ path with code path evaluating that same timed out condition.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47419
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Fix token bitmask
By the SCMI specification the message sequence number field is 10-bit long.
Fix accordingly the used bitmask.
Fixes: d220b1cf02ce ("scmi: Extend and refactor SCMI shmem support")
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47418
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Add helper to manipulate scmi_msg descriptors
Refactor allocation logic for scmi_req and introduce new helpers to be able
to obtain an scmi_msg reference to a freshly allocated request.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47423
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Add devicetree transport properties
SCMI transport characteristics can be optionally described in the
devicetree to override the default build-time values.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47422
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Redefine max message payload size
The defined maximum payload size should not include header and status
field. Fix the definition accordingly, so that it matches the
definitions as can be found in the Linux SCMI stack.
The semantic of this define is important since it will then be possible
to override such values from devicetree, like in Linux.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47421
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Make transports report the effective length of the received messages
Once a message is received that fits into the RX buffer, update the
msg.rx_len field with the effective length of the message received.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Pull Request: https://reviews.freebsd.org/D47420
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
arm64: add HCRX_EL2 register
HCRX_EL2 is the Extended Hypervisor Configuration Register introduced
with FEAT_HCX in ARMv8.7. All fields in this register are used for
features in ARMv8.7 and above. Initially zero the register, incase
firmware has not properly configured it.
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D48583
Signed-off-by: Harry Moulton <harry.moulton at arm.com>
arm64: add HWCAP for FEAT_WFxT
Add the HWCAP for ARMv8.7 FEAT_WFxT.
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D48578
Signed-off-by: Harry Moulton <harry.moulton at arm.com>
depend-cleanup: Add a regex for files that moved
When a file is moved or copied to a new directory the depend-cleanup
script may incorrectly remove the .depend file as the generated regex
will pass. Fix this by passing in a new regex for the arm64 files that
have the same name as a generic implementation we were previously
using.
While here add memchr.S. It has moved from a generated file to one in
the source tree with the same name.
Reviewed by: emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D48519
stand/efi: Add more pl011-like uarts
The Arm SBSA uarts are handled by the pl011 driver. Add them to the
list of pl011 uarts.
Reviewed by: manu, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D48526