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

Debug transition from LLC to SPM #20

Open
wants to merge 1 commit into
base: llc_partition_opt
Choose a base branch
from

Conversation

CyrilKoe
Copy link

@CyrilKoe CyrilKoe commented Jan 5, 2025

Disabling the LLC can cause deadlock upon AXI reads.

These read request are routed to the hit_miss_detect but spm_lock blocks the lookup. We need to make sure that spm_lock is asserted only when there are not anymore requests inside the LLC.

The following code would break before this fix.

void llc_disable() {
    *reg32(&__base_llc, AXI_LLC_CFG_SPM_LOW_REG_OFFSET ) = 0xffffffff;
    *reg32(&__base_llc, AXI_LLC_CFG_SPM_HIGH_REG_OFFSET) = 0xffffffff;
    *reg32(&__base_llc, AXI_LLC_CFG_FLUSH_LOW_REG_OFFSET ) = 0xffffffff;
    *reg32(&__base_llc, AXI_LLC_CFG_FLUSH_HIGH_REG_OFFSET) = 0xffffffff;
    fence();
    // Stress the LLC using the icache
    fencei();
    // Disable the LLC
    *reg32(&__base_llc, AXI_LLC_COMMIT_CFG_REG_OFFSET) = 0x1;
    fence();
}

@CyrilKoe CyrilKoe marked this pull request as ready for review January 6, 2025 08:12
@CyrilKoe CyrilKoe changed the title Draft: Debug transition from LLC to SPM Debug transition from LLC to SPM Jan 6, 2025
@CyrilKoe CyrilKoe self-assigned this Jan 6, 2025
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

Successfully merging this pull request may close these issues.

1 participant