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

Same I2C bus is shared between HYM8563 and FUSB302 on some platforms #70

Open
mariobalanica opened this issue Jul 30, 2023 · 0 comments
Labels
type/issue General issue (not a bug)

Comments

@mariobalanica
Copy link
Collaborator

mariobalanica commented Jul 30, 2023

This is going to be a problem when that I2C peripheral will be exposed to the OS in order to enable proper USB-C functionality.

The RTC hardware is accessed at runtime (GetTime/SetTime services) through the UEFI drivers, meaning nothing else (i.e. the OS drivers) shall touch I2C or there may be a race condition, besides the peripheral being configured differently.

It would pretty much require moving I2C functionality on that bus to EL3, which would then get invoked by both UEFI and OS I2C drivers through SMC, avoiding raw MMIO access and maintaining synchronization. This may affect performance however.

..or, maybe have some shared runtime memory that can be used to track locking state between drivers?

@mariobalanica mariobalanica added the type/issue General issue (not a bug) label Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/issue General issue (not a bug)
Projects
None yet
Development

No branches or pull requests

1 participant