Skip to content

[BUG] cavs platform_init should not write to DSP shim registers in Zephyr build #7249

Closed

Description

@kv2019i

Is your feature request related to a problem? Please describe.
Fix invalid hw access in platform_init() of intel/cavs platform_init in Zephyr builds.

See #5602 and #7248

This is not correct

»       io_reg_write(DSP_INIT_GENO,
»       »       GENO_MDIVOSEL | GENO_DIOPTOSEL);

»       io_reg_write(DSP_INIT_IOPO,
»       »       IOPO_DMIC_FLAG | IOPO_I2S_FLAG);

»       io_reg_write(DSP_INIT_ALHO,
»       »       ALHO_ASO_FLAG | ALHO_CSO_FLAG);

»       io_reg_write(DSP_INIT_LPGPDMA(0),
»       »       LPGPDMA_CHOSEL_FLAG | LPGPDMA_CTLOSEL_FLAG);
»       io_reg_write(DSP_INIT_LPGPDMA(1),
»       »       LPGPDMA_CHOSEL_FLAG | LPGPDMA_CTLOSEL_FLAG);

Activity

  1. added
    bugSomething isn't working as expected
    enhancementNew feature or request
    P2Critical bugs or normal features
    ZephyrIssues only observed with Zephyr integrated
    TGLApplies to Tiger Lake
    on Mar 10, 2023
  2. added this to the v2.6 milestone on Mar 10, 2023
  3. self-assigned this
    on Mar 10, 2023
  4. kv2019i commented on Mar 10, 2023

    @kv2019i
    CollaboratorAuthor

    Started working on this. Some of the registers are written in Zephyr platfom boot code, but not all, so we cannot simply remove this yet. I also didn't want to add ifdef ZEPHYR on individual register writes, but rather wait until we have this init done correctly in Zephyr main and then remove this.

    Also consider how to do this cleanly for intel/cavs. Once @juimonen complete the runtime_pm refactoring, we are starting to get close to the point where we could add a thin "platform/cavs-zephyr" that gets rid of all platform specific code, or drop XTOS support altogether for intel/cavs in SOF main.

    @lgirdwood @juimonen any thoughts?

  5. lgirdwood commented on Mar 13, 2023

    @lgirdwood
    Member

    @nashif fyi
    @kv2019i I assume we have this flow in the Zephyr init and are executing it twice today ?

  6. kv2019i commented on Mar 14, 2023

    @kv2019i
    CollaboratorAuthor

    @lgirdwood Nopes, we are missing bits on Zephyr side -> zephyrproject-rtos/zephyr#55738

  7. lgirdwood commented on May 11, 2023

    @lgirdwood
    Member

    @kv2019i @juimonen any update ?

  8. kv2019i commented on May 25, 2023

    @kv2019i
    CollaboratorAuthor

    Need to move to v2.7. I have a PR in Zephyr side, but I can't complete it in SOF2.6 timeline (Zephyr 3.4 feature freeze starts tomorrow).

  9. modified the milestones: v2.6, v2.7 on May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Critical bugs or normal featuresTGLApplies to Tiger LakeZephyrIssues only observed with Zephyr integratedbugSomething isn't working as expected

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions