Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Fix timer on all platforms #19

Open
3 tasks
JohnAZoidberg opened this issue May 5, 2021 · 2 comments
Open
3 tasks

Fix timer on all platforms #19

JohnAZoidberg opened this issue May 5, 2021 · 2 comments

Comments

@JohnAZoidberg
Copy link
Collaborator

JohnAZoidberg commented May 5, 2021

The countdown in the shell to run autostart.nsh says it's counting down from 5s but it's much faster.

  • U540/U500 (works when setting the PCD to 10x the actual value, which is 1_000_000)
  • RiscvVirt
  • BeagleV (not tested but frequency is 6_250_000 according to datasheet)
@JohnAZoidberg
Copy link
Collaborator Author

Other platforms still use the SiFive timer, too.
They shouldn't.

@JohnAZoidberg JohnAZoidberg changed the title Fix timer on U540 and virt platform Fix timer on all platforms May 13, 2021
@JohnAZoidberg
Copy link
Collaborator Author

On U540 it seems to be off by a factor of 10.
If I change PcdRiscVMachineTimerFrequencyInHerz from 1_000_000 to 10_000_000 the countdown to skip startup.sh seems to be roughly 5 seconds.
However the device tree of the U540 indicates that the frequency is 1_000_000.

Maybe there's something wrong in Silicon/RISC-V/ProcessorPkg/Library/RiscVTimerLib/RiscVTimerLib.c?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant