path: root/utils/hwstub/stub
AgeCommit message (Collapse)AuthorFilesLines
2016-04-08hwstub: rewrite and expand libraryAmaury Pouly2-3/+3
Rewrite the hwstub library in C++, with a clean and modular design. The library was designed from the ground up to be aware of multithreading issues and to handle memory allocation nicely with shared pointers. Compared to the original library, it brings the following major features: - support for JZ boot devices, it is very easy to add support for others - support for network transparent operations (through sockets): both tcp and unix domains are support Change-Id: I75899cb9c7aa938c17ede2bb3f468e7a55d625b4
2016-03-14hwstub: fix warning: no newline at end of file with newer gccMarcin Bukat2-2/+4
Change-Id: Icb4233fb9b2b0d5b6f8c4a35dff300f38c8d3025
2016-03-14hwstub: rework usb driver for atj213xMarcin Bukat1-104/+142
Change-Id: I7b175103e567ae4375ff94e74ed1a06215f640c3
2015-09-29hwstub: make it possible to override toolchainAmaury Pouly4-16/+20
Default toolchain can be overriden using PREFIX, for example: PREFIX=arm-none-eabi- make Change-Id: I06f5ad0ad492b9f648ccba853a851918644f0500
2015-01-13hwstub: implement read/write data abort recoveryAmaury Pouly11-39/+304
Change-Id: I1625873b6864584c40984723d82548ad242ee08e
2014-11-28hwstub/atj213x: add clock setup to crt0.SMarcin Bukat1-1/+29
Change-Id: I3b6e1b8ee1fa76396f7abe7df69af26e9599cfe9 Reviewed-on: Reviewed-by: Marcin Bukat <> Tested: Marcin Bukat <>
2014-11-18hwstub/qeditor: add support for atomic read/writesMarcin Bukat6-3/+200
The current code assumed that READ/WRITE would produce atomic read/writes for 8/16/32-bit words, which in turned put assumption on the memcpy function. Since some memcpy implementation do not always guarantee such strong assumption, introduce two new operation READ/WRITE_ATOMIC which provide the necessary tools to do correct read and write to register in a single memory access. Change-Id: I37451bd5057bb0dcaf5a800d8aef8791c792a090
2014-11-05hwstub: Add atj213x supportbootloader_zenxfi3_v1Marcin Bukat13-7/+4658
Change-Id: Ic32200f9ab2c6977e503307a9cbe43a1328d0341
2014-09-11hwstub: small fixup in rk27xx usb driverMarcin Bukat1-1/+1
Change-Id: Ibf3b91af11041834ce650f663b213bac0113f721
2014-09-08hwstub: implement jump/call in stubAmaury Pouly1-6/+25
Change-Id: I876fa012c5ae1509e57f5816a8ed31dc69d62ca0
2014-09-07hwstub: fix missing \nAmaury Pouly1-3/+3
Change-Id: I077a38d8a8905b7ad686d0d00b2a8a48bd206ade
2014-09-07hwstub: fix horrible bugAmaury Pouly1-2/+1
Change-Id: I8042f692045a23dbb545d840e5169ce4b99fe5d2
2014-09-07hwstub: don't put revision in the protocol, it's specific to the implementationAmaury Pouly1-0/+2
Change-Id: I1311a22da41fe977f1613f1e313a864baa03027c
2014-09-07hwstub: remove protocol to make it use its own interfaceAmaury Pouly1-65/+154
This way, hwstub can be implemented along with other usb features/interfaces. Change-Id: I7148cab845049cc0a8b8e740fa0d52d3a385eaed
2014-06-15Add RKW build target in rk27xx hwstubMarcin Bukat1-0/+3
Change-Id: I5ad44916bc1ac5e8a9384db2369f07b137a1a715
2014-06-15hwstub: fix usb driver for rk27xxMarcin Bukat1-28/+50
Change-Id: I299e76837715c320987177eaea8459f8f199cb96
2014-04-12hwstub: add proper PP supportAmaury Pouly4-19/+85
- drop support for PP500x: it's very different from other PP and although it would be possible to support them, I don't have one to test the code - make sure only the CPU is started - add PP descriptor to report chip ID and revision - add code in shell and lua to support pp (no register description yet) - compile for ARMv4 because PP502x is an ARM7TDMI Change-Id: I36c4e465dfc2cfdfe7433b2f65cc8f6f0720fe62
2014-04-12hwstub: fix error in config descriptor, cleanup some codeAmaury Pouly3-6/+1
Change-Id: I853340ed2c187a044726ca03ec52aed655707e27
2014-04-07Add hwstub support for portal player (manufacturer mode)Amaury Pouly6-0/+208
It is very similar to how e200tool from MrH works but uses the framework of hwstub which is makes it completely trivial since we already have the USB driver written. Change-Id: I61cdc245d3f828c2682bcd6ecfed5a1cc0094139
2014-02-10utils/hwstub: make stmp stub able to load in a MMU'ed environementAmaury Pouly1-6/+10
In might be useful to load hwstub in an environment with the MMU active, in which case care must be taken on the order in which things are done. Mostly, one should not disable the MMU before moving stuff around. The code assumes the linking address (0 currently) is identity mapped. Change-Id: I8d54ce9e8cadcde2e08990353ca7a46803731ca7
2014-02-10utils/hwstub: completely rework the protocol, drop unused featuresAmaury Pouly4-321/+124
The protocol has evolved a lot during the 2.x.y lifetime, bringing more features which later got unused. This commit removes all the unused stuff and simplifies everything: - drop the feature mask: everything is mandatory or stalled on error - remove the info request and put all static information in standard USB descriptors which are part of the configuration descriptor (and can be retrieved using the standard GetDescriptor request). - remove the USB interface, we had only one anyway - remove all endpoint descriptors - remove the exit/atexit stuff, it never worked as intended anyway - update the hwstub library and make it able to handle any device - update the tools (mostly renaming and removing of code) Change-Id: I1872bba7f4177fc3891180e8f944aab88f5bde31
2013-12-13hwstub/stmp: disable watchdogAmaury Pouly1-0/+11
Some targets like Sony NWZ use a watchdog, so we must disable it to prevent spurious reboot when we take over Change-Id: I138a8d7f9a1b089acb2d08d7f6c4a58e8b088b3a
2013-12-13hwstub/stmp: cleanupAmaury Pouly1-4/+1
Conditional no longer needed since ctr0.S is private to target, also setup stack just before jumping to C code only Change-Id: I74116239be9e87bbe53e8fa814c45f04f242f1c1
2013-12-06hwstub: Prepare for multi arch supportMarcin Bukat4-3/+5
Change-Id: Id38411ff95660e60ee23f99350b275b92b3e4578 Reviewed-on: Reviewed-by: Amaury Pouly <>
2013-12-06hwstub: forgot the db command file for stmpAmaury Pouly1-0/+15
Change-Id: I08ca6be221d3633c5b6e5e4b023afca33713e428
2013-11-24hwstub rk27xx portMarcin Bukat12-5/+1929
Change-Id: I85ac57117911544b65ccd56eb16303e30be67cab
2013-11-18hwstub: use a more reasonable hclk frequencyAmaury Pouly1-1/+1
The old code would set CPU to 64MHz and HCLK to 9MHz but that's too low for many things like usb and gpmi. So change HCLK to ~32MHZ. Change-Id: I6459f25900e42603333cebccb7b0ed26c59640ad
2013-10-26hwstub: fix stmp3600Amaury Pouly1-3/+7
The microseconds register has a different address Change-Id: I29d2e7feea9eb34b0d539ee217babd092542b612
2013-10-26hwstub: produce sb1 image too (for STMP3600)Amaury Pouly1-4/+11
Change-Id: Ib7f38fba1e524ed7438cdc395441d801c5eabcaa
2013-10-22hwstub: don't touch mmu registers on non-STMP targets, they might not existAmaury Pouly1-0/+2
Change-Id: Ib18475fd90e0d29ab6d7214116f7a0041584d621
2013-10-09imxtools/sbtools: always probe report size for HID recovery modeAmaury Pouly1-1/+1
Some older versions of the ROM (TA3 for example), use a 64 byte report size instead of 1024, so hardcoding 1024 is just a bad idea. Change-Id: I720c4465cfe2f519bffa307175614bba58766dce
2013-09-10hwstub: add delay functions, and plain binary/sb file generationAmaury Pouly5-4/+37
Change-Id: Idbedb9277b355edcd93975ec5a268428c7b89633
2013-08-11hwstub: fix power off and reboot code on stmpAmaury Pouly1-3/+3
Change-Id: Ia717c5e6f78a2cecc6a0628e4c667ea39f32c44c
2013-08-11hwstub: allow the stub to relocate itselfAmaury Pouly3-1/+25
Change-Id: Iab60c6ec0e8eda19c76c84241f8367d53cb4f87b
2013-07-16hwstub: forgot fileAmaury Pouly1-0/+514
Change-Id: Ib79f4ef89c734d7ba2fcbf648aadc346576e1c17
2013-07-16hwstub: enhance exit protocol and implement on stmpAmaury Pouly2-2/+71
Rename STOP command to EXIT, introduce ATEXIT, this gives better control over the exit of the stub. Add stmp implementation. Change-Id: I45442c8b88b9330d12ef439417ca5ffa1520477a
2013-07-13hwstub: enhance protocol with more functionsAmaury Pouly1-0/+5
Change-Id: I7944249c2f7ea3e180e7b79ee8ae402d1d0742d3
2013-07-13hwstub: split target specific code from the common partAmaury Pouly26-0/+2416
Completely rewrite the Mafile, properly put the usb driver in its own file and the target specific files in a subdirectory. Change-Id: Iaeee0128e021d5dad76b4d6035a63e33e2d946c1