Skip to content

xtensa: add support for platforms with no threadptr register. - #1826

Merged
lgirdwood merged 1 commit into
masterfrom
lrg/topic/threadptr
Sep 30, 2019
Merged

lgirdwood merged 1 commit into
masterfrom
lrg/topic/threadptr

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

Provide a virtual threadptr register in the memory map using a linker
area below the stack. This can then be referenced instead of the register
for ISAs that dont support threadptr.

This patch also includes initial support for HSW/BDW platforms.

TODO: This patch now allow BDW to boot on real HW and updated qemu, but it fails on any context switch to IRQ level1 ? i.e. scheduling IRQs seem to work but any IPC (level1) will process and then break next scheduler IRQ invocation (causing a kernel exception). @tlauda any ideas ?

Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should update the whole header.
There is a high probability, that the rest of the values is also wrong.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the others and they looked correct.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tlauda in fact a few other items were off, now fixed. I will test over the weekend and see if it improves things.

@tlauda

tlauda commented Sep 13, 2019

Copy link
Copy Markdown
Contributor

@lgirdwood Hard to tell from the code what can be wrong. If your macro loads the right address for the virtual threadptr, then it should work correctly.

@lgirdwood

Copy link
Copy Markdown
Member Author

@lgirdwood Hard to tell from the code what can be wrong. If your macro loads the right address for the virtual threadptr, then it should work correctly.

Yeah, validated on qemu. My suspicion is that level 1 IRQs are not used anywhere except on HSW/BDW since they have a different xtos entry compared to mid-high level IRQs (2 - 7).

@tlauda

tlauda commented Sep 13, 2019

Copy link
Copy Markdown
Contributor

@lgirdwood Hard to tell from the code what can be wrong. If your macro loads the right address for the virtual threadptr, then it should work correctly.

Yeah, validated on qemu. My suspicion is that level 1 IRQs are not used anywhere except on HSW/BDW since they have a different xtos entry compared to mid-high level IRQs (2 - 7).

BYT/CHT uses level 1 as PLATFORM_SCHEDULE_IRQ. I see in CI that HSW fails and BDW boots OK. Is this expected, or maybe the exception you're seeing is not on BDW?

@lgirdwood

Copy link
Copy Markdown
Member Author

@lgirdwood Hard to tell from the code what can be wrong. If your macro loads the right address for the virtual threadptr, then it should work correctly.

Yeah, validated on qemu. My suspicion is that level 1 IRQs are not used anywhere except on HSW/BDW since they have a different xtos entry compared to mid-high level IRQs (2 - 7).

BYT/CHT uses level 1 as PLATFORM_SCHEDULE_IRQ.
Ok, that's good to know since the entry is different.

I see in CI that HSW fails and BDW boots OK. Is this expected, or maybe the exception you're seeing is not on BDW?

Expected. Qemu has the wrong ISA config.

Fix the core-isa headers for HSW and BDW.

Provide a virtual threadptr register in the memory map using a linker
area below the stack. This can then be referenced instead of the register
for ISAs that dont support threadptr.

This patch also includes initial vthreadptr support for HSW/BDW platforms.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
@lgirdwood

Copy link
Copy Markdown
Member Author

@tlauda updated core-isa.h fixes the issue. FW can now boot again on BDW and perform IPC. Now need to update kernel and topology for XPS13. Good to merge.

@tlauda

tlauda commented Sep 14, 2019

Copy link
Copy Markdown
Contributor

@lgirdwood What with the HSW boot fail? I think we should first update QEMU in CI to avoid constant failures.

@lgirdwood

Copy link
Copy Markdown
Member Author

@tlauda yep, I will be asking @xiulipan to update qemu shortly. once this is done we can merge this PR.

@lgirdwood

Copy link
Copy Markdown
Member Author

@xiulipan Travis will need an Qemu update now that thesofproject/qemu#19 is merged. This fixes all HSW/BDW issues.

@xiulipan

Copy link
Copy Markdown
Contributor

@lgirdwood Let me have a try with the latest qemu. I think I hold the update for some issue with qemu and need to fix them all before make the update.

{
vector_reset_text :
org = XCHAL_RESET_VECTOR0_PADDR,
org = XCHAL_RESET_VECTOR_PADDR,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason of this change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change in core-isa.h, VECTOR0 no longer exists.

@lgirdwood

Copy link
Copy Markdown
Member Author

SOFCI TEST

@lgirdwood

Copy link
Copy Markdown
Member Author

@xiulipan all qemu fixes now merged (including HSW/BDW ISA updates).

@lgirdwood lgirdwood added this to the v1.4 milestone Sep 30, 2019
@lgirdwood
lgirdwood merged commit db52ec9 into master Sep 30, 2019
@lgirdwood
lgirdwood deleted the lrg/topic/threadptr branch November 19, 2019 12:34
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.

5 participants