Page MenuHomeFreeBSD

Update the virtio driver to work on the ARM AArch64 Foundation Model.
ClosedPublic

Authored by andrew on Nov 27 2014, 10:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 10, 11:31 AM
Unknown Object (File)
Nov 15 2024, 8:33 AM
Unknown Object (File)
Oct 3 2024, 5:45 AM
Unknown Object (File)
Oct 3 2024, 2:21 AM
Unknown Object (File)
Oct 3 2024, 12:25 AM
Unknown Object (File)
Oct 2 2024, 8:53 PM
Unknown Object (File)
Oct 2 2024, 5:33 PM
Unknown Object (File)
Oct 1 2024, 1:02 PM
Subscribers

Details

Summary

There are two main parts to get it to work, 1) most of the register
accesses need to be word sized, other than the config register which
needs to be byte aligned, and 2) we don't need the platform driver
for this to work on the Foundation Model, allow it to be NULL.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

andrew retitled this revision from to Update the virtio driver to work on the ARM AArch64 Foundation Model..
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
sys/dev/virtio/mmio/virtio_mmio.c
141

why to check if (sc->platform != NULL) ? There are empty functions defined in virtio_mmio_if.m for that case.

sys/dev/virtio/mmio/virtio_mmio.c
141

These functions only work when sc->platform points to a valid device. When it's NULL the kernel tries to access the pointer causing an exception and panic.

The alternative to this check would be to create a dummy platform device with a very low priority.

Follow the virtqueue configuration process. This fixes the driver on later revisions of the Foundation Model.

Does anyone have any problems with this change? I would like to push this soon.

In D1240#9, @andrew wrote:

Does anyone have any problems with this change? I would like to push this soon.

It looks fine to me. I guess the vtmmio_vq_intr() function is slightly misnamed now though. How about just vtmmio_intr()?

I think there is still a couple of places that we could better comply with the spec, but they don't seem to be too important as long as it is working.

andrew updated this revision to Diff 2686.

Closed by commit rS275640 (authored by @andrew).