You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the pci-types documentation, the EndpointHeader::bar function should not be called on slots that make up the second part of a 64-bit BAR. However, map_bar_mem calls the function (indirectly) for all slots in the maximum BAR count range, without checking if the previous BAR was 64-bits.
Currently, we map the BAR spaces ahead of time and then match them with the capability they belong to. We can get the slot index from the capability and map the space based on that instead. Although creating a BAR list independent of the capability list could be useful for devices that do not support capability lists, we assume the existence of that support anyways. Fixeshermit-os#1392.
Currently, we map the BAR spaces ahead of time and then match them with the capability they belong to. We can get the slot index from the capability and map the space based on that instead. Although creating a BAR list independent of the capability list could be useful for devices that do not support capability lists, we assume the existence of that support anyways. Fixeshermit-os#1392.
According to the
pci-types
documentation, theEndpointHeader::bar
function should not be called on slots that make up the second part of a 64-bit BAR. However,map_bar_mem
calls the function (indirectly) for all slots in the maximum BAR count range, without checking if the previous BAR was 64-bits.kernel/src/drivers/virtio/env.rs
Lines 33 to 41 in 0245c53
Additionally, it seems like the BARs are always 64-bit based on the lines below:
kernel/src/drivers/pci.rs
Lines 147 to 150 in 0245c53
The text was updated successfully, but these errors were encountered: