| f9ce8da8 | 30-Nov-2022 |
Warner Losh <[email protected]> |
stand/ofw: Refactor ofw parsedev
Both ofw_disk and ofw_net use the same parsedev routine, except for the string passed in to match the ofw device node's type. Create a routine to do that and connect
stand/ofw: Refactor ofw parsedev
Both ofw_disk and ofw_net use the same parsedev routine, except for the string passed in to match the ofw device node's type. Create a routine to do that and connect these two users up to that.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37560
show more ...
|
| 88a8c682 | 30-Nov-2022 |
Warner Losh <[email protected]> |
ofw/disk: Add parsedev support
Add a parsedev support for OpenFirmware disks. We must look at characteristics of the OFW node to know if we match this device (so supply a match routine) or not. Add
ofw/disk: Add parsedev support
Add a parsedev support for OpenFirmware disks. We must look at characteristics of the OFW node to know if we match this device (so supply a match routine) or not. Add a parsing routine to allocate devdesc for OpenFirmware disks as well.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37558
show more ...
|
| b8ff248f | 30-Nov-2022 |
Warner Losh <[email protected]> |
stand/ofw: Subclass devnet to cope with ofw's unique needs
We need to match devices in a slightly special way: We have to look up the path and see if the device is a 'network' device in order to use
stand/ofw: Subclass devnet to cope with ofw's unique needs
We need to match devices in a slightly special way: We have to look up the path and see if the device is a 'network' device in order to use it.
Sponsored by: Netflix Tested by: grehan@ (with tweaks to my original patch) Differential Revision: https://reviews.freebsd.org/D37557
show more ...
|
| ed3cc2f2 | 30-Nov-2022 |
Warner Losh <[email protected]> |
stand/ofw: Add ofw_path_to_handle
ofw_path_to_handle converts a path string to a phandle_t. It searches down the path for the first device whose type matches the passed-in string.
Sponsored by: Ne
stand/ofw: Add ofw_path_to_handle
ofw_path_to_handle converts a path string to a phandle_t. It searches down the path for the first device whose type matches the passed-in string.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37556
show more ...
|
| 33bbe5dd | 30-Nov-2022 |
Warner Losh <[email protected]> |
stand: parsedev API change: devspec now points to start of full device name
To support more flexible device matching, we now pass in the full devspec to the parsedev routines. For everything execpt
stand: parsedev API change: devspec now points to start of full device name
To support more flexible device matching, we now pass in the full devspec to the parsedev routines. For everything execpt uboot, this is just a drop in (since everything except uboot and openfirmware always uses disk...: and/or zfs:, but openfirmware isn't really affected).
uboot we kludge around it by subtracting 4 from where the rest of the device name starts. This is unforunate, and can compute the address one before the string. But we never dereference that address. uboot needs more work, and this is an acceptable UB until that other work happens.
OFW doesn't really use the parsedev routines these days (since none of the supported device uses this... yet). It too needs more work, but it needs device matching support first.
Sponsored by: Netflix Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D37553
show more ...
|
| daaf594e | 30-Nov-2022 |
Warner Losh <[email protected]> |
stand/ofw: ofw_disk isn't really a disk
The rest of the code in the tree assumes that a DEVT_DISK uses a disk_devdesc to represent the device. However ofw_disk diesn't, so we can't use disk_fmtdev,
stand/ofw: ofw_disk isn't really a disk
The rest of the code in the tree assumes that a DEVT_DISK uses a disk_devdesc to represent the device. However ofw_disk diesn't, so we can't use disk_fmtdev, nor disk_parsedev. ofw needs to have a dv_match-like routine to use devpasrse, though, since we have two drivers (net and block) that claim the same sort of devices (eg /path/to/ofw-dev) based on the device-type property. In the interim, we can't use devmatch and ofw_disk's and the default net driver's parsing is offloaded ofw_parsedev.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37347
show more ...
|
| d1608381 | 30-Nov-2022 |
Warner Losh <[email protected]> |
stand/ofw: Access the parsing routine more directly
We don't need to check if something is a ZFS device. Instead, if the found device has a parse routine, call it. Otherwise, just copy the path.
Sp
stand/ofw: Access the parsing routine more directly
We don't need to check if something is a ZFS device. Instead, if the found device has a parse routine, call it. Otherwise, just copy the path.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37343
show more ...
|