-
Notifications
You must be signed in to change notification settings - Fork 126
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
08_scheduler doesn't work #26
Comments
Not bad... I'm impressed! |
It has same issue when testing in ubuntu 20.04 with qemu 4.2.1, but I don't know the reason, however it works after remove "packed" and add "align(4)" |
Good idea to use A better solution I think is to use I tested this on my system with qemu 8.0.2 and gcc 12.2 and it started working. |
08_scheduler
doesn't work on my WSL2, no uart message anymore afterWelcome to Chapter 8, Scheduling!
.Version:
I had debug the source code and found
ptimer_isr
is never enter, that will make the global variablesystimie
always zero. Appending-d guest_errors
to qemu command line params, I got next error messages:The private timer registers should be accessed with uint32, but qemu report it was accessed by uint8, let's check the disassemble code:
Yes, it is accessed by uint8. Remove the
__attribute__((packed))
from the register declare structure, the gcc will make those register accessed by uint32. Next is a patch:Disassemble code after apply this patch:
qemu work fine and no guest errors now:
The text was updated successfully, but these errors were encountered: