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

HPET: 64-bit main counter #224

Open
wkozaczuk opened this issue Jul 8, 2018 · 4 comments
Open

HPET: 64-bit main counter #224

wkozaczuk opened this issue Jul 8, 2018 · 4 comments

Comments

@wkozaczuk
Copy link

@wkozaczuk wkozaczuk commented Jul 8, 2018

What would it take to implement 64-bit main counter -

cap &= ~((uint64_t) HPET_CAP_COUNT_SIZE); /* 32-bit timer */
?

@wkozaczuk
Copy link
Author

@wkozaczuk wkozaczuk commented Mar 2, 2019

Could anyone please weigh in on it? Would you be interested in a pull request to enhance hpet clock functionality in hyperkit to support 64-bit counters?

@ijc
Copy link
Collaborator

@ijc ijc commented Mar 4, 2019

I general PRs are always welcome, yes.

Why do you need a 64 -bit HPET though, are you seeing an issue?

@wkozaczuk
Copy link
Author

@wkozaczuk wkozaczuk commented Mar 5, 2019

While trying to make OSv unikernel to boot on hyperkit I discovered that the assert https://github.com/cloudius-systems/osv/blob/master/drivers/hpet.cc#L55 to verify the counter is 64-bit breaks. I actually disabled the assert which made OSv boot and run but eventually fail in another place after roughly 8 minutes. I am not really familiar with HPET but I am guessing disabling the assert is not the right way to fix it on OSv side.
So I was wondering if it might be easier to support 64-bit counter on hyperkit side same way as QEMU supports. Looking at Linux implementation - https://github.com/torvalds/linux/blob/master/arch/x86/kernel/hpet.c - it seems that properly supporting HPET in both 32 and 64 bit mode might be pretty tricky judging the lines of code (1300) and some comments in there https://github.com/torvalds/linux/blob/master/arch/x86/kernel/hpet.c#L362-L384.

@rn
Copy link
Member

@rn rn commented Mar 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.