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

WIP: Bluetooth tracing #192

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ArcaneNibble
Copy link
Contributor

@ArcaneNibble ArcaneNibble commented Apr 10, 2022

TL;DR this can successfully capture Bluetooth HCI commands being transported across the (seemingly) Apple-custom PCIe pipe interface

Known issues:

  • BAR locations and DART stream ID are hardcoded

@marcan
Copy link
Member

marcan commented Apr 16, 2022

Heh, looks like you ran into some of the same missing instructions @asahilina ran into... can you rebase the HV stuff and see if any of your changes are still needed there? (FWIW for them to be correct you'd have had to expand the Python side too, but that's done now).

@ArcaneNibble
Copy link
Contributor Author

rebased, no HV changes seem to be required anymore

@@ -712,7 +712,8 @@ def reboot(self):
def write64(self, addr, data):
'''write 8 byte value to given address'''
if addr & 7:
raise AlignmentError()
self.write32(addr, data & 0xFFFFFFFF)
self.write32(addr + 4, data >> 32)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What codepath is this used in? I'd prefer to keep the alignment fault '(at least by default) since this is usually a mistake when accessing registers, though I know Apple loves using unaligned 64-bit fields in some protocols. Can we make it a separate wrapper in ProxyUtils, a subclass, or something like that?

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

Successfully merging this pull request may close these issues.

2 participants