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

[Lesson03] Exercises questions #70

Closed
bl4ckout31 opened this issue Jun 30, 2018 · 5 comments · Fixed by #72
Closed

[Lesson03] Exercises questions #70

bl4ckout31 opened this issue Jun 30, 2018 · 5 comments · Fixed by #72

Comments

@bl4ckout31
Copy link
Contributor

I have 2 questions about the exercises of Lesson03 that I'm currently trying to complete, respectively exercise 1 and 3.

  1. Is the local timer the Timer (ARM side) of BCM2835 Peripherals manual p.196 ?

  2. Is the ARM generic timer mentioned here the one mentioned in my previous question or The Generic Timer in AArch64 state of Aarch64-Reference-Manual p. 2321 ?

@s-matyukevich
Copy link
Owner

@bl4ckout31, The local timer described in the BCM2835 Peripherals manual was designed for the old single-core Raspberry Pis - it may still work because of compatibility guarantees. However, I recommend you to use the local ARM timer described in the BCM2836 ARM-local peripherals manual. (I mentioned it here but I will also add this link to the exercise definition)
I am not very familiar with the Generic timer mentioned in the AArch64-Reference-Manual p. 2321 but I will try to investigate what exactly it does and how it is different from the ARM local timer.

@bl4ckout31
Copy link
Contributor Author

bl4ckout31 commented Jul 1, 2018

@s-matyukevich Thanks a lot!

For exercise 1, I thought it was the one I mentioned because it's the only one baside the system timer in the BCM2835 Peripherals manual. By checking the other solutions, it looks like that everyone else had the same conclusion so a link to this manual or just a mention of the Local vs global interrupt controllers paragraph from lesson 3.3 would be nice in case people forget about it the next day just like I did.

For the reasons mentioned above, I tried to use the same timer in exercise 3 but it didn't work at all. That's how I ended up on the Generic timer in the AArch64-Reference-manual but I suppose the local timer should be implemented in qemu.

EDIT: It looks like the local timer is not emulated either.

@f0rm2l1n
Copy link

f0rm2l1n commented Oct 8, 2019

@bl4ckout31
Hi there, I want to ask some questions about exercise1 :D
I want to emulate the timer exception handling in QEMU while the standard timer seems not supported (https://www.raspberrypi.org/forums/viewtopic.php?t=195565)

So can you tell me how you did it? Did you use a real machine or something else?
thanks a lot!

@bl4ckout31
Copy link
Contributor Author

@f0rm2l1n I used the RPi 3 local timer for the real hardware and the ARM generic timer for QEMU.
I don't remember much to be honest, that's what a gathered from reading my code.
Maybe the local timer is working now with QEMU 4.x, I'm gonna try.

@bl4ckout31
Copy link
Contributor Author

@f0rm2l1n After some testing, it looks like QEMU now implement the RPi 3 local timer with the same behavior, at least on version 4.1.0. For this exercice, the same code apart from boot.S and linker.ld should work on both the real hardware and QEMU.

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 a pull request may close this issue.

3 participants