Android FIQ debugger for ARM
Figure out how (or if its appropriate) to upstream the FIQ debugger from Android. If its not appropriate, how can equivalent functionality be provided (possibly in a cross architecture way?)
Anton said he would start looking at this to get a sense of what's all required.
Blueprint information
- Status:
- Started
- Approver:
- John Stultz
- Priority:
- Medium
- Drafter:
- None
- Direction:
- Approved
- Assignee:
- Anton Vorontsov
- Definition:
- Approved
- Series goal:
- Accepted for kernel-merge-window
- Implementation:
- Needs Code Review
- Milestone target:
- 3.11
- Started by
- John Stultz
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Meta:
Headline: FIQ debugger for Android kernel patches upstreamed
Roadmap id: TODO after LCE13
Acceptance: code merged to Rusell's tree
Notes from Anton:
There are four parts: FIQ handling,
serial port handling, KGDB support and "debug shell" implementation.
The latter is mostly what adds LOC count, and this is definitely what
should be merged with KDB support, since we really don't want have
multiple debug shells implementations in the kernel (there are three
already: PowerPC-specific xmon (predates KDB), generic KDB and now
ARM-specific FIQ debugger shell. So, the work involves refactoring
the FIQ debugger so that it would play nicely with KDB (and adjusting
KDB when needed, i.e. preserving all the FIQ debugger's features).
[jakub-pavelek 2012-09-27] Please write correctly formatted whiteboard with headers now that the implementatio is so much progressed and we are close to delivering it. IIRC there is no Card tracking this - that is okay. I want to see acceptance criteria for the upstreaming effort - to which git tree, or by which maintainer it needs to be accepted, are there some tests (at least boot test) that need to pass, etc. When done ping Deepak/me for review and approval yet do not make this stop you working on it.
[jakub-pavelek 2012-11-09] Of well, no one listens ;)
[jakub-pavelek 2013-02-26] Moving from 3.9 to 3.10. If it loooks good also after LCA13 we will make a card.
[jakub-pavelek 2013-03-25] It will not be all done by 3.10, moving to 3.11
[jakub-pavelek 2013-05-07] Moving all work items from 13.04 to 13.05
Work Items
Work items for 12.06:
Deep dive into the current KDB and FIQ debugger code, compare features and elaborate plan to migrate from arch-specific solution to a generic one: DONE
Port FIQ debugger onto the latest mainstream kernels: DONE
Get KDB running on ARM Versatile-PB board (I we'll use it as a test board [QEMU has some preliminary code for FIQs]. And for Linux, ready to use FIQ support exist for Tegra boards, which I obviously don't have): DONE
As an interim step, get QEMU/Versatile UART work via FIQ interrupts (this involves both QEMU/PL190 and Linux play nicely with FIQs): DONE
Make KDB work via FIQ debugger, but w/ the help of a signal/soft interrupt (KGDB/KDB is executed in IRQ context, not FIQ): DONE
Make KDB work via FIQ debugger directly (KDB execution in FIQ context; the feature is missing): DONE
Work items for 12.07:
Clean up FIQ debugger front-end (mostly code deletion and refactoring): DONE
Clean up FIQ debugger back-end (fiq_glue.S, convert some unnecessary asm code to C code): DONE
Submit FIQ debugger code to LKML: DONE
Discuss the code and address community comments: DONE
Implement 'knocking' to enter the debugger (it's a "lightweight" version of an async shell, but w/ just one standard "escape to KDB" command): DONE
Submit the second iteration of the FIQ debugger patches: DONE
Discuss the code and address community comments for the second iteration: DONE
Implement "kiosk" mode in KDB (i.e. KDB with some commands disabled): DONE
Work items for 12.08:
Fix fiq-entry's return path (per Russell King's comments): DONE
Get rid of FIQ_START constant -- it does not directly related to the debugger, the constant is required by the generic FIQ code, on which board-support code depends. So this would be mostly generic FIQ subsystem changes: DONE
Add 'console' command (per Colin Cross' comments): DONE
Submit the next iteration of FIQ debugger patches: DONE
Work items for 12.09:
Get core KGDB/KDB/FIQ patches accepted into -next: DONE
Work items for 12.10:
Anton resubmitted KDB Kiosk and KDB/FIQ arm support patches to the list, but no response: DONE
Work items for 13.01:
Anton resubmitted KDB Kiosk and KDB/FIQ arm support patches to the list, but no response: DONE
John pinged Jason, and Jason said he plans to merge KDB changes in Feb: DONE
Work items for 13.02:
John re-pinged Jason, as no KDB pull requests have yet been made for 3.9: DONE
Work items for 13.05:
Updated Anton's KDB/FIQ ARM patches to Linus' HEAD (May 9): DONE
Updated Anton's KDB Kiosk patches to Linus' HEAD (May 9): DONE
Sent mail to Jason about any blockers to queueing KDB Kiosk mode (May 9): DONE
Resend KDB/FIQ ARM patches to lkml (May 9): DONE
Work items for 13.06:
Pinged Jason again (June 4): DONE
Resend KDB Kiosk mode patches to Jaons/lkml: TODO
Get KDB Kiosk mode support patches accepted into -next: TODO
Work items for backlog:
DeviceTree support for the FIQ/KDB (will need some ARM FIQ subsystem rework): TODO
Get FIQ core cleanup patches accepted (optional, patches were resent but no response): TODO
Get KDB/FIQ ARM support patches accepted into -next: TODO
Implement knock-once functionality, i.e. after entering the debugger via the magic sequence, any further input would interrupt execution (might improve user experience for long debugging sessions, as magic seq will have to be entered just once): TODO
Dependency tree
* Blueprints in grey have been implemented.