Virtio modern has the common data organized in little endian.
POWERPC architecture, as BE, was reading and writing in the wrong
format.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
[POWERPC] Switch endian of common dev information
Virtio modern has the common data organized in little endian.
POWERPC architecture, as BE, was reading and writing in the wrong
format.
Checking endian when reading and writing in dev common.
sys/dev/virtio/pci/virtio_pci_modern.c | ||
---|---|---|
149 | This method signature of void pointer and size is too easy to get wrong, difficult to read, and really only makes sense as a DEVMETHOD to avoid interface explosion. Add methods for each size like already exists instead. |
sys/dev/virtio/pci/virtio_pci_modern.c | ||
---|---|---|
149 | I've added the call to convert endian inside existing functions, avoiding the new one created before. |
Comment Actions
Thanks Leonardo. I've being testing this patch, it looks good to me.
@bryanv, are you ok with this change?