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)
Wed, Apr 17, 8:11 AM
Unknown Object (File)
Wed, Apr 17, 8:08 AM
Unknown Object (File)
Dec 23 2023, 12:46 AM
Unknown Object (File)
Dec 14 2023, 3:47 AM
Unknown Object (File)
Nov 28 2023, 7:59 PM
Unknown Object (File)
Nov 26 2023, 10:32 AM
Unknown Object (File)
Nov 24 2023, 6:57 PM
Unknown Object (File)
Nov 23 2023, 3:20 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
Lint Skipped
Unit
Tests Skipped

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 ↗(On Diff #2566)

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 ↗(On Diff #2566)

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).