Commit Graph

31 Commits

Author SHA1 Message Date
Warner Losh
685dc743dc sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:36 -06:00
Warner Losh
4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Kyle Evans
61fd6a1ea2 Note that static hints no longer break loader hints
This commentary was carried over from the x86 version of the same code,
but has actually been inaccurate for a while now. As of FreeBSD 12.x,
all environments are used unless they disable each other. See
39d44f7f15 ("kern_environment: use any provided environments [...]")
for details.

Reviewed by:	imp
Differentiala Revision:	https://reviews.freebsd.org/D35695
2023-04-26 00:38:32 -05:00
Jung-uk Kim
19ee8335c5 acpica: Merge ACPICA 20221020 2022-10-27 22:04:32 -04:00
John Baldwin
7ae99f80b6 pmap_unmapdev/bios: Accept a pointer instead of a vm_offset_t.
This matches the return type of pmap_mapdev/bios.

Reviewed by:	kib, markj
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D36548
2022-09-22 15:08:52 -07:00
Warner Losh
281a6ff273 acpi: Fix error message
Fix a formatting error from 195f794318

Fixes:		195f794318
Sponsored by:	Netflix
2022-09-01 11:35:45 -06:00
Warner Losh
991aef9795 acpi: Move some errors with RSDP and XSLT out from under bootverbose
Failure to map RSDP, XSLT and checksum failures are events that can't
happen unless something has gone wrong. As such, they should be reported
always, and not in bootverbose. This has been this way since it was
originally brought in to parse APIC tables.

Sponsored by:		Netflix
Reviewed by:		andrew
Differential Revision:	https://reviews.freebsd.org/D36406
2022-09-01 10:40:15 -06:00
Warner Losh
a14b26a6bd acpi: Unmap RSDP in more error cases
Add missing pmap_unmapbios() calls for when we return 0. Otherwise we
can leave the table mapped when it is of no use.

Sponsored by:		Netflix
Reviewed by:		andrew
Differential Revision:	https://reviews.freebsd.org/D36405
2022-09-01 10:39:20 -06:00
Warner Losh
195f794318 acpi: arm64 doesn't support ACPI 1.0 RSDP, report when we see one
arm64 requires ACPI RSDP Revision 2.0 since it requires 64-bit physical
addresses. It is an error worth reporting if we have a RSDP pointer, but
it points to the wrong version.

Sponsored by:		Netflix
Reviewed by:		andrew
Differential Revision:	https://reviews.freebsd.org/D36404
2022-09-01 10:38:53 -06:00
Warner Losh
cf72911158 acpi: add sys/kernel.h
sys/kernel.h is needed for tunable fetching.

Sponsored by:		Netflix
2022-07-02 10:35:49 -06:00
Warner Losh
064f00ec27 arm64: Grab the RSDP from acpi.rsdp like x86
arm64 wasn't updated to grab this from acpi.rsdp when x86 was
update. belatedly update the kernel to grab this information from the
preferred kenv.

Sponsored by:		Netflix
Reviewed by:		andrew, jhb
Differential Revision:	https://reviews.freebsd.org/D35631
2022-07-02 08:02:12 -06:00
Ed Maste
9feff969a0 Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights
These ones were unambiguous cases where the Foundation was the only
listed copyright holder (in the associated license block).

Sponsored by:	The FreeBSD Foundation
2021-08-08 10:42:24 -04:00
Dmitry Salychev
d178b1f878 Parse named nodes from IORT ACPI on arm64
Add the ability to map named components from IORT to their
SMMU or ITS node in order to setup interrupts.
It is now possible to find a node by its name (substring) and
resource ID similar to PCI nodes.
This is needed by work on a driver for NXP's Second Generation
Data Path Acceleration Architecture (DPAA2).

Reviewed by:	andrew
MFC after:	2 weeks
Differential Revision::	https://reviews.freebsd.org/D31267
2021-08-07 17:30:38 +00:00
Jessica Clarke
439097486b acpi: Fix a repeated comment typo 2021-07-19 17:19:23 +01:00
Jessica Clarke
52fba9a943 acpi: Fix a repeated vm_offset_t that should be a vm_size_t
The underlying types for both are the same so arguably this doesn't
really matter, but using the wrong type is still confusing and
technically incorrect.
2021-07-19 17:19:23 +01:00
D Scott Phillips
dd6fd1d430 arm64/acpi: Give the real PA limit to ACPI
Read PA bits from ID_AA64MMFR0_EL1.PARange.

Reviewed by:	andrew, markj
Approved by:	scottl (implicit)
MFC after:	1 week
Sponsored by:	Ampere Computing, Inc.
Differential Revision:	https://reviews.freebsd.org/D26133
2020-08-26 02:12:15 +00:00
Ed Maste
c078c3fd69 acpi_iort: fix mapping end calculation
According to the ARM Design Document "IO Remapping Table Platform"
(DEN 0049D), the "Number of IDs" field of the ID mapping format means
"The number of IDs in the range minus one".

Submitted by:	Greg V <greg@unrelenting.technology>
Reviewed by:	andrew
Differential Revision:	https://reviews.freebsd.org/D25179
2020-08-22 14:39:14 +00:00
Mark Johnston
ee4df38d02 Remove an unused parameter from map_table().
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2020-08-20 00:38:32 +00:00
Alexander Motin
8f6355b51d Remove some noisy ACPI tables messages from verbose dmesg.
Those messages were printed hundreds of times during boot, often multiple
times for each table.  We already print information about the tables in
more organized form once to not duplicate it when random ACPI drivers are
attaching.

MFC after:	1 week
2020-08-19 16:09:36 +00:00
Ruslan Bukin
f3856e6881 Add acpi_iort_map_pci_smmuv3().
This new function allows us to find the SMMU instance assigned
for a particular PCI RID.

Reviewed by:	andrew
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D25687
2020-07-17 14:51:51 +00:00
Andrew Turner
45951bf0a9 Ignore the SMMUv3 and PMCG interrupt controller in the IORT tables
When mapping MSI/MSI-X interrupts throught he Arm IORT ACPI tables we may
need to ignore an interrupt controller even if it is within the bounds the
entry describes. When the SMMUv3 is not using GSIV (non-MSI/MSI-X)
interrupts we need to read the defined field. The Performance Monitoring
Counter Group always ignores the first table entry.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2020-01-31 09:51:38 +00:00
Jayachandran C.
b0f79e328e arm64 acpi_iort: add some error handling
Print warnings for some bad kernel configurations (like NUMA disabled
with multiple domains). Check and report some firmware errors (like
incorrect proximity domain entries).

Differential Revision:	https://reviews.freebsd.org/D20416
2019-06-24 21:24:55 +00:00
Jung-uk Kim
278f0de60d Merge ACPICA 20190329. 2019-03-29 20:21:28 +00:00
Jayachandran C.
9088a4751c arm64 acpi: Add support for IORT table
Add new file arm64/acpica/acpi_iort.c to support the "IO Remapping
Table" (IORT). The table is specified in ARM document "ARM DEN 0049D"
titled "IO Remapping Table Platform Design Document".  The IORT table
has information on the associations between PCI root complexes, SMMU
blocks and GIC ITS blocks in the system.

The changes are to parse and save the information in the IORT table.
The API to use this information is added to sys/dev/acpica/acpivar.h.

The acpi_iort.c also has code to check the GIC ITS nodes seen in the
IORT table with corresponding entries in MADT table (for validity)
and with entries in SRAT table (for proximity information).

Reviewed by:	andrew
Differential Revision:	https://reviews.freebsd.org/D18002
2019-02-07 02:30:33 +00:00
Andrew Turner
1242588828 Only read the ACPI proximity tabled on arm64 when we are booting from
ACPI.

Sponsored by:	DARPA, AFRL
2018-12-11 11:13:11 +00:00
Jayachandran C.
ec63066407 arm64: add ACPI based NUMA support
Use the newly defined SRAT/SLIT parsing APIs in arm64 to support
ACPI based NUMA.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D17943
2018-12-08 19:42:01 +00:00
Andrew Turner
eba1a249df Add support to find the arm64 serial using the ACPI tables. This uses the
Serial Port Console Redirection Table to find the device to use.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-11-21 19:26:58 +00:00
Jung-uk Kim
493deb390b Merge ACPICA 20160930. 2016-10-04 20:27:15 +00:00
Zbigniew Bodek
686836faca Add ARM64TODO comments to ACPI PCI stubs
This will make searching for missing functionalities easier.
2015-07-12 18:32:16 +00:00
Zbigniew Bodek
e7c14c38ba Implement stubs for ACPI PCI routines
ACPI driver requires special functions to be provided by machdep code.
Add temporary stubs to satisfy the compiler when both "pci" and "acpi"
are enabled in the kernel configuration file.

Reviewed by:   andrew
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3028
2015-07-12 17:28:31 +00:00
Andrew Turner
617994efc7 Add basic support for ACPI. It splits out the nexus driver to two new
drivers, one for fdt, one for acpi. It then uses this to decide if it will
use fdt or acpi.

The GICv2 (interrupt controller) and Generic Timer drivers have been
updated to handle both cases.

As this is early code we still need FDT to find the kernel console, and
some parts are still missing, including PCI support.

Differential Revision:	https://reviews.freebsd.org/D2463
Reviewed by:	jhb, jkim, emaste
Obtained from:	ABT Systems Ltd
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2015-06-11 15:45:33 +00:00