<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/vmd, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-12-09T20:00:06Z</updated>
<entry>
<title>bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD</title>
<updated>2025-12-09T20:00:06Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-12-09T19:59:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=575639548cef58590a1d70c29e47aae0e8d44153'/>
<id>urn:sha1:575639548cef58590a1d70c29e47aae0e8d44153</id>
<content type='text'>
The wrapper functions such as bus_alloc_resource_any() still support
passing the rid by value or pointer, but the underlying implementation
now passes by value.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D53402
</content>
</entry>
<entry>
<title>Remove now-redundant calls to device_delete_children</title>
<updated>2025-01-02T18:22:50Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-01-02T18:22:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=160179ea3e24651cd8b15a4fafce519546eac505'/>
<id>urn:sha1:160179ea3e24651cd8b15a4fafce519546eac505</id>
<content type='text'>
Earlier calls to bus_generic_detach now take care of deleting
children.

Differential Revision:	https://reviews.freebsd.org/D47962
</content>
</entry>
<entry>
<title>Replace calls to bus_generic_attach with bus_attach_children</title>
<updated>2024-12-06T22:26:16Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-12-06T22:26:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=18250ec6c089c0c50cbd9fd87d78e03ff89916df'/>
<id>urn:sha1:18250ec6c089c0c50cbd9fd87d78e03ff89916df</id>
<content type='text'>
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47675
</content>
</entry>
<entry>
<title>newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANY</title>
<updated>2024-07-25T04:22:58Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-25T04:22:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5b56413d04e608379c9a306373554a8e4d321bc0'/>
<id>urn:sha1:5b56413d04e608379c9a306373554a8e4d321bc0</id>
<content type='text'>
Sponsored by:		Netflix
</content>
</entry>
<entry>
<title>acpi/pci/vmd: Fix a nit with nested resource mapping requests</title>
<updated>2024-06-04T23:51:14Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-06-04T23:50:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=98056127ddfa36720bcf46edc09843c867784bcb'/>
<id>urn:sha1:98056127ddfa36720bcf46edc09843c867784bcb</id>
<content type='text'>
Some bus drivers use rmans to suballocate resources to child devices.
When the driver for a child device requests a mapping for a
suballocated resource, the bus driver translates this into a mapping
request for a suitable subrange of the original resource the bus
driver allocated from its parent.  This nested mapping request should
look like any other resource mapping request being made by the bus
device (i.e. as if the bus device had called bus_map_resource() or
bus_alloc_resource() with RF_ACTIVE).

I had slightly flubbed this last bit though since the direct use of
bus_generic_map/unmap_resource passed up the original child device
(second argument to the underlying kobj interface).  While this is
currently harmless, it is not strictly correct as the resource being
mapped is owned by the bus device, not the child and can break for
other bus drivers in the future.

Instead, use bus_map/unmap_resource for the nested request where the
requesting device is now the bus device that owns the parent resource.

Reviewed by:	imp
Fixes:		0e1246e33461 acpi: Cleanup handling of suballocated resources
Fixes:		b377ff8110e3 pcib: Refine handling of resources allocated from bridge windows
Fixes:		d79b6b8ec267 pci_host_generic: Don't rewrite resource start address for translation
Fixes:		d714e73f7895 vmd: Use bus_generic_rman_* for PCI bus and memory resources
Differential Revision:	https://reviews.freebsd.org/D45433
</content>
</entry>
<entry>
<title>new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE</title>
<updated>2024-03-13T22:05:54Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-03-13T22:05:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9dbf5b0e6876d8c93890754bcc9c748339de79c0'/>
<id>urn:sha1:9dbf5b0e6876d8c93890754bcc9c748339de79c0</id>
<content type='text'>
The public bus_release_resource() API still accepts both forms, but
the internal kobj method no longer passes the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44131
</content>
</entry>
<entry>
<title>new-bus: Remove the 'rid' and 'type' arguments from BUS_*ACTIVATE_RESOURCE</title>
<updated>2024-03-13T22:05:54Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-03-13T22:05:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2baed46e85d33b1f99e6f96033acc85a9a6fbba4'/>
<id>urn:sha1:2baed46e85d33b1f99e6f96033acc85a9a6fbba4</id>
<content type='text'>
The public bus_activate/deactivate_resource() API still accepts both
forms, but the internal kobj methods no longer pass the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44130
</content>
</entry>
<entry>
<title>new-bus: Remove the 'type' argument from BUS_MAP/UNMAP_RESOURCE</title>
<updated>2024-03-13T22:05:54Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-03-13T22:05:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d77f2092ceebaba115e6be53410428f6f5f6ae83'/>
<id>urn:sha1:d77f2092ceebaba115e6be53410428f6f5f6ae83</id>
<content type='text'>
The public bus_map/unmap_resource() API still accepts both forms, but
the internal kobj methods no longer pass the argument.
Implementations which need the type now use rman_get_type() to fetch
the value from the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44129
</content>
</entry>
<entry>
<title>new-bus: Remove the 'type' argument from BUS_ADJUST_RESOURCE</title>
<updated>2024-03-13T22:05:54Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-03-13T22:05:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fef01f0498aa7b256bc37bbf28ee0e8ac9b2536f'/>
<id>urn:sha1:fef01f0498aa7b256bc37bbf28ee0e8ac9b2536f</id>
<content type='text'>
The public bus_adjust_resource() API still accepts both forms, but the
internal kobj method no longer passes the argument.  Implementations
which need the type now use rman_get_type() to fetch the value from
the allocated resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44128
</content>
</entry>
<entry>
<title>vmd: Use bus_generic_rman_* for PCI bus and memory resources</title>
<updated>2024-02-15T20:26:40Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-02-15T20:26:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d714e73f789515963a22fe64417bf3883cdb599c'/>
<id>urn:sha1:d714e73f789515963a22fe64417bf3883cdb599c</id>
<content type='text'>
While here, add custom bus_map/unmap_resource methods to request
mappings via the window memory resources allocated from the parent
bus.

Tested by:		emaste
Differential Revision:	https://reviews.freebsd.org/D43886
</content>
</entry>
</feed>
