-
Notifications
You must be signed in to change notification settings - Fork 13
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
usb: Adapt USB stack to work on ia32 #525
base: master
Are you sure you want to change the base?
Conversation
4f82b76
to
cc07580
Compare
cc07580
to
31602b7
Compare
31602b7
to
6f3a818
Compare
JIRA: RTOS-937
JIRA: RTOS-937
6f3a818
to
d597901
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General remark - might be nice to separate platform dependent parts in a per arch files (ehci-ia32-generic.c etc?)
#ifdef EHCI_IMX | ||
asm volatile("dmb" ::: "memory"); | ||
#else | ||
__sync_synchronize(); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://godbolt.org/z/1q4s7Gsbe
#ifdef EHCI_IMX | |
asm volatile("dmb" ::: "memory"); | |
#else | |
__sync_synchronize(); | |
#endif | |
__sync_synchronize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GCC won't reduce __sync_synchronize()
to dmb
prior to 9.3.1, see e.g. 9.2.1 https://godbolt.org/z/orPnWevvn
I agree and intend on doing it once I get the EHCI to work on the hardware, since for now it's uncertain which parts of the driver will end up being common. The proposed changes work on QEMU, but as it turned out during my recent tests on hardware (which weren't possible before, because I had to find the controllers' IRQs via ACPI interpretation first), EHCI emulation in QEMU was extremely permissive. I am therefore moving this PR back to draft until I fix the hardware |
JIRA: RTOS-937
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment
Adapt USB stack to work on ia32 phoenix-rtos-usb#34
hal/ia32: Add platformctls for ehci phoenix-rtos-kernel#625