Skip to content

ARC: Boot_time test not functioning #3198

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

Closed
zephyrbot opened this issue Feb 16, 2017 · 8 comments · Fixed by #14664
Closed

ARC: Boot_time test not functioning #3198

zephyrbot opened this issue Feb 16, 2017 · 8 comments · Fixed by #14664
Assignees
Labels
area: ARC ARC Architecture bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented Feb 16, 2017

Reported by Chuck Jordan:

The following tests malfunction for ARC cpu targets:

tests/benchmarks/boot_time
legacy/benchmark/boot_time/<microkernel,nanokernel>

When CONFIG_BOOT_TIME_MEASUREMENT is defined,
some very early initialization is supposed to assign the value
__start_tsc.
This can't be done with ARC because _tsc_read is implemented to rely
on tick interrupts, and that hasn't come alive during this early time.

What could be done, is the ARC timer0 could be activated very early, w/o it causing an interrupt, just so that COUNT register increments.
__start_tsc could be initialized to zero early (but after bss zeroed if this is in bss).
Or perhaps just let the bss zeroing zero it.

Then later, when the timer0 is to be activated for interrupts, to the necessary math to keep the COUNT up to that point as part of the TIME being maintained by the sys_clock.c implementation.
In this way, 64-bit time, as returned by _tsc_read(), can be functional from very early init.

(Imported from Jira ZEP-1747)

@zephyrbot
Copy link
Collaborator Author

by Mark Linkmeyer:

Ruud Derwig , can you please assess this bug and set an appropriate priority? Thx.

@zephyrbot
Copy link
Collaborator Author

by Chuck Jordan:

priority is low

@zephyrbot zephyrbot added priority: low Low impact/importance bug area: Testing bug The issue is a bug, or the PR is fixing a bug labels Sep 23, 2017
@galak galak added the area: ARC ARC Architecture label Nov 7, 2018
@galak
Copy link
Collaborator

galak commented Dec 6, 2018

@ruuddw @vonhust can you see if this is still an issue.

@ruuddw
Copy link
Member

ruuddw commented Dec 11, 2018

Yes, this is still an issue. Though slightly different than the initial issue. k_cycle_get_32() is used for reading timestamps, and on ARC (also ARM, maybe other arches as well) this counter is (re)set to 0 when the sys clock driver is initialized -> boot time numbers reported are slightly optimistic.

@vonhust
Copy link

vonhust commented Dec 12, 2018

I will make an investigation and try to fix it

@galak
Copy link
Collaborator

galak commented Mar 18, 2019

@vonhust any updates on this?

@vonhust
Copy link

vonhust commented Mar 19, 2019

@ruuddw ? Yes, some time is lost between the reset and the inti of systick , do we need very accurate number on this ? IF not, i suggest to close this issue.

@vonhust
Copy link

vonhust commented Mar 19, 2019

@galak #14664 will fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARC ARC Architecture bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants