History log of /freebsd/sys/arm64/iommu/smmu.c (Results 1 – 21 of 21)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# f75ceeca 03-Sep-2024 Zhenlei Huang <zlei@FreeBSD.org>

smmu: Stop checking for failures from malloc(M_WAITOK)

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45852


# d1bdc282 23-Jul-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

Deprecate contigfree(9) in favour of free(9)

As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer
needed and should not be used anymore. We leave a wrapper for 3rd party
code i

Deprecate contigfree(9) in favour of free(9)

As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer
needed and should not be used anymore. We leave a wrapper for 3rd party
code in at least 15.x but remove (almost) all other cases from the tree.

This leaves one use of contigfree(9) untouched; that was the original
trigger for 9e6544dd6e02 and is handled in D45813 (to be committed
seperately later).

Sponsored by: The FreeBSD Foundation
Reviewed by: markj, kib
Tested by: pho (10h stress test run)
Differential Revision: https://reviews.freebsd.org/D46099

show more ...


# b0056b31 03-Jun-2024 Doug Moore <dougm@FreeBSD.org>

libkern: add ilog2 macro

The kernel source contains several definitions of an ilog2 function;
some are slower than necessary, and one of them is incorrect.
Elimininate them all and define an ilog2 m

libkern: add ilog2 macro

The kernel source contains several definitions of an ilog2 function;
some are slower than necessary, and one of them is incorrect.
Elimininate them all and define an ilog2 macro in libkern to replace
them, in a way that is fast, correct for all argument types, and, in a
GENERIC kernel, includes a check for an invalid zero parameter.

Folks at Microsoft have verified that having a correct ilog2
definition for their MANA driver doesn't break it.

Reviewed by: alc, markj, mhorne (older version), jhibbits (older version)
Differential Revision: https://reviews.freebsd.org/D45170
Differential Revision: https://reviews.freebsd.org/D45235

show more ...


Revision tags: release/14.1.0, release/13.3.0
# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remov

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


Revision tags: release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# f0ab8052 04-Aug-2023 Gordon Bergling <gbe@FreeBSD.org>

arm64-iommu: Fix a typo in a kernel message

- s/endianess/endianness/

MFC after: 5 days


# cbe88c6f 12-May-2023 Gordon Bergling <gbe@FreeBSD.org>

arm64: Fix a typo in a source code comment

- s/inferface/interface/

MFC after: 3 days


# b97e94d9 24-Apr-2023 Andrew Turner <andrew@FreeBSD.org>

Move to a SMMU specific struct for the smmu pmap

This is not managed through the VM subsystem so only needs to hold the
data the SMMU driver needs.

Sponsored by: Arm Ltd
Differential Revision: http

Move to a SMMU specific struct for the smmu pmap

This is not managed through the VM subsystem so only needs to hold the
data the SMMU driver needs.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D39184

show more ...


# 49ee1a7e 24-Apr-2023 Andrew Turner <andrew@FreeBSD.org>

Create a common function to get the SMMU sid

Now the PCI drivers have a common interface to read the IOMMU xref
and SID create a common function to read it. This fixes an issue where
we will call in

Create a common function to get the SMMU sid

Now the PCI drivers have a common interface to read the IOMMU xref
and SID create a common function to read it. This fixes an issue where
we will call into an ACPI specific function when booting with FDT when
both are enabled.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D39183

show more ...


# 117beba8 24-Apr-2023 Andrew Turner <andrew@FreeBSD.org>

arm64: Clean up smmu fdt xref handling

Use the xref from OF_xref_from_node for the smmu xref. We already have
a valid xref ID, there is no need to convert this to a memory address.

Sponsored by: Ar

arm64: Clean up smmu fdt xref handling

Use the xref from OF_xref_from_node for the smmu xref. We already have
a valid xref ID, there is no need to convert this to a memory address.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D39181

show more ...


Revision tags: release/13.2.0
# 83fb1bdb 16-Mar-2023 Andrew Turner <andrew@FreeBSD.org>

Rename smmu pmap functions

These are SMMU (and MALI GPU) specific. Give them a SMMU specific name.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D38948


# 4b4e8cb5 20-Dec-2022 Ruslan Bukin <br@FreeBSD.org>

smmu: set guest address space range to 48-bit, which is a hardware
limit in our configuration.

Reviewed by: andrew
Sponsored by: UKRI
Differential Revision: https://reviews.freebsd.org/D37756


Revision tags: release/12.4.0
# 41ce5498 18-May-2022 Ruslan Bukin <br@FreeBSD.org>

Add OFW support to arm64's IOMMU framework.
This is needed to support non-PCI devices like memory-mapped
display controllers.
Split-out some initialization code from iommu_ctx_alloc() into
iommu_ctx_

Add OFW support to arm64's IOMMU framework.
This is needed to support non-PCI devices like memory-mapped
display controllers.
Split-out some initialization code from iommu_ctx_alloc() into
iommu_ctx_init() method so we could pass controller's MD-data
obtained from DTS to the driver prior to a CTX initialization.

Tested on Morello SoC.

Sponsored by: UKRI

show more ...


# 182a6932 18-May-2022 Ruslan Bukin <br@FreeBSD.org>

Fix stream table entry (STE) initialization and removal.
For PCI devices we have entire L1 descriptor for every session ID (SID),
but for non-PCI (e.g. Display Processing Unit DPU), a single L1
descr

Fix stream table entry (STE) initialization and removal.
For PCI devices we have entire L1 descriptor for every session ID (SID),
but for non-PCI (e.g. Display Processing Unit DPU), a single L1
descriptor serves multiple SIDs.
So prevent re-initialization of L1 descriptor if already initialized.
Don't free entire L1 descriptor on every STE removal.

Sponsored by: UKRI

show more ...


Revision tags: release/13.1.0
# 1cb8e38e 10-May-2022 Ruslan Bukin <br@FreeBSD.org>

Code deduplication: use SID-getting functions in smmu_find().

Sponsored by: UKRI


# b7fca06b 09-May-2022 Ruslan Bukin <br@FreeBSD.org>

Split-out SID-getting code to a separate functions.
Also ensure we are dealing with PCI-class devices.

Sponsored by: UKRI


# f224006f 09-May-2022 Ruslan Bukin <br@FreeBSD.org>

Allocate resources selectively.
One of the SMMU interrupt lines (priq) is optional and may be ommited in FDT.

Tested on ARM Morello Board, which has three SMMU units: first two have four
interrupt l

Allocate resources selectively.
One of the SMMU interrupt lines (priq) is optional and may be ommited in FDT.

Tested on ARM Morello Board, which has three SMMU units: first two have four
interrupt lines, last one has three interrupt lines.

Sponsored by: UKRI

show more ...


# 0a8e88fa 09-May-2022 Ruslan Bukin <br@FreeBSD.org>

Change __unused to __diagused.

Pointed out by: jhb
Sponsored by: UKRI


# a5ec261a 07-May-2022 Ruslan Bukin <br@FreeBSD.org>

Add FDT attachment driver for ARM System MMU v3.2 controller.

Tested on ARM Morello Board.

Sponsored by: UKRI


Revision tags: release/12.3.0
# f17c4e38 27-Apr-2021 Ruslan Bukin <br@FreeBSD.org>

Move IOMMU code to a separate pmap module and switch ARM System MMU
driver to use it.

Add ARM Mali Txxx (Midgard), Gxx (Bifrost) GPU page management code.

Sponsored by: UKRI


Revision tags: release/13.0.0
# 4cc87010 16-Nov-2020 Ruslan Bukin <br@FreeBSD.org>

Introduce IOMMU support for arm64 platform.

This adds an arm64 iommu interface and a driver for Arm System Memory
Management Unit version 3.2 (ARM SMMU v3.2) specified in ARM IHI 0070C
document.

Ha

Introduce IOMMU support for arm64 platform.

This adds an arm64 iommu interface and a driver for Arm System Memory
Management Unit version 3.2 (ARM SMMU v3.2) specified in ARM IHI 0070C
document.

Hardware overview is provided in the header of smmu.c file.

The support is disabled by default. To enable add 'options IOMMU' to your
kernel configuration file.

The support was developed on Arm Neoverse N1 System Development Platform
(ARM N1SDP), kindly provided by ARM Ltd.

Currently, PCI-based devices and ACPI platforms are supported only.
The support was tested on IOMMU-enabled Marvell SATA controller,
Realtek Ethernet controller and a TI xHCI USB controller with a low to
medium load only.

Many thanks to Konstantin Belousov for help forming the generic IOMMU
framework that is vital for this project; to Andrew Turner for adding
IOMMU support to MSI interrupt code; to Mark Johnston for help with SMMU
page management; to John Baldwin for explaining various IOMMU bits.

Reviewed by: mmel
Relnotes: yes
Sponsored by: DARPA / AFRL
Sponsored by: Innovate UK (Digital Security by Design programme)
Differential Revision: https://reviews.freebsd.org/D24618

show more ...