Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acs_pcie.c needs reads added to preserve memory ordering #422

Open
cdwilde opened this issue Jan 17, 2025 · 0 comments
Open

acs_pcie.c needs reads added to preserve memory ordering #422

cdwilde opened this issue Jan 17, 2025 · 0 comments

Comments

@cdwilde
Copy link

cdwilde commented Jan 17, 2025

acs_pcie.c has many PCIe writes. During testing, we ran into an issue where a disable and enable got out of order. This is because writes in PCIe can go out of order. To ensure that this doesn't happen, we can add a read after each write to ensure ordering.

/* Set SERR# Enable bit in the Command Register to enable reporting

  • upstream of Non-fatal and Fatal errors detected by the Function.
    */
    val_pcie_read_cfg(bdf, TYPE01_CR, &reg_value);
    dis_mask = (1 << CR_SERRE_SHIFT);
    val_pcie_write_cfg(bdf, TYPE01_CR, reg_value | dis_mask);
    val_pcie_read_cfg(bdf, TYPE01_CR, &reg_value);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant