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

Arty A7-100T Boot Linux Panic about irqchip. #1976

Open
Comet959 opened this issue May 30, 2024 · 11 comments
Open

Arty A7-100T Boot Linux Panic about irqchip. #1976

Comet959 opened this issue May 30, 2024 · 11 comments

Comments

@Comet959
Copy link

the issue metioned on:
litex-hub/linux-on-litex-rocket#40 (comment)

i found the arty.dts had a node with interrupts-extended: <&L4 11 >

L1: interrupt-controller@c000000 {
			#interrupt-cells = <1>;
			compatible = "riscv,plic0";
			interrupt-controller;
			interrupts-extended = <&L4 11 &L4 9>;
			reg = <0xc000000 0x4000000>;
			reg-names = "control";
			riscv,max-priority = <7>;
			riscv,ndev = <8>;
		};

and my Linux can't get thr irq 11 's handler.
How can i debug this?

@Comet959
Copy link
Author

Btw, i'm new on fpga, another question is that where the irq number come from ? Is it come from the litex design or rocketchip?

@AndrewD
Copy link
Collaborator

AndrewD commented Jun 1, 2024

Btw, i'm new on fpga, another question is that where the irq number come from ? Is it come from the litex design or rocketchip?

It could come from litex_json2dts_linux, but doesn't seem to.

Maybe it's hard coded in linux-on-litex-rocket?

@gsomlo
Copy link
Collaborator

gsomlo commented Jun 1, 2024 via email

@AndrewD
Copy link
Collaborator

AndrewD commented Jun 1, 2024

It looks like linux-on-litex-rocket recommends a specific dts which is almost guaranteed to be wrong and the source of the reported error.
@Comet959 if you are using that dts (which I suspect is the case), it would be way better to try the dts generated by litex-json2dts-linux for your exact soc. You just need to generate csr.json by specifying the appropriate command line switch to the target build, then run litex-json2dts-linux with that json file.

@trabucayre
Copy link
Collaborator

You could test using this repository.
linux sub-directory contains a buildroot external with a rocket defconfig using an uptodate linux kernel and a dts generated using litex-json2dts-linux.

@Comet959
Copy link
Author

Comet959 commented Jun 1, 2024

It looks like linux-on-litex-rocket recommends a specific dts which is almost guaranteed to be wrong and the source of the reported error. @Comet959 if you are using that dts (which I suspect is the case), it would be way better to try the dts generated by litex-json2dts-linux for your exact soc. You just need to generate csr.json by specifying the appropriate command line switch to the target build, then run litex-json2dts-linux with that json file.

Thanks for it! I have tried to use litex-json2dts-linux to generate my dts. This problem seems to be solved.
But i meet a new problem mentioned here: litex-hub/linux-on-litex-rocket#41 (comment)

My dts have no irq 12 , but booting info shows me that irq 12 nobody cared, i don't know how to think it. Can you give me some suggestion.
Thanks!

@AndrewD
Copy link
Collaborator

AndrewD commented Jun 1, 2024

But i meet a new problem mentioned here

@Comet959 I think you will have more success if you look at the repository mentioned by @trabucayre above. I believe it will build everything needed to run a known working configuration.
I haven't personally used rocket or followed the docs you mentioned, so I can only provide limited help.
linux-on-litex-rocket is also 2 years old and a lot has changed since then.

@Comet959
Copy link
Author

Comet959 commented Jun 3, 2024

But i meet a new problem mentioned here

@Comet959 I think you will have more success if you look at the repository mentioned by @trabucayre above. I believe it will build everything needed to run a known working configuration. I haven't personally used rocket or followed the docs you mentioned, so I can only provide limited help. linux-on-litex-rocket is also 2 years old and a lot has changed since then.

🎉Thanks very much! I have already run the test successfully, all works fine. I definitely couldn't have done it without your help. @trabucayre @AndrewD
I can't thank you enough.
This issue can be closed.

截屏2024-06-03 18 29 55

@Comet959 Comet959 closed this as completed Jun 3, 2024
@gsomlo
Copy link
Collaborator

gsomlo commented Jun 13, 2024

FWIW, I just updated linux-on-litex-rocket to use "fresh" component commits and opensbi (instead of the old, deprecated BBL). Examples include boards I have available to work with:

  • nexys-video
  • acorn baseboard mini
  • lambdaconcept ecpix5

It should be relatively straightforward to adapt one of the DTS examples to a new board, and rebuild a dedicated opensbi firmware blob to fit the new bitstream.

@Comet959
Copy link
Author

FWIW, I just updated linux-on-litex-rocket to use "fresh" component commits and opensbi (instead of the old, deprecated BBL). Examples include boards I have available to work with:

  • nexys-video
  • acorn baseboard mini
  • lambdaconcept ecpix5

It should be relatively straightforward to adapt one of the DTS examples to a new board, and rebuild a dedicated opensbi firmware blob to fit the new bitstream.

This is really something worth celebrating。

Another thing that puzzles me is about the ISA extension. I want to enable the H-extension when compiling rocketchip, but as you can see in the picture above, isa does not show support for the H extension.

I saw this issue also mentioned related issues chipsalliance/rocket-chip#3296 , but I still haven't figured out how to support H extension specifically. Can you explain it to me?
@gsomlo

@Comet959 Comet959 reopened this Jun 13, 2024
@gsomlo
Copy link
Collaborator

gsomlo commented Jun 13, 2024 via email

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

4 participants