Module Name: src Committed By: rin Date: Tue Nov 7 13:38:01 UTC 2023
Modified Files: src/sys/dev/pci: virtio.c Log Message: virtio_read_device_config_le_[24]: Fix for {aarch64,arm}eb Stop byte-swapping for big-endian aarch64 and arm to fix corrupted read for, e.g., sc_taglen for vio9p(4). As described as comments in virtio_pci.c, big-endian aarch64 and armv7 (armeb) are somewhat special. At the moment, all supported virtual/real machines are configured as little-endian, and only CPU cores are switched to big-endian mode during early boot stage. Most peripheral buses for armeb are LSB as a result, and their default bus_space(9) functions swap byte-order. Therefore, PIOed data from memory-mapped devices, as well as pci(4) ones, are actually LSB, but observed as MSB for armeb. Therefore, we should not swap byte-order further in virtio_read_device_config_le_[24] on armeb. Thanks ozaki-r@ for comments. XXX Centralize? See virtio_pci.c and sys/dev/fdt/virtio_mmio_fdt.c also. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/dev/pci/virtio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.